1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Prepare common tmpl functions in a middleware (#33957)

Fix the TODO in `routers/web/web.go`, and avoid the unnecessary
`GetActiveStopwatch` SQL query in non-related route handlers.
This commit is contained in:
wxiaoguang
2025-03-25 14:17:58 +08:00
committed by GitHub
parent 32258e0f22
commit 41c946a66f
6 changed files with 91 additions and 80 deletions

View File

@@ -1,6 +1,6 @@
<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-sequence-number="{{.SequenceNumber}}">
<div class="ui container">
{{$notificationUnreadCount := call .NotificationUnreadCount}}
{{$notificationUnreadCount := call .NotificationUnreadCount ctx}}
<div class="tw-flex tw-items-center tw-justify-between tw-mb-[--page-spacing]">
<div class="small-menu-items ui compact tiny menu">
<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">