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
+
+
+
+