command palette tweaks

This commit is contained in:
miloschwartz
2026-07-07 21:55:15 -04:00
parent 1e7863ce4f
commit d082de3d88
12 changed files with 182 additions and 39 deletions
+7
View File
@@ -1,9 +1,11 @@
import { Layout } from "@app/components/Layout";
import ResourceLauncher from "@app/components/resource-launcher/ResourceLauncher";
import { commandBarNavSections } from "@app/app/navigation";
import { internal } from "@app/lib/api";
import { authCookieHeader } from "@app/lib/api/cookies";
import { fetchLauncherPageData } from "@app/lib/launcherServerData";
import { verifySession } from "@app/lib/auth/verifySession";
import { pullEnv } from "@app/lib/pullEnv";
import UserProvider from "@app/providers/UserProvider";
import { ListUserOrgsResponse } from "@server/routers/org";
import { GetOrgOverviewResponse } from "@server/routers/org/getOrgOverview";
@@ -57,6 +59,8 @@ export default async function OrgPage(props: OrgPageProps) {
} catch (e) {}
const isAdminOrOwner = Boolean(overview?.isAdmin || overview?.isOwner);
const env = pullEnv();
const primaryOrg = orgs.find((o) => o.orgId === orgId)?.isPrimaryOrg;
const searchParams = new URLSearchParams(await props.searchParams);
const launcherData = overview
@@ -73,6 +77,9 @@ export default async function OrgPage(props: OrgPageProps) {
orgId={orgId}
orgs={orgs}
navItems={[]}
commandNavItems={commandBarNavSections(env, {
isPrimaryOrg: primaryOrg
})}
showSidebar={false}
launcherMode
showViewAsAdmin={isAdminOrOwner}
+12 -1
View File
@@ -15,6 +15,7 @@ import {
GlobeLock,
KeyRound,
Laptop,
LayoutGrid,
Link as LinkIcon,
Logs,
MonitorUp,
@@ -49,7 +50,7 @@ export const orgLangingNavItems: SidebarNavItem[] = [
{
title: "sidebarAccount",
href: "/{orgId}",
icon: <User className="size-4 flex-none" />
icon: <LayoutGrid className="size-4 flex-none" />
}
];
@@ -360,6 +361,16 @@ export const commandBarNavSections = (
env?: Env,
options?: OrgNavSectionsOptions
): CommandBarNavSection[] => [
{
heading: "commandLauncher",
items: [
{
title: "commandResourceLauncher",
href: "/{orgId}",
icon: <LayoutGrid className="size-4 flex-none" />
}
]
},
{
heading: "network",
items: [