Skip to content

Commit

Permalink
fix(ui): Profile avatar image motion setting elk-zone#3044
Browse files Browse the repository at this point in the history
  • Loading branch information
null committed Nov 26, 2024
1 parent 08672d6 commit ce286c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/account/AccountAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ defineProps<{
const loaded = ref(false)
const error = ref(false)
const preferredMotion = usePreferredReducedMotion()
const accountAvatarSrc = computed(() => preferredMotion.value === 'reduce' ? props.account.avatarStatic : props.account.avatar)
</script>

<template>
Expand All @@ -16,7 +19,7 @@ const error = ref(false)
width="400"
height="400"
select-none
:src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar"
:src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : accountAvatarSrc"
:alt="$t('account.avatar_description', [account.username])"
loading="lazy"
class="account-avatar"
Expand Down

0 comments on commit ce286c7

Please sign in to comment.