-
-
Notifications
You must be signed in to change notification settings - Fork 10
✨ feat(ui): clickable port links, keyboard shortcuts, live uptime #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
140e3e3
✨ feat(watcher): add dd.port.label container label
scttbnsn 2fd4f1b
✨ feat(ui): clickable port links and live uptime display
scttbnsn f6b6e09
✨ feat(ui): keyboard shortcuts for search and help overlay
scttbnsn beb3daa
🐛 fix(ui): address CodeRabbit review on quick wins
scttbnsn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| <script setup lang="ts"> | ||
| import { computed, ref } from 'vue'; | ||
| import { useI18n } from 'vue-i18n'; | ||
| import { useFocusTrap } from '../composables/useFocusTrap'; | ||
| import { useShortcutsOverlay } from '../composables/useShortcutsOverlay'; | ||
|
|
||
| const { t } = useI18n(); | ||
|
|
||
| const { visible, close } = useShortcutsOverlay(); | ||
| const dialogTitleId = 'keyboard-shortcuts-title'; | ||
| const dialogRef = ref<HTMLElement | null>(null); | ||
|
|
||
| useFocusTrap(dialogRef, visible); | ||
|
|
||
| const shortcuts = computed(() => [ | ||
| { keys: ['/'], description: t('appShell.layout.shortcuts.focusSearch') }, | ||
| { keys: ['Esc'], description: t('appShell.layout.shortcuts.closeSearch') }, | ||
| { keys: ['?'], description: t('appShell.layout.shortcuts.showHelp') }, | ||
| { keys: ['⌘', 'K'], description: t('appShell.layout.shortcuts.toggleSearch') }, | ||
| ]); | ||
| </script> | ||
|
|
||
| <template> | ||
| <Teleport to="body"> | ||
| <Transition name="shortcuts-fade"> | ||
| <div v-if="visible" | ||
| class="fixed inset-0 z-overlay bg-black/50 backdrop-blur-sm flex items-start justify-center pt-[20vh]" | ||
| @pointerdown.self="close"> | ||
| <div ref="dialogRef" | ||
| class="relative w-full max-w-[var(--dd-layout-dialog-max-width)] min-w-[var(--dd-layout-dialog-min-width)] mx-4 dd-rounded-lg overflow-hidden" | ||
| data-test="keyboard-shortcuts-overlay" | ||
| role="dialog" | ||
| tabindex="-1" | ||
| aria-modal="true" | ||
| :aria-labelledby="dialogTitleId" | ||
| :style="{ | ||
| backgroundColor: 'var(--dd-bg-card)', | ||
| border: '1px solid var(--dd-border-strong)', | ||
| boxShadow: 'var(--dd-shadow-modal)', | ||
| }"> | ||
| <!-- Header --> | ||
| <div class="px-5 pt-4 pb-3" | ||
| :style="{ borderBottom: '1px solid var(--dd-border)' }"> | ||
| <span :id="dialogTitleId" class="text-xs-plus font-semibold dd-text">{{ t('appShell.layout.shortcuts.title') }}</span> | ||
| </div> | ||
|
|
||
| <!-- Body --> | ||
| <div class="px-5 py-4.5 flex flex-col gap-2.5"> | ||
| <div v-for="shortcut in shortcuts" :key="shortcut.description" | ||
| class="flex items-center justify-between gap-4 text-xs dd-text-secondary"> | ||
| <span>{{ shortcut.description }}</span> | ||
| <span class="flex items-center gap-1 shrink-0"> | ||
| <kbd v-for="key in shortcut.keys" :key="key" | ||
| class="px-1.5 py-0.5 dd-rounded-sm text-2xs font-medium dd-text-secondary" style="background: var(--dd-border);"> | ||
| {{ key }} | ||
| </kbd> | ||
| </span> | ||
| </div> | ||
| </div> | ||
|
|
||
| <!-- Footer --> | ||
| <div class="px-5 pt-3 pb-4.5 flex items-center justify-end" | ||
| :style="{ borderTop: '1px solid var(--dd-border)' }"> | ||
| <AppButton size="none" variant="plain" weight="none" | ||
| class="px-4 py-1.5 dd-rounded text-2xs-plus font-semibold transition-colors cursor-pointer" | ||
| data-test="keyboard-shortcuts-close" | ||
| :aria-label="t('appShell.layout.shortcuts.close')" | ||
| :style="{ | ||
| backgroundColor: 'var(--dd-bg-inset)', | ||
| border: '1px solid var(--dd-border-strong)', | ||
| color: 'var(--dd-text)', | ||
| }" | ||
| @click="close"> | ||
| {{ t('appShell.layout.shortcuts.close') }} | ||
| </AppButton> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </Transition> | ||
| </Teleport> | ||
| </template> | ||
|
|
||
| <style scoped> | ||
| .shortcuts-fade-enter-active, | ||
| .shortcuts-fade-leave-active { | ||
| transition: opacity var(--dd-duration-fast) ease; | ||
| } | ||
| .shortcuts-fade-enter-from, | ||
| .shortcuts-fade-leave-to { | ||
| opacity: 0; | ||
| } | ||
| </style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.