From 62aa0bc5e6352d33f8557fd39832eb327bf76a87 Mon Sep 17 00:00:00 2001 From: moshyfawn Date: Thu, 8 Jan 2026 23:29:11 -0500 Subject: [PATCH] appview/pages: make user references clickable Wrap participant avatars with profile links. Make DID-type labels fully clickable chips linking to user profiles, matching the commit hash chip pattern Signed-off-by: moshyfawn --- .../templates/fragments/tinyAvatarList.html | 12 +++-- .../templates/labels/fragments/label.html | 47 ++++++++++++------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/appview/pages/templates/fragments/tinyAvatarList.html b/appview/pages/templates/fragments/tinyAvatarList.html index 3499fd06..0b51f60e 100644 --- a/appview/pages/templates/fragments/tinyAvatarList.html +++ b/appview/pages/templates/fragments/tinyAvatarList.html @@ -5,11 +5,13 @@
{{ $c := "z-50 z-40 z-30 z-20 z-10" }} {{ range $i, $p := $ps }} - + + + {{ end }} {{ if gt (len $all) 5 }} diff --git a/appview/pages/templates/labels/fragments/label.html b/appview/pages/templates/labels/fragments/label.html index 95f30467..7a847c8b 100644 --- a/appview/pages/templates/labels/fragments/label.html +++ b/appview/pages/templates/labels/fragments/label.html @@ -2,28 +2,41 @@ {{ $d := .def }} {{ $v := .val }} {{ $withPrefix := .withPrefix }} - - {{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }} - {{ $lhs := printf "%s" $d.Name }} - {{ $rhs := "" }} + {{ $lhs := printf "%s" $d.Name }} + {{ $rhs := "" }} + {{ $isDid := false }} + {{ $resolvedVal := "" }} - {{ if not $d.ValueType.IsNull }} - {{ if $d.ValueType.IsDidFormat }} - {{ $v = resolve $v }} - {{ end }} - - {{ if not $withPrefix }} - {{ $lhs = "" }} - {{ else }} - {{ $lhs = printf "%s/" $d.Name }} - {{ end }} + {{ if not $d.ValueType.IsNull }} + {{ $isDid = $d.ValueType.IsDidFormat }} + {{ if $isDid }} + {{ $resolvedVal = resolve $v }} + {{ $v = $resolvedVal }} + {{ end }} - {{ $rhs = printf "%s" $v }} + {{ if not $withPrefix }} + {{ $lhs = "" }} + {{ else }} + {{ $lhs = printf "%s/" $d.Name }} {{ end }} - {{ printf "%s%s" $lhs $rhs }} - + {{ $rhs = printf "%s" $v }} + {{ end }} + + {{ $chipClasses := "w-fit flex items-center gap-2 font-normal normal-case rounded py-1 px-2 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-sm" }} + + {{ if $isDid }} + + {{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }} + {{ printf "%s%s" $lhs $rhs }} + + {{ else }} + + {{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }} + {{ printf "%s%s" $lhs $rhs }} + + {{ end }} {{ end }} -- 2.43.0