mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
refac
This commit is contained in:
parent
b93b812468
commit
4491e60a29
6 changed files with 78 additions and 24 deletions
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import ConfirmDialog from '../common/ConfirmDialog.svelte';
|
||||
import { getModels } from '$lib/apis';
|
||||
import FunctionMenu from './Functions/FunctionMenu.svelte';
|
||||
|
|
@ -576,10 +577,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={func?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
func?.user?.name ?? func?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={func?.user?.id
|
||||
? `/api/v1/users/${func.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
func?.user?.name ?? func?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
import Spinner from '../common/Spinner.svelte';
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import XMark from '../icons/XMark.svelte';
|
||||
import ViewSelector from './common/ViewSelector.svelte';
|
||||
import TagSelector from './common/TagSelector.svelte';
|
||||
|
|
@ -514,10 +515,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={item?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
item?.user?.name ?? item?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={item?.user?.id
|
||||
? `/api/v1/users/${item.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
item?.user?.name ?? item?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
import ModelDeleteConfirmDialog from '../common/ConfirmDialog.svelte';
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import GarbageBin from '../icons/GarbageBin.svelte';
|
||||
import Search from '../icons/Search.svelte';
|
||||
import Switch from '../common/Switch.svelte';
|
||||
|
|
@ -883,10 +884,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={model?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
model?.user?.name ?? model?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={model?.user?.id
|
||||
? `/api/v1/users/${model.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
model?.user?.name ?? model?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
import Spinner from '../common/Spinner.svelte';
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import XMark from '../icons/XMark.svelte';
|
||||
import GarbageBin from '../icons/GarbageBin.svelte';
|
||||
import ViewSelector from './common/ViewSelector.svelte';
|
||||
|
|
@ -642,10 +643,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={prompt?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
prompt?.user?.name ?? prompt?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={prompt?.user?.id
|
||||
? `/api/v1/users/${prompt.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
prompt?.user?.name ?? prompt?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import ConfirmDialog from '../common/ConfirmDialog.svelte';
|
||||
import DeleteConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||
import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte';
|
||||
|
|
@ -567,10 +568,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={skill?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
skill?.user?.name ?? skill?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={skill?.user?.id
|
||||
? `/api/v1/users/${skill.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
skill?.user?.name ?? skill?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
import Tooltip from '../common/Tooltip.svelte';
|
||||
import ProfilePreview from '$lib/components/channel/Messages/Message/ProfilePreview.svelte';
|
||||
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
|
||||
import ConfirmDialog from '../common/ConfirmDialog.svelte';
|
||||
import ToolMenu from './Tools/ToolMenu.svelte';
|
||||
import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte';
|
||||
|
|
@ -509,10 +510,18 @@
|
|||
class="hidden max-w-44 shrink-0 self-center truncate text-right text-[0.6875rem] leading-5 text-gray-500 dark:text-gray-500 md:block"
|
||||
>
|
||||
<ProfilePreview user={tool?.user ?? null} side="left">
|
||||
<span class="max-w-44 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
tool?.user?.name ?? tool?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
<span class="flex max-w-44 items-center gap-1.75">
|
||||
<ProfileImage
|
||||
src={tool?.user?.id
|
||||
? `/api/v1/users/${tool.user.id}/profile/image`
|
||||
: '/user.png'}
|
||||
className="size-4 shrink-0 rounded-full!"
|
||||
/>
|
||||
<span class="min-w-0 max-w-24 truncate">
|
||||
{capitalizeFirstLetter(
|
||||
tool?.user?.name ?? tool?.user?.email ?? $i18n.t('Deleted User')
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
</ProfilePreview>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue