[wip] darkmode
This commit is contained in:
parent
d4a2c6cef4
commit
f2fea7f3cd
11 changed files with 130 additions and 44 deletions
|
|
@ -62,6 +62,14 @@
|
|||
app = isMobile ? 'mobile' : 'desktop';
|
||||
}
|
||||
|
||||
// Dark/Light
|
||||
const me = JSON.parse(localStorage.getItem('me') || null);
|
||||
if (me && me.clientSettings) {
|
||||
if ((app == 'desktop' && me.clientSettings.dark) || (app == 'mobile' && me.clientSettings.darkMobile)) {
|
||||
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