Add registration page, fix auth paths, and improve navigation

This commit is contained in:
Torsten Schulz (local)
2025-10-21 11:31:43 +02:00
parent 2b249577a7
commit f058516a3d
86 changed files with 2914 additions and 531 deletions

View File

@@ -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, l as hasProtocol, i as joinURL, m as getContext, w as withQuery, n as withTrailingSlash, o as withoutTrailingSlash, q as isScriptProtocol, s as sanitizeStatusCode, $ as $fetch, t as createHooks, v as executeAsync, c as createError$1, x as toRouteMatcher, y as createRouter$1, z as defu } from '../nitro/nitro.mjs';
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 { b as baseURL } from '../routes/renderer.mjs';
import { RouterView, createMemoryHistory, createRouter, START_LOCATION, useRoute as useRoute$1 } from 'vue-router';
import { ssrRenderSuspense, ssrRenderComponent, ssrRenderVNode, ssrRenderAttrs, ssrRenderAttr, ssrRenderStyle, ssrRenderClass, ssrRenderList, ssrInterpolate } from 'vue/server-renderer';
import { X, Menu, ChevronDown } from 'lucide-vue-next';
import { X, Menu, ChevronDown, User, ChevronUp } from 'lucide-vue-next';
import 'node:http';
import 'node:https';
import 'node:events';
@@ -27,6 +27,8 @@ if (!("global" in globalThis)) {
globalThis.global = globalThis;
}
const nuxtLinkDefaults = { "componentName": "NuxtLink" };
const asyncDataDefaults = { "value": null, "errorValue": null, "deep": true };
const fetchDefaults = {};
const appId = "nuxt-app";
function getNuxtAppCtx(id = appId) {
return getContext(id, {
@@ -383,12 +385,21 @@ async function getRouteRules(arg) {
return defu({}, ..._routeRulesMatcher.matchAll(path).reverse());
}
}
const __nuxt_page_meta = {
layout: "default"
};
const _routes = [
{
name: "index",
path: "/",
component: () => import('./index-DLu_rC7p.mjs')
},
{
name: "login",
path: "/login",
meta: __nuxt_page_meta || {},
component: () => import('./login-CSQ2h4vV.mjs')
},
{
name: "anlagen",
path: "/anlagen",
@@ -419,6 +430,12 @@ const _routes = [
path: "/vorstand",
component: () => import('./vorstand-ul_2Xlsj.mjs')
},
{
name: "cms",
path: "/cms",
meta: { "middleware": "auth" },
component: () => import('./index-Deu10thO.mjs')
},
{
name: "impressum",
path: "/impressum",
@@ -439,6 +456,11 @@ const _routes = [
path: "/geschichte",
component: () => import('./geschichte-Buv1aL5j.mjs')
},
{
name: "registrieren",
path: "/registrieren",
component: () => import('./registrieren-CelrCDCD.mjs')
},
{
name: "spielsysteme",
path: "/spielsysteme",
@@ -469,6 +491,11 @@ const _routes = [
path: "/mannschaften",
component: () => import('./index-BLCJ44Pz.mjs')
},
{
name: "passwort-vergessen",
path: "/passwort-vergessen",
component: () => import('./passwort-vergessen-CU7x98cF.mjs')
},
{
name: "training-anfaenger",
path: "/training/anfaenger",
@@ -494,6 +521,12 @@ const _routes = [
path: "/vereinsmeisterschaften",
component: () => import('./vereinsmeisterschaften-COrSkCMk.mjs')
},
{
name: "mitgliederbereich",
path: "/mitgliederbereich",
meta: { "middleware": "auth" },
component: () => import('./index-CtmAVvb3.mjs')
},
{
name: "mannschaften-spielplaene",
path: "/mannschaften/spielplaene",
@@ -614,7 +647,9 @@ const globalMiddleware = [
validate,
manifest_45route_45rule
];
const namedMiddleware = {};
const namedMiddleware = {
auth: () => import('./auth-D7NaNMED.mjs')
};
const plugin = /* @__PURE__ */ defineNuxtPlugin({
name: "nuxt:router",
enforce: "pre",
@@ -1949,9 +1984,15 @@ const _sfc_main$3 = {
__ssrInlineRender: true,
setup(__props) {
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
const isMemberMenuOpen = ref(false);
const isLoggedIn = ref(false);
const userRole = ref(null);
const isAdmin = computed(() => {
return userRole.value === "admin" || userRole.value === "vorstand";
});
return (_ctx, _push, _parent, _attrs) => {
const _component_NuxtLink = __nuxt_component_0;
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "fixed bottom-0 left-0 right-0 z-40 bg-gray-900 border-t border-gray-800 shadow-2xl" }, _attrs))}><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3"><div class="flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0"><p class="text-sm text-gray-400"> © ${ssrInterpolate(unref(currentYear))} Harheimer TC </p><div class="flex items-center space-x-6 text-sm">`);
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "fixed bottom-0 left-0 right-0 z-40 bg-gray-900 border-t border-gray-800 shadow-2xl" }, _attrs))}><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3"><div class="flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0"><p class="text-sm text-gray-400"> © ${ssrInterpolate(unref(currentYear))} Harheimer TC </p><div class="flex items-center space-x-6 text-sm relative">`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/impressum",
class: "text-gray-400 hover:text-primary-400 transition-colors"
@@ -1982,7 +2023,112 @@ const _sfc_main$3 = {
}),
_: 1
}, _parent));
_push(`</div></div></div></footer>`);
_push(`<div class="relative"><button class="flex items-center space-x-1 text-gray-400 hover:text-primary-400 transition-colors">`);
_push(ssrRenderComponent(unref(User), { size: 16 }, null, _parent));
_push(`<span>Mitglieder</span>`);
_push(ssrRenderComponent(unref(ChevronUp), {
size: 14,
class: ["transition-transform", isMemberMenuOpen.value ? "rotate-0" : "rotate-180"]
}, null, _parent));
_push(`</button>`);
if (isMemberMenuOpen.value) {
_push(`<div class="absolute bottom-full right-0 mb-2 w-48 bg-gray-800 border border-gray-700 rounded-lg shadow-xl overflow-hidden">`);
if (isLoggedIn.value) {
_push(`<!--[-->`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/mitgliederbereich",
onClick: ($event) => isMemberMenuOpen.value = false,
class: "block px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` Mitgliederbereich `);
} else {
return [
createTextVNode(" Mitgliederbereich ")
];
}
}),
_: 1
}, _parent));
if (isAdmin.value) {
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/cms",
onClick: ($event) => isMemberMenuOpen.value = false,
class: "block px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` CMS `);
} else {
return [
createTextVNode(" CMS ")
];
}
}),
_: 1
}, _parent));
} else {
_push(`<!---->`);
}
_push(`<button class="w-full text-left px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"> Abmelden </button><!--]-->`);
} else {
_push(`<!--[-->`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/login",
onClick: ($event) => isMemberMenuOpen.value = false,
class: "block px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` Anmelden `);
} else {
return [
createTextVNode(" Anmelden ")
];
}
}),
_: 1
}, _parent));
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/registrieren",
onClick: ($event) => isMemberMenuOpen.value = false,
class: "block px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` Registrieren `);
} else {
return [
createTextVNode(" Registrieren ")
];
}
}),
_: 1
}, _parent));
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/passwort-vergessen",
onClick: ($event) => isMemberMenuOpen.value = false,
class: "block px-4 py-2 text-sm text-gray-300 hover:bg-primary-600 hover:text-white transition-colors"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` Passwort vergessen `);
} else {
return [
createTextVNode(" Passwort vergessen ")
];
}
}),
_: 1
}, _parent));
_push(`<!--]-->`);
}
_push(`</div>`);
} else {
_push(`<!---->`);
}
_push(`</div></div></div></div></footer>`);
};
}
};
@@ -2117,5 +2263,5 @@ let entry;
}
const entry$1 = (ssrContext) => entry(ssrContext);
export { __nuxt_component_0 as _, entry$1 as default, 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, tryUseNuxtApp as t, useRoute as u };
//# sourceMappingURL=server.mjs.map