"src/lib/components/workspace/Tools/ToolMenu.svelte" did not exist on "099b1d066bd593b3119fb7b0e850627b95548711"
ProfileImage.svelte 607 Bytes
Newer Older
1
<script lang="ts">
2
	import { settings } from '$lib/stores';
Timothy J. Baek's avatar
Timothy J. Baek committed
3
	import { WEBUI_BASE_URL } from '$lib/constants';
Timothy J. Baek's avatar
Timothy J. Baek committed
4

Timothy J. Baek's avatar
refac  
Timothy J. Baek committed
5
6
	export let className = 'size-8';

7
8
9
	export let src = '/user.png';
</script>

Timothy J. Baek's avatar
refac  
Timothy J. Baek committed
10
<div class={`flex-shrink-0 ${($settings?.chatDirection ?? 'LTR') === 'LTR' ? 'mr-3' : 'ml-3'}`}>
Timothy J. Baek's avatar
Timothy J. Baek committed
11
12
	<img
		crossorigin="anonymous"
Timothy J. Baek's avatar
Timothy J. Baek committed
13
14
		src={src.startsWith(WEBUI_BASE_URL) ||
		src.startsWith('https://www.gravatar.com/avatar/') ||
Timothy J. Baek's avatar
Timothy J. Baek committed
15
16
		src.startsWith('data:') ||
		src.startsWith('/')
Timothy J. Baek's avatar
Timothy J. Baek committed
17
18
			? src
			: `/user.png`}
Timothy J. Baek's avatar
Timothy J. Baek committed
19
		class=" {className} object-cover rounded-full -translate-y-[1px]"
Timothy J. Baek's avatar
Timothy J. Baek committed
20
21
22
		alt="profile"
		draggable="false"
	/>
23
</div>