33 lines
820 B
Vue
33 lines
820 B
Vue
<script setup lang="ts">
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
const { t } = useI18n()
|
|
|
|
type SectionKey = 'devices' | 'configurations' | 'commands' | 'device' | 'firmware' | 'trace'
|
|
|
|
const { section, subtitle } = defineProps<{
|
|
section: SectionKey
|
|
subtitle?: string
|
|
}>()
|
|
|
|
const sectionColors: Record<SectionKey, string> = {
|
|
devices: 'blue',
|
|
configurations: 'yellow',
|
|
commands: 'orange',
|
|
device: 'green',
|
|
firmware: 'purple',
|
|
trace: 'pink',
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div :class="['bg-supporting-' + sectionColors[section]]" data-bs-theme="light">
|
|
<div class="container-xxl py-3">
|
|
<h1 class="display-1 mb-0" style="letter-spacing: normal">
|
|
{{ t(`titles.${section}`) }}
|
|
<span v-if="subtitle" class="fs-5 fw-bold ms-2">{{ subtitle }}</span>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
</template>
|