diff --git a/src/lib/components/workspace/Functions.svelte b/src/lib/components/workspace/Functions.svelte index 990b06428..3f04350f7 100644 --- a/src/lib/components/workspace/Functions.svelte +++ b/src/lib/components/workspace/Functions.svelte @@ -3,7 +3,7 @@ import fileSaver from 'file-saver'; const { saveAs } = fileSaver; - import { WEBUI_NAME, functions, models } from '$lib/stores'; + import { WEBUI_NAME, config, functions, models } from '$lib/stores'; import { onMount, getContext, tick } from 'svelte'; import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts'; @@ -468,38 +468,45 @@ -
-
- {$i18n.t('Made by OpenWebUI Community')} +{#if $config?.features.enable_community_sharing} + - - -
-
- - - -
-
- -
-
{$i18n.t('Discover a function')}
-
- {$i18n.t('Discover, download, and explore custom functions')} -
-
-
-
+{/if} -
- +{/if} diff --git a/src/lib/components/workspace/Prompts.svelte b/src/lib/components/workspace/Prompts.svelte index e8cdf3987..0035828aa 100644 --- a/src/lib/components/workspace/Prompts.svelte +++ b/src/lib/components/workspace/Prompts.svelte @@ -4,7 +4,7 @@ const { saveAs } = fileSaver; import { onMount, getContext } from 'svelte'; - import { WEBUI_NAME, prompts } from '$lib/stores'; + import { WEBUI_NAME, config, prompts } from '$lib/stores'; import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts'; import { error } from '@sveltejs/kit'; import { goto } from '$app/navigation'; @@ -67,6 +67,18 @@ + { + deleteHandler(deletePrompt); + }} +> +
+ {$i18n.t('This will delete')} {deletePrompt.command}. +
+
+
@@ -284,47 +296,42 @@
-
-
- {$i18n.t('Made by OpenWebUI Community')} -
- - -
-
- - - -
+{#if $config?.features.enable_community_sharing} +
+
+ {$i18n.t('Made by OpenWebUI Community')}
-
- { - deleteHandler(deletePrompt); - }} -> -
- {$i18n.t('This will delete')} {deletePrompt.command}. +
+
{$i18n.t('Discover a prompt')}
+
+ {$i18n.t('Discover, download, and explore custom prompts')} +
+
+
-
+{/if} diff --git a/src/lib/components/workspace/Tools.svelte b/src/lib/components/workspace/Tools.svelte index 281fcb926..94c5a0f0d 100644 --- a/src/lib/components/workspace/Tools.svelte +++ b/src/lib/components/workspace/Tools.svelte @@ -4,7 +4,7 @@ const { saveAs } = fileSaver; import { onMount, getContext } from 'svelte'; - import { WEBUI_NAME, prompts, tools } from '$lib/stores'; + import { WEBUI_NAME, config, prompts, tools } from '$lib/stores'; import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts'; import { goto } from '$app/navigation'; @@ -422,38 +422,45 @@
-
- +{/if}