From 0c1aa34ef7053dac79a44a1bb589c9f594ce4fad Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Tue, 27 May 2025 08:05:30 -0400 Subject: [PATCH] add english group id's to command palette --- src/components/CommandPalette/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/CommandPalette/index.tsx b/src/components/CommandPalette/index.tsx index f041ca9a..c8cb4140 100644 --- a/src/components/CommandPalette/index.tsx +++ b/src/components/CommandPalette/index.tsx @@ -37,6 +37,7 @@ import { useTranslation } from "react-i18next"; import { usePinnedItems } from "@core/hooks/usePinnedItems.ts"; export interface Group { + id: string; label: string; icon: LucideIcon; commands: Command[]; @@ -70,6 +71,7 @@ export const CommandPalette = () => { const groups: Group[] = [ { + id: "gotoGroup", label: t("goto.label"), icon: LinkIcon, commands: [ @@ -112,6 +114,7 @@ export const CommandPalette = () => { ], }, { + id: "manageGroup", label: t("manage.label"), icon: SmartphoneIcon, commands: [ @@ -142,6 +145,7 @@ export const CommandPalette = () => { ], }, { + id: "contextualGroup", label: t("contextual.label"), icon: BoxSelectIcon, commands: [ @@ -210,6 +214,7 @@ export const CommandPalette = () => { ], }, { + id: "debugGroup", label: t("debug.label"), icon: BugIcon, commands: [ @@ -232,8 +237,8 @@ export const CommandPalette = () => { ]; const sortedGroups = [...groups].sort((a, b) => { - const aPinned = pinnedItems.includes(a.label) ? 1 : 0; - const bPinned = pinnedItems.includes(b.label) ? 1 : 0; + const aPinned = pinnedItems.includes(a.id) ? 1 : 0; + const bPinned = pinnedItems.includes(b.id) ? 1 : 0; return bPinned - aPinned; }); @@ -265,7 +270,7 @@ export const CommandPalette = () => { {group.label}