Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/web/src/components/settings/settingsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export function SettingsSection({
title,
hideTitle = false,
icon,
badge,
headerAction,
variant = "grouped",
children,
Expand All @@ -181,6 +182,8 @@ export function SettingsSection({
title: string;
hideTitle?: boolean;
icon?: ReactNode;
/** Status shown right after the title, e.g. which profile is the default. */
badge?: ReactNode;
headerAction?: ReactNode;
variant?: "grouped" | "plain";
children: ReactNode;
Expand All @@ -205,6 +208,7 @@ export function SettingsSection({
<h2 className="flex min-h-7 items-center gap-2 text-sm font-normal text-foreground/70">
{icon}
{title}
{badge}
</h2>
</div>
<div className="flex min-h-7 min-w-7 items-center justify-end">{headerAction}</div>
Expand Down
20 changes: 9 additions & 11 deletions apps/web/src/profileScope/EnvironmentProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,27 +149,25 @@ export function EnvironmentProfiles({
key={id}
title={profile.name}
icon={<ProfileAvatar option={profileOption(id, profile)} size="sm" />}
badge={isDefault ? <Badge variant="info">Default</Badge> : null}
headerAction={
<span className="flex items-center gap-2">
{isDefault ? (
<Badge variant="secondary" size="sm">
Default
</Badge>
) : null}
{readOnly ? null : isDefault ? (
<InlineButton
tone="muted"
<Button
size="xs"
variant="outline"
onClick={() => updateSettings({ providerProfileId: null })}
>
Unset default
</InlineButton>
</Button>
) : (
<InlineButton
tone="muted"
<Button
size="xs"
variant="outline"
onClick={() => updateSettings({ providerProfileId: id })}
>
Make default
</InlineButton>
</Button>
)}
{readOnly ? null : (
<Button size="xs" variant="outline" onClick={() => setEditing({ id, profile })}>
Expand Down
Loading