Skip to content

best way to save what you love

web/settings: add "privacy" page with analytics toggle

dumbmoron4168998b93ba
diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json
index 27c28bd8..3b0195e5 100644
--- a/web/i18n/en/settings.json
+++ b/web/i18n/en/settings.json
@@ -1,5 +1,6 @@
{
"page.appearance": "appearance",
+ "page.privacy": "privacy",
"page.video": "video",
"page.audio": "audio",
"page.metadata": "metadata",
@@ -84,6 +85,10 @@
"language.preferred.title": "preferred language",
"language.preferred.description": "language used for interface and content. if any text isn’t translated to this language, it will be displayed in english.",
+ "privacy": "anonymous traffic analytics",
+ "privacy.disableAnalytics.title": "opt out of private analytics",
+ "privacy.disableAnalytics.description": "enable if you don't want to be included in anonymous traffic stats. read more about this in about > privacy policy (tl;dr: nothing about you is ever stored or tracked, no cookies are used).",
+
"advanced.debug": "debug",
"advanced.debug.title": "enable debug features",
"advanced.debug.description": "gives you access to a page with app & device info useful for debugging."
diff --git a/web/src/routes/settings/+layout.svelte b/web/src/routes/settings/+layout.svelte
index 6de86016..a8d795ef 100644
--- a/web/src/routes/settings/+layout.svelte
+++ b/web/src/routes/settings/+layout.svelte
@@ -15,6 +15,7 @@
import IconFileSettings from "@tabler/icons-svelte/IconFileSettings.svelte";
import IconSettingsBolt from "@tabler/icons-svelte/IconSettingsBolt.svelte";
import IconBug from "@tabler/icons-svelte/IconBug.svelte";
+ import IconLock from "@tabler/icons-svelte/IconLock.svelte";
import IconChevronLeft from "@tabler/icons-svelte/IconChevronLeft.svelte";
@@ -81,6 +82,13 @@
>
<IconSunHigh />
</SettingsNavTab>
+ <SettingsNavTab
+ tabName="privacy"
+ tabLink="general/privacy"
+ iconColor="blue"
+ >
+ <IconLock />
+ </SettingsNavTab>
</SettingsNavSection>
<SettingsNavSection sectionTitle="save">
<SettingsNavTab
diff --git a/web/src/routes/settings/general/privacy/+page.svelte b/web/src/routes/settings/general/privacy/+page.svelte
new file mode 100644
index 00000000..1512ee04
--- /dev/null
+++ b/web/src/routes/settings/general/privacy/+page.svelte
@@ -0,0 +1,15 @@
+<script lang="ts">
+ import { t } from "$lib/i18n/translations";
+
+ import SettingsCategory from "$components/settings/SettingsCategory.svelte";
+ import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
+</script>
+
+<SettingsCategory sectionId="privacy" title={$t("settings.privacy")}>
+ <SettingsToggle
+ settingContext="privacy"
+ settingId="disableAnalytics"
+ title={$t("settings.privacy.disableAnalytics.title")}
+ description={$t("settings.privacy.disableAnalytics.description")}
+ />
+</SettingsCategory>
\ No newline at end of file