Add global auth state with composable for reactive login status
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { defineComponent, shallowRef, h, resolveComponent, hasInjectionContext, getCurrentInstance, inject, computed, ref, Suspense, Fragment, createApp, provide, shallowReactive, toRef, onErrorCaptured, onServerPrefetch, unref, createVNode, resolveDynamicComponent, reactive, effectScope, isReadonly, isRef, isShallow, isReactive, toRaw, defineAsyncComponent, mergeProps, getCurrentScope, withCtx, createTextVNode, toDisplayString, useSSRContext } from 'vue';
|
||||
import { p as parseQuery, c as createError$1, n as hasProtocol, o as isScriptProtocol, l as joinURL, w as withQuery, q as sanitizeStatusCode, t as getContext, v as withTrailingSlash, x as withoutTrailingSlash, $ as $fetch, y as createHooks, z as executeAsync, A as toRouteMatcher, B as createRouter$1, C as defu } from '../nitro/nitro.mjs';
|
||||
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { defineComponent, shallowRef, h, resolveComponent, hasInjectionContext, inject, computed, getCurrentInstance, ref, Suspense, Fragment, createApp, provide, shallowReactive, mergeProps, unref, withCtx, createTextVNode, toRef, onErrorCaptured, onServerPrefetch, createVNode, resolveDynamicComponent, reactive, effectScope, isReadonly, isRef, isShallow, isReactive, toRaw, defineAsyncComponent, getCurrentScope, toDisplayString, useSSRContext } from 'vue';
|
||||
import { p as parseQuery, c as createError$1, o as hasProtocol, q as isScriptProtocol, m as joinURL, w as withQuery, t as sanitizeStatusCode, v as withTrailingSlash, x as withoutTrailingSlash, y as getContext, $ as $fetch, z as createHooks, A as executeAsync, B as toRouteMatcher, C as createRouter$1, D as defu } from '../nitro/nitro.mjs';
|
||||
import { b as baseURL } from '../routes/renderer.mjs';
|
||||
import { RouterView, createMemoryHistory, createRouter, START_LOCATION, useRoute as useRoute$1, useRouter as useRouter$1 } from 'vue-router';
|
||||
import { ssrRenderSuspense, ssrRenderComponent, ssrRenderVNode, ssrRenderAttrs, ssrRenderAttr, ssrRenderStyle, ssrRenderClass, ssrRenderList, ssrInterpolate } from 'vue/server-renderer';
|
||||
import { X, Menu, ChevronDown, User, ChevronUp } from 'lucide-vue-next';
|
||||
import { RouterView, useRouter as useRouter$1, createMemoryHistory, createRouter, START_LOCATION, useRoute as useRoute$1 } from 'vue-router';
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent, ssrRenderSuspense, ssrRenderVNode, ssrRenderAttr, ssrRenderStyle, ssrRenderClass, ssrRenderList } from 'vue/server-renderer';
|
||||
import { User, ChevronUp, X, Menu, ChevronDown } from 'lucide-vue-next';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
@@ -16,7 +16,6 @@ import 'vue-bundle-renderer/runtime';
|
||||
import 'unhead/server';
|
||||
import 'devalue';
|
||||
import 'unhead/utils';
|
||||
import 'unhead/plugins';
|
||||
|
||||
if (!globalThis.$fetch) {
|
||||
globalThis.$fetch = $fetch.create({
|
||||
@@ -27,7 +26,7 @@ if (!("global" in globalThis)) {
|
||||
globalThis.global = globalThis;
|
||||
}
|
||||
const nuxtLinkDefaults = { "componentName": "NuxtLink" };
|
||||
const asyncDataDefaults = { "value": null, "errorValue": null, "deep": true };
|
||||
const asyncDataDefaults = { "deep": false };
|
||||
const fetchDefaults = {};
|
||||
const appId = "nuxt-app";
|
||||
function getNuxtAppCtx(id = appId) {
|
||||
@@ -42,10 +41,9 @@ function createNuxtApp(options) {
|
||||
_id: options.id || appId || "nuxt-app",
|
||||
_scope: effectScope(),
|
||||
provide: void 0,
|
||||
globalName: "nuxt",
|
||||
versions: {
|
||||
get nuxt() {
|
||||
return "3.19.3";
|
||||
return "4.1.3";
|
||||
},
|
||||
get vue() {
|
||||
return nuxtApp.vueApp.version;
|
||||
@@ -392,151 +390,151 @@ const _routes = [
|
||||
{
|
||||
name: "index",
|
||||
path: "/",
|
||||
component: () => import('./index-DLu_rC7p.mjs')
|
||||
component: () => import('./index-DNNo-ri8.mjs')
|
||||
},
|
||||
{
|
||||
name: "login",
|
||||
path: "/login",
|
||||
meta: __nuxt_page_meta || {},
|
||||
component: () => import('./login-DXVSQ6Sf.mjs')
|
||||
component: () => import('./login-UYxkHMSA.mjs')
|
||||
},
|
||||
{
|
||||
name: "anlagen",
|
||||
path: "/anlagen",
|
||||
component: () => import('./anlagen-7Uz9tb3O.mjs')
|
||||
component: () => import('./anlagen-DZVZwc54.mjs')
|
||||
},
|
||||
{
|
||||
name: "galerie",
|
||||
path: "/galerie",
|
||||
component: () => import('./galerie-D2ht4V1J.mjs')
|
||||
component: () => import('./galerie-CKkERrvu.mjs')
|
||||
},
|
||||
{
|
||||
name: "kontakt",
|
||||
path: "/kontakt",
|
||||
component: () => import('./kontakt-YBQTHNL0.mjs')
|
||||
component: () => import('./kontakt-CvPL2iTP.mjs')
|
||||
},
|
||||
{
|
||||
name: "satzung",
|
||||
path: "/satzung",
|
||||
component: () => import('./satzung-4p_dkEGQ.mjs')
|
||||
component: () => import('./satzung-B1EyxnEP.mjs')
|
||||
},
|
||||
{
|
||||
name: "termine",
|
||||
path: "/termine",
|
||||
component: () => import('./termine-okzZOtGi.mjs')
|
||||
component: () => import('./termine-CjI7RQkI.mjs')
|
||||
},
|
||||
{
|
||||
name: "vorstand",
|
||||
path: "/vorstand",
|
||||
component: () => import('./vorstand-ul_2Xlsj.mjs')
|
||||
component: () => import('./vorstand-CTvU3sk9.mjs')
|
||||
},
|
||||
{
|
||||
name: "cms",
|
||||
path: "/cms",
|
||||
meta: { "middleware": "auth" },
|
||||
component: () => import('./index-BT55J3_j.mjs')
|
||||
component: () => import('./index-Di6P3gtk.mjs')
|
||||
},
|
||||
{
|
||||
name: "impressum",
|
||||
path: "/impressum",
|
||||
component: () => import('./impressum-aCGVD7DK.mjs')
|
||||
component: () => import('./impressum-C5x7htZh.mjs')
|
||||
},
|
||||
{
|
||||
name: "tt-regeln",
|
||||
path: "/tt-regeln",
|
||||
component: () => import('./tt-regeln-Bq95zRf7.mjs')
|
||||
component: () => import('./tt-regeln-BZWHc7KZ.mjs')
|
||||
},
|
||||
{
|
||||
name: "ueber-uns",
|
||||
path: "/ueber-uns",
|
||||
component: () => import('./ueber-uns-DX0FWdab.mjs')
|
||||
component: () => import('./ueber-uns-BgGrxPpm.mjs')
|
||||
},
|
||||
{
|
||||
name: "geschichte",
|
||||
path: "/geschichte",
|
||||
component: () => import('./geschichte-Buv1aL5j.mjs')
|
||||
component: () => import('./geschichte-_GJnsN3v.mjs')
|
||||
},
|
||||
{
|
||||
name: "cms-benutzer",
|
||||
path: "/cms/benutzer",
|
||||
meta: { "middleware": "auth" },
|
||||
component: () => import('./benutzer-BVRRcIDN.mjs')
|
||||
component: () => import('./benutzer-D4aaeGzm.mjs')
|
||||
},
|
||||
{
|
||||
name: "registrieren",
|
||||
path: "/registrieren",
|
||||
component: () => import('./registrieren-CelrCDCD.mjs')
|
||||
component: () => import('./registrieren-x584k-EW.mjs')
|
||||
},
|
||||
{
|
||||
name: "spielsysteme",
|
||||
path: "/spielsysteme",
|
||||
component: () => import('./spielsysteme-Dhk9J-4G.mjs')
|
||||
component: () => import('./spielsysteme-Bnq6t-L4.mjs')
|
||||
},
|
||||
{
|
||||
name: "mitgliedschaft",
|
||||
path: "/mitgliedschaft",
|
||||
component: () => import('./mitgliedschaft-WKu4BIDX.mjs')
|
||||
component: () => import('./mitgliedschaft-CtYFHuYj.mjs')
|
||||
},
|
||||
{
|
||||
name: "training",
|
||||
path: "/training",
|
||||
component: () => import('./index-B63YZkFt.mjs')
|
||||
component: () => import('./index-BTKjtPbN.mjs')
|
||||
},
|
||||
{
|
||||
name: "training-trainer",
|
||||
path: "/training/trainer",
|
||||
component: () => import('./trainer-BShuuH8n.mjs')
|
||||
component: () => import('./trainer-CjEe4OtY.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften-damen",
|
||||
path: "/mannschaften/damen",
|
||||
component: () => import('./damen-CHT201O4.mjs')
|
||||
component: () => import('./damen-Cc1AuKQL.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften",
|
||||
path: "/mannschaften",
|
||||
component: () => import('./index-BLCJ44Pz.mjs')
|
||||
component: () => import('./index-vLmOCJh4.mjs')
|
||||
},
|
||||
{
|
||||
name: "passwort-vergessen",
|
||||
path: "/passwort-vergessen",
|
||||
component: () => import('./passwort-vergessen-CU7x98cF.mjs')
|
||||
component: () => import('./passwort-vergessen-bF4OFsu5.mjs')
|
||||
},
|
||||
{
|
||||
name: "training-anfaenger",
|
||||
path: "/training/anfaenger",
|
||||
component: () => import('./anfaenger-Dfou2g8h.mjs')
|
||||
component: () => import('./anfaenger-BL6O-iHL.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften-slug",
|
||||
path: "/mannschaften/:slug()",
|
||||
component: () => import('./_slug_-lfD5B1w9.mjs')
|
||||
component: () => import('./_slug_-BEHYKHP5.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften-herren",
|
||||
path: "/mannschaften/herren",
|
||||
component: () => import('./herren-Bwm6LWcz.mjs')
|
||||
component: () => import('./herren-CMQFxGvZ.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften-jugend",
|
||||
path: "/mannschaften/jugend",
|
||||
component: () => import('./jugend-DUozs_HR.mjs')
|
||||
component: () => import('./jugend-BKTgWzcA.mjs')
|
||||
},
|
||||
{
|
||||
name: "vereinsmeisterschaften",
|
||||
path: "/vereinsmeisterschaften",
|
||||
component: () => import('./vereinsmeisterschaften-COrSkCMk.mjs')
|
||||
component: () => import('./vereinsmeisterschaften-BWzarjkV.mjs')
|
||||
},
|
||||
{
|
||||
name: "mitgliederbereich",
|
||||
path: "/mitgliederbereich",
|
||||
meta: { "middleware": "auth" },
|
||||
component: () => import('./index-CtmAVvb3.mjs')
|
||||
component: () => import('./index-Djv2EYWD.mjs')
|
||||
},
|
||||
{
|
||||
name: "mannschaften-spielplaene",
|
||||
path: "/mannschaften/spielplaene",
|
||||
component: () => import('./spielplaene-Cklo3s-l.mjs')
|
||||
component: () => import('./spielplaene-x8nFGpj2.mjs')
|
||||
}
|
||||
];
|
||||
const ROUTE_KEY_PARENTHESES_RE = /(:\w+)\([^)]+\)/g;
|
||||
@@ -654,7 +652,7 @@ const globalMiddleware = [
|
||||
manifest_45route_45rule
|
||||
];
|
||||
const namedMiddleware = {
|
||||
auth: () => import('./auth-D7NaNMED.mjs')
|
||||
auth: () => import('./auth-DLmcIH86.mjs')
|
||||
};
|
||||
const plugin = /* @__PURE__ */ defineNuxtPlugin({
|
||||
name: "nuxt:router",
|
||||
@@ -2386,6 +2384,7 @@ _sfc_main$3.setup = (props, ctx) => {
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/Footer.vue");
|
||||
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
||||
};
|
||||
const Footer = Object.assign(_sfc_main$3, { __name: "Footer" });
|
||||
const _sfc_main$2 = {
|
||||
__name: "app",
|
||||
__ssrInlineRender: true,
|
||||
@@ -2397,7 +2396,7 @@ const _sfc_main$2 = {
|
||||
_push(`<main class="flex-1 overflow-y-auto pt-20">`);
|
||||
_push(ssrRenderComponent(_component_NuxtPage, null, null, _parent));
|
||||
_push(`</main>`);
|
||||
_push(ssrRenderComponent(_sfc_main$3, null, null, _parent));
|
||||
_push(ssrRenderComponent(Footer, null, null, _parent));
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
@@ -2429,8 +2428,8 @@ const _sfc_main$1 = {
|
||||
const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error");
|
||||
const description = _error.message || _error.toString();
|
||||
const stack = void 0;
|
||||
const _Error404 = defineAsyncComponent(() => import('./error-404-DSMHCJdg.mjs'));
|
||||
const _Error = defineAsyncComponent(() => import('./error-500-DWvPMRQk.mjs'));
|
||||
const _Error404 = defineAsyncComponent(() => import('./error-404-d_FMCCWa.mjs'));
|
||||
const _Error = defineAsyncComponent(() => import('./error-500-RVXNRl1D.mjs'));
|
||||
const ErrorTemplate = is404 ? _Error404 : _Error;
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(ErrorTemplate), mergeProps({ statusCode: unref(statusCode), statusMessage: unref(statusMessage), description: unref(description), stack: unref(stack) }, _attrs), null, _parent));
|
||||
@@ -2511,5 +2510,5 @@ let entry;
|
||||
}
|
||||
const entry$1 = (ssrContext) => entry(ssrContext);
|
||||
|
||||
export { __nuxt_component_0 as _, useNuxtApp as a, asyncDataDefaults as b, createError as c, defineNuxtRouteMiddleware as d, entry$1 as default, fetchDefaults as f, navigateTo as n, tryUseNuxtApp as t, useRoute as u };
|
||||
export { __nuxt_component_0 as _, useNuxtApp as a, asyncDataDefaults as b, createError as c, defineNuxtRouteMiddleware as d, entry$1 as default, fetchDefaults as f, navigateTo as n, useRoute as u };
|
||||
//# sourceMappingURL=server.mjs.map
|
||||
|
||||
Reference in New Issue
Block a user