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

View File

@@ -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 '';
}