feat:#5 added menubar link

This commit is contained in:
Elmar Kresse
2024-01-24 11:24:44 +01:00
parent 4c16605bd6
commit c90577e6e5
6 changed files with 54 additions and 12 deletions

View File

@@ -17,9 +17,20 @@ const items = computed(() => [
route: "/edit",
},
{
label: t("roomFinder"),
icon: "pi pi-fw pi-calendar",
route: "/rooms",
label: t("rooms"),
icon: "pi pi-fw pi-angle-down",
items: [
{
label: t("roomFinderPage.roomSchedule"),
icon: "pi pi-fw pi-hourglass",
route: "/rooms",
},
{
label: t("roomFinderPage.freeRooms"),
icon: "pi pi-fw pi-calendar",
route: "/rooms/free",
},
],
},
{
label: t("faq"),
@@ -44,17 +55,17 @@ const items = computed(() => [
<template #start>
<router-link v-slot="{ navigate }" :to="`/`" custom>
<Button severity="secondary" text class="p-0 mx-2" @click="navigate">
<img
width="50"
height="50"
src="../../public/htwk.svg"
alt="Logo"
/>
<img width="50" height="50" src="../../public/htwk.svg" alt="Logo" />
</Button>
</router-link>
</template>
<template #item="{ item }">
<router-link v-slot="{ navigate }" :to="item.route" custom>
<router-link
v-if="item.route"
v-slot="{ navigate }"
:to="item.route"
custom
>
<Button
:label="String(item.label)"
:icon="item.icon"
@@ -64,6 +75,15 @@ const items = computed(() => [
@click="navigate"
/>
</router-link>
<Button
v-else
:label="String(item.label)"
:icon="item.icon"
text
severity="secondary"
@click="item.url"
>
</Button>
</template>
<template #end>
<div class="flex align-items-stretch justify-content-center">
@@ -80,6 +100,10 @@ const items = computed(() => [
border: none;
}
:deep(.p-submenu-list) {
border-radius: 6px;
}
:deep(.p-button .p-button-label::after) {
content: "";
display: block;