feat(ui) : add confirmation dialogs on all delete and unlink actions
This commit is contained in:
@@ -255,7 +255,16 @@ const handleResolve = async (commentId: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const { confirm } = useConfirm()
|
||||
|
||||
const handleDelete = async (commentId: string) => {
|
||||
const ok = await confirm({
|
||||
title: 'Supprimer ce commentaire ?',
|
||||
message: 'Cette action est irréversible.',
|
||||
confirmText: 'Supprimer',
|
||||
dangerous: true,
|
||||
})
|
||||
if (!ok) return
|
||||
const result = await deleteComment(commentId)
|
||||
if (result.success) {
|
||||
comments.value = comments.value.filter(c => c.id !== commentId)
|
||||
|
||||
Reference in New Issue
Block a user