Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Improved Loading #238

Merged
merged 8 commits into from
Sep 19, 2021
Prev Previous commit
Next Next commit
💫 Hide loader, if still visible
  • Loading branch information
Lissy93 committed Sep 19, 2021
commit b532e168fe2da0fb6b96f8d2601ed3e9e8641ec5
8 changes: 6 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export default {
},
/* Determine if splash screen should be shown */
shouldShowSplash() {
return (this.visibleComponents || defaultVisibleComponents).splashScreen
|| !localStorage[localStorageKeys.HIDE_WELCOME_BANNER];
return (this.visibleComponents || defaultVisibleComponents).splashScreen;
},
},
methods: {
Expand Down Expand Up @@ -107,6 +106,10 @@ export default {
this.$i18n.locale = 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 */
mounted() {
Expand All @@ -115,6 +118,7 @@ export default {
if (this.appConfig.customCss) {
const cleanedCss = this.appConfig.customCss.replace(/<\/?[^>]+(>|$)/g, '');
this.injectCustomStyles(cleanedCss);
this.hideLoader();
}
welcomeMsg();
},
Expand Down