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:
@@ -2,7 +2,7 @@
|
||||
* Admin Home Dashboard - Fast daily overview
|
||||
* 3 flows: BRL→USD, USD→BRL, USD→USD (balance)
|
||||
*/
|
||||
const { buildHeader, buildFooter, buildHead } = require('./ui-template');
|
||||
const { buildHeader, buildFooter, buildHead, getChartJsScript } = require('./ui-template');
|
||||
|
||||
function buildAdminHomeHTML(stats, user) {
|
||||
const now = new Date().toLocaleString('pt-BR');
|
||||
@@ -26,7 +26,7 @@ function buildAdminHomeHTML(stats, user) {
|
||||
const totalOntem = stats.brlUsd.ontem.qtd + stats.usdBrl.ontem.qtd + stats.usdUsd.ontem.qtd;
|
||||
const totalVar = calcVar(totalHoje, totalOntem);
|
||||
|
||||
const pageScripts = `<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>`;
|
||||
const pageScripts = getChartJsScript();
|
||||
|
||||
const pageCSS = `
|
||||
/* Trading Terminal - Live Rates */
|
||||
|
||||
Reference in New Issue
Block a user