web/SettingsNavSection: make section title optional

This commit is contained in:
wukko 2024-07-10 23:35:40 +06:00
parent 2b907e5684
commit 49f9057b6b
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -1,11 +1,15 @@
<script lang="ts"> <script lang="ts">
import { t } from "$lib/i18n/translations"; import { t } from "$lib/i18n/translations";
export let sectionTitle: string; export let sectionTitle: string = "";
</script> </script>
<div id="settings-section"> <div id="settings-section">
<div id="settings-section-title">{$t(`settings.section.${sectionTitle}`)}</div> {#if sectionTitle}
<div id="settings-section-title">
{$t(`settings.section.${sectionTitle}`)}
</div>
{/if}
<div id="settings-section-categories"> <div id="settings-section-categories">
<slot></slot> <slot></slot>
</div> </div>