wip
This commit is contained in:
parent
f6e4a1770e
commit
2b07b3a873
7 changed files with 103 additions and 70 deletions
|
|
@ -20,6 +20,16 @@
|
|||
|
||||
const langs = LANGS;
|
||||
|
||||
//#region Apply theme
|
||||
const theme = localStorage.getItem('theme');
|
||||
if (theme) {
|
||||
Object.entries(JSON.parse(theme)).forEach(([k, v]) => {
|
||||
if (k == 'meta') return;
|
||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Load settings
|
||||
let settings = null;
|
||||
const vuex = localStorage.getItem('vuex');
|
||||
|
|
@ -84,13 +94,6 @@
|
|||
app = isMobile ? 'mobile' : 'desktop';
|
||||
}
|
||||
|
||||
// Dark/Light
|
||||
if (settings) {
|
||||
if (settings.device.darkmode) {
|
||||
document.documentElement.setAttribute('data-darkmode', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
// Script version
|
||||
const ver = localStorage.getItem('v') || VERSION;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue