2020-08-11 14:46:58 +02:00
|
|
|
<template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<section
|
|
|
|
class="flex flex-col mb-3 border-2"
|
|
|
|
:class="{
|
|
|
|
'border-mbz-purple': privateSection,
|
|
|
|
'border-yellow-1': !privateSection,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<div class="flex items-stretch py-3 px-1 bg-yellow-1 text-violet-title">
|
|
|
|
<div class="flex flex-1 gap-1">
|
|
|
|
<o-icon :icon="icon" custom-size="36" />
|
|
|
|
<h2 class="text-2xl font-medium mt-0">{{ title }}</h2>
|
|
|
|
</div>
|
|
|
|
<router-link class="self-center" :to="route">{{
|
|
|
|
t("View all")
|
|
|
|
}}</router-link>
|
2020-08-31 12:40:30 +02:00
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="flex-1">
|
2020-08-31 12:40:30 +02:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="flex justify-end p-2">
|
2020-08-31 12:40:30 +02:00
|
|
|
<slot name="create"></slot>
|
|
|
|
</div>
|
2020-08-11 14:46:58 +02:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
|
|
|
|
withDefaults(
|
|
|
|
defineProps<{
|
|
|
|
title: string;
|
|
|
|
icon: string;
|
|
|
|
privateSection?: boolean;
|
|
|
|
route: { name: string; params: { preferredUsername: string } };
|
|
|
|
}>(),
|
|
|
|
{ privateSection: true }
|
|
|
|
);
|
|
|
|
const { t } = useI18n({ useScope: "global" });
|
2020-08-11 14:46:58 +02:00
|
|
|
</script>
|