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 { 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,50 +82,55 @@
|
||||||
{m["settings.privacy.title"]()}
|
{m["settings.privacy.title"]()}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="flex flex-col gap-8">
|
<div class="flex flex-col gap-8">
|
||||||
<div class="flex flex-col gap-4">
|
{#if !DISABLE_ALL_EXTERNAL_REQUESTS}
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-4">
|
||||||
<p class="text-base font-bold">
|
<div class="flex flex-col gap-2">
|
||||||
{m["settings.privacy.plausible_title"]()}
|
<p class="text-base font-bold">
|
||||||
</p>
|
{m["settings.privacy.plausible_title"]()}
|
||||||
<p class="text-sm text-muted font-normal">
|
</p>
|
||||||
{@html link(
|
<p class="text-sm text-muted font-normal">
|
||||||
["plausible_link", "analytics_link"],
|
{@html link(
|
||||||
m["settings.privacy.plausible_description"](),
|
["plausible_link", "analytics_link"],
|
||||||
[
|
m["settings.privacy.plausible_description"](),
|
||||||
"https://plausible.io/privacy-focused-web-analytics",
|
[
|
||||||
"https://ats.vert.sh/vert.sh",
|
"https://plausible.io/privacy-focused-web-analytics",
|
||||||
],
|
"https://ats.vert.sh/vert.sh",
|
||||||
)}
|
],
|
||||||
</p>
|
)}
|
||||||
</div>
|
</p>
|
||||||
<div class="flex flex-col gap-3 w-full">
|
</div>
|
||||||
<div class="flex gap-3 w-full">
|
<div class="flex flex-col gap-3 w-full">
|
||||||
<button
|
<div class="flex gap-3 w-full">
|
||||||
onclick={() => (settings.plausible = true)}
|
<button
|
||||||
class="btn {$effects
|
onclick={() => (settings.plausible = true)}
|
||||||
? ''
|
class="btn {$effects
|
||||||
: '!scale-100'} {settings.plausible
|
? ''
|
||||||
? 'selected'
|
: '!scale-100'} {settings.plausible
|
||||||
: ''} 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"
|
||||||
<PlayIcon size="24" class="inline-block mr-2" />
|
>
|
||||||
{m["settings.privacy.opt_in"]()}
|
<PlayIcon size="24" class="inline-block mr-2" />
|
||||||
</button>
|
{m["settings.privacy.opt_in"]()}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onclick={() => (settings.plausible = false)}
|
onclick={() => (settings.plausible = false)}
|
||||||
class="btn {$effects
|
class="btn {$effects
|
||||||
? ''
|
? ''
|
||||||
: '!scale-100'} {settings.plausible
|
: '!scale-100'} {settings.plausible
|
||||||
? ''
|
? ''
|
||||||
: '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
|
||||||
{m["settings.privacy.opt_out"]()}
|
size="24"
|
||||||
</button>
|
class="inline-block mr-2"
|
||||||
|
/>
|
||||||
|
{m["settings.privacy.opt_out"]()}
|
||||||
|
</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">
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue