diff --git a/src/app.js b/src/app.js index d9dd1987..e746850f 100644 --- a/src/app.js +++ b/src/app.js @@ -16924,7 +16924,15 @@ console.log(`isLinux: ${LINUX}`); return false; }; - $app.methods.userImage = function (user) { + $app.methods.userImage = function (user, isIcon, resolution = '64') { + if (isIcon) { + return user.userIcon + ? `${user.userIcon.replace('/file/', '/image/')}${user.userIcon.endsWith('/') ? '256' : '/' + resolution}` + : user.currentAvatarThumbnailImageUrl?.replace( + '256', + resolution + ) || user.profilePicOverrideThumbnail; + } if (typeof user === 'undefined') { return ''; } diff --git a/src/components/sidebar/FriendItem.vue b/src/components/sidebar/FriendItem.vue index d9ac9d8c..69e0d2a0 100644 --- a/src/components/sidebar/FriendItem.vue +++ b/src/components/sidebar/FriendItem.vue @@ -4,7 +4,7 @@
- +
diff --git a/src/localization/en/en.json b/src/localization/en/en.json index cc443ace..4fc89c1b 100644 --- a/src/localization/en/en.json +++ b/src/localization/en/en.json @@ -204,6 +204,9 @@ }, "instance": { "closed": "Instance Closed" + }, + "badge": { + "earned": "Badge Earned" } } }, diff --git a/src/mixins/dialogs/userDialog.pug b/src/mixins/dialogs/userDialog.pug index 7f78514e..3f1cc6d7 100644 --- a/src/mixins/dialogs/userDialog.pug +++ b/src/mixins/dialogs/userDialog.pug @@ -195,7 +195,7 @@ mixin userDialog el-popover(placement='right' width='500px' trigger='click') img.x-link( slot='reference' - :src='userDialog.ref.userIcon' + :src='userImage(userDialog.ref, true, "256")' style='flex: none; width: 120px; height: 120px; border-radius: 12px; object-fit: cover') img.x-link( :src='userDialog.ref.userIcon' diff --git a/src/mixins/tabs/profile.pug b/src/mixins/tabs/profile.pug index c832ee65..bdb54ba3 100644 --- a/src/mixins/tabs/profile.pug +++ b/src/mixins/tabs/profile.pug @@ -5,7 +5,7 @@ mixin profileTab .x-friend-list(style='margin-top: 10px') .x-friend-item(@click='showUserDialog(API.currentUser.id)') .avatar - img(v-lazy='userImage(API.currentUser)') + img(v-lazy='userImage(API.currentUser, true)') .detail span.name(v-text='API.currentUser.displayName') span.extra(v-text='API.currentUser.username') diff --git a/src/views/tabs/FriendsList.vue b/src/views/tabs/FriendsList.vue index 111b2c27..143f0bee 100644 --- a/src/views/tabs/FriendsList.vue +++ b/src/views/tabs/FriendsList.vue @@ -117,7 +117,7 @@