mirror of
https://github.com/open-webui/open-webui
synced 2025-05-25 23:25:27 +00:00
21 lines
492 B
Svelte
21 lines
492 B
Svelte
<script lang="ts">
|
|
import { settings } from '$lib/stores';
|
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
|
|
|
export let src = '/user.png';
|
|
</script>
|
|
|
|
<div class={$settings?.chatDirection === 'LTR' ? "mr-3" : "ml-3"}>
|
|
<img
|
|
crossorigin="anonymous"
|
|
src={src.startsWith(WEBUI_BASE_URL) ||
|
|
src.startsWith('https://www.gravatar.com/avatar/') ||
|
|
src.startsWith('data:')
|
|
? src
|
|
: `/user.png`}
|
|
class=" w-8 object-cover rounded-full"
|
|
alt="profile"
|
|
draggable="false"
|
|
/>
|
|
</div>
|