feat:屏蔽功能

This commit is contained in:
Iced-peach 2025-11-23 18:59:33 +08:00
parent ebdc4a8620
commit 8a8b9b0870
5 changed files with 19 additions and 0 deletions

View file

@ -1391,6 +1391,8 @@
</div> </div>
</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=" 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%]"> <div class="ml-1 self-end flex items-center flex-1 max-w-[80%]">
<InputMenu <InputMenu
@ -1807,6 +1809,7 @@
{/if} {/if}
</div> </div>
</div> </div>
{/if}
</div> </div>
{#if $config?.license_metadata?.input_footer} {#if $config?.license_metadata?.input_footer}

View file

@ -70,10 +70,13 @@
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.multiple_models ?? true)} {#if $user?.role === 'admin' || ($user?.permissions?.chat?.multiple_models ?? true)}
{#if selectedModelIdx === 0} {#if selectedModelIdx === 0}
<!-- ai-friend 屏蔽添加模型按钮 -->
<div <div
class=" self-center mx-1 disabled:text-gray-600 disabled:hover:text-gray-600 -translate-y-[0.5px]" class=" self-center mx-1 disabled:text-gray-600 disabled:hover:text-gray-600 -translate-y-[0.5px]"
> >
<Tooltip content={$i18n.t('Add Model')}> <Tooltip content={$i18n.t('Add Model')}>
{#if false}
<button <button
class=" " class=" "
{disabled} {disabled}
@ -93,6 +96,7 @@
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" /> <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" />
</svg> </svg>
</button> </button>
{/if}
</Tooltip> </Tooltip>
</div> </div>
{:else} {:else}

View file

@ -110,8 +110,10 @@
<div class="self-start flex flex-none items-center text-gray-600 dark:text-gray-400"> <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" /> --> <!-- <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 $user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true}
{#if !chat?.id} {#if !chat?.id}
{#if false}
<Tooltip content={$i18n.t(`Temporary Chat`)}> <Tooltip content={$i18n.t(`Temporary Chat`)}>
<button <button
class="flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition" 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> </div>
</button> </button>
</Tooltip> </Tooltip>
{/if}
{:else if $temporaryChatEnabled} {:else if $temporaryChatEnabled}
<Tooltip content={$i18n.t(`Save Chat`)}> <Tooltip content={$i18n.t(`Save Chat`)}>
<button <button
@ -201,6 +204,8 @@
</Menu> </Menu>
{/if} {/if}
<!-- ai-friend 屏蔽对话高级设置 -->
{#if false}
{#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}
<Tooltip content={$i18n.t('Controls')}> <Tooltip content={$i18n.t('Controls')}>
<button <button
@ -216,6 +221,7 @@
</button> </button>
</Tooltip> </Tooltip>
{/if} {/if}
{/if}
{#if $user !== undefined && $user !== null} {#if $user !== undefined && $user !== null}
<UserMenu <UserMenu

View file

@ -240,6 +240,8 @@
</div> </div>
{:else} {:else}
<div class="mx-auto max-w-2xl font-primary mt-2" in:fade={{ duration: 200, delay: 200 }}> <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"> <div class="mx-5">
<Suggestions <Suggestions
suggestionPrompts={atSelectedModel?.info?.meta?.suggestion_prompts ?? suggestionPrompts={atSelectedModel?.info?.meta?.suggestion_prompts ??
@ -250,6 +252,7 @@
{onSelect} {onSelect}
/> />
</div> </div>
{/if}
</div> </div>
{/if} {/if}
</div> </div>

View file

@ -590,6 +590,8 @@
id="settings-tabs-container" 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" 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 <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" 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" id="settings-search"
@ -610,6 +612,7 @@
placeholder={$i18n.t('Search')} placeholder={$i18n.t('Search')}
/> />
</div> </div>
{/if}
{#if filteredSettings.length > 0} {#if filteredSettings.length > 0}
{#each filteredSettings as tabId (tabId)} {#each filteredSettings as tabId (tabId)}
{#if tabId === 'general'} {#if tabId === 'general'}