Skip to content

Commit 50f67d7

Browse files
authored
Don't display stop watch top bar icon when disabled and hidden when click other place (#22374)
Fix #22286 When timetracking is disabled, the stop watch top bar icon should be hidden. When the stop watch recording popup, it should be allowed to hide with some operation. Now click any place on this page will hide the popup window.
1 parent a357143 commit 50f67d7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

templates/base/head_navbar.tmpl

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
</div>
7878
{{else if .IsSigned}}
7979
<div class="right stackable menu">
80+
{{if EnableTimetracking}}
8081
<a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}">
8182
<span class="text">
8283
<span class="fitted item">
@@ -115,6 +116,7 @@
115116
</form>
116117
</div>
117118
</div>
119+
{{end}}
118120

119121
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
120122
<span class="text">

web_src/js/features/stopwatch.js

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function initStopwatch() {
2424
trigger: 'click',
2525
maxWidth: 'none',
2626
interactive: true,
27+
hideOnClick: true,
2728
});
2829

2930
// global stop watch (in the head_navbar), it should always work in any case either the EventSource or the PeriodicPoller is used.

0 commit comments

Comments
 (0)