Merge pull request #7955 from matthewdtwo/dev

fix: Hide workspace model community share button when community sharing is disabled.
This commit is contained in:
Timothy Jaeryang Baek 2024-12-19 12:45:07 -08:00 committed by GitHub
commit 71d4ed1f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,6 +52,7 @@
align="start"
transition={flyAndScale}
>
{#if $config?.features.enable_community_sharing}
<DropdownMenu.Item
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
on:click={() => {
@ -59,6 +62,7 @@
<Share />
<div class="flex items-center">{$i18n.t('Share')}</div>
</DropdownMenu.Item>
{/if}
<DropdownMenu.Item
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"