Conditionally show the data sharing toggle (#624)
Browse files- src/routes/settings/+page.svelte +16 -14
src/routes/settings/+page.svelte
CHANGED
@@ -10,6 +10,7 @@
|
|
10 |
|
11 |
import { useSettingsStore } from "$lib/stores/settings";
|
12 |
import Switch from "$lib/components/Switch.svelte";
|
|
|
13 |
|
14 |
let isConfirmingDeletion = false;
|
15 |
|
@@ -24,21 +25,22 @@
|
|
24 |
</div>
|
25 |
|
26 |
<div class="flex h-full flex-col gap-4 pt-4 max-sm:pt-0">
|
27 |
-
|
28 |
-
|
29 |
-
<
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
<p class="text-sm text-gray-500">
|
39 |
-
Sharing your data will help improve the training data and make open models better over time.
|
40 |
-
</p>
|
41 |
|
|
|
|
|
|
|
|
|
42 |
<!-- svelte-ignore a11y-label-has-associated-control -->
|
43 |
<label class="mt-6 flex items-center">
|
44 |
<Switch name="hideEmojiOnSidebar" bind:checked={$settings.hideEmojiOnSidebar} />
|
|
|
10 |
|
11 |
import { useSettingsStore } from "$lib/stores/settings";
|
12 |
import Switch from "$lib/components/Switch.svelte";
|
13 |
+
import { PUBLIC_APP_DATA_SHARING } from "$env/static/public";
|
14 |
|
15 |
let isConfirmingDeletion = false;
|
16 |
|
|
|
25 |
</div>
|
26 |
|
27 |
<div class="flex h-full flex-col gap-4 pt-4 max-sm:pt-0">
|
28 |
+
{#if PUBLIC_APP_DATA_SHARING === "1"}
|
29 |
+
<!-- svelte-ignore a11y-label-has-associated-control -->
|
30 |
+
<label class="flex items-center">
|
31 |
+
<Switch
|
32 |
+
name="shareConversationsWithModelAuthors"
|
33 |
+
bind:checked={$settings.shareConversationsWithModelAuthors}
|
34 |
+
/>
|
35 |
+
<div class="inline cursor-pointer select-none items-center gap-2 pl-2">
|
36 |
+
Share conversations with model authors
|
37 |
+
</div>
|
38 |
+
</label>
|
|
|
|
|
|
|
39 |
|
40 |
+
<p class="text-sm text-gray-500">
|
41 |
+
Sharing your data will help improve the training data and make open models better over time.
|
42 |
+
</p>
|
43 |
+
{/if}
|
44 |
<!-- svelte-ignore a11y-label-has-associated-control -->
|
45 |
<label class="mt-6 flex items-center">
|
46 |
<Switch name="hideEmojiOnSidebar" bind:checked={$settings.hideEmojiOnSidebar} />
|