enh: hide made by community
This commit is contained in:
		
							parent
							
								
									e153108b51
								
							
						
					
					
						commit
						545f2a0fe2
					
				|  | @ -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 @@ | |||
| 	</div> | ||||
| </div> | ||||
| 
 | ||||
| <div class=" my-16"> | ||||
| 	<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 		{$i18n.t('Made by OpenWebUI Community')} | ||||
| {#if $config?.features.enable_community_sharing} | ||||
| 	<div class=" my-16"> | ||||
| 		<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 			{$i18n.t('Made by OpenWebUI Community')} | ||||
| 		</div> | ||||
| 
 | ||||
| 		<a | ||||
| 			class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 			href="https://openwebui.com/#open-webui-community" | ||||
| 			target="_blank" | ||||
| 		> | ||||
| 			<div class=" self-center w-10 flex-shrink-0"> | ||||
| 				<div | ||||
| 					class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 				> | ||||
| 					<svg | ||||
| 						xmlns="http://www.w3.org/2000/svg" | ||||
| 						viewBox="0 0 24 24" | ||||
| 						fill="currentColor" | ||||
| 						class="w-6" | ||||
| 					> | ||||
| 						<path | ||||
| 							fill-rule="evenodd" | ||||
| 							d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 							clip-rule="evenodd" | ||||
| 						/> | ||||
| 					</svg> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 
 | ||||
| 			<div class=" self-center"> | ||||
| 				<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a function')}</div> | ||||
| 				<div class=" text-sm line-clamp-1"> | ||||
| 					{$i18n.t('Discover, download, and explore custom functions')} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</a> | ||||
| 	</div> | ||||
| 
 | ||||
| 	<a | ||||
| 		class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 		href="https://openwebui.com/#open-webui-community" | ||||
| 		target="_blank" | ||||
| 	> | ||||
| 		<div class=" self-center w-10 flex-shrink-0"> | ||||
| 			<div | ||||
| 				class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 			> | ||||
| 				<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6"> | ||||
| 					<path | ||||
| 						fill-rule="evenodd" | ||||
| 						d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 						clip-rule="evenodd" | ||||
| 					/> | ||||
| 				</svg> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class=" self-center"> | ||||
| 			<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a function')}</div> | ||||
| 			<div class=" text-sm line-clamp-1"> | ||||
| 				{$i18n.t('Discover, download, and explore custom functions')} | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</a> | ||||
| </div> | ||||
| {/if} | ||||
| 
 | ||||
| <DeleteConfirmDialog | ||||
| 	bind:show={showDeleteConfirm} | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ | |||
| 
 | ||||
| 	import { onMount, getContext, tick } from 'svelte'; | ||||
| 
 | ||||
| 	import { WEBUI_NAME, mobile, models, settings, user } from '$lib/stores'; | ||||
| 	import { WEBUI_NAME, config, mobile, models, settings, user } from '$lib/stores'; | ||||
| 	import { addNewModel, deleteModelById, getModelInfos, updateModelById } from '$lib/apis/models'; | ||||
| 
 | ||||
| 	import { deleteModel } from '$lib/apis/ollama'; | ||||
|  | @ -674,35 +674,42 @@ | |||
| 	{/if} | ||||
| </div> | ||||
| 
 | ||||
| <div class=" my-16"> | ||||
| 	<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 		{$i18n.t('Made by OpenWebUI Community')} | ||||
| {#if $config?.features.enable_community_sharing} | ||||
| 	<div class=" my-16"> | ||||
| 		<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 			{$i18n.t('Made by OpenWebUI Community')} | ||||
| 		</div> | ||||
| 
 | ||||
| 		<a | ||||
| 			class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 			href="https://openwebui.com/#open-webui-community" | ||||
| 			target="_blank" | ||||
| 		> | ||||
| 			<div class=" self-center w-10 flex-shrink-0"> | ||||
| 				<div | ||||
| 					class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 				> | ||||
| 					<svg | ||||
| 						xmlns="http://www.w3.org/2000/svg" | ||||
| 						viewBox="0 0 24 24" | ||||
| 						fill="currentColor" | ||||
| 						class="w-6" | ||||
| 					> | ||||
| 						<path | ||||
| 							fill-rule="evenodd" | ||||
| 							d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 							clip-rule="evenodd" | ||||
| 						/> | ||||
| 					</svg> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 
 | ||||
| 			<div class=" self-center"> | ||||
| 				<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a model')}</div> | ||||
| 				<div class=" text-sm line-clamp-1"> | ||||
| 					{$i18n.t('Discover, download, and explore model presets')} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</a> | ||||
| 	</div> | ||||
| 
 | ||||
| 	<a | ||||
| 		class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 		href="https://openwebui.com/#open-webui-community" | ||||
| 		target="_blank" | ||||
| 	> | ||||
| 		<div class=" self-center w-10 flex-shrink-0"> | ||||
| 			<div | ||||
| 				class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 			> | ||||
| 				<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6"> | ||||
| 					<path | ||||
| 						fill-rule="evenodd" | ||||
| 						d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 						clip-rule="evenodd" | ||||
| 					/> | ||||
| 				</svg> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class=" self-center"> | ||||
| 			<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a model')}</div> | ||||
| 			<div class=" text-sm line-clamp-1"> | ||||
| 				{$i18n.t('Discover, download, and explore model presets')} | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</a> | ||||
| </div> | ||||
| {/if} | ||||
|  |  | |||
|  | @ -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 @@ | |||
| 	</title> | ||||
| </svelte:head> | ||||
| 
 | ||||
| <DeleteConfirmDialog | ||||
| 	bind:show={showDeleteConfirm} | ||||
| 	title={$i18n.t('Delete prompt?')} | ||||
| 	on:confirm={() => { | ||||
| 		deleteHandler(deletePrompt); | ||||
| 	}} | ||||
| > | ||||
| 	<div class=" text-sm text-gray-500"> | ||||
| 		{$i18n.t('This will delete')} <span class="  font-semibold">{deletePrompt.command}</span>. | ||||
| 	</div> | ||||
| </DeleteConfirmDialog> | ||||
| 
 | ||||
| <div class=" flex w-full space-x-2 mb-2.5"> | ||||
| 	<div class="flex flex-1"> | ||||
| 		<div class=" self-center ml-1 mr-3"> | ||||
|  | @ -284,47 +296,42 @@ | |||
| 	</div> | ||||
| </div> | ||||
| 
 | ||||
| <div class=" my-16"> | ||||
| 	<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 		{$i18n.t('Made by OpenWebUI Community')} | ||||
| 	</div> | ||||
| 
 | ||||
| 	<a | ||||
| 		class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 		href="https://openwebui.com/#open-webui-community" | ||||
| 		target="_blank" | ||||
| 	> | ||||
| 		<div class=" self-center w-10 flex-shrink-0"> | ||||
| 			<div | ||||
| 				class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 			> | ||||
| 				<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6"> | ||||
| 					<path | ||||
| 						fill-rule="evenodd" | ||||
| 						d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 						clip-rule="evenodd" | ||||
| 					/> | ||||
| 				</svg> | ||||
| 			</div> | ||||
| {#if $config?.features.enable_community_sharing} | ||||
| 	<div class=" my-16"> | ||||
| 		<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 			{$i18n.t('Made by OpenWebUI Community')} | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class=" self-center"> | ||||
| 			<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a prompt')}</div> | ||||
| 			<div class=" text-sm line-clamp-1"> | ||||
| 				{$i18n.t('Discover, download, and explore custom prompts')} | ||||
| 		<a | ||||
| 			class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 			href="https://openwebui.com/#open-webui-community" | ||||
| 			target="_blank" | ||||
| 		> | ||||
| 			<div class=" self-center w-10 flex-shrink-0"> | ||||
| 				<div | ||||
| 					class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 				> | ||||
| 					<svg | ||||
| 						xmlns="http://www.w3.org/2000/svg" | ||||
| 						viewBox="0 0 24 24" | ||||
| 						fill="currentColor" | ||||
| 						class="w-6" | ||||
| 					> | ||||
| 						<path | ||||
| 							fill-rule="evenodd" | ||||
| 							d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 							clip-rule="evenodd" | ||||
| 						/> | ||||
| 					</svg> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</a> | ||||
| </div> | ||||
| 
 | ||||
| <DeleteConfirmDialog | ||||
| 	bind:show={showDeleteConfirm} | ||||
| 	title={$i18n.t('Delete prompt?')} | ||||
| 	on:confirm={() => { | ||||
| 		deleteHandler(deletePrompt); | ||||
| 	}} | ||||
| > | ||||
| 	<div class=" text-sm text-gray-500"> | ||||
| 		{$i18n.t('This will delete')} <span class="  font-semibold">{deletePrompt.command}</span>. | ||||
| 			<div class=" self-center"> | ||||
| 				<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a prompt')}</div> | ||||
| 				<div class=" text-sm line-clamp-1"> | ||||
| 					{$i18n.t('Discover, download, and explore custom prompts')} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</a> | ||||
| 	</div> | ||||
| </DeleteConfirmDialog> | ||||
| {/if} | ||||
|  |  | |||
|  | @ -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 @@ | |||
| 	</div> | ||||
| </div> | ||||
| 
 | ||||
| <div class=" my-16"> | ||||
| 	<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 		{$i18n.t('Made by OpenWebUI Community')} | ||||
| {#if $config?.features.enable_community_sharing} | ||||
| 	<div class=" my-16"> | ||||
| 		<div class=" text-lg font-semibold mb-3 line-clamp-1"> | ||||
| 			{$i18n.t('Made by OpenWebUI Community')} | ||||
| 		</div> | ||||
| 
 | ||||
| 		<a | ||||
| 			class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 			href="https://openwebui.com/#open-webui-community" | ||||
| 			target="_blank" | ||||
| 		> | ||||
| 			<div class=" self-center w-10 flex-shrink-0"> | ||||
| 				<div | ||||
| 					class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 				> | ||||
| 					<svg | ||||
| 						xmlns="http://www.w3.org/2000/svg" | ||||
| 						viewBox="0 0 24 24" | ||||
| 						fill="currentColor" | ||||
| 						class="w-6" | ||||
| 					> | ||||
| 						<path | ||||
| 							fill-rule="evenodd" | ||||
| 							d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 							clip-rule="evenodd" | ||||
| 						/> | ||||
| 					</svg> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 
 | ||||
| 			<div class=" self-center"> | ||||
| 				<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a tool')}</div> | ||||
| 				<div class=" text-sm line-clamp-1"> | ||||
| 					{$i18n.t('Discover, download, and explore custom tools')} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</a> | ||||
| 	</div> | ||||
| 
 | ||||
| 	<a | ||||
| 		class=" flex space-x-4 cursor-pointer w-full mb-2 px-3 py-2" | ||||
| 		href="https://openwebui.com/#open-webui-community" | ||||
| 		target="_blank" | ||||
| 	> | ||||
| 		<div class=" self-center w-10 flex-shrink-0"> | ||||
| 			<div | ||||
| 				class="w-full h-10 flex justify-center rounded-full bg-transparent dark:bg-gray-700 border border-dashed border-gray-200" | ||||
| 			> | ||||
| 				<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6"> | ||||
| 					<path | ||||
| 						fill-rule="evenodd" | ||||
| 						d="M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z" | ||||
| 						clip-rule="evenodd" | ||||
| 					/> | ||||
| 				</svg> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class=" self-center"> | ||||
| 			<div class=" font-semibold line-clamp-1">{$i18n.t('Discover a tool')}</div> | ||||
| 			<div class=" text-sm line-clamp-1"> | ||||
| 				{$i18n.t('Discover, download, and explore custom tools')} | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</a> | ||||
| </div> | ||||
| {/if} | ||||
| 
 | ||||
| <DeleteConfirmDialog | ||||
| 	bind:show={showDeleteConfirm} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue