feat: shortcuts indicator toggle

This commit is contained in:
liyasthomas
2021-07-19 22:12:56 +05:30
parent ae8cf656a3
commit 88ccda8fd1
6 changed files with 51 additions and 7 deletions

View File

@@ -53,7 +53,7 @@
class="svg-icons"
/>
{{ label }}
<div v-if="shortcuts.length" class="ml-2">
<div v-if="shortcuts.length && SHORTCUTS_INDICATOR_ENABLED" class="ml-2">
<kbd
v-for="(key, index) in shortcuts"
:key="`key-${index}`"
@@ -68,6 +68,8 @@
</template>
<script>
import { getSettingSubject } from "~/newstore/settings"
export default {
props: {
to: {
@@ -135,5 +137,17 @@ export default {
default: () => [],
},
},
data() {
return {
SHORTCUTS_INDICATOR_ENABLED: null,
}
},
subscriptions() {
return {
SHORTCUTS_INDICATOR_ENABLED: getSettingSubject(
"SHORTCUTS_INDICATOR_ENABLED"
),
}
},
}
</script>