fix: theme mode base on device condition

This commit is contained in:
puriphatt 2024-07-01 06:55:49 +00:00
parent 613a5759a9
commit 3f3eee3113

View file

@ -102,7 +102,7 @@ function changeMode(mode: string) {
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', () => {
changeMode('baseOnDevice');
if (themeMode.value[2].isActive) changeMode('baseOnDevice');
});
onMounted(async () => {