ff-admin/src/components/Footer.vue

44 lines
1.4 KiB
Vue
Raw Normal View History

2024-08-23 14:42:32 +02:00
<template>
<footer
2025-01-04 19:18:14 +01:00
v-if="authCheck && (routeName.includes('admin-') || routeName.includes('account-') || routeName.includes('docs-'))"
2024-10-27 15:51:15 +01:00
class="md:hidden flex flex-row h-16 min-h-16 justify-center md:justify-normal p-1 bg-white"
2024-08-23 14:42:32 +02:00
>
<div class="w-full flex flex-row gap-2 h-full align-middle">
2024-11-20 10:02:25 +01:00
<TopLevelLink
v-if="routeName == 'admin' || routeName.includes('admin-')"
2024-11-20 10:02:25 +01:00
v-for="item in topLevel"
:key="item.key"
:link="item"
:disableSubLink="true"
/>
<TopLevelLink
2025-02-15 11:41:27 +01:00
v-else-if="
routeName == 'account' || routeName.includes('account-') || routeName == 'docs' || routeName.includes('docs-')
"
:link="{ key: 'club', title: 'Zur Admin Oberfläche', levelDefault: '' }"
:disableSubLink="true"
/>
2024-08-23 14:42:32 +02:00
</div>
</footer>
</template>
<script setup lang="ts">
2024-11-27 17:06:39 +01:00
import { defineComponent } from "vue";
2024-08-23 14:42:32 +02:00
import { mapState } from "pinia";
2024-09-17 16:44:02 +02:00
import { useAuthStore } from "@/stores/auth";
import { useNavigationStore } from "@/stores/admin/navigation";
2024-08-23 14:42:32 +02:00
import TopLevelLink from "./admin/TopLevelLink.vue";
</script>
<script lang="ts">
export default defineComponent({
computed: {
...mapState(useAuthStore, ["authCheck"]),
...mapState(useNavigationStore, ["topLevel"]),
routeName() {
2024-09-01 19:19:48 +02:00
return typeof this.$route.name == "string" ? this.$route.name : "";
2024-08-23 14:42:32 +02:00
},
},
});
</script>