mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
fix extension ui
This commit is contained in:
parent
15b5bc3bfc
commit
597ce85335
5 changed files with 20 additions and 49 deletions
|
|
@ -14,14 +14,12 @@ interface ScopeSelectStepProps {
|
|||
selectedExtension: Extension | null;
|
||||
mode: 'disable' | 'enable';
|
||||
onScopeSelect: (scope: 'user' | 'workspace') => void;
|
||||
onNavigateBack: () => void;
|
||||
}
|
||||
|
||||
export function ScopeSelectStep({
|
||||
selectedExtension,
|
||||
mode,
|
||||
onScopeSelect,
|
||||
onNavigateBack,
|
||||
}: ScopeSelectStepProps) {
|
||||
const scopeItems = [
|
||||
{
|
||||
|
|
@ -38,20 +36,9 @@ export function ScopeSelectStep({
|
|||
},
|
||||
value: 'workspace' as const,
|
||||
},
|
||||
{
|
||||
key: 'back',
|
||||
get label() {
|
||||
return t('Back');
|
||||
},
|
||||
value: 'back' as const,
|
||||
},
|
||||
];
|
||||
|
||||
const handleSelect = (value: 'user' | 'workspace' | 'back') => {
|
||||
if (value === 'back') {
|
||||
onNavigateBack();
|
||||
return;
|
||||
}
|
||||
const handleSelect = (value: 'user' | 'workspace') => {
|
||||
onScopeSelect(value);
|
||||
};
|
||||
|
||||
|
|
@ -71,7 +58,7 @@ export function ScopeSelectStep({
|
|||
return (
|
||||
<Box flexDirection="column" gap={1}>
|
||||
<Text color={theme.text.primary}>{title}</Text>
|
||||
<Box marginTop={1}>
|
||||
<Box>
|
||||
<RadioButtonSelect
|
||||
items={scopeItems}
|
||||
onSelect={handleSelect}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue