File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import type { mastodon } from ' masto'
3
3
4
- defineProps <{
4
+ const { account, square } = defineProps <{
5
5
account: mastodon .v1 .Account
6
6
square? : boolean
7
7
}>()
8
8
9
9
const loaded = ref (false )
10
10
const error = ref (false )
11
+
12
+ const preferredMotion = usePreferredReducedMotion ()
13
+ const accountAvatarSrc = computed (() => {
14
+ return preferredMotion .value === ' reduce' ? account .avatarStatic : account .avatar
15
+ })
11
16
</script >
12
17
13
18
<template >
@@ -16,7 +21,7 @@ const error = ref(false)
16
21
width =" 400"
17
22
height =" 400"
18
23
select-none
19
- :src =" (error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar "
24
+ :src =" (error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : accountAvatarSrc "
20
25
:alt =" $t('account.avatar_description', [account.username])"
21
26
loading =" lazy"
22
27
class =" account-avatar"
You can’t perform that action at this time.
0 commit comments