From 0b9c6466ce54ac465ccb3e8550c993e008a14acb Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 19 Dec 2024 10:48:02 -0600 Subject: [PATCH] Hide community share button when community sharing is disabled. Only show the share button on the workspaces model menu when Community sharing is enabled. --- .../workspace/Models/ModelMenu.svelte | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/lib/components/workspace/Models/ModelMenu.svelte b/src/lib/components/workspace/Models/ModelMenu.svelte index 8cd9130a0..968bfad87 100644 --- a/src/lib/components/workspace/Models/ModelMenu.svelte +++ b/src/lib/components/workspace/Models/ModelMenu.svelte @@ -14,6 +14,8 @@ import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte'; import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte'; + import { config } from '$lib/stores'; + const i18n = getContext('i18n'); export let user; @@ -50,15 +52,17 @@ align="start" transition={flyAndScale} > - { - shareHandler(); - }} - > - -
{$i18n.t('Share')}
-
+ {#if $config?.features.enable_community_sharing} + { + shareHandler(); + }} + > + +
{$i18n.t('Share')}
+
+ {/if}