mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 01:13:09 +02:00
fix typo: schema -> scheme
This commit is contained in:
parent
db623dda22
commit
0cb3c7481c
3 changed files with 7 additions and 7 deletions
|
@ -116,9 +116,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const colorSchema = localStorage.getItem('colorSchema');
|
const colorScheme = localStorage.getItem('colorScheme');
|
||||||
if (colorSchema) {
|
if (colorScheme) {
|
||||||
document.documentElement.style.setProperty('color-schema', colorSchema);
|
document.documentElement.style.setProperty('color-scheme', colorScheme);
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ type Keys =
|
||||||
'hashtags' |
|
'hashtags' |
|
||||||
'wallpaper' |
|
'wallpaper' |
|
||||||
'theme' |
|
'theme' |
|
||||||
'colorSchema' |
|
'colorScheme' |
|
||||||
'useSystemFont' |
|
'useSystemFont' |
|
||||||
'fontSize' |
|
'fontSize' |
|
||||||
'ui' |
|
'ui' |
|
||||||
|
|
|
@ -60,7 +60,7 @@ export function applyTheme(theme: Theme, persist = true) {
|
||||||
document.documentElement.classList.remove('_themeChanging_');
|
document.documentElement.classList.remove('_themeChanging_');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
const colorSchema = theme.base === 'dark' ? 'dark' : 'light';
|
const colorScheme = theme.base === 'dark' ? 'dark' : 'light';
|
||||||
|
|
||||||
// Deep copy
|
// Deep copy
|
||||||
const _theme = deepClone(theme);
|
const _theme = deepClone(theme);
|
||||||
|
@ -83,11 +83,11 @@ export function applyTheme(theme: Theme, persist = true) {
|
||||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
document.documentElement.style.setProperty('color-schema', colorSchema);
|
document.documentElement.style.setProperty('color-scheme', colorScheme);
|
||||||
|
|
||||||
if (persist) {
|
if (persist) {
|
||||||
miLocalStorage.setItem('theme', JSON.stringify(props));
|
miLocalStorage.setItem('theme', JSON.stringify(props));
|
||||||
miLocalStorage.setItem('colorSchema', colorSchema);
|
miLocalStorage.setItem('colorScheme', colorScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 色計算など再度行えるようにクライアント全体に通知
|
// 色計算など再度行えるようにクライアント全体に通知
|
||||||
|
|
Loading…
Reference in a new issue