base structure

This commit is contained in:
Julian Krauser 2024-11-16 12:19:13 +01:00
parent 967d815784
commit d6f28022f0
7 changed files with 99 additions and 26 deletions

View file

@ -0,0 +1,37 @@
<template>
<SidebarLayout>
<template #sidebar>
<SidebarTemplate mainTitle="Mein Account" topTitle="Mitgliederverwaltung" :showTopList="true">
<template #topList>
<RoutingLink title="Administration" :link="{ name: 'account' }" :active="activeRouteName == 'account'" />
</template>
<template #list>
<RoutingLink title="Mein Account" :link="{ name: 'account' }" :active="activeRouteName == 'account'" />
<RoutingLink title="Anmeldedaten" :link="{ name: 'account' }" :active="activeRouteName == 'account'" />
</template>
</SidebarTemplate>
</template>
<template #main>
<RouterView />
</template>
</SidebarLayout>
</template>
<script setup lang="ts">
import { defineComponent } from "vue";
import { mapState, mapActions } from "pinia";
import SidebarLayout from "@/layouts/Sidebar.vue";
import SidebarTemplate from "@/templates/Sidebar.vue";
import RoutingLink from "@/components/admin/RoutingLink.vue";
import { RouterView } from "vue-router";
</script>
<script lang="ts">
export default defineComponent({
computed: {
activeRouteName() {
return this.$route.name;
},
},
});
</script>

View file

@ -0,0 +1,3 @@
<template>
<div class="w-full h-full bg-white rounded-md flex items-center justify-center">bitte auswählen</div>
</template>

View file

@ -7,10 +7,22 @@
:showTopList="activeNavigationObject.top != null"
>
<template #topList>
<RoutingLink v-for="item in activeNavigationObject.top" :key="item.key" :link="item" />
<RoutingLink
v-for="item in activeNavigationObject.top"
:key="item.key"
:title="item.title"
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
:active="activeLink == item.key"
/>
</template>
<template #list>
<RoutingLink v-for="item in activeNavigationObject.main" :key="item.key" :link="item" />
<RoutingLink
v-for="item in activeNavigationObject.main"
:key="item.key"
:title="item.title"
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
:active="activeLink == item.key"
/>
</template>
</SidebarTemplate>
</template>
@ -33,14 +45,13 @@ import { RouterView } from "vue-router";
<script lang="ts">
export default defineComponent({
props: {
contestId: {
type: String,
default: "",
},
},
computed: {
...mapState(useNavigationStore, ["activeNavigationObject", "activeTopLevelObject", "activeLink"]),
...mapState(useNavigationStore, [
"activeNavigationObject",
"activeTopLevelObject",
"activeLink",
"activeNavigation",
]),
},
created() {
useAbilityStore().$subscribe(() => {