forked from tangled.org/core
this repo has no description

appview: fix crash when setting description of forked repo

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 178c2851 a96b5173

verified
Changed files
+8 -8
appview
pages
templates
layouts
fragments
notifications
fragments
repo
+1 -1
appview/pages/templates/layouts/fragments/topbar.html
···
</a>
</div>
-
<div id="right-items" class="flex items-center gap-2">
+
<div id="right-items" class="flex items-center gap-4">
{{ with .LoggedInUser }}
{{ block "newButton" . }} {{ end }}
{{ template "notifications/fragments/bell" }}
+1 -1
appview/pages/templates/notifications/fragments/bell.html
···
hx-get="/notifications/count"
hx-target="#notification-count"
hx-trigger="load, every 30s">
-
<a href="/notifications" class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group ml-4 mr-2">
+
<a href="/notifications" class="text-gray-500 dark:text-gray-400 flex gap-1 items-end group">
{{ i "bell" "w-5 h-5" }}
<span id="notification-count"></span>
</a>
+5 -5
appview/pages/templates/notifications/fragments/count.html
···
{{define "notifications/fragments/count"}}
-
{{if and .Count (gt .Count 0)}}
-
<span class="absolute -top-1 -right-0.5 min-w-[16px] h-[16px] px-1 bg-red-500 text-white text-xs font-medium rounded-full flex items-center justify-center">
-
{{if gt .Count 99}}99+{{else}}{{.Count}}{{end}}
-
</span>
-
{{end}}
+
{{if and .Count (gt .Count 0)}}
+
<span class="absolute -top-1.5 -right-0.5 min-w-[16px] h-[16px] px-1 bg-red-500 text-white text-xs font-medium rounded-full flex items-center justify-center">
+
{{if gt .Count 99}}99+{{else}}{{.Count}}{{end}}
+
</span>
+
{{end}}
{{end}}
+1 -1
appview/repo/repo.go
···
Knot: targetKnot,
Rkey: rkey,
Source: sourceAt,
-
Description: existingRepo.Description,
+
Description: f.Repo.Description,
Created: time.Now(),
Labels: models.DefaultLabelDefs(),