Skip to content

Commit 678f114

Browse files
committed
Don't use thumbnail on avatar sizes more more than sm
1 parent d1df37a commit 678f114

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

frontend/app/components/site/a-user.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
<m-flex inline :column="column" class="items-center" :gap="neededGap">
1010
<NuxtLink v-if="avatar" class="inline-flex" :to="link">
11-
<m-avatar :size="avatarSize" :src="user?.avatar" :use-thumb="user?.avatar_has_thumb" :style="{ opacity: isBanned ? 0.6 : 1 }"/>
11+
<m-avatar :size="avatarSize" :src="user?.avatar" :use-thumb="useThumb" :style="{ opacity: isBanned ? 0.6 : 1 }"/>
1212
</NuxtLink>
1313

1414
<m-flex gap="1" class="break-words" column>
@@ -79,6 +79,13 @@ const isOwnOrModerator = computed(() => me && (props.user?.id === me.id || canMo
7979
const statusString = computed(() => t(isOnline.value ? 'online' : 'offline'));
8080
const statusColor = computed(() => isOnline.value ? 'green' : 'gray');
8181
82+
const useThumb = computed(() => {
83+
if (!props.user?.avatar_has_thumb) {
84+
return false;
85+
}
86+
return props.avatarSize === 'xs' || props.avatarSize === 'sm';
87+
});
88+
8289
const isBanned = computed(() => !!(props.user?.ban || props.user?.game_ban));
8390
const userTag = computed(() => {
8491
if (props.user && props.user.show_tag !== 'none') {

0 commit comments

Comments
 (0)