enhance(notifications): mark current notification page as read (#39294)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Mitrahsoft
2026-09-16 00:31:16 +00:00
committed by GitHub
co-authored by wxiaoguang
parent f9d3268dbe
commit a583a30d4a
5 changed files with 42 additions and 16 deletions
@@ -14,11 +14,16 @@
</a>
</div>
{{if and (not $pageTypeIsRead) $notificationUnreadCount}}
<form action="{{AppSubUrl}}/notifications/purge" method="post">
<button type="submit" class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
{{svg "octicon-checklist"}}
</button>
</form>
<div class="flex-text-block">
{{if .CurUnreadNotificationIDs}}
<button type="button" class="ui mini button link-action" data-tooltip-content="{{ctx.Locale.Tr "notification.mark_page_as_read"}}"
data-url="{{AppSubUrl}}/notifications/purge-page?ids={{.CurUnreadNotificationIDs}}"
>{{svg "octicon-check"}}</button>
{{end}}
<button type="button" class="ui mini button primary link-action" data-tooltip-content="{{ctx.Locale.Tr "notification.mark_all_as_read"}}"
data-url="{{AppSubUrl}}/notifications/purge"
>{{svg "octicon-checklist"}}</button>
</div>
{{end}}
</div>
<div id="notification_table">