mirror of
https://github.com/open-webui/open-webui
synced 2025-05-23 14:24:22 +00:00
fix: #2332
This commit is contained in:
parent
014e52c072
commit
5b2369da5d
@ -1,11 +1,16 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
||||||
export let src = '/user.png';
|
export let src = '/user.png';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class=" mr-3">
|
<div class=" mr-3">
|
||||||
<img
|
<img
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
{src}
|
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"
|
class=" w-8 object-cover rounded-full"
|
||||||
alt="profile"
|
alt="profile"
|
||||||
draggable="false"
|
draggable="false"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import { WEBUI_API_BASE_URL } from '$lib/constants';
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
||||||
import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores';
|
import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { onMount, getContext } from 'svelte';
|
import { onMount, getContext } from 'svelte';
|
||||||
@ -264,7 +264,11 @@
|
|||||||
<div class="flex flex-row w-max">
|
<div class="flex flex-row w-max">
|
||||||
<img
|
<img
|
||||||
class=" rounded-full w-6 h-6 object-cover mr-2.5"
|
class=" rounded-full w-6 h-6 object-cover mr-2.5"
|
||||||
src={user.profile_image_url}
|
src={user.profile_image_url.startsWith(WEBUI_BASE_URL) ||
|
||||||
|
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
|
||||||
|
user.profile_image_url.startsWith('data:')
|
||||||
|
? user.profile_image_url
|
||||||
|
: `/user.png`}
|
||||||
alt="user"
|
alt="user"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user