opened by
- {{ template "user/fragments/picHandleLink" .Issue.Did }}
+ {{ template "user/fragments/picLink" (list .Issue.Did "size-6" (index .VouchRelationships .Issue.Did)) }}
+ {{ resolve .Issue.Did }}
{{ if .Issue.Edited }}
edited {{ template "repo/fragments/time" .Issue.Edited }}
diff --git a/appview/pages/templates/repo/issues/issues.html b/appview/pages/templates/repo/issues/issues.html
index ad9ea64e..3dbd89f0 100644
--- a/appview/pages/templates/repo/issues/issues.html
+++ b/appview/pages/templates/repo/issues/issues.html
@@ -65,7 +65,13 @@
{{ define "repoAfter" }}
- {{ template "repo/issues/fragments/issueListing" (dict "Issues" .Issues "RepoPrefix" .RepoInfo.FullName "LabelDefs" .LabelDefs) }}
+ {{ template "repo/issues/fragments/issueListing"
+ (dict
+ "Issues" .Issues
+ "RepoPrefix" .RepoInfo.FullName
+ "LabelDefs" .LabelDefs
+ "VouchRelationships" .VouchRelationships
+ ) }}
{{if gt .IssueCount .Page.Limit }}
{{ template "fragments/pagination" (dict
diff --git a/appview/pages/templates/user/fragments/picLink.html b/appview/pages/templates/user/fragments/picLink.html
index ec447992..058a475e 100644
--- a/appview/pages/templates/user/fragments/picLink.html
+++ b/appview/pages/templates/user/fragments/picLink.html
@@ -4,12 +4,16 @@
{{ $handle := resolve $did }}
{{ $isVouched := false }}
{{ $isDenounced := false }}
+ {{ $isPartial := false }}
+ {{ $vouchRelation := false }}
{{ if ge (len .) 3 }}
- {{ $vouchRelation := index . 2 }}
+ {{ $vouchRelation = index . 2 }}
{{ if $vouchRelation.IsDirectVouch }}
{{ $isVouched = true }}
{{ else if $vouchRelation.IsDirectDenounce }}
{{ $isDenounced = true }}
+ {{ else if not $vouchRelation.IsEmpty }}
+ {{ $isPartial = true }}
{{ end }}
{{ end }}
@@ -18,10 +22,18 @@
alt=""
class="rounded-full border border-gray-300 dark:border-gray-700 {{ $classes }}"
/>
- {{ if $isVouched }}
- {{ template "fragments/icons/shield-check" "size-4" }}
- {{ else if $isDenounced }}
- {{ template "fragments/icons/shield-alert" "size-4" }}
+ {{ if $vouchRelation }}
+ {{ if ne $did $vouchRelation.ViewerDid }}
+
+ {{ if $isVouched }}
+ {{ template "fragments/icons/shield-check" "w-full h-full" }}
+ {{ else if $isDenounced }}
+ {{ template "fragments/icons/shield-alert" "w-full h-full" }}
+ {{ else if $isPartial }}
+ {{ template "fragments/icons/shield" "w-full h-full" }}
+ {{ end }}
+
+ {{ end }}
{{ end }}
{{ end }}
diff --git a/appview/pages/templates/user/fragments/vouchTooltip.html b/appview/pages/templates/user/fragments/vouchTooltip.html
new file mode 100644
index 00000000..3056f380
--- /dev/null
+++ b/appview/pages/templates/user/fragments/vouchTooltip.html
@@ -0,0 +1,25 @@
+{{ define "user/fragments/vouchTooltip" }}
+ {{- $vr := . -}}
+ {{- if not $vr.IsEmpty -}}
+ {{- $networkPart := "" -}}
+ {{- if and (gt $vr.VouchStrength 0) (eq $vr.DenounceStrength 0) -}}
+ {{- $networkPart = printf "%s from your network vouched for this user" (plural $vr.VouchStrength "person" "people") -}}
+ {{- else if and (gt $vr.DenounceStrength 0) (eq $vr.VouchStrength 0) -}}
+ {{- $networkPart = printf "%s from your network denounced this user" (plural $vr.DenounceStrength "person" "people") -}}
+ {{- else if and (eq $vr.DenounceStrength 0) (eq $vr.VouchStrength 0) -}}
+ {{- $networkPart = "" -}}
+ {{- else -}}
+ {{- $networkPart = printf "%s and %s from your network" (plural $vr.VouchStrength "vouch" "vouches") (plural $vr.DenounceStrength "denounce" "") -}}
+ {{- end -}}
+ {{- $direct := $vr.GetDirectVouch -}}
+ {{- if $direct -}}
+ {{- if $direct.IsVouch -}}
+ You vouched for {{ resolve $vr.SubjectDid }} {{ relTimeFmt $direct.CreatedAt }}. {{ $networkPart }}.
+ {{- else -}}
+ You denounced {{ resolve $vr.SubjectDid }} {{ relTimeFmt $direct.CreatedAt }}. {{ $networkPart }}.
+ {{- end -}}
+ {{- else -}}
+ {{- $networkPart -}}.
+ {{- end -}}
+ {{- end -}}
+{{ end }}
diff --git a/flake.lock b/flake.lock
index 6570b0b3..ea4a2361 100644
--- a/flake.lock
+++ b/flake.lock
@@ -120,11 +120,11 @@
"lastModified": 1731402384,
"narHash": "sha256-OwUmrPfEehLDz0fl2ChYLK8FQM2p0G1+EMrGsYEq+6g=",
"type": "tarball",
- "url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip"
+ "url": "https://github.com/IBM/plex/releases/download/@ibm%2Fplex-mono@1.1.0/ibm-plex-mono.zip"
},
"original": {
"type": "tarball",
- "url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip"
+ "url": "https://github.com/IBM/plex/releases/download/@ibm%2Fplex-mono@1.1.0/ibm-plex-mono.zip"
}
},
"indigo": {