This commit is contained in:
Timothy J. Baek
2024-11-06 02:19:04 -08:00
parent 056f24dc57
commit ccbf5a08f3
5 changed files with 35 additions and 39 deletions
@@ -1,11 +1,21 @@
<script lang="ts">
import { settings } from '$lib/stores';
import ProfileImageBase from './ProfileImageBase.svelte';
import { WEBUI_BASE_URL } from '$lib/constants';
export let className = 'size-8';
export let src = '';
export let src = `${WEBUI_BASE_URL}/static/favicon.png`;
</script>
<div class={`flex-shrink-0 ${($settings?.chatDirection ?? 'LTR') === 'LTR' ? 'mr-3' : 'ml-3'}`}>
<ProfileImageBase {src} {className} />
</div>
<img
crossorigin="anonymous"
src={src === ''
? `${WEBUI_BASE_URL}/static/favicon.png`
: src.startsWith(WEBUI_BASE_URL) ||
src.startsWith('https://www.gravatar.com/avatar/') ||
src.startsWith('data:') ||
src.startsWith('/')
? src
: `/user.png`}
class=" {className} object-cover rounded-full -translate-y-[1px]"
alt="profile"
draggable="false"
/>