chore: streamline the URL used for resources like favicon.png

This commit is contained in:
guenhter
2025-07-09 09:14:51 +02:00
parent 0a3c448a52
commit 196af9eaf7
29 changed files with 66 additions and 42 deletions
@@ -14,7 +14,7 @@
src.startsWith('data:') ||
src.startsWith('/')
? src
: `/user.png`}
: `${WEBUI_BASE_URL}/user.png`}
class=" {className} object-cover rounded-full"
alt="profile"
draggable="false"
@@ -605,7 +605,9 @@
<div class={`shrink-0 ltr:mr-3 rtl:ml-3 hidden @lg:flex mt-1 `}>
<ProfileImage
src={model?.info?.meta?.profile_image_url ??
($i18n.language === 'dg-DG' ? `/doge.png` : `${WEBUI_BASE_URL}/static/favicon.png`)}
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/favicon.png`)}
className={'size-8 assistant-message-profile-image'}
/>
</div>
@@ -6,6 +6,7 @@
import { models, settings } from '$lib/stores';
import { user as _user } from '$lib/stores';
import { copyToClipboard as _copyToClipboard, formatDate } from '$lib/utils';
import { WEBUI_BASE_URL } from '$lib/constants';
import Name from './Name.svelte';
import ProfileImage from './ProfileImage.svelte';
@@ -117,8 +118,8 @@
<ProfileImage
src={message.user
? ($models.find((m) => m.id === message.user)?.info?.meta?.profile_image_url ??
'/user.png')
: (user?.profile_image_url ?? '/user.png')}
`${WEBUI_BASE_URL}/user.png`)
: (user?.profile_image_url ?? `${WEBUI_BASE_URL}/user.png`)}
className={'size-8 user-message-profile-image'}
/>
</div>