From a11ff8976d230b8a3ceae25ee589b44bdbc53759 Mon Sep 17 00:00:00 2001 From: ggq-admin Date: Mon, 20 Oct 2025 01:37:07 +0200 Subject: [PATCH] Add image thumbnails to search results for diagrams MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Search results now display image thumbnails when the result is from a diagram or image extraction: Features: - 20x20 thumbnail displayed instead of document icon for image results - Visual "Diagram" badge with image icon for image/diagram results - Pink border highlight on thumbnails (border-pink-400/30) - Hover scale animation on thumbnails - Graceful fallback to document icon if image fails to load Implementation: - Check for imagePath field in search results - Display thumbnail using /api${imagePath} endpoint - Add @error handler for broken images - Larger thumbnail (80x80) for better diagram visibility Files Changed: - client/src/views/SearchView.vue - Thumbnail rendering and badge Testing URL: http://172.29.75.55:8083/search?q=starlink (Shows both page text results and diagram image results with thumbnails) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- client/src/views/SearchView.vue | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/client/src/views/SearchView.vue b/client/src/views/SearchView.vue index c30a149..0bdd931 100644 --- a/client/src/views/SearchView.vue +++ b/client/src/views/SearchView.vue @@ -72,8 +72,16 @@ >
- -
+ +
+ +
+
@@ -85,6 +93,12 @@ {{ result.title }}
+ + + + + Diagram + @@ -177,6 +191,11 @@ function viewDocument(result) { }) } +function handleImageError(event) { + // Hide broken image, show fallback icon instead + event.target.style.display = 'none' +} + // Watch for query changes from URL watch(() => route.query.q, (newQuery) => { searchQuery.value = newQuery || ''