import '../css/app.css'; import { createApp, h } from 'vue'; import { createInertiaApp } from '@inertiajs/vue3'; import { createPortalVuetify } from './plugins/vuetify'; createInertiaApp({ title: (title, page) => { const portalName = page.props.branding.portal_name; return title ? `${title} – ${portalName}` : portalName; }, resolve: (name) => { const pages = import.meta.glob('./pages/**/*.vue'); const page = pages[`./pages/${name}.vue`]; if (!page) { throw new Error(`Seite nicht gefunden: ${name}`); } return page(); }, setup({ el, App, props, plugin }) { const shared = props.initialPage.props; createApp({ render: () => h(App, props) }) .use(plugin) .use(createPortalVuetify({ primaryColor: shared.branding.primary_color, theme: shared.auth.user?.theme ?? 'system', })) .mount(el); }, progress: { color: 'rgb(var(--v-theme-primary))', }, });