alpha
Login
or
Join now
dunkirk.sh
/
core
forked from
tangled.org/core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
resolve dids in profile page
author
Akshay
date
1 year ago
(Mar 2, 2025, 6:29 PM UTC)
commit
ec0558e5
ec0558e5eccf59e42dacb8bc48290df6942e3412
parent
ab45e810
ab45e810d3faffa7bf3e1a8f234351b9eafc1e0f
+24
-8
6 changed files
Expand all
Collapse all
Unified
Split
appview
pages
pages.go
templates
layouts
repobase.html
user
profile.html
state
repo.go
state.go
tailwind.config.js
+1
appview/pages/pages.go
Reviewed
···
145
145
CollaboratingRepos []db.Repo
146
146
ProfileStats ProfileStats
147
147
FollowStatus db.FollowStatus
148
148
+
DidHandleMap map[string]string
148
149
}
149
150
150
151
type ProfileStats struct {
+6
-3
appview/pages/templates/layouts/repobase.html
Reviewed
···
29
29
hx-boost="true"
30
30
>
31
31
<div
32
32
-
class="px-4 py-2 mr-1 text-black min-w-[80px] text-center relative group-hover:bg-gray-200 rounded-t
33
33
-
{{ if eq $.Active $key }}
32
32
+
class="px-4 py-1 mr-1 text-black min-w-[80px] text-center relative rounded-t
33
33
+
{{ if eq $.Active $key }}
34
34
{{ $activeTabStyles }}
35
35
-
{{ end }}"
35
35
+
{{ else }}
36
36
+
group-hover:bg-gray-200
37
37
+
{{ end }}
38
38
+
"
36
39
>
37
40
{{ $key }}
38
41
</div>
+2
-2
appview/pages/templates/user/profile.html
Reviewed
···
58
58
class="py-4 px-6 drop-shadow-sm rounded bg-white"
59
59
>
60
60
<div id="repo-card-name" class="font-medium">
61
61
-
<a href="/{{ .Did }}/{{ .Name }}">
62
62
-
@{{ .Did }}/{{ .Name }}
61
61
+
<a href="/{{ index $.DidHandleMap .Did }}/{{ .Name }}">
62
62
+
{{ index $.DidHandleMap .Did }}/{{ .Name }}
63
63
</a>
64
64
</div>
65
65
<div
-2
appview/state/repo.go
Reviewed
···
219
219
baseTreeLink := path.Join(f.OwnerDid(), f.RepoName, "tree", ref, treePath)
220
220
baseBlobLink := path.Join(f.OwnerDid(), f.RepoName, "blob", ref, treePath)
221
221
222
222
-
log.Println(result)
223
223
-
224
222
s.pages.RepoTree(w, pages.RepoTreeParams{
225
223
LoggedInUser: user,
226
224
BreadCrumbs: breadcrumbs,
+14
appview/state/state.go
Reviewed
···
642
642
if err != nil {
643
643
log.Printf("getting collaborating repos for %s: %s", ident.DID.String(), err)
644
644
}
645
645
+
var didsToResolve []string
646
646
+
for _, r := range collaboratingRepos {
647
647
+
didsToResolve = append(didsToResolve, r.Did)
648
648
+
}
649
649
+
resolvedIds := s.resolver.ResolveIdents(r.Context(), didsToResolve)
650
650
+
didHandleMap := make(map[string]string)
651
651
+
for _, identity := range resolvedIds {
652
652
+
if !identity.Handle.IsInvalidHandle() {
653
653
+
didHandleMap[identity.DID.String()] = fmt.Sprintf("@%s", identity.Handle.String())
654
654
+
} else {
655
655
+
didHandleMap[identity.DID.String()] = identity.DID.String()
656
656
+
}
657
657
+
}
645
658
646
659
followers, following, err := s.db.GetFollowerFollowing(ident.DID.String())
647
660
if err != nil {
···
665
678
Following: following,
666
679
},
667
680
FollowStatus: db.FollowStatus(followStatus),
681
681
+
DidHandleMap: didHandleMap,
668
682
})
669
683
}
670
684
+1
-1
tailwind.config.js
Reviewed
···
10
10
md: "650px",
11
11
lg: "900px",
12
12
xl: "1100px",
13
13
-
"2xl": "1300x",
13
13
+
"2xl": "1300px"
14
14
},
15
15
},
16
16
extend: {