only show interface after theme has been applied
This commit is contained in:
parent
e8159164e3
commit
9806eea12e
|
@ -2,6 +2,7 @@
|
|||
<div
|
||||
id="app-loaded"
|
||||
:style="bgStyle"
|
||||
v-show="$store.state.interface.themeApplied"
|
||||
>
|
||||
<div
|
||||
id="app_bg_wrapper"
|
||||
|
|
|
@ -363,6 +363,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
} else {
|
||||
applyTheme(customTheme)
|
||||
}
|
||||
store.commit('setThemeApplied')
|
||||
} else if (theme) {
|
||||
// do nothing, it will load asynchronously
|
||||
} else {
|
||||
|
|
|
@ -386,6 +386,7 @@ const instance = {
|
|||
} else {
|
||||
applyTheme(themeData.theme)
|
||||
}
|
||||
commit('setThemeApplied')
|
||||
})
|
||||
},
|
||||
fetchEmoji ({ dispatch, state }) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const defaultState = {
|
||||
themeApplied: false,
|
||||
settingsModalState: 'hidden',
|
||||
settingsModalLoadedUser: false,
|
||||
settingsModalLoadedAdmin: false,
|
||||
|
@ -35,6 +36,9 @@ const interfaceMod = {
|
|||
state.settings.currentSaveStateNotice = { error: true, errorData: error }
|
||||
}
|
||||
},
|
||||
setThemeApplied (state) {
|
||||
state.themeApplied = true
|
||||
},
|
||||
setNotificationPermission (state, permission) {
|
||||
state.notificationPermission = permission
|
||||
},
|
||||
|
|
|
@ -88,9 +88,6 @@ export const generateTheme = async (input, callbacks) => {
|
|||
}
|
||||
|
||||
export const applyTheme = async (input) => {
|
||||
const body = document.body
|
||||
body.classList.add('hidden')
|
||||
|
||||
const styleSheet = new CSSStyleSheet()
|
||||
document.adoptedStyleSheets = [styleSheet]
|
||||
|
||||
|
@ -103,8 +100,6 @@ export const applyTheme = async (input) => {
|
|||
}
|
||||
)
|
||||
|
||||
body.classList.remove('hidden')
|
||||
|
||||
setTimeout(lazyProcessFunc, 0)
|
||||
|
||||
return Promise.resolve()
|
||||
|
|
Loading…
Reference in New Issue