fix: button (#5470)
This commit is contained in:
@@ -20,7 +20,7 @@ const FormattingChanged: FC<IFormattingChangedProps> = ({
|
||||
description={t('appDebug.feature.dataSet.queryVariable.unableToQueryDataSetTip')}
|
||||
footer={
|
||||
<div className='flex space-x-2'>
|
||||
<Button variant='primary' className='flex items-center justify-start !h-8 !w-[96px]' onClick={onConfirm}>
|
||||
<Button variant='primary' className='flex justify-start !w-[96px]' onClick={onConfirm}>
|
||||
<span className='text-[13px] font-medium'>{t('appDebug.feature.dataSet.queryVariable.ok')}</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@ const FormattingChanged: FC<IFormattingChangedProps> = ({
|
||||
description={t('appDebug.formattingChangedText')}
|
||||
footer={
|
||||
<div className='flex space-x-2'>
|
||||
<Button variant='primary' className='flex items-center space-x-2' onClick={onConfirm}>
|
||||
<Button variant='primary' className='flex space-x-2' onClick={onConfirm}>
|
||||
{icon}
|
||||
<span>{t('common.operation.refresh')}</span>
|
||||
</Button>
|
||||
|
||||
@@ -28,7 +28,7 @@ const HasNotSetAPI: FC<IHasNotSetAPIProps> = ({
|
||||
title={isTrailFinished ? t('appDebug.notSetAPIKey.trailFinished') : t('appDebug.notSetAPIKey.title')}
|
||||
description={t('appDebug.notSetAPIKey.description')}
|
||||
footer={
|
||||
<Button variant='primary' className='flex items-center space-x-2' onClick={onSetting}>
|
||||
<Button variant='primary' className='flex space-x-2' onClick={onSetting}>
|
||||
<span>{t('appDebug.notSetAPIKey.settingBtn')}</span>
|
||||
{icon}
|
||||
</Button>}
|
||||
|
||||
@@ -62,8 +62,8 @@ const ConfirmAddVar: FC<IConfirmAddVarProps> = ({
|
||||
</div>
|
||||
</div>
|
||||
<div className='mt-7 flex justify-end space-x-2'>
|
||||
<Button className='w-20 h-8 !text-[13px]' onClick={onCancel}>{t('common.operation.cancel')}</Button>
|
||||
<Button className='w-20 h-8 !text-[13px]' variant='primary' onClick={onConfrim}>{t('common.operation.add')}</Button>
|
||||
<Button onClick={onCancel}>{t('common.operation.cancel')}</Button>
|
||||
<Button variant='primary' onClick={onConfrim}>{t('common.operation.add')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ const AgentSettingButton: FC<Props> = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setIsShowAgentSetting(true)} className='shrink-0 mr-2 !px-3 !h-8 !text-[13px] font-medium text-gray-700'>
|
||||
<Button onClick={() => setIsShowAgentSetting(true)} className='shrink-0 mr-2'>
|
||||
<Settings01 className='mr-1 w-4 h-4 text-gray-500' />
|
||||
{t('appDebug.agent.setting.name')}
|
||||
</Button>
|
||||
|
||||
@@ -137,13 +137,12 @@ const AgentSetting: FC<Props> = ({
|
||||
>
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
className='mr-2 text-sm font-medium'
|
||||
className='mr-2'
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
onClick={handleSave}
|
||||
>
|
||||
{t('common.operation.save')}
|
||||
|
||||
@@ -154,7 +154,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
||||
|
||||
<div className='mt-6 flex justify-end'>
|
||||
<Button
|
||||
className='flex space-x-2 items-center !h-8'
|
||||
className='flex space-x-2'
|
||||
variant='primary'
|
||||
onClick={onGenerate}
|
||||
disabled={isLoading}
|
||||
|
||||
@@ -16,7 +16,7 @@ const ContrlBtnGroup: FC<IContrlBtnGroupProps> = ({ onSave, onReset }) => {
|
||||
<div className="fixed left-[224px] bottom-0 w-[519px] h-[64px]">
|
||||
<div className={`${s.ctrlBtn} flex items-center h-full pl-4 gap-2 bg-white`}>
|
||||
<Button variant='primary' onClick={onSave}>{t('appDebug.operation.applyConfig')}</Button>
|
||||
<Button variant='default' onClick={onReset}>{t('appDebug.operation.resetConfig')}</Button>
|
||||
<Button onClick={onReset}>{t('appDebug.operation.resetConfig')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -155,8 +155,8 @@ const SelectDataSet: FC<ISelectDataSetProps> = ({
|
||||
{selected.length > 0 && `${selected.length} ${t('appDebug.feature.dataSet.selected')}`}
|
||||
</div>
|
||||
<div className='flex space-x-2'>
|
||||
<Button className='!w-24 !h-9' onClick={onClose}>{t('common.operation.cancel')}</Button>
|
||||
<Button className='!w-24 !h-9' variant='primary' onClick={handleSelect} disabled={hasNoData}>{t('common.operation.add')}</Button>
|
||||
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
|
||||
<Button variant='primary' onClick={handleSelect} disabled={hasNoData}>{t('common.operation.add')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -275,13 +275,12 @@ const SettingsModal: FC<SettingsModalProps> = ({
|
||||
>
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
className='mr-2 text-sm font-medium'
|
||||
className='mr-2'
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
disabled={loading}
|
||||
onClick={handleSave}
|
||||
>
|
||||
|
||||
@@ -399,10 +399,7 @@ const Debug: FC<IDebug> = ({
|
||||
? (
|
||||
<>
|
||||
<Button
|
||||
className={`
|
||||
h-8 px-2.5 text-[13px] font-medium text-primary-600 bg-white
|
||||
${multipleModelConfigs.length >= 4 && 'opacity-30'}
|
||||
`}
|
||||
variant='secondary-accent'
|
||||
onClick={() => onMultipleModelConfigsChange(true, [...multipleModelConfigs, { id: `${Date.now()}`, model: '', provider: '', parameters: {} }])}
|
||||
disabled={multipleModelConfigs.length >= 4}
|
||||
>
|
||||
@@ -415,7 +412,7 @@ const Debug: FC<IDebug> = ({
|
||||
: null
|
||||
}
|
||||
{mode !== AppType.completion && (
|
||||
<Button className='flex items-center gap-1 !h-8 !bg-white' onClick={clearConversation}>
|
||||
<Button variant='secondary-accent' className='gap-1' onClick={clearConversation}>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.66663 2.66629V5.99963H3.05463M3.05463 5.99963C3.49719 4.90505 4.29041 3.98823 5.30998 3.39287C6.32954 2.7975 7.51783 2.55724 8.68861 2.70972C9.85938 2.8622 10.9465 3.39882 11.7795 4.23548C12.6126 5.07213 13.1445 6.16154 13.292 7.33296M3.05463 5.99963H5.99996M13.3333 13.333V9.99963H12.946M12.946 9.99963C12.5028 11.0936 11.7093 12.0097 10.6898 12.6045C9.67038 13.1993 8.48245 13.4393 7.31203 13.2869C6.1416 13.1344 5.05476 12.5982 4.22165 11.7621C3.38854 10.926 2.8562 9.83726 2.70796 8.66629M12.946 9.99963H9.99996" stroke="#1C64F2" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
|
||||
@@ -134,8 +134,20 @@ const OpeningStatement: FC<IOpeningStatementProps> = ({
|
||||
const headerRight = !readonly ? (
|
||||
isFocus ? (
|
||||
<div className='flex items-center space-x-1'>
|
||||
<div className='px-3 leading-[18px] text-xs font-medium text-gray-700 cursor-pointer' onClick={handleCancel}>{t('common.operation.cancel')}</div>
|
||||
<Button className='!h-8 !px-3 text-xs' onClick={handleConfirm} variant="primary">{t('common.operation.save')}</Button>
|
||||
<Button
|
||||
variant='ghost'
|
||||
size='small'
|
||||
onClick={handleCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleConfirm}
|
||||
variant="primary"
|
||||
size='small'
|
||||
>
|
||||
{t('common.operation.save')}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<OperationBtn type='edit' actionName={hasValue ? '' : t('appDebug.openingStatement.writeOpener') as string} onClick={handleEdit} />
|
||||
|
||||
@@ -198,7 +198,6 @@ const PromptValuePanel: FC<IPromptValuePanelProps> = ({
|
||||
<div className="mt-5 border-b border-gray-100"></div>
|
||||
<div className="flex justify-between mt-4 px-4">
|
||||
<Button
|
||||
className='!h-8 !p-3'
|
||||
onClick={onClear}
|
||||
disabled={false}
|
||||
>
|
||||
|
||||
@@ -123,11 +123,10 @@ const ConfigParamModal: FC<Props> = ({
|
||||
</div>
|
||||
|
||||
<div className='mt-6 flex gap-2 justify-end'>
|
||||
<Button className='!text-sm' onClick={onHide}>{t('common.operation.cancel')}</Button>
|
||||
<Button onClick={onHide}>{t('common.operation.cancel')}</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
onClick={handleSave}
|
||||
className='flex items-center border-[0.5px] !text-sm'
|
||||
loading={isLoading}
|
||||
>
|
||||
<div></div>
|
||||
|
||||
@@ -354,13 +354,12 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({
|
||||
<div className='flex items-center justify-end'>
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
className='mr-2 text-sm font-medium'
|
||||
className='mr-2'
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
onClick={handleSave}
|
||||
disabled={localeData.type === 'openai_moderation' && !openaiProviderConfiged}
|
||||
>
|
||||
|
||||
@@ -271,13 +271,12 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
|
||||
<div className='flex items-center justify-end mt-6'>
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
className='mr-2 text-sm font-medium'
|
||||
className='mr-2'
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
onClick={handleSave}
|
||||
>
|
||||
{t('common.operation.save')}
|
||||
|
||||
Reference in New Issue
Block a user