From 75fdd0255dd9228f78af15dd54a8609605ac4f68 Mon Sep 17 00:00:00 2001
From: isaacclad
Date: Sun, 14 Jun 2026 23:01:23 +0000
Subject: [PATCH] Replace native confirm dialogs with Ladill modal for file
deletes.
Use the existing ladillConfirm store on the Files page and x-confirm-dialog on transfer delete so confirmations match the rest of Transfer.
Co-authored-by: Cursor
---
resources/js/app.js | 12 +++++++++---
.../views/transfer/transfers/show.blade.php | 17 ++++++++++++-----
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/resources/js/app.js b/resources/js/app.js
index fcabad2..66fef95 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -686,9 +686,15 @@ Alpine.data('filesManager', (config = {}) => ({
this.showToast('Delete files individually. Folder delete is not supported yet.');
return;
}
- if (! confirm(`Delete ${this.selectedFileIds.length} file${this.selectedFileIds.length === 1 ? '' : 's'}? This cannot be undone.`)) {
- return;
- }
+ const count = this.selectedFileIds.length;
+ const confirmed = await Alpine.store('ladillConfirm').ask({
+ title: count === 1 ? 'Delete file?' : `Delete ${count} files?`,
+ message: 'This cannot be undone.',
+ confirmLabel: 'Delete',
+ cancelLabel: 'Cancel',
+ variant: 'danger',
+ });
+ if (!confirmed) return;
this.submitAction(this.routes.bulkDelete);
},
diff --git a/resources/views/transfer/transfers/show.blade.php b/resources/views/transfer/transfers/show.blade.php
index c4bffc0..16c2ed6 100644
--- a/resources/views/transfer/transfers/show.blade.php
+++ b/resources/views/transfer/transfers/show.blade.php
@@ -24,11 +24,18 @@
· {{ $fmtBytes($transfer->storage_bytes) }} stored · GHS {{ number_format($transfer->monthlyCostGhs(), 2) }}/mo
-
+
+
+
+
+
@if(session('success'))