From 2fc0eb913caf40aec056d49f5838992e136208a2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 12 Aug 2023 10:26:53 +0200 Subject: [PATCH] Tweak actions menu (#26278) Ressurect lost changes from https://github.com/go-gitea/gitea/pull/24451. - Always show icons for each entry in the menu - Make all checkboxes toggle only their feature, e.g. "seconds" and "timestamps" can now be toggled on together. - Reorder the items Screenshot 2023-08-01 at 19 19 27 --------- Co-authored-by: Giteabot --- web_src/js/components/RepoActionView.vue | 30 ++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 2c4273f2f2..929e971b6c 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -74,23 +74,23 @@ @@ -401,20 +401,10 @@ const sfc = { if (this.menuVisible) this.menuVisible = false; }, - // show at most one of log seconds and timestamp (can be both invisible) toggleTimeDisplay(type) { - const toToggleTypes = []; - const other = type === 'seconds' ? 'stamp' : 'seconds'; this.timeVisible[`log-time-${type}`] = !this.timeVisible[`log-time-${type}`]; - toToggleTypes.push(type); - if (this.timeVisible[`log-time-${type}`] && this.timeVisible[`log-time-${other}`]) { - this.timeVisible[`log-time-${other}`] = false; - toToggleTypes.push(other); - } - for (const toToggle of toToggleTypes) { - for (const el of this.$refs.steps.querySelectorAll(`.log-time-${toToggle}`)) { - toggleElem(el, this.timeVisible[`log-time-${toToggle}`]); - } + for (const el of this.$refs.steps.querySelectorAll(`.log-time-${type}`)) { + toggleElem(el, this.timeVisible[`log-time-${type}`]); } },