2025-05-06 19:00:26 +02:00
|
|
|
<script setup>
|
2025-01-19 12:00:22 +01:00
|
|
|
|
2025-07-08 17:30:58 +02:00
|
|
|
import { inject } from 'vue';
|
|
|
|
|
|
2025-05-06 19:00:26 +02:00
|
|
|
defineProps({
|
|
|
|
|
title: String,
|
|
|
|
|
padding: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2025-05-13 13:26:35 +02:00
|
|
|
titleBadge: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
2025-05-06 19:00:26 +02:00
|
|
|
});
|
2025-01-19 12:00:22 +01:00
|
|
|
|
2025-07-08 17:30:58 +02:00
|
|
|
const subscriptionRequiredDialog = inject('subscriptionRequiredDialog');
|
|
|
|
|
|
|
|
|
|
function onTitleBadge() {
|
|
|
|
|
subscriptionRequiredDialog.value.open();
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-19 12:00:22 +01:00
|
|
|
</script>
|
|
|
|
|
|
2025-01-17 12:24:48 +01:00
|
|
|
<template>
|
2025-05-13 12:56:12 +02:00
|
|
|
<div class="section" :class="{ 'section-extra-padding': padding }">
|
2025-01-17 14:02:05 +01:00
|
|
|
<h2 class="section-header">
|
2025-05-13 13:26:35 +02:00
|
|
|
<div>
|
|
|
|
|
<slot name="header-title">{{ title }}</slot>
|
2025-09-15 17:26:52 +02:00
|
|
|
<slot name="header-title-extra"></slot>
|
2025-07-08 17:30:58 +02:00
|
|
|
<div class="section-header-title-badge" v-if="titleBadge" @click="onTitleBadge()">{{ titleBadge }}</div>
|
2025-05-13 13:26:35 +02:00
|
|
|
</div>
|
2025-01-28 13:55:05 +01:00
|
|
|
<div><slot name="header-buttons"></slot></div>
|
2025-01-17 14:02:05 +01:00
|
|
|
</h2>
|
2025-01-17 12:24:48 +01:00
|
|
|
<hr class="section-divider"/>
|
|
|
|
|
<div class="section-body">
|
2025-01-17 14:02:05 +01:00
|
|
|
<slot></slot>
|
2025-01-17 12:24:48 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-11 18:00:20 +02:00
|
|
|
<style>
|
2025-01-17 12:24:48 +01:00
|
|
|
|
2025-02-10 16:11:36 +01:00
|
|
|
.section {
|
2025-09-19 18:43:41 +02:00
|
|
|
margin-bottom: 20px;
|
2025-05-06 19:10:02 +02:00
|
|
|
position: relative;
|
2025-02-10 16:11:36 +01:00
|
|
|
}
|
|
|
|
|
|
2025-01-17 12:24:48 +01:00
|
|
|
.section-header {
|
2025-01-17 15:12:26 +01:00
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 5px;
|
2025-01-17 14:02:05 +01:00
|
|
|
padding-left: 15px;
|
|
|
|
|
padding-right: 15px;
|
2025-09-19 18:43:41 +02:00
|
|
|
padding-top: 5px;
|
2025-03-25 19:11:40 +01:00
|
|
|
margin-top: 0;
|
2025-09-08 19:32:45 +02:00
|
|
|
margin-bottom: 0px;
|
2025-03-25 19:11:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.section-header > div {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 6px;
|
2025-03-26 16:04:58 +01:00
|
|
|
flex-wrap: wrap;
|
2025-09-22 20:47:40 +02:00
|
|
|
align-items: center;
|
2025-01-17 12:24:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.section-divider {
|
|
|
|
|
border-color: #d8dee4;
|
|
|
|
|
border-width: 1px;
|
|
|
|
|
margin-top: 10px;
|
2025-09-19 18:43:41 +02:00
|
|
|
margin-bottom: 5px;
|
2025-01-17 12:24:48 +01:00
|
|
|
}
|
|
|
|
|
|
2025-01-17 14:02:05 +01:00
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
|
.section-divider {
|
|
|
|
|
border-color: #495057;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-17 12:24:48 +01:00
|
|
|
.section-body {
|
|
|
|
|
position: relative;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
padding: 10px 15px;
|
2025-03-25 16:11:59 +01:00
|
|
|
padding-bottom: 25px;
|
2025-01-17 12:24:48 +01:00
|
|
|
}
|
|
|
|
|
|
2025-03-17 22:17:30 +01:00
|
|
|
.section-extra-padding .section-body {
|
2025-09-08 19:32:45 +02:00
|
|
|
padding-left: 15px;
|
|
|
|
|
padding-right: 15px;
|
2025-03-17 22:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
2025-05-13 13:26:35 +02:00
|
|
|
.section-header-title-badge {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: white;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
background-color: #00c383;
|
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
margin-left: 10px;
|
2025-07-08 17:30:58 +02:00
|
|
|
cursor: pointer;
|
2025-05-13 13:26:35 +02:00
|
|
|
}
|
|
|
|
|
|
2025-01-17 12:24:48 +01:00
|
|
|
</style>
|