summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/ThemeDialog.tsx
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-07-09 21:16:42 +0000
committerGitHub <[email protected]>2025-07-09 21:16:42 +0000
commitda50a1eefbd0751aaf137882595d500e6b6b4179 (patch)
tree4a07182ca01f20074a5544db5caf5a198cabae6c /packages/cli/src/ui/components/ThemeDialog.tsx
parent063481faa4b1c86868689580ff0fbd8cb04141e3 (diff)
Add system-wide settings config for administrators (#3498)
Co-authored-by: Jack Wotherspoon <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/ThemeDialog.tsx')
-rw-r--r--packages/cli/src/ui/components/ThemeDialog.tsx20
1 files changed, 13 insertions, 7 deletions
diff --git a/packages/cli/src/ui/components/ThemeDialog.tsx b/packages/cli/src/ui/components/ThemeDialog.tsx
index 9351d5a1..ba49f8e3 100644
--- a/packages/cli/src/ui/components/ThemeDialog.tsx
+++ b/packages/cli/src/ui/components/ThemeDialog.tsx
@@ -57,6 +57,7 @@ export function ThemeDialog({
const scopeItems = [
{ label: 'User Settings', value: SettingScope.User },
{ label: 'Workspace Settings', value: SettingScope.Workspace },
+ { label: 'System Settings', value: SettingScope.System },
];
const handleThemeSelect = (themeName: string) => {
@@ -86,16 +87,21 @@ export function ThemeDialog({
}
});
+ const otherScopes = Object.values(SettingScope).filter(
+ (scope) => scope !== selectedScope,
+ );
+
+ const modifiedInOtherScopes = otherScopes.filter(
+ (scope) => settings.forScope(scope).settings.theme !== undefined,
+ );
+
let otherScopeModifiedMessage = '';
- const otherScope =
- selectedScope === SettingScope.User
- ? SettingScope.Workspace
- : SettingScope.User;
- if (settings.forScope(otherScope).settings.theme !== undefined) {
+ if (modifiedInOtherScopes.length > 0) {
+ const modifiedScopesStr = modifiedInOtherScopes.join(', ');
otherScopeModifiedMessage =
settings.forScope(selectedScope).settings.theme !== undefined
- ? `(Also modified in ${otherScope})`
- : `(Modified in ${otherScope})`;
+ ? `(Also modified in ${modifiedScopesStr})`
+ : `(Modified in ${modifiedScopesStr})`;
}
// Constants for calculating preview pane layout.