💫 Hide loader, if still visible

This commit is contained in:
Alicia Sykes 2021-09-19 22:23:26 +01:00
parent b00c9ad902
commit b532e168fe

View File

@ -53,8 +53,7 @@ export default {
}, },
/* Determine if splash screen should be shown */ /* Determine if splash screen should be shown */
shouldShowSplash() { shouldShowSplash() {
return (this.visibleComponents || defaultVisibleComponents).splashScreen return (this.visibleComponents || defaultVisibleComponents).splashScreen;
|| !localStorage[localStorageKeys.HIDE_WELCOME_BANNER];
}, },
}, },
methods: { methods: {
@ -107,6 +106,10 @@ export default {
this.$i18n.locale = language; this.$i18n.locale = language;
document.getElementsByTagName('html')[0].setAttribute('lang', language); document.getElementsByTagName('html')[0].setAttribute('lang', language);
}, },
hideLoader() {
const loader = document.getElementById('loader');
if (loader) loader.style.display = 'none';
},
}, },
/* When component mounted, hide splash and initiate the injection of custom styles */ /* When component mounted, hide splash and initiate the injection of custom styles */
mounted() { mounted() {
@ -115,6 +118,7 @@ export default {
if (this.appConfig.customCss) { if (this.appConfig.customCss) {
const cleanedCss = this.appConfig.customCss.replace(/<\/?[^>]+(>|$)/g, ''); const cleanedCss = this.appConfig.customCss.replace(/<\/?[^>]+(>|$)/g, '');
this.injectCustomStyles(cleanedCss); this.injectCustomStyles(cleanedCss);
this.hideLoader();
} }
welcomeMsg(); welcomeMsg();
}, },