diff --git a/frontend/js/legacy.js b/frontend/js/legacy.js index 4760530..901d6f1 100644 --- a/frontend/js/legacy.js +++ b/frontend/js/legacy.js @@ -1,11 +1,10 @@ /* ObsiGate — Legacy module: remaining functions for the orchestrator -import { api } from './auth.js'; Extracted from the monolithic frontend/app.js IIFE. Functions already in other modules are re-exported. */ -// --- State imports --- +import { api } from './auth.js'; import { state } from './state.js'; -import { escapeHtml, safeCreateIcons } from './utils.js'; +import { escapeHtml, safeCreateIcons } from './utils.js'; // --- Search imports --- import { diff --git a/frontend/js/sidebar.js b/frontend/js/sidebar.js index b820cd1..30e749f 100644 --- a/frontend/js/sidebar.js +++ b/frontend/js/sidebar.js @@ -1,6 +1,8 @@ import { state } from './state.js'; -import { safeCreateIcons, getFileIcon } from './utils.js'; +import { safeCreateIcons, getFileIcon } from './utils.js'; import { api } from './auth.js'; +import { populateCustomDropdown } from './ui.js'; +import { el } from './viewer.js'; // --------------------------------------------------------------------------- // Vault context switching diff --git a/frontend/js/ui.js b/frontend/js/ui.js index da12ff1..1543635 100644 --- a/frontend/js/ui.js +++ b/frontend/js/ui.js @@ -277,7 +277,7 @@ export function initCustomDropdowns() { } // Helper to populate custom dropdown options -function populateCustomDropdown(dropdownId, optionsList, defaultValue) { +export function populateCustomDropdown(dropdownId, optionsList, defaultValue) { const dropdown = document.getElementById(dropdownId); if (!dropdown) return; diff --git a/frontend/js/viewer.js b/frontend/js/viewer.js index 322237f..24b7d3c 100644 --- a/frontend/js/viewer.js +++ b/frontend/js/viewer.js @@ -603,7 +603,7 @@ function renderFile(data) { // --------------------------------------------------------------------------- // Helpers (escapeHtml imported from utils.js) // --------------------------------------------------------------------------- -function el(tag, attrs, children) { +export function el(tag, attrs, children) { const e = document.createElement(tag); if (attrs) { Object.entries(attrs).forEach(([k, v]) => {