Make Tags and TimeLog optional features that can be switched on/off in Settings (enabled by default)
All checks were successful
CI / test (push) Successful in 4m31s
Lint / test (push) Successful in 1m2s
Trivy / test (push) Successful in 23s

This commit is contained in:
Miguel Jacq 2025-11-21 08:50:06 +11:00
parent f9ee150a23
commit 3e91f158c3
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
8 changed files with 49 additions and 18 deletions

View file

@ -41,6 +41,8 @@ def load_db_config() -> DBConfig:
idle = s.value("ui/idle_minutes", 15, type=int)
theme = s.value("ui/theme", "system", type=str)
move_todos = s.value("ui/move_todos", False, type=bool)
tags = s.value("ui/tags", True, type=bool)
time_log = s.value("ui/time_log", True, type=bool)
locale = s.value("ui/locale", "en", type=str)
return DBConfig(
path=path,
@ -48,6 +50,8 @@ def load_db_config() -> DBConfig:
idle_minutes=idle,
theme=theme,
move_todos=move_todos,
tags=tags,
time_log=time_log,
locale=locale,
)
@ -59,4 +63,6 @@ def save_db_config(cfg: DBConfig) -> None:
s.setValue("ui/idle_minutes", str(cfg.idle_minutes))
s.setValue("ui/theme", str(cfg.theme))
s.setValue("ui/move_todos", str(cfg.move_todos))
s.setValue("ui/tags", str(cfg.tags))
s.setValue("ui/time_log", str(cfg.time_log))
s.setValue("ui/locale", str(cfg.locale))