Replace native confirm() dialogs with styled confirm modals.
Deploy Ladill Mini / deploy (push) Successful in 33s
Deploy Ladill Mini / deploy (push) Successful in 33s
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:
@@ -74,10 +74,19 @@
|
||||
<div class="mt-4 rounded-2xl border border-rose-200 bg-white p-5">
|
||||
<h2 class="text-sm font-semibold text-rose-700">Delete mailbox</h2>
|
||||
<p class="mt-0.5 text-xs text-slate-400">This permanently removes the mailbox and its email.</p>
|
||||
<form method="POST" action="{{ route('email.mailboxes.destroy', $mailbox['id']) }}" class="mt-3" onsubmit="return confirm('Delete {{ $mailbox['address'] }}? This cannot be undone.')">
|
||||
@csrf @method('DELETE')
|
||||
<button class="rounded-lg bg-rose-600 px-4 py-2 text-sm font-semibold text-white hover:bg-rose-700">Delete mailbox</button>
|
||||
</form>
|
||||
<x-confirm-dialog
|
||||
:name="'delete-mailbox-'.$mailbox['id']"
|
||||
title="Delete mailbox?"
|
||||
:message="'Delete '.$mailbox['address'].'? This cannot be undone.'"
|
||||
:action="route('email.mailboxes.destroy', $mailbox['id'])"
|
||||
method="DELETE"
|
||||
confirm-label="Delete mailbox"
|
||||
class="mt-3"
|
||||
>
|
||||
<x-slot:trigger>
|
||||
<button type="button" class="rounded-lg bg-rose-600 px-4 py-2 text-sm font-semibold text-white hover:bg-rose-700">Delete mailbox</button>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user