|
| 1 | +<template> |
| 2 | + <TransitionRoot as="template" :show="logViewerStore.helpSlideOverOpen"> |
| 3 | + <Dialog as="div" class="relative z-20" @close="logViewerStore.helpSlideOverOpen = false"> |
| 4 | + <div class="fixed inset-0" /> |
| 5 | + |
| 6 | + <div class="fixed inset-0 overflow-hidden"> |
| 7 | + <div class="absolute inset-0 overflow-hidden"> |
| 8 | + <div class="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10"> |
| 9 | + <TransitionChild |
| 10 | + as="template" |
| 11 | + enter="transform transition ease-in-out duration-200 sm:duration-300" |
| 12 | + enter-from="translate-x-full" |
| 13 | + enter-to="translate-x-0" |
| 14 | + leave="transform transition ease-in-out duration-200 sm:duration-300" |
| 15 | + leave-from="translate-x-0" |
| 16 | + leave-to="translate-x-full" |
| 17 | + > |
| 18 | + <DialogPanel class="pointer-events-auto w-screen max-w-md"> |
| 19 | + <div class="flex h-full flex-col overflow-y-scroll bg-white py-6 shadow-xl"> |
| 20 | + <div class="px-4 sm:px-6"> |
| 21 | + <div class="flex items-start justify-between"> |
| 22 | + <DialogTitle class="text-base font-semibold leading-6 text-gray-900">Keyboard Shortcuts</DialogTitle> |
| 23 | + <div class="ml-3 flex h-7 items-center"> |
| 24 | + <button type="button" class="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2" @click="logViewerStore.helpSlideOverOpen = false"> |
| 25 | + <span class="sr-only">Close panel</span> |
| 26 | + <XMarkIcon class="h-6 w-6" aria-hidden="true" /> |
| 27 | + </button> |
| 28 | + </div> |
| 29 | + </div> |
| 30 | + </div> |
| 31 | + <div class="relative mt-6 flex-1 px-4 sm:px-6"> |
| 32 | + <div class="keyboard-shortcut"> |
| 33 | + <span class="shortcut">{{ KeyShortcuts.Hosts }}</span> |
| 34 | + <span class="description">Select a host</span> |
| 35 | + </div> |
| 36 | + <div class="keyboard-shortcut"> |
| 37 | + <span class="shortcut">{{ KeyShortcuts.Files }}</span> |
| 38 | + <span class="description">Jump to file selection</span> |
| 39 | + </div> |
| 40 | + <div class="keyboard-shortcut"> |
| 41 | + <span class="shortcut">{{ KeyShortcuts.Logs }}</span> |
| 42 | + <span class="description">Jump to logs</span> |
| 43 | + </div> |
| 44 | + <div class="keyboard-shortcut"> |
| 45 | + <span class="shortcut">{{ KeyShortcuts.Severity }}</span> |
| 46 | + <span class="description">Severity selection</span> |
| 47 | + </div> |
| 48 | + <div class="keyboard-shortcut"> |
| 49 | + <span class="shortcut">{{ KeyShortcuts.Settings }}</span> |
| 50 | + <span class="description">Settings</span> |
| 51 | + </div> |
| 52 | + <div class="keyboard-shortcut"> |
| 53 | + <span class="shortcut">{{ KeyShortcuts.Search }}</span> |
| 54 | + <span class="description">Search</span> |
| 55 | + </div> |
| 56 | + <div class="keyboard-shortcut"> |
| 57 | + <span class="shortcut">{{ KeyShortcuts.Refresh }}</span> |
| 58 | + <span class="description">Refresh logs</span> |
| 59 | + </div> |
| 60 | + <div class="keyboard-shortcut"> |
| 61 | + <span class="shortcut">{{ KeyShortcuts.ShortcutHelp }}</span> |
| 62 | + <span class="description">Keyboard shortcuts help</span> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + </DialogPanel> |
| 67 | + </TransitionChild> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + </Dialog> |
| 72 | + </TransitionRoot> |
| 73 | +</template> |
| 74 | + |
| 75 | +<script setup> |
| 76 | +import { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from '@headlessui/vue' |
| 77 | +import { XMarkIcon } from '@heroicons/vue/24/outline' |
| 78 | +import { useLogViewerStore } from '../stores/logViewer.js'; |
| 79 | +import { KeyShortcuts } from '../keyboardNavigation/shared.js'; |
| 80 | +
|
| 81 | +const logViewerStore = useLogViewerStore(); |
| 82 | +</script> |
0 commit comments