From 680fa90cbe3ee49f0f4a90659030f4e34a48ea0a Mon Sep 17 00:00:00 2001 From: dtoro Date: Tue, 19 May 2026 23:34:01 +0200 Subject: [PATCH] web: collapsible Tags section + file size on its own row Groups score, color label, keywords, and auto-labels under one collapsible "Tags" section on the metadata sidebar (open by default, choice persists). Moves file size onto its own row with a HardDrive icon so dimensions and weight read as independent facts. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/sidebar/RightSidebar.svelte | 225 ++++++++++-------- 1 file changed, 123 insertions(+), 102 deletions(-) diff --git a/web/src/lib/components/sidebar/RightSidebar.svelte b/web/src/lib/components/sidebar/RightSidebar.svelte index 4640661..3349248 100644 --- a/web/src/lib/components/sidebar/RightSidebar.svelte +++ b/web/src/lib/components/sidebar/RightSidebar.svelte @@ -14,6 +14,7 @@ ExternalLink, File, Folder, + HardDrive, ImageIcon, Loader2, MapPin, @@ -345,11 +346,19 @@ {/if} - +
- {dims} ยท {sizeStr} + {dims} + +
+ + +
+ + + {sizeStr}
@@ -386,82 +395,121 @@ > - -
-
Score
-
- {#each [1, 2, 3, 4, 5] as n (n)} - - {/each} -
-
+ +
setMetadataSection('tags', e.currentTarget.open)} + > + + + Tags + + +
+
+
Score
+
+ {#each [1, 2, 3, 4, 5] as n (n)} + + {/each} +
+
-
-
Color label
-
- {#each COLOR_SWATCHES as c (c.key)} - - {/each} -
-
+
+
Color label
+
+ {#each COLOR_SWATCHES as c (c.key)} + + {/each} +
+
- -
-
- Keywords + +
+
Keywords
+
+ {#each keywords as kw (kw)} + + {kw} + + + {/each} + { + if (e.key === 'Enter' || e.key === ',') { + e.preventDefault(); + addKeyword(); + } + }} + /> +
+
+ + + {#if (photo.Labels ?? []).length > 0} +
+
+ Labels (auto) +
+
+ {#each photo.Labels ?? [] as lbl (lbl.UID ?? lbl.Label?.Slug)} + {@const slug = lbl.Label?.Slug} + {@const name = lbl.Label?.Name ?? slug ?? '(unknown)'} + + {name} + + {/each} +
+
+ {/if}
-
- {#each keywords as kw (kw)} - - {kw} - - - {/each} - { - if (e.key === 'Enter' || e.key === ',') { - e.preventDefault(); - addKeyword(); - } - }} - /> -
-
+
- {#if (photo.Labels ?? []).length > 0} -
-
- Labels (auto) -
-
- {#each photo.Labels ?? [] as lbl (lbl.UID ?? lbl.Label?.Slug)} - {@const slug = lbl.Label?.Slug} - {@const name = lbl.Label?.Name ?? slug ?? '(unknown)'} - - {name} - - {/each} -
-
- {/if} -