Added volunteer signup.
This commit is contained in:
parent
ace7f11a60
commit
8dc5d3ed01
12 changed files with 1258 additions and 49 deletions
|
|
@ -11,6 +11,8 @@
|
|||
import Users from './pages/Users.svelte'
|
||||
import Import from './pages/Import.svelte'
|
||||
import Kiosk from './pages/Kiosk.svelte'
|
||||
import VolunteerSignup from './pages/VolunteerSignup.svelte'
|
||||
import ConfirmEmail from './pages/ConfirmEmail.svelte'
|
||||
import GateUI from './pages/GateUI.svelte'
|
||||
import ScheduleBoard from './pages/ScheduleBoard.svelte'
|
||||
import Settings from './pages/Settings.svelte'
|
||||
|
|
@ -25,8 +27,11 @@
|
|||
let updateAvailable = $state(false)
|
||||
let mobileNavOpen = $state(false)
|
||||
|
||||
// Check if this is a kiosk token URL before doing anything else
|
||||
// Check if this is a public page (no auth needed)
|
||||
const kioskToken = $derived(window.location.hash.match(/^#\/v\/([A-Z0-9]+)/i)?.[1] ?? '')
|
||||
const isVolunteerSignup = $derived(window.location.hash.startsWith('#/volunteer-signup'))
|
||||
const isConfirmEmail = $derived(window.location.hash.startsWith('#/confirm/'))
|
||||
const isPublicPage = $derived(!!kioskToken || isVolunteerSignup || isConfirmEmail)
|
||||
|
||||
async function checkVersion() {
|
||||
try {
|
||||
|
|
@ -39,8 +44,8 @@
|
|||
onMount(async () => {
|
||||
checkVersion()
|
||||
|
||||
// Kiosk pages don't need auth
|
||||
if (kioskToken) {
|
||||
// Public pages don't need auth
|
||||
if (isPublicPage) {
|
||||
loading = false
|
||||
return
|
||||
}
|
||||
|
|
@ -87,6 +92,10 @@
|
|||
<!-- checking session -->
|
||||
{:else if kioskToken}
|
||||
<Kiosk />
|
||||
{:else if isVolunteerSignup}
|
||||
<VolunteerSignup />
|
||||
{:else if isConfirmEmail}
|
||||
<ConfirmEmail />
|
||||
{:else if !session}
|
||||
<Login onlogin={onLogin} />
|
||||
{:else if role === 'gate'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue