mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
21 lines
467 B
JavaScript
21 lines
467 B
JavaScript
class App {
|
|
constructor() {
|
|
// Initialize app components
|
|
this.auth = window.auth;
|
|
this.notes = window.notes;
|
|
this.admin = window.admin;
|
|
}
|
|
|
|
init() {
|
|
// Load initial data if authenticated
|
|
if (this.auth.token) {
|
|
this.notes.loadNotes();
|
|
if (this.auth.user.is_admin) {
|
|
this.admin.loadUsers();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Initialize main app
|
|
window.app = new App(); |