mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-28 10:25:49 +00:00
Default to dark theme when unset
This commit is contained in:
parent
4521beab7c
commit
47e229e323
1 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,8 @@
|
|||
{{define "component/aThemeSwitch"}}
|
||||
<script>
|
||||
function createThemeSwitcher() {
|
||||
const isDarkTheme = localStorage.getItem('dark-mode') === 'true';
|
||||
const darkModePreference = localStorage.getItem('dark-mode');
|
||||
const isDarkTheme = darkModePreference === null ? true : darkModePreference === 'true';
|
||||
const isUltra = localStorage.getItem('isUltraDarkThemeEnabled') === 'true';
|
||||
if (isUltra) {
|
||||
document.documentElement.setAttribute('data-theme', 'ultra-dark');
|
||||
|
|
|
|||
Loading…
Reference in a new issue