feat: FRO-17 Added Rule Component and changed Mainmenu structure (#11)

Added a Rule Component and changed MainMenu Structure

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #11
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: lq64 <lq@blackhole.local>
Co-committed-by: lq64 <lq@blackhole.local>
This commit is contained in:
2025-12-10 14:12:12 +01:00
committed by Janis
parent b2f56bcd6f
commit adbe2be534
8 changed files with 179 additions and 55 deletions

View File

@@ -3,8 +3,10 @@ import LoginView from '../views/LoginView.vue'
import MainMenuView from '../views/MainMenuView.vue'
import createGameView from '../views/CreateGame.vue'
import joinGameView from "@/views/JoinGameView.vue";
import defaultMenu from "../components/DefaultMenu.vue"
import axios from "axios";
import { useUserInfo } from "@/composables/useUserInfo";
import rulesView from "../components/Rules.vue";
const api = window?.__RUNTIME_CONFIG__?.API_URL;
@@ -12,10 +14,35 @@ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'mainmenu',
path: '/mainmenu/',
component: MainMenuView,
meta: { requiresAuth: true }
meta: { requiresAuth: true },
children: [
{
path: '',
name: 'mainmenu',
component: defaultMenu,
meta: { requiresAuth: true }
},
{
path: 'create',
name: 'create-Game',
component: createGameView,
meta: {requiresAuth: true }
},
{
path: 'join',
name: 'join-Game',
component: joinGameView,
meta: {requiresAuth: true }
},
{
path: 'rules',
name: 'rules-Game',
component: rulesView,
meta: {requiresAuth: true }
},
],
},
{
path: '/login',
@@ -23,18 +50,6 @@ const router = createRouter({
component: LoginView,
meta: { requiresAuth: false }
},
{
path: '/create',
name: 'create-Game',
component: createGameView,
meta: { requiresAuth: true }
},
{
path: '/join',
name: 'join-Game',
component: joinGameView,
meta: { requiresAuth: true }
}
],
})