/** * Executive Cockpit Application Controller V5.3 * Pure SQLite integration, real token auth, dynamic kanban mutations. */ import { Api } from './api.js?v=5.3.0'; import { Components } from './components.js?v=5.3.0'; class AppController { constructor() { this.user = null; this.state = null; this.activeTab = 'command'; this.init(); } async init() { const token = Api.getToken(); const role = sessionStorage.getItem('exec_role'); const name = sessionStorage.getItem('exec_name'); if (token && role && name) { this.user = { role, name, token }; this.renderApp(); await this.refreshState(); this.initSse(); } else { this.renderLogin(); } } renderLogin() { const root = document.getElementById('app'); root.innerHTML = `
احراز هویت توکنمحور با اعتبارسنجی سمت سرور