Files
star-cloud/resources/views/profile/partials/delete-user-form.blade.php
sky121113 773396fc90
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 52s
[REFACTOR] 實作側邊欄與儀表板多語系化,修復 UI 位移與樣式優化
2026-03-12 17:42:57 +08:00

59 lines
2.9 KiB
PHP

<section class="space-y-6">
<header>
<h2 class="text-xl font-black text-rose-600 dark:text-rose-500 tracking-tight">
{{ __('Danger Zone: Delete Account') }}
</h2>
<p class="mt-1 text-sm font-bold text-slate-400 dark:text-slate-400 uppercase tracking-widest">
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}
</p>
</header>
<button
x-data=""
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
class="btn-luxury-rose px-8"
>
<span>{{ __('Delete Account') }}</span>
</button>
<x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
<form method="post" action="{{ route('profile.destroy') }}" class="p-8">
@csrf
@method('delete')
<h2 class="text-2xl font-black text-slate-800 dark:text-white tracking-tight">
{{ __('Are you sure you want to delete your account?') }}
</h2>
<p class="mt-3 text-sm font-bold text-slate-500 dark:text-slate-400 leading-relaxed">
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
</p>
<div class="mt-8">
<x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
<input
id="password"
name="password"
type="password"
class="py-3 px-4 block w-full border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900 rounded-2xl text-sm font-bold text-slate-700 dark:text-slate-200 focus:ring-4 focus:ring-rose-500/10 focus:border-rose-500 transition-all outline-none"
placeholder="{{ __('Enter your password to confirm') }}"
/>
<x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
</div>
<div class="mt-8 flex justify-end gap-x-3">
<button type="button" x-on:click="$dispatch('close')" class="py-3 px-6 inline-flex items-center gap-x-2 text-sm font-black rounded-2xl border border-slate-200 bg-white text-slate-600 shadow-sm hover:bg-slate-50 focus:outline-none focus:bg-slate-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-slate-900 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:focus:bg-slate-800 transition-all">
{{ __('Cancel') }}
</button>
<button type="submit" class="btn-luxury-rose px-8">
<span>{{ __('Permanently Delete Account') }}</span>
</button>
</div>
</form>
</x-modal>
</section>