fix: step 2 switch to economy

This commit is contained in:
AkaraChen
2024-12-13 14:41:57 +08:00
parent 2fb71dce50
commit 24975d475a
3 changed files with 8 additions and 5 deletions

View File

@ -880,13 +880,13 @@ const StepTwo = ({
disabled={!isAPIKeySet || hasSetIndexType || docForm !== ChuckingMode.text}
ref={economyDomRef}
onSwitched={() => {
if (isAPIKeySet)
if (isAPIKeySet && docForm === ChuckingMode.text)
setIndexType(IndexingType.ECONOMICAL)
}}
/>
</PortalToFollowElemTrigger>
<PortalToFollowElemContent>
<div className='p-3 bg-white text-xs font-medium text-text-secondary rounded-lg shadow-lg'>
<div className='p-3 bg-components-tooltip-bg border-components-panel-border text-xs font-medium text-text-secondary rounded-lg shadow-lg'>
{
docForm === ChuckingMode.qa
? t('datasetCreation.stepTwo.notAvailableForQA')

View File

@ -58,8 +58,11 @@ export const OptionCard: FC<OptionCardProps> = forwardRef((props, ref) => {
const { icon, className, title, description, isActive, children, actions, activeHeaderClassName, style, effectImg, onSwitched, onClick, noHighlight, disabled, ...rest } = props
return <div
className={classNames(
'rounded-xl',
(isActive && !noHighlight) ? 'border-components-option-card-option-selected-border bg-components-panel-bg' : 'border-components-option-card-option-border bg-components-option-card-option-bg',
'rounded-xl border',
(isActive && !noHighlight)
? 'border-components-option-card-option-selected-border bg-components-panel-bg'
: 'border-components-option-card-option-border bg-components-option-card-option-bg',
disabled && 'opacity-50',
className,
)}
style={{