mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-01 16:03:38 +08:00
feat: update the "tag delete" confirm modal (#7522)
This commit is contained in:
parent
9f6aab11d4
commit
6f968bafb2
@ -8,7 +8,7 @@ import { useDebounceFn } from 'ahooks'
|
|||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useStore as useTagStore } from './store'
|
import { useStore as useTagStore } from './store'
|
||||||
import TagRemoveModal from './tag-remove-modal'
|
import Confirm from '@/app/components/base/confirm'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import type { Tag } from '@/app/components/base/tag-management/constant'
|
import type { Tag } from '@/app/components/base/tag-management/constant'
|
||||||
import { ToastContext } from '@/app/components/base/toast'
|
import { ToastContext } from '@/app/components/base/toast'
|
||||||
@ -134,14 +134,15 @@ const TagItemEditor: FC<TagItemEditorProps> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<TagRemoveModal
|
<Confirm
|
||||||
tag={tag}
|
title={`${t('common.tag.delete')} "${tag.name}"`}
|
||||||
show={showRemoveModal}
|
isShow={showRemoveModal}
|
||||||
|
content={t('common.tag.deleteTip')}
|
||||||
onConfirm={() => {
|
onConfirm={() => {
|
||||||
handleRemove()
|
handleRemove()
|
||||||
setShowRemoveModal(false)
|
setShowRemoveModal(false)
|
||||||
}}
|
}}
|
||||||
onClose={() => setShowRemoveModal(false)}
|
onCancel={() => setShowRemoveModal(false)}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user