initial commit
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<section class="space-y-6">
|
||||
<header>
|
||||
<h2 class="text-lg font-medium text-gray-900">
|
||||
{{ __('Delete Account') }}
|
||||
{{ __('Hapus akun') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('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.') }}
|
||||
{{ __('Setelah akun dihapus, seluruh data terkait akun akan dihapus secara permanen. Pastikan data yang diperlukan sudah diamankan sebelum melanjutkan.') }}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<x-danger-button
|
||||
x-data=""
|
||||
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
|
||||
>{{ __('Delete Account') }}</x-danger-button>
|
||||
>{{ __('Hapus akun') }}</x-danger-button>
|
||||
|
||||
<x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
|
||||
<form method="post" action="{{ route('profile.destroy') }}" class="p-6">
|
||||
@@ -47,7 +47,7 @@
|
||||
</x-secondary-button>
|
||||
|
||||
<x-danger-button class="ms-3">
|
||||
{{ __('Delete Account') }}
|
||||
{{ __('Hapus akun') }}
|
||||
</x-danger-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section>
|
||||
<header>
|
||||
<h2 class="text-lg font-medium text-gray-900">
|
||||
{{ __('Update Password') }}
|
||||
{{ __('Ubah kata sandi') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
@@ -14,19 +14,19 @@
|
||||
@method('put')
|
||||
|
||||
<div>
|
||||
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
|
||||
<x-input-label for="update_password_current_password" :value="__('Kata Sandi Saat Ini')" />
|
||||
<x-text-input id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
|
||||
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="update_password_password" :value="__('New Password')" />
|
||||
<x-input-label for="update_password_password" :value="__('Kata Sandi Baru')" />
|
||||
<x-text-input id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
||||
<x-input-error :messages="$errors->updatePassword->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" />
|
||||
<x-input-label for="update_password_password_confirmation" :value="__('Konfirmasi Kata Sandi')" />
|
||||
<x-text-input id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
||||
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<section>
|
||||
<section class="space-y-6">
|
||||
<header>
|
||||
<h2 class="text-lg font-medium text-gray-900">
|
||||
{{ __('Profile Information') }}
|
||||
{{ __('Informasi profil') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __("Update your account's profile information and email address.") }}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
{{-- Form Profile Standar --}}
|
||||
<form id="send-verification" method="post" action="{{ route('verification.send') }}">
|
||||
@csrf
|
||||
</form>
|
||||
@@ -29,36 +29,83 @@
|
||||
<x-input-error class="mt-2" :messages="$errors->get('email')" />
|
||||
|
||||
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
|
||||
<div>
|
||||
<p class="text-sm mt-2 text-gray-800">
|
||||
{{-- Verification Logic --}}
|
||||
<div class="mt-2">
|
||||
<p class="text-sm text-gray-800">
|
||||
{{ __('Your email address is unverified.') }}
|
||||
|
||||
<button form="send-verification" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
||||
<button form="send-verification" class="underline text-sm text-gray-600 hover:text-gray-900">
|
||||
{{ __('Click here to re-send the verification email.') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@if (session('status') === 'verification-link-sent')
|
||||
<p class="mt-2 font-medium text-sm text-green-600">
|
||||
{{ __('A new verification link has been sent to your email address.') }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<x-primary-button>{{ __('Save') }}</x-primary-button>
|
||||
|
||||
@if (session('status') === 'profile-updated')
|
||||
<p
|
||||
x-data="{ show: true }"
|
||||
x-show="show"
|
||||
x-transition
|
||||
x-init="setTimeout(() => show = false, 2000)"
|
||||
class="text-sm text-gray-600"
|
||||
>{{ __('Saved.') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr class="border-slate-100 my-8">
|
||||
|
||||
{{-- SECTION BIOMETRIK: DISESUAIKAN DENGAN DESIGN ILYCATS --}}
|
||||
<div class="p-8 bg-indigo-600 rounded-[2.5rem] text-white shadow-xl shadow-indigo-100 relative overflow-hidden group">
|
||||
<div class="relative z-10">
|
||||
<div class="flex items-center gap-4 mb-6">
|
||||
<div class="w-12 h-12 bg-white/20 backdrop-blur-md rounded-2xl flex items-center justify-center border border-white/30">
|
||||
<i class="fas fa-fingerprint text-xl text-white"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="text-sm font-black uppercase tracking-widest">Keamanan Biometrik</h4>
|
||||
<p class="text-[10px] text-indigo-100 font-bold uppercase tracking-tighter opacity-80">Passkeys • Face ID • Windows Hello</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-xs text-indigo-50 mb-6 leading-relaxed max-w-sm">
|
||||
Daftarkan wajah atau sidik jari Anda. Setelah terdaftar, Anda bisa masuk ke sistem tanpa perlu mengetik password lagi.
|
||||
</p>
|
||||
|
||||
<button type="button" id="register-passkey"
|
||||
class="inline-flex items-center px-6 py-3 bg-white text-indigo-600 rounded-xl font-black text-[10px] uppercase tracking-widest hover:bg-indigo-50 transition-all shadow-lg active:scale-95 disabled:opacity-50">
|
||||
<i class="fas fa-plus-circle mr-2"></i> DAFTARKAN WAJAH SEKARANG
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{-- Dekorasi Ikon --}}
|
||||
<i class="fas fa-shield-check absolute -bottom-6 -right-6 text-9xl text-white/10 -rotate-12"></i>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- PERBAIKAN SCRIPT: MENGGUNAKAN TYPE MODULE --}}
|
||||
<script type="module">
|
||||
// 1. Ambil objek UTAMA (Default Export), bukan fungsi named-nya
|
||||
import WebAuthn from "{{ asset('vendor/webauthn/webauthn.js') }}";
|
||||
|
||||
const regBtn = document.getElementById('register-passkey');
|
||||
|
||||
if (regBtn) {
|
||||
regBtn.addEventListener('click', async () => {
|
||||
const btn = regBtn;
|
||||
const originalText = btn.innerHTML;
|
||||
|
||||
try {
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> MENUNGGU SCAN...';
|
||||
|
||||
// 2. Panggil fungsi register melalui objek WebAuthn
|
||||
const response = await WebAuthn.register();
|
||||
|
||||
if (response.success) {
|
||||
alert("Berhasil! Wajah/Sidik Jari telah terdaftar.");
|
||||
window.location.reload();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
alert("Pendaftaran gagal. Pastikan perangkat mendukung biometrik.");
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = originalText;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user