From ad8a08de6b94447eb4639bf36869d43752ea81f5 Mon Sep 17 00:00:00 2001 From: Sleeps Date: Wed, 7 Oct 2026 17:04:31 +0100 Subject: [PATCH] Polish grouped scene details --- scene_search/web/index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scene_search/web/index.html b/scene_search/web/index.html index 023fb8a..71bead0 100644 --- a/scene_search/web/index.html +++ b/scene_search/web/index.html @@ -603,7 +603,8 @@ const el = document.createElement('article'); el.className = 'result'; - const details = matches.map(scene => { + const otherMatches = matches.slice(1); + const details = otherMatches.map(scene => { const score = scene.ranking_score == null ? (scene.siglip_score == null ? '—' : Number(scene.siglip_score).toFixed(3)) : Number(scene.ranking_score).toFixed(3); @@ -613,7 +614,7 @@ }).join(''); const moreText = totalMatches > shownMatches - ? ' · showing top ' + shownMatches + ? ' · ' + totalMatches + ' total hits, showing top ' + shownMatches : ''; el.innerHTML = @@ -628,8 +629,9 @@ ? (best.siglip_score == null ? '—' : Number(best.siglip_score).toFixed(3)) : Number(best.ranking_score).toFixed(3)) + '' + - (matches.length > 1 - ? '
View matching scenes' + + (otherMatches.length + ? '
View ' + otherMatches.length + + ' other matching scene' + (otherMatches.length === 1 ? '' : 's') + moreText + '' + details + '
' : '') + '';