feat: preparing for performance tweaking to page load sub 1s

This commit is contained in:
Ronald A. Richardson
2025-11-28 11:56:38 +08:00
parent cf2ced1512
commit ca3050905d
3 changed files with 9 additions and 6 deletions

View File

@@ -96,7 +96,10 @@ export default class ApplicationRoute extends Route {
* @memberof ApplicationRoute
*/
afterModel() {
if (!this.session.isAuthenticated) removeBootLoader();
if (!this.session.isAuthenticated) {
console.log('boot loader removed');
removeBootLoader();
}
}
/**

View File

@@ -39,6 +39,7 @@ export default class ConsoleRoute extends Route {
async afterModel(model, transition) {
this.hookService.execute('console:after-model', this.session, this.router, model, transition);
removeBootLoader();
console.log('boot loader removed');
}
/**

View File

@@ -13,6 +13,7 @@ module.exports = {
name: require('./package').name,
getGeneratedFileHeader() {
const year = (new Date()).getFullYear();
return `/**
* ███████╗██╗ ███████╗███████╗████████╗██████╗ █████╗ ███████╗███████╗
* ██╔════╝██║ ██╔════╝██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝
@@ -27,7 +28,7 @@ module.exports = {
* Any manual changes will be overwritten on the next build.
*
* @generated
* @copyright © 2024 Fleetbase Pte Ltd. All rights reserved.
* @copyright © ${year} Fleetbase Pte Ltd. All rights reserved.
* @license AGPL-3.0-or-later
*/
@@ -37,17 +38,15 @@ module.exports = {
included(app) {
this._super.included.apply(this, arguments);
console.log('\n' + '='.repeat(80));
console.log('\n' + '/'.repeat(70));
console.log('[Fleetbase] Extension Build System');
console.log('='.repeat(80));
console.log('/'.repeat(70));
// Generate files on startup
this.generateExtensionFiles();
// Watch for changes in development
this.watchExtensionFiles();
console.log('='.repeat(80) + '\n');
},
async generateExtensionFiles() {