feat: theme local storage

This commit is contained in:
puriphatt 2024-06-26 06:45:28 +00:00
parent d91c735b2d
commit 8358f5fcfb
2 changed files with 5 additions and 0 deletions

View file

@ -149,6 +149,9 @@ onMounted(async () => {
setLocale('th');
}
const getCurTheme = localStorage.getItem('currentTheme');
if (getCurTheme === 'dark') $q.dark.toggle();
const resultOption = await fetch('/option/option.json');
rawOption.value = await resultOption.json();
if (locale.value === 'en-US') optionStore.globalOption = rawOption.value.eng;