Replace native confirm() dialogs with styled confirm modals.
Deploy Ladill Servers / deploy (push) Successful in 29s

Add shared confirm-dialog component, Alpine ladillConfirm store, and
swap browser confirms for consistent bottom-sheet modals across user,
admin, and hosting flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-07 21:11:10 +00:00
co-authored by Cursor
parent b5513283da
commit 29cdfe67b8
21 changed files with 499 additions and 85 deletions
@@ -418,9 +418,9 @@
this.selected = event.target.checked ? [...this.allPaths] : [];
},
bulkAction(action) {
async async async bulkAction(action) {
if (action === 'delete') {
if (!confirm('Delete ' + this.selected.length + ' item(s)? This cannot be undone.')) return;
if (!await this.$store.ladillConfirm.ask({ title: 'Delete items?', message: 'Delete ' + this.selected.length + ' item(s)? This cannot be undone.' })) return;
this.submitBulkDelete();
} else if (action === 'move' || action === 'copy') {
this.moveAction = action;
@@ -567,7 +567,7 @@
},
async deleteFile(path) {
if (!confirm('Are you sure you want to delete this?')) return;
if (!await this.$store.ladillConfirm.ask({ title: 'Delete item?', message: 'Are you sure you want to delete this?' })) return;
this.loading = true;
try {
const res = await fetch('{{ route("hosting.panel.files.delete", $account) }}', {
@@ -583,7 +583,7 @@
},
async extractFile(path, name) {
if (!confirm('Extract "' + name + '" in the current directory?\n\nThis may take a while for large archives.')) return;
if (!await this.$store.ladillConfirm.ask({ title: 'Extract archive?', message: 'Extract "' + name + '" in the current directory?\n\nThis may take a while for large archives.', confirmLabel: 'Extract', variant: 'primary' })) return;
this.loading = true;
this.extracting = true;
this.extractFileName = name;