feat: 修改用户设置和工作区设置的选择顺序

This commit is contained in:
刘伟光 2026-01-08 10:45:22 +08:00
parent 570ec432af
commit 6319a6ed56
5 changed files with 12 additions and 12 deletions

View file

@ -54,7 +54,7 @@ export function ApprovalModeDialog({
}: ApprovalModeDialogProps): React.JSX.Element {
// Start with User scope by default
const [selectedScope, setSelectedScope] = useState<SettingScope>(
SettingScope.User,
SettingScope.Workspace,
);
// Track the currently highlighted approval mode

View file

@ -33,7 +33,7 @@ export function EditorSettingsDialog({
onExit,
}: EditorDialogProps): React.JSX.Element {
const [selectedScope, setSelectedScope] = useState<SettingScope>(
SettingScope.User,
SettingScope.Workspace,
);
const [focusedSection, setFocusedSection] = useState<'editor' | 'scope'>(
'editor',
@ -66,13 +66,6 @@ export function EditorSettingsDialog({
}
const scopeItems = [
{
get label() {
return t('User Settings');
},
value: SettingScope.User,
key: SettingScope.User,
},
{
get label() {
return t('Workspace Settings');
@ -80,6 +73,13 @@ export function EditorSettingsDialog({
value: SettingScope.Workspace,
key: SettingScope.Workspace,
},
{
get label() {
return t('User Settings');
},
value: SettingScope.User,
key: SettingScope.User,
},
];
const handleEditorSelect = (editorType: EditorType | 'not_set') => {

View file

@ -63,7 +63,7 @@ export function SettingsDialog({
);
// Scope selector state (User by default)
const [selectedScope, setSelectedScope] = useState<SettingScope>(
SettingScope.User,
SettingScope.Workspace,
);
// Active indices
const [activeSettingIndex, setActiveSettingIndex] = useState(0);

View file

@ -39,7 +39,7 @@ export function ThemeDialog({
terminalWidth,
}: ThemeDialogProps): React.JSX.Element {
const [selectedScope, setSelectedScope] = useState<SettingScope>(
SettingScope.User,
SettingScope.Workspace,
);
// Track the currently highlighted theme name