fix: use load img for profile banners

This commit is contained in:
ThaUnknown 2025-09-07 19:46:58 +02:00
parent a670e1c7cd
commit 4efd9449d6
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "ui",
"version": "6.4.127",
"version": "6.4.128",
"license": "BUSL-1.1",
"private": true,
"packageManager": "pnpm@9.15.5",

View file

@ -7,6 +7,7 @@
import * as Avatar from '$lib/components/ui/avatar'
import * as Popover from '$lib/components/ui/popover'
import { cn, since } from '$lib/utils'
import { Load } from '../img';
type $$Props = HTMLAttributes<HTMLImageElement> & {
user: ResultOf<typeof UserFrag>
@ -35,7 +36,7 @@
<div class='w-[300px] rounded core-bg gap-2 flex flex-col pb-2'>
<div class={cn('w-full h-[105px] relative p-3 flex items-end', !banner && 'bg-white/10')}>
{#if banner}
<img src={banner} alt='banner' class='absolute top-0 left-0 w-full h-full rounded-t opacity-50 pointer-events-none object-cover' />
<Load src={banner} alt='banner' class='absolute top-0 left-0 w-full h-full rounded-t opacity-50 pointer-events-none object-cover' />
{/if}
<Avatar.Root class='inline-block size-20'>
<Avatar.Image src={avatar} alt={name} />