{{ define "user/fragments/vouchPopover" }} {{ $isVouched := false }} {{ $isDenounced := false }} {{ $isUndecided := false }} {{ if .VouchRelationship }} {{ if .VouchRelationship.IsDirectVouch }} {{ $isVouched = true }} {{ else if .VouchRelationship.IsDirectDenounce }} {{ $isDenounced = true }} {{ else }} {{ $isUndecided = true }} {{ end }} {{ else }} {{ $isUndecided = true }} {{ end }} {{ $userIdent := "" }} {{ $userDid := "" }} {{ with .VouchRelationship }} {{ $userDid = .SubjectDid.String }} {{ $userIdent = resolve .SubjectDid.String }} {{ end }}

Vouch for {{ $userIdent }}

{{ with .VouchRelationship }} {{ with .GetDirectVouch }} You {{if $isVouched}}vouched{{else}}denounced{{end}} {{ $userIdent }} {{ relTimeFmt .CreatedAt }}. You can change your descision below. {{ else }} Vouching builds a web-of-trust across Tangled. Vouch for users you have had positive interactions with. Read more {{ i "arrow-right" "size-3" }} {{ end }} {{ end }}

{{ if .VouchRelationship }} {{ if .VouchRelationship.IndirectVouches }}

From your network:

{{ template "user/fragments/networkVouches" .VouchRelationship }}
{{ end }} {{ end }} {{ $labelClass := "grid grid-cols-[auto_1fr_auto] items-center gap-2 rounded p-2 py- ring-1 ring-gray-200 dark:ring-gray-700 cursor-pointer" }}
{{ end }}