refactor: move actions from app header to app footer

This commit is contained in:
Liyas Thomas
2021-07-23 18:28:07 +00:00
committed by GitHub
parent f694f1ad36
commit 233214cb30
35 changed files with 222 additions and 278 deletions

View File

@@ -17,7 +17,7 @@
? `text-${color}-800 bg-${color}-200 hover:text-${color}-900 hover:bg-${color}-300 focus:text-${color}-900 focus:bg-${color}-300`
: `text-white bg-accent hover:bg-accentDark focus:bg-accentDark`,
label ? 'px-4' : 'px-2',
rounded ? 'rounded-full' : 'rounded-lg',
rounded ? 'rounded-full' : 'rounded',
{ 'opacity-50 cursor-not-allowed': disabled },
{ 'pointer-events-none': loading },
{ 'px-6 py-4 text-lg': large },
@@ -53,9 +53,9 @@
class="svg-icons"
/>
{{ label }}
<div v-if="shortcuts.length && SHORTCUTS_INDICATOR_ENABLED" class="ml-2">
<div v-if="shortcut.length && SHORTCUT_INDICATOR" class="ml-2">
<kbd
v-for="(key, index) in shortcuts"
v-for="(key, index) in shortcut"
:key="`key-${index}`"
class="bg-accentLight rounded ml-1 px-1 inline-flex"
>
@@ -132,21 +132,19 @@ export default {
type: Boolean,
default: false,
},
shortcuts: {
shortcut: {
type: Array,
default: () => [],
},
},
data() {
return {
SHORTCUTS_INDICATOR_ENABLED: null,
SHORTCUT_INDICATOR: null,
}
},
subscriptions() {
return {
SHORTCUTS_INDICATOR_ENABLED: getSettingSubject(
"SHORTCUTS_INDICATOR_ENABLED"
),
SHORTCUT_INDICATOR: getSettingSubject("SHORTCUT_INDICATOR"),
}
},
}