From 27e9eb2277b90783f6d3a03d4895ce7dec6f0fe9 Mon Sep 17 00:00:00 2001 From: Tonya Date: Sat, 23 Aug 2025 19:22:33 +0100 Subject: [PATCH] improve dialogs, option to open image dialog in edit then delete (#951) * fix: change Content-Disposition to inline for proper document display in attachments * feat: overhaul how dialog system works, add delete to image dialog and add button to open image dialog on edit page * chore: remove unneeded console log * fix: ensure cleanup of dialog callbacks on unmount in BarcodeModal, CreateModal, and ImageDialog components --- frontend/components/App/QuickMenuModal.vue | 8 +- frontend/components/App/ScannerModal.vue | 2 +- frontend/components/Item/BarcodeModal.vue | 8 +- frontend/components/Item/CreateModal.vue | 4 +- frontend/components/Item/ImageDialog.vue | 99 +++++++++++ .../ui/alert-dialog/AlertDialogContent.vue | 4 +- .../ui/dialog-provider/DialogProvider.vue | 53 ++++-- .../components/ui/dialog-provider/utils.ts | 163 ++++++++++++++---- frontend/components/ui/dialog/Dialog.vue | 2 +- frontend/components/ui/drawer/Drawer.vue | 2 +- frontend/layouts/default.vue | 8 +- frontend/locales/en.json | 3 +- frontend/pages/item/[id]/index.vue | 61 +++---- frontend/pages/item/[id]/index/edit.vue | 28 +++ 14 files changed, 336 insertions(+), 109 deletions(-) create mode 100644 frontend/components/Item/ImageDialog.vue diff --git a/frontend/components/App/QuickMenuModal.vue b/frontend/components/App/QuickMenuModal.vue index 8ce72f56..4d443033 100644 --- a/frontend/components/App/QuickMenuModal.vue +++ b/frontend/components/App/QuickMenuModal.vue @@ -1,6 +1,6 @@ + + diff --git a/frontend/components/ui/alert-dialog/AlertDialogContent.vue b/frontend/components/ui/alert-dialog/AlertDialogContent.vue index 30ff8f45..fdb5a1e8 100644 --- a/frontend/components/ui/alert-dialog/AlertDialogContent.vue +++ b/frontend/components/ui/alert-dialog/AlertDialogContent.vue @@ -25,13 +25,13 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)