From 32ffe33e1acf3e7fa00be477c94671e95ecc37d9 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 24 Jun 2020 16:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A6=81=E7=94=A8=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E9=94=AE=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=85=A8=E5=B1=80=E5=BF=AB=E6=8D=B7=E9=94=AE=E7=9A=84?= =?UTF-8?q?bug=EF=BC=8C=E4=BC=98=E5=8C=96=E5=90=AF=E7=94=A8/=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E8=A7=86=E8=A7=89=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/views/Setting.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index a53777c9..901b6422 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -137,7 +137,7 @@ div.scroll(:class="$style.setting") h3 {{$t('view.setting.hot_key_local_title')}} div material-checkbox(id="setting_download_hotKeyLocal" v-model="current_hot_key.local.enable" :label="$t('view.setting.is_enable')" @change="handleHotKeySaveConfig") - div(:class="$style.hotKeyContainer") + div(:class="$style.hotKeyContainer" :style="{ opacity: current_hot_key.local.enable ? 1 : .6 }") div(:class="$style.hotKeyItem" v-for="item in hotKeys.local") h4(:class="$style.hotKeyItemTitle") {{$t('view.setting.hot_key_' + item.name)}} material-input.key-bind(:class="$style.hotKeyItemInput" readonly @keyup.prevent :placeholder="$t('view.setting.hot_key_unset_input')" @@ -148,7 +148,7 @@ div.scroll(:class="$style.setting") h3 {{$t('view.setting.hot_key_global_title')}} div material-checkbox(id="setting_download_hotKeyGlobal" v-model="current_hot_key.global.enable" :label="$t('view.setting.is_enable')" @change="handleEnableHotKey") - div(:class="$style.hotKeyContainer") + div(:class="$style.hotKeyContainer" :style="{ opacity: current_hot_key.global.enable ? 1 : .6 }") div(:class="$style.hotKeyItem" v-for="item in hotKeys.global") h4(:class="$style.hotKeyItemTitle") {{$t('view.setting.hot_key_' + item.name)}} material-input.key-bind(:class="[$style.hotKeyItemInput, hotKeyConfig.global[item.name] && hotKeyStatus[hotKeyConfig.global[item.name].key] && hotKeyStatus[hotKeyConfig.global[item.name].key].status === false ? $style.hotKeyFailed : null]" @@ -854,7 +854,7 @@ export default { let config = this.hotKeyConfig[type][info.name] let originKey if (newHotKey) { - if (type == 'global' && newHotKey) { + if (type == 'global' && newHotKey && this.current_hot_key.global.enable) { try { await rendererInvoke(NAMES.hotKey.set_config, { action: 'register', @@ -890,7 +890,7 @@ export default { this.initHotKeyConfig() // console.log(this.current_hot_key.global.keys) - if (originKey) { + if (originKey && this.current_hot_key.global.enable) { try { await rendererInvoke(NAMES.hotKey.set_config, { action: 'unregister', @@ -1104,6 +1104,7 @@ export default { flex-flow: row wrap; // margin-top: -15px; margin-bottom: 15px; + transition: opacity @transition-theme; } .hotKeyItem { width: 30%;