From 12dcb2e8acdf82231ee0882592b29ae5a65b93b8 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 16 Sep 2024 03:22:48 +0300 Subject: [PATCH] this might be it --- src/App.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/App.js b/src/App.js index 730330d01..b5d9ad57c 100644 --- a/src/App.js +++ b/src/App.js @@ -46,13 +46,7 @@ export default { }), watch: { themeApplied (value) { - this.$nextTick(() => { - document.querySelector('#status').textContent = this.$t('splash.fun_' + Math.ceil(Math.random() * 4)) - /* eslint-disable no-debugger */ - debugger - document.querySelector('#splash').classList.add('hidden') - document.querySelector('#app').classList.remove('hidden') - }) + this.removeSplash() } }, created () { @@ -61,6 +55,11 @@ export default { this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val }) window.addEventListener('resize', this.updateMobileState) }, + mounted () { + if (themeApplied) { + this.removeSplash() + } + } unmounted () { window.removeEventListener('resize', this.updateMobileState) }, @@ -144,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') } } }