commit: 6c5fc53789538e393703ac1251d6cecdc9bb64bb
parent 5bbfa5ab255bd1f61582d49a2c884cbe2df906fd
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 16 Sep 2024 03:36:17 +0300
fix production
Diffstat:
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/App.js b/src/App.js
@@ -46,11 +46,7 @@ export default {
}),
watch: {
themeApplied (value) {
- this.$nextTick(() => {
- document.querySelector('#app').classList.remove('hidden')
- document.querySelector('#splash').classList.add('hidden')
- document.querySelector('#status').textContent = this.$t('splash.fun_' + Math.ceil(Math.random() * 4))
- })
+ this.removeSplash()
}
},
created () {
@@ -59,6 +55,11 @@ export default {
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
window.addEventListener('resize', this.updateMobileState)
},
+ mounted () {
+ if (this.$store.state.interface.themeApplied) {
+ this.removeSplash()
+ }
+ },
unmounted () {
window.removeEventListener('resize', this.updateMobileState)
},
@@ -142,6 +143,11 @@ export default {
updateMobileState () {
this.$store.dispatch('setLayoutWidth', windowWidth())
this.$store.dispatch('setLayoutHeight', windowHeight())
+ },
+ removeSplash () {
+ document.querySelector('#status').textContent = this.$t('splash.fun_' + Math.ceil(Math.random() * 4))
+ document.querySelector('#splash').classList.add('hidden')
+ document.querySelector('#app').classList.remove('hidden')
}
}
}