From 2c7b8b525afdefd0c069490130ed19e7c8004839 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Mon, 15 Jun 2026 16:51:49 -0400 Subject: [PATCH] fix: icone type distinct + position a droite dans les recherches sauvegardees - Recherche classique: icone search (loupe) grise a droite - Recherche repertoire: icone folder-search bleue a droite - Icones dans .saved-search-meta, poussees a droite via margin-left:auto - Les badges/vault restent a gauche dans .saved-search-badges --- frontend/js/legacy.js | 10 ++++++---- frontend/js/viewer.js | 11 +++++++---- frontend/style.css | 13 +++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/frontend/js/legacy.js b/frontend/js/legacy.js index ca546ba..9a8d045 100644 --- a/frontend/js/legacy.js +++ b/frontend/js/legacy.js @@ -335,7 +335,9 @@ async function loadSavedSearches() { list.innerHTML = searches.map(s => { var isDirSearch = (!s.query || s.query.trim() === '') && s.include_paths; var displayQuery = isDirSearch ? (s.include_paths || 'Dossier') : escapeHtml(s.query); - var dirIcon = isDirSearch ? '' : ''; + var typeIcon = isDirSearch + ? '' + : ''; const badges = []; if (s.case_sensitive) badges.push('Aa'); if (s.whole_word) badges.push('wd'); @@ -346,10 +348,10 @@ async function loadSavedSearches() { const vaultStr = s.vault && s.vault !== "all" ? `\u{1F4C1} ${escapeHtml(s.vault)}` : ""; return `
-
${dirIcon}${displayQuery}
+
${displayQuery}
- ${badges.join("")} - ${vaultStr} + ${badges.join("")} ${vaultStr} + ${typeIcon}
${pathFilters.length ? '
' + pathFilters.join(" ") + '
' : ""} diff --git a/frontend/js/viewer.js b/frontend/js/viewer.js index 1f39f38..8986d71 100644 --- a/frontend/js/viewer.js +++ b/frontend/js/viewer.js @@ -1041,7 +1041,10 @@ export async function loadSavedSearches() { // Detect directory-based saved search (empty query + include_paths) var isDirSearch = (!s.query || s.query.trim() === '') && s.include_paths; var displayQuery = isDirSearch ? (s.include_paths || 'Dossier') : escapeHtml(s.query); - var dirIcon = isDirSearch ? '' : ''; + // Icon: folder-search for directories, search for regular queries + var typeIcon = isDirSearch + ? '' + : ''; const badges = []; if (s.case_sensitive) badges.push('Aa'); if (s.whole_word) badges.push('wd'); @@ -1052,10 +1055,10 @@ export async function loadSavedSearches() { const vaultStr = s.vault && s.vault !== "all" ? `📁 ${escapeHtml(s.vault)}` : ""; return `
-
${dirIcon}${displayQuery}
+
${displayQuery}
- ${badges.join("")} - ${vaultStr} + ${badges.join("")} ${vaultStr} + ${typeIcon}
${pathFilters.length ? '
' + pathFilters.join(" ") + '
' : ""} diff --git a/frontend/style.css b/frontend/style.css index 12e3709..3f152d9 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -2081,6 +2081,19 @@ select { flex-wrap: wrap; margin-bottom: 2px; } +.saved-search-badges { + display: flex; + gap: 4px; + align-items: center; + flex-wrap: wrap; + flex: 1; + min-width: 0; +} +.saved-search-type-icon { + margin-left: auto; + flex-shrink: 0; + opacity: 0.6; +} .saved-search-vault { font-size: 0.65rem; color: var(--text-muted);