Restructures project with feature-based organization
Refactors project structure to support modular, feature-driven development Introduces comprehensive language localization support Adds menu management with role-based access control Implements dynamic sidebar and theme switching capabilities Enhances project scalability and maintainability
This commit is contained in:
parent
fac7754d7a
commit
d7f3c55a2a
60 changed files with 3214 additions and 20 deletions
58
app/wwwroot/ts/app.ts
Normal file
58
app/wwwroot/ts/app.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/**
|
||||
* Salon OS App
|
||||
*
|
||||
* Main application class that orchestrates all UI controllers
|
||||
*/
|
||||
|
||||
import { SidebarController } from './modules/sidebar';
|
||||
import { DrawerController } from './modules/drawers';
|
||||
import { ThemeController } from './modules/theme';
|
||||
import { SearchController } from './modules/search';
|
||||
import { LockScreenController } from './modules/lockscreen';
|
||||
|
||||
/**
|
||||
* Main application class
|
||||
*/
|
||||
export class App {
|
||||
readonly sidebar: SidebarController;
|
||||
readonly drawers: DrawerController;
|
||||
readonly theme: ThemeController;
|
||||
readonly search: SearchController;
|
||||
readonly lockScreen: LockScreenController;
|
||||
|
||||
constructor() {
|
||||
// Initialize controllers
|
||||
this.sidebar = new SidebarController();
|
||||
this.drawers = new DrawerController();
|
||||
this.theme = new ThemeController();
|
||||
this.search = new SearchController();
|
||||
this.lockScreen = new LockScreenController(this.drawers);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Global app instance
|
||||
*/
|
||||
let app: App;
|
||||
|
||||
/**
|
||||
* Initialize the application
|
||||
*/
|
||||
function init(): void {
|
||||
app = new App();
|
||||
|
||||
// Expose to window for debugging
|
||||
if (typeof window !== 'undefined') {
|
||||
(window as unknown as { app: App }).app = app;
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for DOM ready
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
|
||||
export { app };
|
||||
export default App;
|
||||
Loading…
Add table
Add a link
Reference in a new issue