From 98217db270faf167a2779d00bd53fadbfd2d5f49 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Mon, 18 Sep 2023 17:40:51 +0100 Subject: [PATCH 1/2] feat: add command palette --- apps/www/.vitepress/theme/components/Kbd.vue | 37 ++++++ .../.vitepress/theme/layout/MainLayout.vue | 121 ++++++++++++++++-- .../default/ui/command/CommandGroup.vue | 2 +- .../default/ui/dialog/DialogContent.vue | 4 +- 4 files changed, 151 insertions(+), 13 deletions(-) create mode 100644 apps/www/.vitepress/theme/components/Kbd.vue diff --git a/apps/www/.vitepress/theme/components/Kbd.vue b/apps/www/.vitepress/theme/components/Kbd.vue new file mode 100644 index 000000000..7e3bd02cc --- /dev/null +++ b/apps/www/.vitepress/theme/components/Kbd.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/www/.vitepress/theme/layout/MainLayout.vue b/apps/www/.vitepress/theme/layout/MainLayout.vue index d108a0578..14a2e80e5 100644 --- a/apps/www/.vitepress/theme/layout/MainLayout.vue +++ b/apps/www/.vitepress/theme/layout/MainLayout.vue @@ -1,30 +1,38 @@ diff --git a/apps/www/src/lib/registry/default/ui/command/CommandGroup.vue b/apps/www/src/lib/registry/default/ui/command/CommandGroup.vue index 1d994b9a2..f74f38378 100644 --- a/apps/www/src/lib/registry/default/ui/command/CommandGroup.vue +++ b/apps/www/src/lib/registry/default/ui/command/CommandGroup.vue @@ -11,7 +11,7 @@ const props = defineProps {{ heading }} diff --git a/apps/www/src/lib/registry/default/ui/dialog/DialogContent.vue b/apps/www/src/lib/registry/default/ui/dialog/DialogContent.vue index 9925a20aa..36a011308 100644 --- a/apps/www/src/lib/registry/default/ui/dialog/DialogContent.vue +++ b/apps/www/src/lib/registry/default/ui/dialog/DialogContent.vue @@ -33,9 +33,9 @@ const emitsAsProps = useEmitAsProps(emits) - + Close From a3e40e67ddc0269c4a07ad84238473a0b618bb25 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Mon, 18 Sep 2023 17:46:35 +0100 Subject: [PATCH 2/2] fix: add command empty --- apps/www/.vitepress/theme/layout/MainLayout.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/www/.vitepress/theme/layout/MainLayout.vue b/apps/www/.vitepress/theme/layout/MainLayout.vue index 14a2e80e5..c8c2fa596 100644 --- a/apps/www/.vitepress/theme/layout/MainLayout.vue +++ b/apps/www/.vitepress/theme/layout/MainLayout.vue @@ -8,7 +8,7 @@ import Logo from '../components/Logo.vue' import MobileNav from '../components/MobileNav.vue' import Kbd from '../components/Kbd.vue' -import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/lib/registry/default/ui/command' +import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/lib/registry/default/ui/command' import { Button } from '@/lib/registry/default/ui/button' import RadixIconsGithubLogo from '~icons/radix-icons/github-logo' @@ -196,6 +196,9 @@ function openInNewTab(url: string | undefined) { + + No results found. +