Feat/new confirm (#6984)
This commit is contained in:
@@ -24,7 +24,7 @@ import { checkKeys, getNewVar } from '@/utils/var'
|
||||
import Switch from '@/app/components/base/switch'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
import { Settings01 } from '@/app/components/base/icons/src/vender/line/general'
|
||||
import ConfirmModal from '@/app/components/base/confirm/common'
|
||||
import Confirm from '@/app/components/base/confirm'
|
||||
import ConfigContext from '@/context/debug-configuration'
|
||||
import { AppType } from '@/types/app'
|
||||
import type { ExternalDataTool } from '@/models/common'
|
||||
@@ -389,11 +389,10 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
|
||||
)}
|
||||
|
||||
{isShowDeleteContextVarModal && (
|
||||
<ConfirmModal
|
||||
<Confirm
|
||||
isShow={isShowDeleteContextVarModal}
|
||||
title={t('appDebug.feature.dataSet.queryVariable.deleteContextVarTitle', { varName: promptVariables[removeIndex as number]?.name })}
|
||||
desc={t('appDebug.feature.dataSet.queryVariable.deleteContextVarTip') as string}
|
||||
confirmBtnClassName='bg-[#B42318] hover:bg-[#B42318]'
|
||||
content={t('appDebug.feature.dataSet.queryVariable.deleteContextVarTip')}
|
||||
onConfirm={() => {
|
||||
didRemoveVar(removeIndex as number)
|
||||
hideDeleteContextVarModal()
|
||||
|
||||
@@ -282,7 +282,6 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
||||
title={t('appDebug.generate.overwriteTitle')}
|
||||
content={t('appDebug.generate.overwriteMessage')}
|
||||
isShow={showConfirmOverwrite}
|
||||
onClose={() => setShowConfirmOverwrite(false)}
|
||||
onConfirm={() => {
|
||||
setShowConfirmOverwrite(false)
|
||||
onFinished(res!)
|
||||
|
||||
@@ -880,7 +880,6 @@ const Configuration: FC = () => {
|
||||
title={t('appDebug.resetConfig.title')}
|
||||
content={t('appDebug.resetConfig.message')}
|
||||
isShow={restoreConfirmOpen}
|
||||
onClose={() => setRestoreConfirmOpen(false)}
|
||||
onConfirm={resetAppConfig}
|
||||
onCancel={() => setRestoreConfirmOpen(false)}
|
||||
/>
|
||||
@@ -890,7 +889,6 @@ const Configuration: FC = () => {
|
||||
title={t('appDebug.trailUseGPT4Info.title')}
|
||||
content={t('appDebug.trailUseGPT4Info.description')}
|
||||
isShow={showUseGPT4Confirm}
|
||||
onClose={() => setShowUseGPT4Confirm(false)}
|
||||
onConfirm={() => {
|
||||
setShowAccountSettingModal({ payload: 'provider' })
|
||||
setShowUseGPT4Confirm(false)
|
||||
|
||||
Reference in New Issue
Block a user