Dark mode fix first page loading
This commit is contained in:
@@ -86,14 +86,19 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
watch(() => dark.value, (value: any, oldval: any) => {
|
||||
$q.dark.set(value)
|
||||
tools.setCookie('darkmode', value ? '-1' : '0')
|
||||
if (isfinishLoading.value) {
|
||||
$q.dark.set(value)
|
||||
tools.setCookie('darkmode', value ? '-1' : '0')
|
||||
}
|
||||
})
|
||||
|
||||
function uploadStart() {
|
||||
function setDarkMode() {
|
||||
dark.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
|
||||
$q.dark.set(dark.value)
|
||||
}
|
||||
|
||||
function uploadStart() {
|
||||
|
||||
BeforeMount()
|
||||
}
|
||||
@@ -389,6 +394,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function BeforeMount() {
|
||||
setDarkMode()
|
||||
|
||||
// Estrai la Lang dal Localstorage
|
||||
if (!globalStore.finishLoading)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user