Add theme toggle and update MineGeo branding
This commit is contained in:
@@ -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
5
shared/theme.ts
Normal 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){}})()`;
|
||||
Reference in New Issue
Block a user