Spaces:
Build error
Build error
fix issue with settings modal
Browse files
src/lib/components/SettingsModal.svelte
CHANGED
|
@@ -10,7 +10,7 @@
|
|
| 10 |
import { PUBLIC_APP_DATA_SHARING } from "$env/static/public";
|
| 11 |
import type { Model } from "$lib/types/Model";
|
| 12 |
|
| 13 |
-
export let settings:
|
| 14 |
export let models: Array<Model>;
|
| 15 |
|
| 16 |
let shareConversationsWithModelAuthors = settings.shareConversationsWithModelAuthors;
|
|
@@ -37,9 +37,14 @@
|
|
| 37 |
>
|
| 38 |
{#if PUBLIC_APP_DATA_SHARING}
|
| 39 |
<label class="flex cursor-pointer select-none items-center gap-2 text-gray-500">
|
| 40 |
-
{#each Object.entries(settings).filter(([k]) => k
|
| 41 |
<input type="hidden" name={key} value={val} />
|
| 42 |
{/each}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
<Switch
|
| 44 |
name="shareConversationsWithModelAuthors"
|
| 45 |
bind:checked={shareConversationsWithModelAuthors}
|
|
|
|
| 10 |
import { PUBLIC_APP_DATA_SHARING } from "$env/static/public";
|
| 11 |
import type { Model } from "$lib/types/Model";
|
| 12 |
|
| 13 |
+
export let settings: Settings;
|
| 14 |
export let models: Array<Model>;
|
| 15 |
|
| 16 |
let shareConversationsWithModelAuthors = settings.shareConversationsWithModelAuthors;
|
|
|
|
| 37 |
>
|
| 38 |
{#if PUBLIC_APP_DATA_SHARING}
|
| 39 |
<label class="flex cursor-pointer select-none items-center gap-2 text-gray-500">
|
| 40 |
+
{#each Object.entries(settings).filter(([k]) => !(k === "shareConversationsWithModelAuthors" || k === "customPrompts")) as [key, val]}
|
| 41 |
<input type="hidden" name={key} value={val} />
|
| 42 |
{/each}
|
| 43 |
+
<input
|
| 44 |
+
type="hidden"
|
| 45 |
+
name="customPrompts"
|
| 46 |
+
value={JSON.stringify(settings.customPrompts)}
|
| 47 |
+
/>
|
| 48 |
<Switch
|
| 49 |
name="shareConversationsWithModelAuthors"
|
| 50 |
bind:checked={shareConversationsWithModelAuthors}
|