mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-15 21:03:52 +02:00
Check for valid avatar image url
This commit is contained in:
@@ -10387,10 +10387,17 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.getAvatarName = function (args) {
|
||||
var D = this.userDialog;
|
||||
D.$avatarInfo = {
|
||||
id: '',
|
||||
name: '-'
|
||||
};
|
||||
if (!D.visible) {
|
||||
return;
|
||||
}
|
||||
var imageUrl = D.ref.currentAvatarImageUrl;
|
||||
if (imageUrl.substring(0, 41) !== 'https://api.vrchat.cloud/api/1/file/file_') {
|
||||
return;
|
||||
}
|
||||
var url = new URL(imageUrl);
|
||||
var pathArray = url.pathname.split('/');
|
||||
var fileId = pathArray[4];
|
||||
@@ -10398,10 +10405,6 @@ speechSynthesis.getVoices();
|
||||
D.$avatarInfo = API.cachedAvatarNames.get(fileId);
|
||||
return;
|
||||
}
|
||||
D.$avatarInfo = {
|
||||
id: '',
|
||||
name: ''
|
||||
};
|
||||
var params = {
|
||||
fileId
|
||||
};
|
||||
|
||||
@@ -1020,7 +1020,7 @@ html
|
||||
.extra(@click="userDialogCommand('Show Avatar Details')" style="cursor:pointer;width:fit-content")
|
||||
span(v-text="userDialog.$avatarInfo.name" style="display:inline-block;margin-right:5px")
|
||||
span(v-if="userDialog.$avatarInfo.id === userDialog.id" style="display:inline-block;color:#E6A23C" ) (own)
|
||||
span(v-else-if="userDialog.$avatarInfo.name" style="display:inline-block;color:#67C23A") (public)
|
||||
span(v-else-if="userDialog.$avatarInfo.name && userDialog.$avatarInfo.id" style="display:inline-block;color:#67C23A") (public)
|
||||
.x-friend-item(style="width:100%;cursor:default")
|
||||
.detail
|
||||
span.name Bio
|
||||
|
||||
Reference in New Issue
Block a user