- Fix session persistence: add loading state to App.vue, hydrate portal store in router guards so page refresh preserves auth + event context - Fix shift visibility for festivals: query child event time slots so shifts on sub-events appear in the portal - Add profile page with editable personal info and password change - Add backend endpoints: PUT /portal/profile and PUT /portal/password - Fix registration form: make first_name/last_name editable for logged-in users - Restyle login page: remove Vuexy illustration, center form with Crewli branding - Improve dashboard StatusCard with action cards, icons, and upcoming shift count - Enhance shift cards with status border colors and availability progress bars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
1.1 KiB
Vue
36 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import { useTheme } from 'vuetify'
|
|
import ScrollToTop from '@core/components/ScrollToTop.vue'
|
|
import initCore from '@core/initCore'
|
|
import { initConfigStore } from '@core/stores/config'
|
|
import { hexToRgb } from '@core/utils/colorConverter'
|
|
import { useAuthStore } from '@/stores/useAuthStore'
|
|
|
|
const { global } = useTheme()
|
|
|
|
initCore()
|
|
initConfigStore()
|
|
|
|
const authStore = useAuthStore()
|
|
|
|
// Validate stored token on app startup — must complete before rendering protected content
|
|
authStore.initialize()
|
|
</script>
|
|
|
|
<template>
|
|
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
|
<!-- Show loading state while validating auth token -->
|
|
<template v-if="!authStore.isInitialized">
|
|
<div class="d-flex align-center justify-center" style="min-height: 100vh;">
|
|
<VProgressCircular indeterminate color="primary" size="48" />
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Only render app shell after auth is resolved -->
|
|
<template v-else>
|
|
<RouterView />
|
|
<ScrollToTop />
|
|
</template>
|
|
</VApp>
|
|
</template>
|