From 1a845fcfc2a45bcd1dcebecba336b3fab5ff4b51 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 18 Sep 2024 15:28:09 +0600 Subject: [PATCH] web/SectionHeading: reusable component for linkable section headings --- web/i18n/en/button.json | 1 + web/src/components/misc/SectionHeading.svelte | 95 +++++++++++++++++++ .../settings/SettingsCategory.svelte | 75 +-------------- 3 files changed, 99 insertions(+), 72 deletions(-) create mode 100644 web/src/components/misc/SectionHeading.svelte diff --git a/web/i18n/en/button.json b/web/i18n/en/button.json index 849ac98d..1ea7fb41 100644 --- a/web/i18n/en/button.json +++ b/web/i18n/en/button.json @@ -7,6 +7,7 @@ "download": "download", "share": "share", "copy": "copy", + "copy.section": "copy the section link", "copied": "copied", "import": "import", "continue": "continue", diff --git a/web/src/components/misc/SectionHeading.svelte b/web/src/components/misc/SectionHeading.svelte new file mode 100644 index 00000000..1c87ae92 --- /dev/null +++ b/web/src/components/misc/SectionHeading.svelte @@ -0,0 +1,95 @@ + + +
+

{title}

+ {#if beta} +
{$t("general.beta")}
+ {/if} + +
+ + diff --git a/web/src/components/settings/SettingsCategory.svelte b/web/src/components/settings/SettingsCategory.svelte index 1e475761..520be2db 100644 --- a/web/src/components/settings/SettingsCategory.svelte +++ b/web/src/components/settings/SettingsCategory.svelte @@ -1,8 +1,8 @@