From 178c28518ec1775ce7c2da05bce2f8277287bd9e Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Thu, 25 Sep 2025 09:32:24 +0100 Subject: [PATCH] appview: fix crash when setting description of forked repo Signed-off-by: oppiliappan --- appview/pages/templates/layouts/fragments/topbar.html | 2 +- .../pages/templates/notifications/fragments/bell.html | 2 +- .../pages/templates/notifications/fragments/count.html | 10 +++++----- appview/repo/repo.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appview/pages/templates/layouts/fragments/topbar.html b/appview/pages/templates/layouts/fragments/topbar.html index a997000d..043f4b0e 100644 --- a/appview/pages/templates/layouts/fragments/topbar.html +++ b/appview/pages/templates/layouts/fragments/topbar.html @@ -7,7 +7,7 @@ -
+
{{ with .LoggedInUser }} {{ block "newButton" . }} {{ end }} {{ template "notifications/fragments/bell" }} diff --git a/appview/pages/templates/notifications/fragments/bell.html b/appview/pages/templates/notifications/fragments/bell.html index 5e8894d5..3dec7cef 100644 --- a/appview/pages/templates/notifications/fragments/bell.html +++ b/appview/pages/templates/notifications/fragments/bell.html @@ -3,7 +3,7 @@ hx-get="/notifications/count" hx-target="#notification-count" hx-trigger="load, every 30s"> - + {{ i "bell" "w-5 h-5" }} diff --git a/appview/pages/templates/notifications/fragments/count.html b/appview/pages/templates/notifications/fragments/count.html index 87c7ce7c..a0d06447 100644 --- a/appview/pages/templates/notifications/fragments/count.html +++ b/appview/pages/templates/notifications/fragments/count.html @@ -1,7 +1,7 @@ {{define "notifications/fragments/count"}} -{{if and .Count (gt .Count 0)}} - - {{if gt .Count 99}}99+{{else}}{{.Count}}{{end}} - -{{end}} + {{if and .Count (gt .Count 0)}} + + {{if gt .Count 99}}99+{{else}}{{.Count}}{{end}} + + {{end}} {{end}} diff --git a/appview/repo/repo.go b/appview/repo/repo.go index 4c1e556e..fb47ca4b 100644 --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -2189,7 +2189,7 @@ func (rp *Repo) ForkRepo(w http.ResponseWriter, r *http.Request) { Knot: targetKnot, Rkey: rkey, Source: sourceAt, - Description: existingRepo.Description, + Description: f.Repo.Description, Created: time.Now(), Labels: models.DefaultLabelDefs(), } -- 2.51.2