forked from open-webui/open-webui
refac
This commit is contained in:
parent
e1d4c87ff0
commit
783d8cf7ef
1 changed files with 7 additions and 13 deletions
|
@ -4,7 +4,7 @@
|
||||||
import { tick } from 'svelte';
|
import { tick } from 'svelte';
|
||||||
import Name from './Name.svelte';
|
import Name from './Name.svelte';
|
||||||
import ProfileImage from './ProfileImage.svelte';
|
import ProfileImage from './ProfileImage.svelte';
|
||||||
import { modelfiles, settings, user as userStore } from '$lib/stores';
|
import { modelfiles, settings } from '$lib/stores';
|
||||||
|
|
||||||
export let user;
|
export let user;
|
||||||
export let message;
|
export let message;
|
||||||
|
@ -57,20 +57,14 @@
|
||||||
{#if message.user}
|
{#if message.user}
|
||||||
{#if $modelfiles.map((modelfile) => modelfile.tagName).includes(message.user)}
|
{#if $modelfiles.map((modelfile) => modelfile.tagName).includes(message.user)}
|
||||||
{$modelfiles.find((modelfile) => modelfile.tagName === message.user)?.title}
|
{$modelfiles.find((modelfile) => modelfile.tagName === message.user)?.title}
|
||||||
{:else}
|
|
||||||
{#if $settings.showUsername}
|
|
||||||
{$userStore.name}
|
|
||||||
{:else}
|
{:else}
|
||||||
You <span class=" text-gray-500 text-sm font-medium">{message?.user ?? ''}</span>
|
You <span class=" text-gray-500 text-sm font-medium">{message?.user ?? ''}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{:else if $settings.showUsername}
|
||||||
{:else}
|
{user.name}
|
||||||
{#if $settings.showUsername}
|
|
||||||
{$userStore.name}
|
|
||||||
{:else}
|
{:else}
|
||||||
You
|
You
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if message.timestamp}
|
{#if message.timestamp}
|
||||||
<span class=" invisible group-hover:visible text-gray-400 text-xs font-medium">
|
<span class=" invisible group-hover:visible text-gray-400 text-xs font-medium">
|
||||||
|
|
Loading…
Reference in a new issue