feat: dark/light mode + trading console BI + Chart.js local + fix themeScript

- Dark/light mode toggle across all pages (login, dashboard, corporate, admin, BI)
- BI Executive redesigned as permanent dark trading console (Bloomberg-style)
- Floating vertical nav with anchor scroll for mobile navigation
- Chart.js bundled locally (eliminates CDN dependency)
- Chart.js inlined in HTML for guaranteed loading
- Fix: themeScript </script> tag had literal backslash breaking HTML parser
- Fix: each chart wrapped in individual try/catch for graceful degradation
- No-cache headers on BI page to prevent stale HTML
- Robust init that handles DOMContentLoaded already fired

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-15 10:21:05 -05:00
parent ddf016a627
commit 95958e9a96
9 changed files with 547 additions and 47 deletions

View File

@@ -328,6 +328,8 @@ app.get('/admin/dashboard', requireRole('admin'), (req, res) => {
// --- Admin BI Dashboard (admin only) ---
app.get('/admin/bi', requireRole('admin'), (req, res) => {
try {
res.set('Cache-Control', 'no-store, no-cache, must-revalidate');
res.set('Pragma', 'no-cache');
const html = buildAdminBIHTML(req.session.user);
res.send(html);
} catch (err) {