@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 3.4 kB
Source Map (JSON)
{"version":3,"file":"NcAppSettingsShortcutsSection-QPGGYtbC.mjs","sources":["../../src/components/NcAppSettingsShortcutsSection/NcAppSettingsShortcutsSection.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport NcAppSettingsSection from '../NcAppSettingsSection/NcAppSettingsSection.vue'\nimport { t } from '../../l10n.ts'\n\ndefineSlots<{\n\t/**\n\t * Shortcuts described via <NcHotkeyList> components\n\t */\n\tdefault?: Slot\n}>()\n</script>\n\n<template>\n\t<NcAppSettingsSection id=\"keyboard-shortcuts\" :name=\"t('Keyboard shortcuts')\">\n\t\t<div :class=\"$style.appSettingsSectionShortcuts\">\n\t\t\t<slot />\n\t\t</div>\n\t</NcAppSettingsSection>\n</template>\n\n<style module>\n.appSettingsSectionShortcuts {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: calc(4 * var(--default-grid-baseline));\n}\n</style>\n\n<docs>\nA special `NcAppSettingsSection` for listing keyboard shortcuts using `<NcHotkeyList>` and `<NcHotkey>` components with predefined heading and gap between hotkey lists.\n\n```vue\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\topen: false,\n\t\t}\n\t},\n}\n</script>\n\n<template>\n\t<div>\n\t\t<NcButton @click=\"open = true\">App Settings</NcButton>\n\t\t<NcAppSettingsDialog v-model:open=\"open\" name=\"Application settings\" show-navigation>\n\t\t\t<NcAppSettingsShortcutsSection>\n\t\t\t\t<NcHotkeyList label=\"Actions\">\n\t\t\t\t\t<NcHotkey label=\"File actions\" hotkey=\"A\" />\n\t\t\t\t\t<NcHotkey label=\"Rename\" hotkey=\"F2\" />\n\t\t\t\t\t<NcHotkey label=\"Delete\" hotkey=\"Delete\" />\n\t\t\t\t\t<NcHotkey label=\"Add or remove favorite\" hotkey=\"S\" />\n\t\t\t\t\t<NcHotkey label=\"Manage tags\" hotkey=\"T\" />\n\t\t\t\t</NcHotkeyList>\n\n\t\t\t\t<NcHotkeyList label=\"Selection\">\n\t\t\t\t\t<NcHotkey label=\"Select all files\" hotkey=\"Control A\" />\n\t\t\t\t\t<NcHotkey label=\"Deselect all\" hotkey=\"Escape\" />\n\t\t\t\t\t<NcHotkey label=\"Select or deselect\" hotkey=\"Control Space\" />\n\t\t\t\t\t<NcHotkey label=\"Select a range\" hotkey=\"Control Shift Space\" />\n\t\t\t\t</NcHotkeyList>\n\n\t\t\t\t<NcHotkeyList label=\"Navigation\">\n\t\t\t\t\t<NcHotkey label=\"Go to parent folder\" hotkey=\"Alt ArrowUp\" />\n\t\t\t\t\t<NcHotkey label=\"Go to file above\" hotkey=\"ArrowUp\" />\n\t\t\t\t\t<NcHotkey label=\"Go to file below\" hotkey=\"ArrowDown\" />\n\t\t\t\t\t<NcHotkey label=\"Go left in grid\" hotkey=\"ArrowLeft\" />\n\t\t\t\t\t<NcHotkey label=\"Go right in grid\" hotkey=\"ArrowRight\" />\n\t\t\t\t</NcHotkeyList>\n\n\t\t\t\t<NcHotkeyList label=\"View\">\n\t\t\t\t\t<NcHotkey label=\"Toggle grid view\" hotkey=\"V\" />\n\t\t\t\t\t<NcHotkey label=\"Open file sidebar\" hotkey=\"D\" />\n\t\t\t\t\t<NcHotkey label=\"Show those shortcuts\" hotkey=\"?\" />\n\t\t\t\t</NcHotkeyList>\n\t\t\t</NcAppSettingsShortcutsSection>\n\t\t</NcAppSettingsDialog>\n\t</div>\n</template>\n```\n</docs>\n"],"names":["_createBlock","_unref","_createElementVNode","_normalizeClass","$style","_renderSlot"],"mappings":";;;;;;;;;0BAoBCA,YAIuB,sBAAA;AAAA,QAJD,IAAG;AAAA,QAAsB,MAAMC,MAAA,CAAA,EAAC,oBAAA;AAAA,MAAA;yBACrD,MAEM;AAAA,UAFNC,mBAEM,OAAA;AAAA,YAFA,OAAKC,eAAEC,KAAAA,OAAO,2BAA2B;AAAA,UAAA;YAC9CC,WAAQ,KAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;;;;;;;;;"}