Implement auto-prefill for Exhibitor shared passcode for trusted users
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { page } from '$app/state';
|
||||
import { liveQuery } from 'dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
import { events_loc, events_sess } from '$lib/stores/ae_events_stores';
|
||||
import { Key, Mail, Lock, User, ArrowRight, LoaderCircle, AlertCircle, CheckCircle2 } from 'lucide-svelte';
|
||||
import { untrack } from 'svelte';
|
||||
@@ -27,6 +28,15 @@
|
||||
let status = $state('idle'); // 'idle', 'submitting', 'error', 'success'
|
||||
let error_msg = $state('');
|
||||
|
||||
// --- Auto-prefill for Trusted Users ---
|
||||
$effect(() => {
|
||||
if ($ae_loc.trusted_access && $lq__exhibit_obj?.staff_passcode) {
|
||||
untrack(() => {
|
||||
if (!passcode) passcode = $lq__exhibit_obj?.staff_passcode ?? '';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
async function handle_signin() {
|
||||
if (!$lq__exhibit_obj) return;
|
||||
status = 'submitting';
|
||||
|
||||
Reference in New Issue
Block a user