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:
taogaetz 2025-09-14 15:10:10 -04:00
parent fe3f532a25
commit 1fc17a8039
3 changed files with 6 additions and 3 deletions

View File

@ -21,6 +21,7 @@ export const load: LayoutServerLoad = async ({ locals }) => {
return {
recipes,
authenticated: locals.authenticated
authenticated: locals.authenticated,
hasAccess: locals.hasAccess
};
};

View File

@ -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>

View File

@ -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"