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
prevent long-handle UI abuse
author
Akshay
date
1 year ago
(Mar 18, 2025, 12:32 PM UTC)
commit
bf37556b
bf37556be73234f172c9b89a308113a6a8b4c33e
parent
d08fb1e6
d08fb1e638f2434ccc40c98a8c0f1dbd8d7aa4d4
+12
-6
3 changed files
Expand all
Collapse all
Unified
Split
appview
pages
funcmap.go
templates
timeline.html
user
profile.html
+6
appview/pages/funcmap.go
Reviewed
···
15
15
"split": func(s string) []string {
16
16
return strings.Split(s, "\n")
17
17
},
18
18
+
"truncateAt30": func(s string) string {
19
19
+
if len(s) <= 30 {
20
20
+
return s
21
21
+
}
22
22
+
return s[:30] + "…"
23
23
+
},
18
24
"splitOn": func(s, sep string) []string {
19
25
return strings.Split(s, sep)
20
26
},
+5
-5
appview/pages/templates/timeline.html
Reviewed
···
43
43
{{ $userHandle := index $.DidHandleMap .Repo.Did }}
44
44
<div class="flex items-center">
45
45
<p class="text-gray-600">
46
46
-
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle }}</a>
46
46
+
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle | truncateAt30 }}</a>
47
47
created
48
48
<a href="/{{ $userHandle }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ .Repo.Name }}</a>
49
49
<time class="text-gray-700 text-xs">{{ .Repo.Created | timeFmt }}</time>
···
54
54
{{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }}
55
55
<div class="flex items-center">
56
56
<p class="text-gray-600">
57
57
-
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle }}</a>
57
57
+
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle | truncateAt30 }}</a>
58
58
followed
59
59
-
<a href="/{{ $subjectHandle }}" class="no-underline hover:underline">{{ $subjectHandle }}</a>
59
59
+
<a href="/{{ $subjectHandle }}" class="no-underline hover:underline">{{ $subjectHandle | truncateAt30 }}</a>
60
60
<time class="text-gray-700 text-xs">{{ .Follow.FollowedAt | timeFmt }}</time>
61
61
</p>
62
62
</div>
···
65
65
{{ $repoOwnerHandle := index $.DidHandleMap .Star.Repo.Did }}
66
66
<div class="flex items-center">
67
67
<p class="text-gray-600">
68
68
-
<a href="/{{ $starrerHandle }}" class="no-underline hover:underline">{{ $starrerHandle }}</a>
68
68
+
<a href="/{{ $starrerHandle }}" class="no-underline hover:underline">{{ $starrerHandle | truncateAt30 }}</a>
69
69
starred
70
70
-
<a href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}" class="no-underline hover:underline">{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}</a>
70
70
+
<a href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}" class="no-underline hover:underline">{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a>
71
71
<time class="text-gray-700 text-xs">{{ .Star.Created | timeFmt }}</time>
72
72
</p>
73
73
</div>
+1
-1
appview/pages/templates/user/profile.html
Reviewed
···
21
21
{{ end }}
22
22
</div>
23
23
<p class="text-xl font-bold text-center">
24
24
-
{{ didOrHandle .UserDid .UserHandle }}
24
24
+
{{ truncateAt30 (didOrHandle .UserDid .UserHandle) }}
25
25
</p>
26
26
<div class="text-sm text-center">
27
27
<span>{{ .ProfileStats.Followers }} followers</span>