From 1745a8efeda694f373c7458662e00c74ecc03bcf Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 9 Jan 2023 10:39:10 +0800 Subject: [PATCH 1/2] don't display stop watch top bar icon when disabled and hidden when click other place --- templates/base/head_navbar.tmpl | 2 ++ web_src/js/modules/tippy.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 4fc61cf36909b..3c4670e418686 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -77,6 +77,7 @@ {{else if .IsSigned}} + {{end}} diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index ce8f0369f11c9..b982d397e333a 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -6,7 +6,7 @@ export function createTippy(target, opts = {}) { placement: target.getAttribute('data-placement') || 'top-start', animation: false, allowHTML: false, - hideOnClick: false, + hideOnClick: true, interactiveBorder: 30, ignoreAttributes: true, maxWidth: 500, // increase over default 350px From 673ede11ac1ea57935bca306928cd657da5fe0bd Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 9 Jan 2023 11:05:22 +0800 Subject: [PATCH 2/2] Don't change the framework layer but only stopwatch --- web_src/js/features/stopwatch.js | 1 + web_src/js/modules/tippy.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.js index b9042fae4cc98..33915a1d83713 100644 --- a/web_src/js/features/stopwatch.js +++ b/web_src/js/features/stopwatch.js @@ -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. diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index b982d397e333a..ce8f0369f11c9 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -6,7 +6,7 @@ export function createTippy(target, opts = {}) { placement: target.getAttribute('data-placement') || 'top-start', animation: false, allowHTML: false, - hideOnClick: true, + hideOnClick: false, interactiveBorder: 30, ignoreAttributes: true, maxWidth: 500, // increase over default 350px