Skip to content

Commit

Permalink
fix: disable disclaimer modal on shared conversation page
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarrazin committed Nov 29, 2024
1 parent 85aa989 commit 7255599
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@
$: mobileNavTitle = ["/models", "/assistants", "/privacy"].includes($page.route.id ?? "")
? ""
: data.conversations.find((conv) => conv.id === $page.params.id)?.title;
$: showDisclaimer =
!$settings.ethicsModalAccepted &&
$page.url.pathname !== `${base}/privacy` &&
envPublic.PUBLIC_APP_DISCLAIMER === "1" &&
!($page.data.shared === true);
</script>

<svelte:head>
Expand Down Expand Up @@ -203,7 +209,7 @@
{/if}
</svelte:head>

{#if !$settings.ethicsModalAccepted && $page.url.pathname !== `${base}/privacy` && envPublic.PUBLIC_APP_DISCLAIMER === "1"}
{#if showDisclaimer}
<DisclaimerModal on:close={() => ($settings.ethicsModalAccepted = true)} />
{/if}

Expand Down

0 comments on commit 7255599

Please sign in to comment.