mirror of
https://github.com/open-webui/open-webui
synced 2025-06-25 09:47:41 +00:00
refac
This commit is contained in:
parent
39c466d542
commit
a4810a5e42
@ -102,17 +102,19 @@
|
|||||||
|
|
||||||
{#if filteredItems.length > 0 || prompt.split(' ')?.at(0)?.substring(1).startsWith('http')}
|
{#if filteredItems.length > 0 || prompt.split(' ')?.at(0)?.substring(1).startsWith('http')}
|
||||||
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
||||||
<div class="flex w-full px-2">
|
<div class="flex w-full dark:border dark:border-gray-850 rounded-lg">
|
||||||
<div class=" bg-gray-100 dark:bg-gray-700 w-10 rounded-l-xl text-center">
|
<div class=" bg-gray-50 dark:bg-gray-850 w-10 rounded-l-lg text-center">
|
||||||
<div class=" text-lg font-semibold mt-2">#</div>
|
<div class=" text-lg font-semibold mt-2">#</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="max-h-60 flex flex-col w-full rounded-r-xl bg-white dark:bg-gray-850 dark:text-gray-100 ">
|
<div
|
||||||
<div class="m-1 overflow-y-auto p-1 rounded-r-xl space-y-0.5">
|
class="max-h-60 flex flex-col w-full rounded-r-xl bg-white dark:bg-gray-900 dark:text-gray-100"
|
||||||
|
>
|
||||||
|
<div class="m-1 overflow-y-auto p-1 rounded-r-xl space-y-0.5 scrollbar-hidden">
|
||||||
{#each filteredItems as doc, docIdx}
|
{#each filteredItems as doc, docIdx}
|
||||||
<button
|
<button
|
||||||
class=" px-3 py-1.5 rounded-xl w-full text-left {docIdx === selectedIdx
|
class=" px-3 py-1.5 rounded-xl w-full text-left {docIdx === selectedIdx
|
||||||
? ' bg-gray-100 dark:bg-gray-600 dark:text-gray-100 selected-command-option-button'
|
? ' bg-gray-50 dark:bg-gray-850 dark:text-gray-100 selected-command-option-button'
|
||||||
: ''}"
|
: ''}"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@ -130,7 +132,9 @@
|
|||||||
{doc?.title ?? `#${doc.name}`}
|
{doc?.title ?? `#${doc.name}`}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" text-xs text-gray-600 dark:text-gray-100 line-clamp-1">{$i18n.t('Collection')}</div>
|
<div class=" text-xs text-gray-600 dark:text-gray-100 line-clamp-1">
|
||||||
|
{$i18n.t('Collection')}
|
||||||
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class=" font-medium text-black dark:text-gray-100 line-clamp-1">
|
<div class=" font-medium text-black dark:text-gray-100 line-clamp-1">
|
||||||
#{doc.name} ({doc.filename})
|
#{doc.name} ({doc.filename})
|
||||||
|
@ -134,17 +134,19 @@
|
|||||||
{#if prompt.charAt(0) === '@'}
|
{#if prompt.charAt(0) === '@'}
|
||||||
{#if filteredModels.length > 0}
|
{#if filteredModels.length > 0}
|
||||||
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
||||||
<div class="flex w-full px-2">
|
<div class="flex w-full dark:border dark:border-gray-850 rounded-lg">
|
||||||
<div class=" bg-gray-100 dark:bg-gray-700 w-10 rounded-l-xl text-center">
|
<div class=" bg-gray-50 dark:bg-gray-850 w-10 rounded-l-lg text-center">
|
||||||
<div class=" text-lg font-semibold mt-2">@</div>
|
<div class=" text-lg font-semibold mt-2">@</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="max-h-60 flex flex-col w-full rounded-r-xl bg-white dark:bg-gray-850">
|
<div
|
||||||
<div class="m-1 overflow-y-auto p-1 rounded-r-xl space-y-0.5">
|
class="max-h-60 flex flex-col w-full rounded-r-lg bg-white dark:bg-gray-900 dark:text-gray-100"
|
||||||
|
>
|
||||||
|
<div class="m-1 overflow-y-auto p-1 rounded-r-lg space-y-0.5 scrollbar-hidden">
|
||||||
{#each filteredModels as model, modelIdx}
|
{#each filteredModels as model, modelIdx}
|
||||||
<button
|
<button
|
||||||
class=" px-3 py-1.5 rounded-xl w-full text-left {modelIdx === selectedIdx
|
class=" px-3 py-1.5 rounded-xl w-full text-left {modelIdx === selectedIdx
|
||||||
? ' bg-gray-100 dark:bg-gray-600 selected-command-option-button'
|
? ' bg-gray-50 dark:bg-gray-850 selected-command-option-button'
|
||||||
: ''}"
|
: ''}"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
@ -89,17 +89,19 @@
|
|||||||
|
|
||||||
{#if filteredPromptCommands.length > 0}
|
{#if filteredPromptCommands.length > 0}
|
||||||
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
<div class="pl-1 pr-12 mb-3 text-left w-full absolute bottom-0 left-0 right-0">
|
||||||
<div class="flex w-full px-2">
|
<div class="flex w-full dark:border dark:border-gray-850 rounded-lg">
|
||||||
<div class=" bg-gray-100 dark:bg-gray-700 w-10 rounded-l-xl text-center">
|
<div class=" bg-gray-50 dark:bg-gray-850 w-10 rounded-l-lg text-center">
|
||||||
<div class=" text-lg font-semibold mt-2">/</div>
|
<div class=" text-lg font-semibold mt-2">/</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="max-h-60 flex flex-col w-full rounded-r-xl bg-white dark:bg-gray-850">
|
<div
|
||||||
<div class="m-1 overflow-y-auto p-1 rounded-r-xl space-y-0.5">
|
class="max-h-60 flex flex-col w-full rounded-r-lg bg-white dark:bg-gray-900 dark:text-gray-100"
|
||||||
|
>
|
||||||
|
<div class="m-1 overflow-y-auto p-1 rounded-r-lg space-y-0.5 scrollbar-hidden">
|
||||||
{#each filteredPromptCommands as command, commandIdx}
|
{#each filteredPromptCommands as command, commandIdx}
|
||||||
<button
|
<button
|
||||||
class=" px-3 py-1.5 rounded-xl w-full text-left {commandIdx === selectedCommandIdx
|
class=" px-3 py-1.5 rounded-xl w-full text-left {commandIdx === selectedCommandIdx
|
||||||
? ' bg-gray-100 dark:bg-gray-600 selected-command-option-button'
|
? ' bg-gray-50 dark:bg-gray-850 selected-command-option-button'
|
||||||
: ''}"
|
: ''}"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@ -122,7 +124,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class=" px-2 pb-1 text-xs text-gray-600 dark:text-gray-100 bg-white dark:bg-gray-850 rounded-br-xl flex items-center space-x-1"
|
class=" px-2 pb-1 text-xs text-gray-600 dark:text-gray-100 bg-white dark:bg-gray-900 rounded-br-xl flex items-center space-x-1"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<svg
|
<svg
|
||||||
|
Loading…
Reference in New Issue
Block a user