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