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
@@ -23,6 +23,7 @@
import ChevronUp from '$lib/components/icons/ChevronUp.svelte';
import ChevronDown from '$lib/components/icons/ChevronDown.svelte';
import { WEBUI_BASE_URL } from '$lib/constants';
export let feedbacks = [];
@@ -313,7 +314,7 @@
<Tooltip content={feedback?.user?.name}>
<div class="shrink-0">
<img
src={feedback?.user?.profile_image_url ?? '/user.png'}
src={feedback?.user?.profile_image_url ?? `${WEBUI_BASE_URL}/user.png`}
alt={feedback?.user?.name}
class="size-5 rounded-full object-cover shrink-0"
/>
@@ -15,6 +15,7 @@
import ChevronUp from '$lib/components/icons/ChevronUp.svelte';
import ChevronDown from '$lib/components/icons/ChevronDown.svelte';
import { WEBUI_BASE_URL } from '$lib/constants';
const i18n = getContext('i18n');
@@ -516,7 +517,7 @@
<div class="flex items-center gap-2">
<div class="shrink-0">
<img
src={model?.info?.meta?.profile_image_url ?? '/favicon.png'}
src={model?.info?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/favicon.png`}
alt={model.name}
class="size-5 rounded-full object-cover shrink-0"
/>
@@ -13,6 +13,7 @@
import AccessControl from '$lib/components/workspace/common/AccessControl.svelte';
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
import XMark from '$lib/components/icons/XMark.svelte';
import { WEBUI_BASE_URL } from '$lib/constants';
export let show = false;
export let edit = false;
@@ -36,7 +37,7 @@
}
};
let profileImageUrl = '/favicon.png';
let profileImageUrl = `${WEBUI_BASE_URL}/favicon.png`;
let description = '';
let selectedModelId = '';
@@ -92,7 +93,7 @@
name = '';
id = '';
profileImageUrl = '/favicon.png';
profileImageUrl = `${WEBUI_BASE_URL}/favicon.png`;
description = '';
modelIds = [];
selectedModelId = '';
@@ -36,6 +36,7 @@
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
import EyeSlash from '$lib/components/icons/EyeSlash.svelte';
import Eye from '$lib/components/icons/Eye.svelte';
import { WEBUI_BASE_URL } from '$lib/constants';
let shiftKey = false;
@@ -332,7 +333,7 @@
: 'opacity-50 dark:opacity-50'} "
>
<img
src={model?.meta?.profile_image_url ?? '/static/favicon.png'}
src={model?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`}
alt="modelfile profile"
class=" rounded-full w-full h-auto object-cover"
/>
@@ -88,7 +88,7 @@
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
: `${WEBUI_BASE_URL}/user.png`}
alt="user"
/>
@@ -396,7 +396,7 @@
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
: `${WEBUI_BASE_URL}/user.png`}
alt="user"
/>