fix: correct websocket notification for change password page (#39671) (#39670)

* Backport #39671
* Fix #39669

And also fix a UI bug
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-07 19:26:34 +00:00
1 parent c60b13b2dd
commit 5018ae1b29
3 files changed
+3 -4

No files matched your search

+2 -2
View File
@@ -44,8 +44,8 @@
<div class="navbar-right">
{{if and .IsSigned .MustChangePassword}}
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
<span class="text">
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
<span class="flex-text-block">
{{ctx.AvatarUtils.Avatar .SignedUser 24}}
<span class="only-mobile">{{.SignedUser.Name}}</span>
<span class="not-mobile flex-text-block">{{svg "octicon-triangle-down"}}</span>
</span>
+1 -1
View File
@@ -1,6 +1,6 @@
{{- $itemExtraClass := .ItemExtraClass -}}
{{- $data := .PageGlobalData -}}
{{if and $data $data.IsSigned}}{{/* data may not exist, for example: rendering 503 page before the PageGlobalData middleware */}}
{{if and $data $data.IsSigned (not ctx.RootData.MustChangePassword)}}{{/* data may not exist, for example: rendering 503 page before the PageGlobalData middleware */}}
{{- $activeStopwatch := call $data.GetActiveStopwatch -}}
{{- $notificationUnreadCount := call $data.GetNotificationUnreadCount -}}
{{/* always rendered so a real-time push can reveal it without a reload */}}