diff --git a/src/css/lang/zh-Hant/setting/main/box.css b/src/css/lang/zh-Hant/setting/main/box.css index 7509234..8280180 100644 --- a/src/css/lang/zh-Hant/setting/main/box.css +++ b/src/css/lang/zh-Hant/setting/main/box.css @@ -1201,7 +1201,7 @@ li { } .extended-list-box { - width: 100%; + width: 80%; border-bottom: unset !important; padding: 2 !important; justify-content: space-between; diff --git a/src/js/setting/plugin_list.js b/src/js/setting/plugin_list.js index d8ec22c..ec6b4b8 100644 --- a/src/js/setting/plugin_list.js +++ b/src/js/setting/plugin_list.js @@ -25,9 +25,16 @@ class PluginList { init() { this.extendedConfirmWrapper.addEventListener('click', (event) => { + if (!this.extendedConfirmWrapper.classList.contains('extendedOpen')) { + return; + } const { classList } = event.target; if (classList.contains('confirm-sure')) { this.setExtendedState(); + this.bubble.showBubble('success', 3000); + setTimeout(() => { + ipcRenderer.send('all-reload'); + }, 4000); } else if (classList.contains('confirm-cancel')) { this.checkExtendedState(); @@ -234,17 +241,14 @@ class PluginList { } localStorage.setItem('enabled-plugins', JSON.stringify(this.enablePluginList)); this.hideConfirmWrapper(); + this.bubble.showBubble('success', 3000); } hideConfirmWrapper() { - this.bubble.showBubble('success', 30000); this.extendedConfirmWrapper.classList.remove('extendedOpen'); this.extendedConfirmWrapper.style.bottom = '-100%'; this.ConfirmTitle.textContent = ''; clearInterval(this.interval); - setTimeout(() => { - ipcRenderer.send('all-reload'); - }, 4000); } } diff --git a/src/js/setting/reset.js b/src/js/setting/reset.js index da47a31..dfe6c02 100644 --- a/src/js/setting/reset.js +++ b/src/js/setting/reset.js @@ -28,14 +28,14 @@ class Reset { const { classList } = event.target; if (classList[0] == 'confirm-sure') { this.resetConfirmWrapper.style.bottom = '-100%'; - this.bubble.showBubble('success', 30000); + this.bubble.showBubble('success', 3000); Config.getInstance().resetConfig(); setTimeout(() => { ipcRenderer.send('all-reload'); }, 4000); } else if (classList[0] == 'confirm-cancel') { - this.resetConfirmWrapper.style.bottom = '-100%'; + this.hideConfirmWrapper(); } }); } @@ -85,5 +85,11 @@ class Reset { } }, 1000); } + + hideConfirmWrapper() { + this.resetConfirmWrapper.classList.remove('reset'); + this.resetConfirmWrapper.style.bottom = '-100%'; + clearInterval(this.interval); + } } new Reset();