enhance: unified ui

This commit is contained in:
Julian Krauser 2025-05-16 10:27:38 +02:00
parent 2d35e2416b
commit 35fd8a8e82

View file

@ -17,9 +17,12 @@
class="max-w-full w-full grow flex flex-col divide-y-2 divide-gray-300 bg-white rounded-lg justify-center overflow-hidden" class="max-w-full w-full grow flex flex-col divide-y-2 divide-gray-300 bg-white rounded-lg justify-center overflow-hidden"
> >
<slot name="topBar"></slot> <slot name="topBar"></slot>
<div v-if="!topBar" class="flex flex-row items-center justify-between pt-5 pb-3 px-7">
<h1 class="font-bold text-xl min-h-8">{{ title }}</h1>
</div>
<div class="flex flex-col gap-2 grow py-5 overflow-hidden"> <div class="flex flex-col gap-2 grow py-5 overflow-hidden">
<slot name="diffMain"></slot> <slot name="diffMain"></slot>
<div v-if="!diffMain" class="flex flex-col gap-2 grow px-7 overflow-y-scroll"> <div v-if="!diffMain" class="flex flex-col gap-2 grow px-7 overflow-y-auto">
<slot name="main"></slot> <slot name="main"></slot>
</div> </div>
</div> </div>
@ -51,6 +54,10 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
title: {
type: String,
default: "Titel",
},
}, },
computed: { computed: {
...mapState(useNavigationStore, ["activeLink", "activeNavigation"]), ...mapState(useNavigationStore, ["activeLink", "activeNavigation"]),
@ -60,6 +67,9 @@ export default defineComponent({
rootRoute() { rootRoute() {
return ((this.$route?.name as string) ?? "").split("-")[0]; return ((this.$route?.name as string) ?? "").split("-")[0];
}, },
topBar() {
return this.$slots.topBar;
},
diffMain() { diffMain() {
return this.$slots.diffMain; return this.$slots.diffMain;
}, },