Signed-off-by: oppiliappan me@oppi.li
appview/pages/pages.go
appview/pages/pages.go
This file has not been changed.
appview/pages/templates/timeline/fragments/announcements.html
appview/pages/templates/timeline/fragments/announcements.html
This file has not been changed.
appview/pages/templates/timeline/fragments/timeline.html
appview/pages/templates/timeline/fragments/timeline.html
This file has not been changed.
appview/pages/templates/timeline/fragments/trending.html
appview/pages/templates/timeline/fragments/trending.html
This file has not been changed.
+20
-20
appview/pages/templates/timeline/fragments/vouchSuggestions.html
+20
-20
appview/pages/templates/timeline/fragments/vouchSuggestions.html
···
1
1
{{ define "timeline/fragments/vouchSuggestions" }}
2
-
{{ if and .LoggedInUser .VouchSuggestions }}
3
-
<div>
4
-
<h3 class="text-xl font-bold dark:text-white flex items-center gap-4 px-4 pb-4">
5
-
{{ i "shield-plus" "size-5 flex-shrink-0" }}
6
-
Suggested
7
-
</h3>
8
-
<div class="flex flex-col gap-4 bg-white dark:bg-gray-800 p-4 border border-gray-200 dark:border-gray-700 shadow-sm">
9
-
{{ range .VouchSuggestions }}
10
-
<div class="flex items-center gap-3 ">
11
-
{{ template "user/fragments/picLink" (list .Did "size-10") }}
12
-
<div class="flex flex-col min-w-0 flex-1">
13
-
<a href="/{{ resolve .Did }}" class="text-sm font-medium dark:text-white hover:underline truncate">{{ resolve .Did }}</a>
14
-
<span class="text-xs text-gray-500 dark:text-gray-400 truncate" title="{{ .Reason }}">{{ .Reason }}</span>
15
-
</div>
16
-
<div class="shrink-0">
17
-
{{ template "user/fragments/vouch" . }}
2
+
{{ if and .LoggedInUser .VouchSuggestions }}
3
+
<div>
4
+
<h3 class="text-xl font-bold dark:text-white flex items-center gap-4 px-4 pb-4">
5
+
{{ i "shield-plus" "size-5 flex-shrink-0" }}
6
+
Suggested
7
+
</h3>
8
+
<div class="flex flex-col gap-4 bg-white dark:bg-gray-800 p-4 border border-gray-200 dark:border-gray-700 shadow-sm">
9
+
{{ range .VouchSuggestions }}
10
+
<div class="flex items-center gap-3 ">
11
+
{{ template "user/fragments/picLink" (list .Did.String "size-10") }}
12
+
<div class="flex flex-col min-w-0 flex-1">
13
+
<a href="/{{ resolve .Did.String }}" class="text-sm font-medium dark:text-white hover:underline truncate">{{ resolve .Did.String }}</a>
14
+
<span class="text-xs text-gray-500 dark:text-gray-400 truncate" title="{{ .Reason }}">{{ .Reason }}</span>
15
+
</div>
16
+
<div class="shrink-0">
17
+
{{ template "user/fragments/vouch" . }}
18
+
</div>
19
+
</div>
20
+
{{ end }}
18
21
</div>
19
22
</div>
20
-
{{ end }}
21
-
</div>
22
-
</div>
23
-
{{ end }}
23
+
{{ end }}
24
24
{{ end }}
appview/pages/templates/timeline/timeline.html
appview/pages/templates/timeline/timeline.html
This file has not been changed.
+2
-2
appview/pages/templates/user/fragments/vouchPopover.html
+2
-2
appview/pages/templates/user/fragments/vouchPopover.html
···
17
17
{{ $userIdent := "" }}
18
18
{{ $userDid := "" }}
19
19
{{ with .VouchRelationship }}
20
-
{{ $userDid = .SubjectDid }}
21
-
{{ $userIdent = resolve .SubjectDid }}
20
+
{{ $userDid = .SubjectDid.String }}
21
+
{{ $userIdent = resolve .SubjectDid.String }}
22
22
{{ end }}
23
23
<div
24
24
id="vouch-modal-{{ normalizeForHtmlId $userDid }}"
+6
-6
appview/pulls/pulls.go
+6
-6
appview/pulls/pulls.go
···
805
805
}
806
806
807
807
s.pages.RepoPulls(w, pages.RepoPullsParams{
808
+
LoggedInUser: s.oauth.GetMultiAccountUser(r),
809
+
RepoInfo: repoInfo,
810
+
Pulls: pulls,
811
+
LabelDefs: defs,
812
+
FilterState: filterState,
813
+
FilterQuery: query.String(),
808
-
LoggedInUser: s.oauth.GetMultiAccountUser(r),
809
-
RepoInfo: repoInfo,
810
-
Pulls: pulls,
811
-
LabelDefs: defs,
812
-
FilterState: filterState,
813
-
FilterQuery: query.String(),
814
814
Stacks: stacks,
815
815
Pipelines: m,
816
816
Page: page,
+4
-3
appview/state/timeline.go
+4
-3
appview/state/timeline.go
···
3
3
import (
4
4
"net/http"
5
5
6
+
"github.com/bluesky-social/indigo/atproto/syntax"
6
7
"tangled.org/core/appview/db"
7
8
"tangled.org/core/appview/models"
8
9
"tangled.org/core/appview/oauth"
···
78
79
s.logger.Error("failed to get vouch suggestions", "err", err)
79
80
}
80
81
if len(vouchSuggestions) > 0 {
81
-
suggestionDids := make([]string, len(vouchSuggestions))
82
+
suggestionDids := make([]syntax.DID, len(vouchSuggestions))
82
83
for i, sv := range vouchSuggestions {
83
-
suggestionDids[i] = sv.Did
84
+
suggestionDids[i] = syntax.DID(sv.Did)
84
85
}
85
-
relationships, err := db.GetVouchRelationshipsBatch(s.db, user.Did, suggestionDids)
86
+
relationships, err := db.GetVouchRelationshipsBatch(s.db, syntax.DID(user.Did), suggestionDids)
86
87
if err != nil {
87
88
s.logger.Error("failed to get vouch relationships for suggestions", "err", err)
88
89
} else {
+4
-4
appview/pages/templates/user/fragments/networkVouches.html
+4
-4
appview/pages/templates/user/fragments/networkVouches.html
···
4
4
{{ $denounces := (list) }}
5
5
{{ range .IndirectVouches }}
6
6
{{ if .IsVouch }}
7
-
{{ $vouches = append $vouches .Did }}
7
+
{{ $vouches = append $vouches .Did.String }}
8
8
{{ else if .IsDenounce }}
9
-
{{ $denounces = append $denounces .Did }}
9
+
{{ $denounces = append $denounces .Did.String }}
10
10
{{ end }}
11
11
{{ end }}
12
12
···
18
18
border-x border-green-600/25 dark:border-green-400/25
19
19
{{ if $denounces }} border-t {{ else }} border-y {{ end }}
20
20
">
21
-
<a class="text-sm text-green-800 dark:text-green-200 hover:no-underline" href="/{{ .SubjectDid }}?tab=vouches">
21
+
<a class="text-sm text-green-800 dark:text-green-200 hover:no-underline" href="/{{ .SubjectDid.String }}?tab=vouches">
22
22
vouched for by {{ len $vouches }} {{ if eq (len $vouches) 1 }}user{{ else }}users{{ end }}
23
23
</a>
24
24
{{ template "fragments/tinyAvatarList" (dict "all" $vouches "classes" "size-6") }}
···
32
32
border-x border-red-600/25 dark:border-red-400/25
33
33
{{ if $vouches }} border-b {{ else }} border-y {{ end }}
34
34
">
35
-
<a class="text-sm text-red-800 dark:text-red-200 hover:no-underline" href="/{{ .SubjectDid }}?tab=vouches">
35
+
<a class="text-sm text-red-800 dark:text-red-200 hover:no-underline" href="/{{ .SubjectDid.String }}?tab=vouches">
36
36
denounced by {{ len $denounces }} {{ if eq (len $denounces) 1 }}user{{ else }}users{{ end }}
37
37
</a>
38
38
{{ template "fragments/tinyAvatarList" (dict "all" $denounces "classes" "size-6") }}