fix: show placeholder on not loaded avatar to void showing alt text (#1054)
parent
3367ba6e30
commit
5c9a21eb9a
|
@ -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 New Issue