Commit awal: prototipe UI SIAKAD Untan
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{{--
|
||||
Isi bersama halaman galat. Parameter: $code, $heading, $message, $mode.
|
||||
$mode "home": tombol ke dashboard (sudah masuk) atau halaman masuk; "retry": hanya muat ulang dari awal.
|
||||
Pengecekan login dibungkus rescue() supaya halaman galat tetap tampil bila DB atau sesi sedang rusak.
|
||||
--}}
|
||||
@php
|
||||
if ($mode === 'home') {
|
||||
$authenticated = rescue(fn () => auth()->check(), false, false);
|
||||
$href = rescue(fn () => route($authenticated ? 'dashboard' : 'login'), url('/'), false);
|
||||
$label = $authenticated ? 'Kembali ke dashboard' : 'Ke halaman masuk';
|
||||
} else {
|
||||
$href = url('/');
|
||||
$label = 'Coba lagi';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<x-glass.panel as="section" padding="lg" aria-labelledby="judul-galat">
|
||||
<x-brand.logo size="xl" priority />
|
||||
|
||||
<h1 id="judul-galat" class="mt-6">{{ $heading }}</h1>
|
||||
<p class="lede mt-2">{{ $message }}</p>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-ui.button :href="$href" :block="true">{{ $label }}</x-ui.button>
|
||||
</div>
|
||||
|
||||
<p class="mt-4 text-sm text-muted">Kode galat <span class="num">{{ $code }}</span></p>
|
||||
</x-glass.panel>
|
||||
Reference in New Issue
Block a user