improve model picker

This commit is contained in:
miloschwartz
2026-08-14 11:38:11 -04:00
parent c8f170d197
commit 7375b9efae
7 changed files with 45 additions and 197 deletions
+2 -1
View File
@@ -80,7 +80,8 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
orgId={params.orgId}
orgs={orgs}
navItems={orgNavSections(env, {
isPrimaryOrg: primaryOrg
isPrimaryOrg: primaryOrg,
isServerAdmin: user.serverAdmin
})}
commandNavItems={commandBarNavSections(env, {
isPrimaryOrg: primaryOrg
+22
View File
@@ -47,6 +47,7 @@ export type SidebarNavSection = {
export type OrgNavSectionsOptions = {
isPrimaryOrg?: boolean;
isServerAdmin?: boolean;
};
// Merged from 'user-management-and-resources' branch
@@ -67,6 +68,27 @@ export const orgNavSections = (
env?: Env,
options?: OrgNavSectionsOptions
): SidebarNavSection[] => [
{
heading: "sidebarOverview",
items: [
{
title: "resourceSidebarLauncherTitle",
href: "/{orgId}",
icon: <LayoutGrid className="size-4 flex-none" />,
exact: true
},
...(options?.isServerAdmin
? [
{
title: "serverAdmin",
href: "/admin",
icon: <Server className="size-4 flex-none" />,
exact: true
}
]
: [])
]
},
{
heading: "network",
items: [