From 94bbda81dca10783dade4ad344ef40cea40215b0 Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Thu, 30 Nov 2023 13:22:38 +0000 Subject: [PATCH] web/satellite/vuetify-poc: add delete action to file preview This change adds a menu to the file preview dialog with an action to delete files. Issue: #6553 Change-Id: I3b282696077b884df4171a85dee6a62dc9fb0513 --- .../components/dialogs/DeleteFileDialog.vue | 2 + .../components/dialogs/FilePreviewDialog.vue | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/web/satellite/vuetify-poc/src/components/dialogs/DeleteFileDialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/DeleteFileDialog.vue index f24c9e1cf..f3452179f 100644 --- a/web/satellite/vuetify-poc/src/components/dialogs/DeleteFileDialog.vue +++ b/web/satellite/vuetify-poc/src/components/dialogs/DeleteFileDialog.vue @@ -92,6 +92,7 @@ const props = defineProps<{ const emit = defineEmits<{ 'update:modelValue': [value: boolean], 'contentRemoved': [], + 'fileDeleted': [], }>(); const model = computed({ @@ -131,6 +132,7 @@ async function onDeleteClick(): Promise { return; } + emit('fileDeleted'); notify.success(`${fileType.value.charAt(0).toUpperCase() + fileType.value.slice(1)} deleted.`); model.value = false; }); diff --git a/web/satellite/vuetify-poc/src/components/dialogs/FilePreviewDialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/FilePreviewDialog.vue index b01a27965..8ffe68b2b 100644 --- a/web/satellite/vuetify-poc/src/components/dialogs/FilePreviewDialog.vue +++ b/web/satellite/vuetify-poc/src/components/dialogs/FilePreviewDialog.vue @@ -54,6 +54,18 @@ > More + + + + + + Delete + + + + Close @@ -111,6 +123,12 @@ +