fix: only hide plausible opt-in when privacy mode is enabled

This commit is contained in:
not-nullptr 2025-10-19 19:11:45 +01:00
parent 2f604a5c14
commit 544400c7f4
2 changed files with 49 additions and 41 deletions

View File

@ -15,6 +15,7 @@
import { onMount } from "svelte"; import { onMount } from "svelte";
import { error } from "$lib/logger"; import { error } from "$lib/logger";
import { ToastManager } from "$lib/toast/index.svelte"; import { ToastManager } from "$lib/toast/index.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
const { settings = $bindable() }: { settings: ISettings } = $props(); const { settings = $bindable() }: { settings: ISettings } = $props();
@ -81,6 +82,7 @@
{m["settings.privacy.title"]()} {m["settings.privacy.title"]()}
</h2> </h2>
<div class="flex flex-col gap-8"> <div class="flex flex-col gap-8">
{#if !DISABLE_ALL_EXTERNAL_REQUESTS}
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<p class="text-base font-bold"> <p class="text-base font-bold">
@ -119,12 +121,16 @@
? '' ? ''
: 'selected'} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center" : 'selected'} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
> >
<PauseIcon size="24" class="inline-block mr-2" /> <PauseIcon
size="24"
class="inline-block mr-2"
/>
{m["settings.privacy.opt_out"]()} {m["settings.privacy.opt_out"]()}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
{/if}
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<p class="text-base font-bold"> <p class="text-base font-bold">

View File

@ -66,6 +66,8 @@
<Settings.Conversion bind:settings /> <Settings.Conversion bind:settings />
{#if !DISABLE_ALL_EXTERNAL_REQUESTS} {#if !DISABLE_ALL_EXTERNAL_REQUESTS}
<Settings.Vertd bind:settings /> <Settings.Vertd bind:settings />
{:else if PUB_PLAUSIBLE_URL}
<Settings.Privacy bind:settings />
{/if} {/if}
</div> </div>