feat: make settings typed and store "12" and "24" over "12-hour" and "24-hour" internally

This commit is contained in:
Twig 2025-07-12 22:39:26 +02:00
parent eb49450756
commit 195322f3b0
No known key found for this signature in database
5 changed files with 32 additions and 11 deletions

View file

@ -1,9 +1,9 @@
export default (): "12" | "24" => {
const format = settingLoad("timeFormat").timeFormat ?? "auto"
const format = settingsLoad().timeFormat?.format ?? "auto"
if (format == "12-hour") {
if (format == "12") {
return "12"
} else if (format == "24-hour") {
} else if (format == "24") {
return "24"
}