From 5c8ef5347ffa5bb76e81bc54794311fcbc2512b0 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Sun, 3 May 2026 16:08:11 +0100 Subject: [PATCH] appview/pages: add htmx fragments for profile popups also removes the gray shield indicator for profiles that are not vouched for. Signed-off-by: oppiliappan --- .../templates/user/fragments/picLink.html | 32 ++++++++-- .../user/fragments/profilePopover.html | 59 +++++++++++++++++++ 2 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 appview/pages/templates/user/fragments/profilePopover.html diff --git a/appview/pages/templates/user/fragments/picLink.html b/appview/pages/templates/user/fragments/picLink.html index 33d5629a..a769c481 100644 --- a/appview/pages/templates/user/fragments/picLink.html +++ b/appview/pages/templates/user/fragments/picLink.html @@ -6,8 +6,23 @@ {{ if ge (len .) 3 }} {{ $vr = index . 2 }} {{ end }} -
- + {{ if $vr }} {{ if ne $did $vr.ViewerDid }} diff --git a/appview/pages/templates/user/fragments/profilePopover.html b/appview/pages/templates/user/fragments/profilePopover.html new file mode 100644 index 00000000..3cf20f83 --- /dev/null +++ b/appview/pages/templates/user/fragments/profilePopover.html @@ -0,0 +1,59 @@ +{{ define "user/fragments/profilePopover" }} +{{ $handle := resolve .UserDid }} +
+ +
+ + + +
+

+ {{ $handle }} +

+ {{ with .Profile }} + {{ if .Pronouns }} +

{{ .Pronouns }}

+ {{ end }} + {{ end }} +
+
+ +
+ {{ with .Profile }} + {{ if .Description }} +

{{ .Description }}

+ {{ end }} + {{ end }} + + + + {{ if and .LoggedInUser (ne .FollowStatus.String "IsSelf") }} +
+ {{ template "user/fragments/follow" . }} + {{ template "user/fragments/vouchButton" . }} +
+ + {{ if .VouchRelationship }} + {{ if .VouchRelationship.IndirectVouches }} + {{ template "user/fragments/networkVouches" .VouchRelationship }} + {{ end }} + {{ end }} + {{ end }} +
+ +
+ + {{/* render the vouch modal outside the popover content div so the popover api places it in the top layer correctly */}} + {{ if and .LoggedInUser (ne .FollowStatus.String "IsSelf") }} + {{ template "user/fragments/vouchPopover" . }} + {{ end }} +{{ end }} -- 2.51.2