enhance/ui (#28)

Fix #24

Reviewed-on: #28
This commit is contained in:
2023-06-07 00:59:45 +02:00
parent a149ab71bb
commit 693c596224
10 changed files with 158 additions and 99 deletions

View File

@@ -22,3 +22,29 @@ class Util:
time += str(seconds) + "s"
return time
@staticmethod
def format_time_to_seconds(time: str) -> int:
seconds = 0
hours = time.split("h")
if len(hours) > 1:
seconds += (60 * 60 * int(hours.pop(0)))
time = hours.pop(0)
minutes = time.split("m")
if len(minutes) > 1:
seconds += (60 * int(minutes.pop(0)))
time = minutes.pop(0)
seconds += int(time[0:-1]) if len(time) > 0 else 0
return seconds
@staticmethod
def get_default_button_color():
return "#3a7ebf", "#1f538d"
@staticmethod
def get_default_active_button_color():
return "gray29", "gray29"