Line data Source code
1 : <template>
2 18 : <div class="flex h-full flex-col p-4">
3 : <div class="min-h-0 flex-1 overflow-auto">
4 : <ShortcutsList
5 : :commands="essentialsCommands"
6 : :subcategories="essentialsSubcategories"
7 : />
8 : </div>
9 : </div>
10 : </template>
11 :
12 : <script setup lang="ts">
13 : import { computed } from 'vue'
14 :
15 : import {
16 : ESSENTIALS_CONFIG,
17 : useCommandSubcategories
18 : } from '@/platform/keybindings/composables/useCommandSubcategories'
19 : import { useCommandStore } from '@/platform/keybindings/commandStore'
20 :
21 : import ShortcutsList from './ShortcutsList.vue'
22 :
23 18 : const commandStore = useCommandStore()
24 :
25 18 : const essentialsCommands = computed(() =>
26 : commandStore.commands.filter((cmd) => cmd.category === 'essentials')
27 : )
28 :
29 18 : const { subcategories: essentialsSubcategories } = useCommandSubcategories(
30 : essentialsCommands,
31 : ESSENTIALS_CONFIG
32 : )
33 : </script>
|