Fix Auto Theme
This commit is contained in:
@@ -20,9 +20,9 @@ function toggleDrawer() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
theme.change(
|
theme.change(
|
||||||
localStorage.getItem('theme') || window.matchMedia('(prefers-color-scheme: dark)').matches
|
localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||||
? 'dark'
|
? 'dark'
|
||||||
: 'light',
|
: 'light')
|
||||||
);
|
);
|
||||||
showDrawer.value = localStorage.getItem('drawer')?.startsWith('Y') || false;
|
showDrawer.value = localStorage.getItem('drawer')?.startsWith('Y') || false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user