ui: Change the request user icon resolution (#1178) (#1179)

* ui: Change the request user icon resolution (#1178)

* ui: add Badge Earned text
This commit is contained in:
pa
2025-03-11 23:26:42 +09:00
committed by GitHub
parent 7a449ad383
commit 730b31dbe0
6 changed files with 16 additions and 5 deletions
+9 -1
View File
@@ -16924,7 +16924,15 @@ console.log(`isLinux: ${LINUX}`);
return false; 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') { if (typeof user === 'undefined') {
return ''; return '';
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<div <div
class="avatar" class="avatar"
:class="isFriendActiveOrOffline ? undefined : userStatusClass(friend.ref, friend.pendingOffline)"> :class="isFriendActiveOrOffline ? undefined : userStatusClass(friend.ref, friend.pendingOffline)">
<img v-lazy="userImage(friend.ref)" /> <img v-lazy="userImage(friend.ref, true)" />
</div> </div>
<div class="detail"> <div class="detail">
<span v-if="!hideNicknames && friend.$nickName" class="name" :style="{ color: friend.ref.$userColour }"> <span v-if="!hideNicknames && friend.$nickName" class="name" :style="{ color: friend.ref.$userColour }">
+3
View File
@@ -204,6 +204,9 @@
}, },
"instance": { "instance": {
"closed": "Instance Closed" "closed": "Instance Closed"
},
"badge": {
"earned": "Badge Earned"
} }
} }
}, },
+1 -1
View File
@@ -195,7 +195,7 @@ mixin userDialog
el-popover(placement='right' width='500px' trigger='click') el-popover(placement='right' width='500px' trigger='click')
img.x-link( img.x-link(
slot='reference' 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') style='flex: none; width: 120px; height: 120px; border-radius: 12px; object-fit: cover')
img.x-link( img.x-link(
:src='userDialog.ref.userIcon' :src='userDialog.ref.userIcon'
+1 -1
View File
@@ -5,7 +5,7 @@ mixin profileTab
.x-friend-list(style='margin-top: 10px') .x-friend-list(style='margin-top: 10px')
.x-friend-item(@click='showUserDialog(API.currentUser.id)') .x-friend-item(@click='showUserDialog(API.currentUser.id)')
.avatar .avatar
img(v-lazy='userImage(API.currentUser)') img(v-lazy='userImage(API.currentUser, true)')
.detail .detail
span.name(v-text='API.currentUser.displayName') span.name(v-text='API.currentUser.displayName')
span.extra(v-text='API.currentUser.username') span.extra(v-text='API.currentUser.username')
+1 -1
View File
@@ -117,7 +117,7 @@
<el-table-column :label="$t('table.friendList.avatar')" width="70" prop="photo"> <el-table-column :label="$t('table.friendList.avatar')" width="70" prop="photo">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" height="500px" trigger="hover"> <el-popover placement="right" height="500px" trigger="hover">
<img slot="reference" v-lazy="userImage(scope.row)" class="friends-list-avatar" /> <img slot="reference" v-lazy="userImage(scope.row, true)" class="friends-list-avatar" />
<img <img
v-lazy="userImageFull(scope.row)" v-lazy="userImageFull(scope.row)"
class="friends-list-avatar" class="friends-list-avatar"