From 8f0e17774f07292d9187f22924e3f9a85d7d8e63 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Mon, 22 Jun 2026 21:22:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Update=20command=20bar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../useCommandPaletteActions.tsx | 25 ++++++------------- src/components/ui/command.tsx | 3 ++- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/components/command-palette/useCommandPaletteActions.tsx b/src/components/command-palette/useCommandPaletteActions.tsx index 998fb97b8..4b288c3bc 100644 --- a/src/components/command-palette/useCommandPaletteActions.tsx +++ b/src/components/command-palette/useCommandPaletteActions.tsx @@ -86,6 +86,12 @@ export function useCommandPaletteActions( icon: , href: `/${orgId}/settings/resources/proxy/create` }); + actions.push({ + id: "create-machine-client", + label: t("commandPaletteCreateMachineClient"), + icon: , + href: `/${orgId}/settings/clients/machine/create` + }); actions.push({ id: "create-user", label: t("commandPaletteCreateUser"), @@ -98,12 +104,6 @@ export function useCommandPaletteActions( icon: , href: `/${orgId}/settings/api-keys/create` }); - actions.push({ - id: "create-machine-client", - label: t("commandPaletteCreateMachineClient"), - icon: , - href: `/${orgId}/settings/clients/machine/create` - }); if (!env?.flags.disableEnterpriseFeatures) { actions.push({ @@ -129,17 +129,6 @@ export function useCommandPaletteActions( } } - const canChooseOrganization = !isAdminPage && (orgs?.length ?? 0) > 1; - - if (canChooseOrganization) { - actions.push({ - id: "choose-org", - label: t("commandPaletteChooseOrganization"), - icon: , - href: "/?orgs=1" - }); - } - actions.push({ id: "toggle-theme", label: t("commandPaletteToggleTheme"), @@ -158,4 +147,4 @@ export function useCommandPaletteActions( return actions; }, [isAdminPage, orgId, orgs, env, user.serverAdmin, theme, setTheme, t]); -} \ No newline at end of file +} diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx index efd1c35f5..3d577c275 100644 --- a/src/components/ui/command.tsx +++ b/src/components/ui/command.tsx @@ -174,10 +174,11 @@ function CommandShortcut({ ...props }: React.ComponentProps<"span">) { return ( -