mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-24 21:15:27 +02:00
💄 Update command bar
This commit is contained in:
@@ -86,6 +86,12 @@ export function useCommandPaletteActions(
|
|||||||
icon: <Globe className="size-4" />,
|
icon: <Globe className="size-4" />,
|
||||||
href: `/${orgId}/settings/resources/proxy/create`
|
href: `/${orgId}/settings/resources/proxy/create`
|
||||||
});
|
});
|
||||||
|
actions.push({
|
||||||
|
id: "create-machine-client",
|
||||||
|
label: t("commandPaletteCreateMachineClient"),
|
||||||
|
icon: <MonitorUp className="size-4" />,
|
||||||
|
href: `/${orgId}/settings/clients/machine/create`
|
||||||
|
});
|
||||||
actions.push({
|
actions.push({
|
||||||
id: "create-user",
|
id: "create-user",
|
||||||
label: t("commandPaletteCreateUser"),
|
label: t("commandPaletteCreateUser"),
|
||||||
@@ -98,12 +104,6 @@ export function useCommandPaletteActions(
|
|||||||
icon: <KeyRound className="size-4" />,
|
icon: <KeyRound className="size-4" />,
|
||||||
href: `/${orgId}/settings/api-keys/create`
|
href: `/${orgId}/settings/api-keys/create`
|
||||||
});
|
});
|
||||||
actions.push({
|
|
||||||
id: "create-machine-client",
|
|
||||||
label: t("commandPaletteCreateMachineClient"),
|
|
||||||
icon: <MonitorUp className="size-4" />,
|
|
||||||
href: `/${orgId}/settings/clients/machine/create`
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!env?.flags.disableEnterpriseFeatures) {
|
if (!env?.flags.disableEnterpriseFeatures) {
|
||||||
actions.push({
|
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: <Building2 className="size-4" />,
|
|
||||||
href: "/?orgs=1"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
actions.push({
|
actions.push({
|
||||||
id: "toggle-theme",
|
id: "toggle-theme",
|
||||||
label: t("commandPaletteToggleTheme"),
|
label: t("commandPaletteToggleTheme"),
|
||||||
@@ -158,4 +147,4 @@ export function useCommandPaletteActions(
|
|||||||
|
|
||||||
return actions;
|
return actions;
|
||||||
}, [isAdminPage, orgId, orgs, env, user.serverAdmin, theme, setTheme, t]);
|
}, [isAdminPage, orgId, orgs, env, user.serverAdmin, theme, setTheme, t]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,10 +174,11 @@ function CommandShortcut({
|
|||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"span">) {
|
}: React.ComponentProps<"span">) {
|
||||||
return (
|
return (
|
||||||
<span
|
<kbd
|
||||||
data-slot="command-shortcut"
|
data-slot="command-shortcut"
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-muted-foreground ml-auto text-xs tracking-widest",
|
"text-muted-foreground ml-auto text-xs tracking-widest",
|
||||||
|
"px-1 py-0.5 rounded-sm border-border bg-muted border",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
Reference in New Issue
Block a user