Feat/new confirm (#6984)

This commit is contained in:
Yi Xiao
2024-08-06 14:31:13 +08:00
committed by GitHub
parent bd3ed89516
commit 0c22e4e3d1
33 changed files with 192 additions and 461 deletions

View File

@@ -48,7 +48,7 @@ import {
PortalToFollowElemContent,
} from '@/app/components/base/portal-to-follow-elem'
import { useToastContext } from '@/app/components/base/toast'
import ConfirmCommon from '@/app/components/base/confirm/common'
import Confirm from '@/app/components/base/confirm'
import { useAppContext } from '@/context/app-context'
type ModelModalProps = {
@@ -385,12 +385,11 @@ const ModelModal: FC<ModelModalProps> = ({
</div>
{
showConfirm && (
<ConfirmCommon
<Confirm
title={t('common.modelProvider.confirmDelete')}
isShow={showConfirm}
onCancel={() => setShowConfirm(false)}
onConfirm={handleRemove}
confirmWrapperClassName='z-[70]'
/>
)
}

View File

@@ -40,7 +40,7 @@ import {
PortalToFollowElemContent,
} from '@/app/components/base/portal-to-follow-elem'
import { useToastContext } from '@/app/components/base/toast'
import ConfirmCommon from '@/app/components/base/confirm/common'
import Confirm from '@/app/components/base/confirm'
type ModelModalProps = {
provider: ModelProvider
@@ -330,12 +330,11 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
</div>
{
showConfirm && (
<ConfirmCommon
<Confirm
title={t('common.modelProvider.confirmDelete')}
isShow={showConfirm}
onCancel={() => setShowConfirm(false)}
onConfirm={handleRemove}
confirmWrapperClassName='z-[70]'
/>
)
}