This commit is contained in:
2026-03-25 00:56:58 -07:00
parent 96f327e4dc
commit c31402c8f1
5 changed files with 89 additions and 12 deletions

View File

@@ -2221,6 +2221,21 @@ class ItemDetailView(Table):
details_table.add_column("Key", style="cyan", justify="right", width=15)
details_table.add_column("Value", style="white")
def _render_tag_text(tag_value: Any) -> Text:
tag_text = Text()
tag_text.append("#", style="dim")
raw = str(tag_value or "")
namespace, sep, value = raw.partition(":")
if sep and namespace:
tag_text.append(namespace, style="#6ecbff")
tag_text.append(sep, style="#6ecbff")
if value:
tag_text.append(value, style="green")
else:
tag_text.append(raw, style="green")
return tag_text
# Canonical display order for metadata
order = ["Title", "Hash", "Store", "Path", "Ext", "Size", "Duration", "Url", "Relations"]
@@ -2268,7 +2283,7 @@ class ItemDetailView(Table):
if isinstance(tags, str):
tags = [t.strip() for t in tags.split(",") if t.strip()]
tags_sorted = sorted(map(str, tags))
tag_cols = Columns([f"[dim]#[/dim]{t}" for t in tags_sorted], equal=True, expand=True)
tag_cols = Columns([_render_tag_text(t) for t in tags_sorted], equal=True, expand=True)
details_table.add_row("", "") # Spacer
details_table.add_row("Tags:", tag_cols)
has_details = True