From 5e11a0453b51934513e2608b27f49511b0aedb3c Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 29 May 2026 09:23:58 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20conflit=20showProgressBar/hideProgressBa?= =?UTF-8?q?r/showWelcome=20=E2=80=94=20doublons=20locaux=20vs=20imports=20?= =?UTF-8?q?dans=20legacy.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/legacy.js | 132 +----------------------------------------- 1 file changed, 1 insertion(+), 131 deletions(-) diff --git a/frontend/js/legacy.js b/frontend/js/legacy.js index e208fb5..d384286 100644 --- a/frontend/js/legacy.js +++ b/frontend/js/legacy.js @@ -29,22 +29,9 @@ export { initSidebarTabs, initConfigModal, initHelpModal, initRecentTab } from ' export { initSyncStatus } from './sync.js'; export { DashboardRecentWidget } from './dashboard.js'; -// ========================================================================= -// Progress bar helpers (used by showWelcome) -// ========================================================================= - -function showProgressBar() { - const bar = document.getElementById("search-progress-bar"); - if (bar) bar.classList.add("active"); -} - -function hideProgressBar() { - const bar = document.getElementById("search-progress-bar"); - if (bar) bar.classList.remove("active"); -} // ========================================================================= -// loadVaultSettings +// Helpers // ========================================================================= async function loadVaultSettings() { @@ -308,123 +295,6 @@ function initSearch() { }); } -// ========================================================================= -// showWelcome -// ========================================================================= - -function showWelcome() { - hideProgressBar(); - - // Restore or rebuild the dashboard with tabbed sections - const area = document.getElementById("content-area"); - const home = document.getElementById("dashboard-home"); - - if (area && !home) { - area.innerHTML = ` -
- -
- - - - -
- - -
-
-
Chargement...
-
-
-
- - -
-
-
- - Aucun bookmark -

Épinglez des fichiers pour les retrouver ici.

-
-
- - -
-
-
- -
-
-
-
-
-
-
- -
- - -
-
-
- - Aucun document partagé -

Partagez un document pour le voir apparaître ici

-
-
-
`; - - // Re-initialize widgets and dashboard tabs - DashboardRecentWidget.init(); - initDashboardTabs(); - safeCreateIcons(); - } else if (home) { - // Dashboard already exists, show it with default tab - home.style.display = ""; - // Reset tabs to default - document.querySelectorAll(".dashboard-tab").forEach(t => t.classList.remove("active")); - document.querySelectorAll(".dashboard-panel").forEach(p => p.classList.remove("active")); - const defaultTab = document.querySelector('.dashboard-tab[data-tab="stats"]'); - const defaultPanel = document.getElementById("dashboard-panel-stats"); - if (defaultTab) defaultTab.classList.add("active"); - if (defaultPanel) defaultPanel.classList.add("active"); - } - - // Load all widgets (they handle missing elements gracefully) - if (typeof DashboardStatsWidget !== "undefined") { - DashboardStatsWidget.load(); - } - if (typeof DashboardConflictsWidget !== "undefined") { - DashboardConflictsWidget.load(); - } - DashboardRecentWidget.load(state.selectedContextVault); - if (typeof DashboardBookmarkWidget !== "undefined") { - DashboardBookmarkWidget.load(state.selectedContextVault); - } - if (typeof DashboardSharedWidget !== "undefined") { - DashboardSharedWidget.load(); - } - - // Load saved searches sidebar - loadSavedSearches(); -} - -// ========================================================================= -// goHome -// ========================================================================= - function goHome() { const searchInput = document.getElementById("search-input"); if (searchInput) searchInput.value = "";