Initial import
Some checks failed
Build & Release / build-docker-image (push) Failing after 3m15s
Build & Release / deploy-to-production (push) Has been skipped

This commit is contained in:
2026-03-31 19:09:37 +02:00
commit da7e881311
24 changed files with 2990 additions and 0 deletions

40
app/enums.py Normal file
View File

@@ -0,0 +1,40 @@
from enum import IntEnum, Enum
class CounterType(IntEnum):
SIMPLE = 1
DAILY = 2
WEEKLY = 3
MONTHLY = 4
YEARLY = 5
def current_unit_text(self):
match self:
case CounterType.DAILY:
return 'today'
case CounterType.WEEKLY:
return 'this week'
case CounterType.MONTHLY:
return 'this month'
case CounterType.YEARLY:
return 'this year'
case _:
return 'times'
def previous_unit_text(self):
match self:
case CounterType.DAILY:
return 'yesterday'
case CounterType.WEEKLY:
return 'last week'
case CounterType.MONTHLY:
return 'last month'
case CounterType.YEARLY:
return 'last year'
case _:
return 'times'
class Tabs(Enum):
COUNTERS ="Counters"
STATISTICS = "Stats"