mirror of
https://github.com/taogaetz/chefbible.git
synced 2025-12-06 11:47:24 -05:00
Update layout to include access management and adjust input type for PIN authentication
- Added hasAccess property to layout server load for improved access control. - Updated layout to check for hasAccess instead of authenticated for rendering the LogoutButton. - Changed input type for access PIN from password to tel for better user experience and input handling.
This commit is contained in:
parent
fe3f532a25
commit
1fc17a8039
@ -21,6 +21,7 @@ export const load: LayoutServerLoad = async ({ locals }) => {
|
||||
|
||||
return {
|
||||
recipes,
|
||||
authenticated: locals.authenticated
|
||||
authenticated: locals.authenticated,
|
||||
hasAccess: locals.hasAccess
|
||||
};
|
||||
};
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
© 2025 Birbante - Italian Apericena & Dolce Vita
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
{#if data.authenticated}
|
||||
{#if data.hasAccess}
|
||||
<LogoutButton />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,9 @@
|
||||
<span class="label-text">Access Code</span>
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
type="tel"
|
||||
inputmode="numeric"
|
||||
pattern="[0-9]*"
|
||||
id="pin"
|
||||
name="pin"
|
||||
class="input-bordered input w-full"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user