From 9a0d05ae931ebab248809d68773e3de51d96145d Mon Sep 17 00:00:00 2001 From: MarekWo Date: Fri, 13 Mar 2026 07:38:37 +0100 Subject: [PATCH] fix(search): remove double hash in channel names, add FTS5 syntax help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Channel names from device already include # prefix — removed hardcoded # from search results badge. Added (?) help button with search syntax examples and link to FTS5 docs. Co-Authored-By: Claude Opus 4.6 --- app/static/js/app.js | 11 ++++++++++- app/static/js/sw.js | 2 +- app/templates/base.html | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index 42b5c5c..82e1ec7 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -3777,6 +3777,15 @@ function initializeSearch() { const btn = document.getElementById('searchBtn'); if (!input || !btn) return; + // Toggle search help + const helpBtn = document.getElementById('searchHelpBtn'); + const helpPanel = document.getElementById('searchHelp'); + if (helpBtn && helpPanel) { + helpBtn.addEventListener('click', () => { + helpPanel.style.display = helpPanel.style.display === 'none' ? '' : 'none'; + }); + } + // Search on Enter or button click btn.addEventListener('click', () => performSearch(input.value)); input.addEventListener('keydown', (e) => { @@ -3842,7 +3851,7 @@ async function performSearch(query) { item.innerHTML = `
- #${escapeHtml(r.channel_name || '')} + ${escapeHtml(r.channel_name || '')} ${r.is_own ? 'You' : escapeHtml(r.sender || '')}
${time} diff --git a/app/static/js/sw.js b/app/static/js/sw.js index 96d1a0e..3e3be4c 100644 --- a/app/static/js/sw.js +++ b/app/static/js/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'mc-webui-v8'; +const CACHE_NAME = 'mc-webui-v9'; const ASSETS_TO_CACHE = [ '/', '/static/css/style.css', diff --git a/app/templates/base.html b/app/templates/base.html index 3e08a44..49a88d4 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -417,6 +417,21 @@ + +
+