feat(ui) : add confirmation dialogs on all delete and unlink actions

This commit is contained in:
2026-04-04 16:41:35 +02:00
parent 239f417a35
commit a610284325
2 changed files with 37 additions and 4 deletions

View File

@@ -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)