forked from Mirrors/elk
fix: show placeholder on not loaded avatar to void showing alt text (#1054)
This commit is contained in:
parent
3367ba6e30
commit
5c9a21eb9a
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ const error = $ref(false)
|
|||
:key="account.avatar"
|
||||
width="400"
|
||||
height="400"
|
||||
:src="error ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar"
|
||||
:src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar"
|
||||
:alt="$t('account.avatar_description', [account.username])"
|
||||
loading="lazy"
|
||||
:class="(loaded ? 'bg-base' : 'bg-gray:10') + (square ? ' ' : ' rounded-full')"
|
||||
|
|
Loading…
Reference in a new issue