mirror of https://github.com/VERT-sh/VERT.git
fix: only hide plausible opt-in when privacy mode is enabled
This commit is contained in:
parent
2f604a5c14
commit
544400c7f4
|
|
@ -15,6 +15,7 @@
|
|||
import { onMount } from "svelte";
|
||||
import { error } from "$lib/logger";
|
||||
import { ToastManager } from "$lib/toast/index.svelte";
|
||||
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
|
||||
|
||||
const { settings = $bindable() }: { settings: ISettings } = $props();
|
||||
|
||||
|
|
@ -81,50 +82,55 @@
|
|||
{m["settings.privacy.title"]()}
|
||||
</h2>
|
||||
<div class="flex flex-col gap-8">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">
|
||||
{m["settings.privacy.plausible_title"]()}
|
||||
</p>
|
||||
<p class="text-sm text-muted font-normal">
|
||||
{@html link(
|
||||
["plausible_link", "analytics_link"],
|
||||
m["settings.privacy.plausible_description"](),
|
||||
[
|
||||
"https://plausible.io/privacy-focused-web-analytics",
|
||||
"https://ats.vert.sh/vert.sh",
|
||||
],
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 w-full">
|
||||
<div class="flex gap-3 w-full">
|
||||
<button
|
||||
onclick={() => (settings.plausible = true)}
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} {settings.plausible
|
||||
? 'selected'
|
||||
: ''} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
>
|
||||
<PlayIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.privacy.opt_in"]()}
|
||||
</button>
|
||||
{#if !DISABLE_ALL_EXTERNAL_REQUESTS}
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">
|
||||
{m["settings.privacy.plausible_title"]()}
|
||||
</p>
|
||||
<p class="text-sm text-muted font-normal">
|
||||
{@html link(
|
||||
["plausible_link", "analytics_link"],
|
||||
m["settings.privacy.plausible_description"](),
|
||||
[
|
||||
"https://plausible.io/privacy-focused-web-analytics",
|
||||
"https://ats.vert.sh/vert.sh",
|
||||
],
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 w-full">
|
||||
<div class="flex gap-3 w-full">
|
||||
<button
|
||||
onclick={() => (settings.plausible = true)}
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} {settings.plausible
|
||||
? 'selected'
|
||||
: ''} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
>
|
||||
<PlayIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.privacy.opt_in"]()}
|
||||
</button>
|
||||
|
||||
<button
|
||||
onclick={() => (settings.plausible = false)}
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} {settings.plausible
|
||||
? ''
|
||||
: '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" />
|
||||
{m["settings.privacy.opt_out"]()}
|
||||
</button>
|
||||
<button
|
||||
onclick={() => (settings.plausible = false)}
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} {settings.plausible
|
||||
? ''
|
||||
: '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"
|
||||
/>
|
||||
{m["settings.privacy.opt_out"]()}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@
|
|||
<Settings.Conversion bind:settings />
|
||||
{#if !DISABLE_ALL_EXTERNAL_REQUESTS}
|
||||
<Settings.Vertd bind:settings />
|
||||
{:else if PUB_PLAUSIBLE_URL}
|
||||
<Settings.Privacy bind:settings />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue