From a30aaba1d3203378ddfd343c88ab4e54b09f22c9 Mon Sep 17 00:00:00 2001 From: DecibillyJoel <23534814+DecibillyJoel@users.noreply.github.com> Date: Mon, 30 May 2022 22:01:41 -0400 Subject: [PATCH] app-mainMenu can be triggered by right click (#1093) Currently you can't open the little Cider popup menu without first uncollapsing the sidebar. This is extremely an extremely unepic sussy amogus L gamer moment. This change allows you to right click to bypass uncollapsing the sidebar and get straight to the hot app-mainMenu action. I think Cider speedrunners will greatly appreciate this quality of life addition. Please consider accepting this PR (short for pull request) to improve the UX (short for user experience). --- src/renderer/main/vueapp.js | 4 +- src/renderer/style.less | 4 +- src/renderer/views/app/app-navigation.ejs | 125 ++++++++++++++++++++++ src/renderer/views/app/chrome-top.ejs | 10 +- src/renderer/views/app/sidebar.ejs | 125 ---------------------- 5 files changed, 136 insertions(+), 132 deletions(-) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 2ac1e6cf..2501414c 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -299,8 +299,8 @@ const app = new Vue({ formatVolumeTooltip() { return this.cfg.audio.dBSPL ? (Number(this.cfg.audio.dBSPLcalibration) + (Math.log10(this.mk.volume) * 20)).toFixed(2) + ' dB SPL' : (Math.log10(this.mk.volume) * 20).toFixed(2) + ' dBFS' }, - mainMenuVisibility(val) { - if(this.chrome.sidebarCollapsed) { + mainMenuVisibility(val, isContextMenu) { + if(this.chrome.sidebarCollapsed && !isContextMenu) { this.chrome.sidebarCollapsed = false return } diff --git a/src/renderer/style.less b/src/renderer/style.less index 65df8494..61a10664 100644 --- a/src/renderer/style.less +++ b/src/renderer/style.less @@ -667,7 +667,9 @@ input[type=range].web-slider::-webkit-slider-runnable-track { #cmenu() { .container { position: absolute; - width: 100%; + left: 0px; + width: var(--sidebarWidth); + max-width: var(--sidebarWidth); padding: 10px; z-index: 1; } diff --git a/src/renderer/views/app/app-navigation.ejs b/src/renderer/views/app/app-navigation.ejs index 2f9a5bb2..e937bc99 100644 --- a/src/renderer/views/app/app-navigation.ejs +++ b/src/renderer/views/app/app-navigation.ejs @@ -1,4 +1,129 @@
-