mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 05:15:18 +00:00
feat:屏蔽功能
This commit is contained in:
parent
ebdc4a8620
commit
8a8b9b0870
5 changed files with 19 additions and 0 deletions
|
|
@ -1391,6 +1391,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ai-friend 屏蔽语言更多/引用/对话/语音 -->
|
||||
{#if false}
|
||||
<div class=" flex justify-between mt-0.5 mb-2.5 mx-0.5 max-w-full" dir="ltr">
|
||||
<div class="ml-1 self-end flex items-center flex-1 max-w-[80%]">
|
||||
<InputMenu
|
||||
|
|
@ -1807,6 +1809,7 @@
|
|||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if $config?.license_metadata?.input_footer}
|
||||
|
|
|
|||
|
|
@ -70,10 +70,13 @@
|
|||
|
||||
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.multiple_models ?? true)}
|
||||
{#if selectedModelIdx === 0}
|
||||
|
||||
<!-- ai-friend 屏蔽添加模型按钮 -->
|
||||
<div
|
||||
class=" self-center mx-1 disabled:text-gray-600 disabled:hover:text-gray-600 -translate-y-[0.5px]"
|
||||
>
|
||||
<Tooltip content={$i18n.t('Add Model')}>
|
||||
{#if false}
|
||||
<button
|
||||
class=" "
|
||||
{disabled}
|
||||
|
|
@ -93,6 +96,7 @@
|
|||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" />
|
||||
</svg>
|
||||
</button>
|
||||
{/if}
|
||||
</Tooltip>
|
||||
</div>
|
||||
{:else}
|
||||
|
|
|
|||
|
|
@ -110,8 +110,10 @@
|
|||
<div class="self-start flex flex-none items-center text-gray-600 dark:text-gray-400">
|
||||
<!-- <div class="md:hidden flex self-center w-[1px] h-5 mx-2 bg-gray-300 dark:bg-stone-700" /> -->
|
||||
|
||||
<!-- ai-friend 屏蔽临时聊天 -->
|
||||
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true}
|
||||
{#if !chat?.id}
|
||||
{#if false}
|
||||
<Tooltip content={$i18n.t(`Temporary Chat`)}>
|
||||
<button
|
||||
class="flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
||||
|
|
@ -143,6 +145,7 @@
|
|||
</div>
|
||||
</button>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
{:else if $temporaryChatEnabled}
|
||||
<Tooltip content={$i18n.t(`Save Chat`)}>
|
||||
<button
|
||||
|
|
@ -201,6 +204,8 @@
|
|||
</Menu>
|
||||
{/if}
|
||||
|
||||
<!-- ai-friend 屏蔽对话高级设置 -->
|
||||
{#if false}
|
||||
{#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}
|
||||
<Tooltip content={$i18n.t('Controls')}>
|
||||
<button
|
||||
|
|
@ -216,6 +221,7 @@
|
|||
</button>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if $user !== undefined && $user !== null}
|
||||
<UserMenu
|
||||
|
|
|
|||
|
|
@ -240,6 +240,8 @@
|
|||
</div>
|
||||
{:else}
|
||||
<div class="mx-auto max-w-2xl font-primary mt-2" in:fade={{ duration: 200, delay: 200 }}>
|
||||
<!-- ai-friend 屏蔽建议 -->
|
||||
{#if false}
|
||||
<div class="mx-5">
|
||||
<Suggestions
|
||||
suggestionPrompts={atSelectedModel?.info?.meta?.suggestion_prompts ??
|
||||
|
|
@ -250,6 +252,7 @@
|
|||
{onSelect}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -590,6 +590,8 @@
|
|||
id="settings-tabs-container"
|
||||
class="tabs flex flex-row overflow-x-auto gap-2.5 mx-3 md:pr-4 md:gap-1 md:flex-col flex-1 md:flex-none md:w-50 md:min-h-[36rem] md:max-h-[36rem] dark:text-gray-200 text-sm text-left mb-1 md:mb-0 -translate-y-1"
|
||||
>
|
||||
<!-- ai-friend 隐藏设置搜索 -->
|
||||
{#if false}
|
||||
<div
|
||||
class="hidden md:flex w-full rounded-full px-2.5 gap-2 bg-gray-100/80 dark:bg-gray-850/80 backdrop-blur-2xl my-1 mb-1.5"
|
||||
id="settings-search"
|
||||
|
|
@ -610,6 +612,7 @@
|
|||
placeholder={$i18n.t('Search')}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if filteredSettings.length > 0}
|
||||
{#each filteredSettings as tabId (tabId)}
|
||||
{#if tabId === 'general'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue