mirror of
https://github.com/open-webui/open-webui
synced 2025-02-12 16:26:55 +00:00
Merge pull request #7955 from matthewdtwo/dev
fix: Hide workspace model community share button when community sharing is disabled.
This commit is contained in:
commit
71d4ed1f6a
@ -14,6 +14,8 @@
|
|||||||
import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
|
import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
|
||||||
import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte';
|
import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte';
|
||||||
|
|
||||||
|
import { config } from '$lib/stores';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
export let user;
|
export let user;
|
||||||
@ -50,15 +52,17 @@
|
|||||||
align="start"
|
align="start"
|
||||||
transition={flyAndScale}
|
transition={flyAndScale}
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
{#if $config?.features.enable_community_sharing}
|
||||||
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"
|
<DropdownMenu.Item
|
||||||
on:click={() => {
|
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"
|
||||||
shareHandler();
|
on:click={() => {
|
||||||
}}
|
shareHandler();
|
||||||
>
|
}}
|
||||||
<Share />
|
>
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<Share />
|
||||||
</DropdownMenu.Item>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<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"
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user