Skip to content

Commit

Permalink
Don't display stop watch top bar icon when disabled and hidden when c…
Browse files Browse the repository at this point in the history
…lick other place (#22374) (#22387)

Backport #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.
  • Loading branch information
yardenshoham committed Jan 10, 2023
1 parent 32999e2 commit 885082f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
</div>
{{else if .IsSigned}}
<div class="right stackable menu">
{{if EnableTimetracking}}
<a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}">
<span class="text">
<span class="fitted item">
Expand Down Expand Up @@ -115,6 +116,7 @@
</form>
</div>
</div>
{{end}}

<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
<span class="text">
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/stopwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function initStopwatch() {
trigger: 'click',
maxWidth: 'none',
interactive: true,
hideOnClick: true,
});

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

0 comments on commit 885082f

Please sign in to comment.