Add theme toggle and update MineGeo branding

This commit is contained in:
2026-10-08 20:37:50 +05:00
parent 0b08672f4a
commit bf01d9801d
11 changed files with 574 additions and 5 deletions

View File

@@ -786,5 +786,7 @@
"Submit this report before sending messages": "Отправьте обращение перед отправкой сообщений",
"Invalid support message": "Недопустимое сообщение поддержке",
"Sign in to link this report": "Войдите, чтобы привязать обращение",
"Remove hidden control characters": "Удалите скрытые управляющие символы"
"Remove hidden control characters": "Удалите скрытые управляющие символы",
"Turn on light mode": "Включить светлую тему",
"Turn on dark mode": "Включить тёмную тему"
}

5
shared/theme.ts Normal file
View File

@@ -0,0 +1,5 @@
export type Theme = "dark" | "light";
export const themeStorageKey = "minegeo-theme-v1";
// Apply the saved choice before paint; storage can be disabled in private browsers.
export const themeInitScript = `(function(){try{var t=localStorage.getItem("${themeStorageKey}");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}})()`;