Skip to content

Commit abee72f

Browse files
fix(web): cleanup settings on a mixed selection offer the machines that support them
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f29c371 commit abee72f

2 files changed

Lines changed: 233 additions & 206 deletions

File tree

‎apps/web/src/components/settings/SettingsScopeNotice.tsx‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ export function SettingsScopeNotice({
3232
target,
3333
targetId,
3434
eligibleEnvironmentIds,
35+
inline = false,
3536
}: {
3637
children: string;
38+
/** Renders inside a section instead of as its own page. */
39+
inline?: boolean;
3740
target: "environment" | "all" | "project" | "checkout";
3841
targetId?: string;
3942
eligibleEnvironmentIds?: readonly EnvironmentId[];
@@ -147,26 +150,23 @@ export function SettingsScopeNotice({
147150
</button>
148151
));
149152
};
150-
return (
151-
<SettingsPageContainer>
152-
<div className="space-y-3">
153-
<p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
154-
{children}
155-
</p>
156-
<div className="space-y-4">
157-
{choiceGroups.map((group) =>
158-
group?.displayName ? (
159-
<SettingsSection key={group.projectKey} title={group.displayName}>
160-
{renderChoices(group)}
161-
</SettingsSection>
162-
) : (
163-
<SettingsGroup key={group?.projectKey ?? target}>
164-
{renderChoices(group)}
165-
</SettingsGroup>
166-
),
167-
)}
168-
</div>
153+
const notice = (
154+
<div className="space-y-3">
155+
<p role="status" className="px-3 text-sm text-muted-foreground sm:px-4">
156+
{children}
157+
</p>
158+
<div className="space-y-4">
159+
{choiceGroups.map((group) =>
160+
group?.displayName ? (
161+
<SettingsSection key={group.projectKey} title={group.displayName}>
162+
{renderChoices(group)}
163+
</SettingsSection>
164+
) : (
165+
<SettingsGroup key={group?.projectKey ?? target}>{renderChoices(group)}</SettingsGroup>
166+
),
167+
)}
169168
</div>
170-
</SettingsPageContainer>
169+
</div>
171170
);
171+
return inline ? notice : <SettingsPageContainer>{notice}</SettingsPageContainer>;
172172
}

0 commit comments

Comments
 (0)