From 3751e21c6c72efcb50c9ccf65bbf89334b6afe4e Mon Sep 17 00:00:00 2001 From: Louis Pagnier Date: Tue, 30 Jun 2026 17:06:15 +0200 Subject: [PATCH] add delete popup in calibration dialog --- .../components/CalibrationDialog.vue | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/client/dive-common/components/CalibrationDialog.vue b/client/dive-common/components/CalibrationDialog.vue index 6ee2c9154..c74dd3d05 100644 --- a/client/dive-common/components/CalibrationDialog.vue +++ b/client/dive-common/components/CalibrationDialog.vue @@ -3,6 +3,7 @@ import { DatasetStereoCalibration } from 'dive-common/apispec'; import { defineComponent, PropType, + ref, } from 'vue'; export default defineComponent({ @@ -18,6 +19,7 @@ export default defineComponent({ }, setup(props, { emit }) { const close = () => emit('input', false); + const confirmDeleteDialog = ref(false); const formatOptional = (value: number | undefined) => ( value === undefined || value === null ? '' : String(value) @@ -91,14 +93,21 @@ export default defineComponent({ close(); }; - const deleteCalibration = () => { + const openDeleteConfirmation = () => { + confirmDeleteDialog.value = true; + }; + + const confirmDelete = () => { emit('delete'); + confirmDeleteDialog.value = false; }; return { close, downloadCalibration, - deleteCalibration, + confirmDeleteDialog, + openDeleteConfirmation, + confirmDelete, formatOptional, formatPair, formatTriple, @@ -282,7 +291,7 @@ export default defineComponent({ Cancel - + mdi-delete-outline @@ -296,5 +305,32 @@ export default defineComponent({ + + + + + + mdi-alert + + + Confirm Deletion + + + + + + Are you sure you want to delete this dataset calibration? + + + + + Cancel + + + Delete + + + +