diff options
| author | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-04-02 16:52:06 +0100 |
|---|---|---|
| committer | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-04-02 16:52:06 +0100 |
| commit | bd7341e00a1153ea99e4b1d6ce9761b855fee744 (patch) | |
| tree | 9c6899160ed5948f651c2570a45a3b9289311172 /api/static/js/main.js | |
| parent | 75696e2faea1d095a890d297d9ba74968be5afe6 (diff) | |
| parent | f19aa5de3e3f1c3c0b9ce90913588b9e956d4156 (diff) | |
Merge branch 'feature/web-gui'
Diffstat (limited to 'api/static/js/main.js')
| -rw-r--r-- | api/static/js/main.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/api/static/js/main.js b/api/static/js/main.js new file mode 100644 index 0000000..2995943 --- /dev/null +++ b/api/static/js/main.js @@ -0,0 +1,31 @@ +import { ui } from './ui.js'; +import { results } from './components/results.js'; + +async function init() { + console.log('Initializing AI Reasoning Dashboard...'); + + // Global utility for filters + window.toggleFilter = (type, state) => { + document.querySelectorAll(`input[name="filter-${type}"]`).forEach(cb => cb.checked = state); + }; + + await results.init(); + + // Init UI behaviors + ui.initTabs((tabId) => { + // We could lazy load data here, but for now everything triggers on file/filter change + }); +} + +function start() { + init().catch(err => { + console.error("Initialization error:", err); + alert(`Dashboard Failed to Load: ${err.message}`); + }); +} + +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', start); +} else { + start(); +}
\ No newline at end of file |
