mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Select avatar by id, check cache when direct access avatar, Download Unity Package button, display avatar id on avatar dialog.
This commit is contained in:
+20
-3
@@ -7343,8 +7343,8 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.promptAvatarDialog = function () {
|
$app.methods.promptSelectAvatarDialog = function () {
|
||||||
this.$prompt('Enter a Avatar ID (UUID)', 'Direct Access', {
|
this.$prompt('Enter a Avatar ID (UUID)', 'Select avatar', {
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
@@ -7353,7 +7353,15 @@ speechSynthesis.getVoices();
|
|||||||
callback: (action, instance) => {
|
callback: (action, instance) => {
|
||||||
if (action === 'confirm' &&
|
if (action === 'confirm' &&
|
||||||
instance.inputValue) {
|
instance.inputValue) {
|
||||||
this.showAvatarDialog(instance.inputValue);
|
API.selectAvatar({
|
||||||
|
avatarId: instance.inputValue
|
||||||
|
}).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Avatar changed',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -7488,6 +7496,10 @@ speechSynthesis.getVoices();
|
|||||||
callback: (action, instance) => {
|
callback: (action, instance) => {
|
||||||
if (action === 'confirm' &&
|
if (action === 'confirm' &&
|
||||||
instance.inputValue) {
|
instance.inputValue) {
|
||||||
|
if (API.cachedAvatars.has(instance.inputValue)) {
|
||||||
|
this.showAvatarDialog(instance.inputValue);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.showFavoriteDialog('avatar', instance.inputValue);
|
this.showFavoriteDialog('avatar', instance.inputValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8207,6 +8219,8 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
} else if (command === 'Previous Images') {
|
} else if (command === 'Previous Images') {
|
||||||
this.displayPreviousImages('User');
|
this.displayPreviousImages('User');
|
||||||
|
} else if (command === 'Select Avatar') {
|
||||||
|
this.promptSelectAvatarDialog();
|
||||||
} else {
|
} else {
|
||||||
this.$confirm(`Continue? ${command}`, 'Confirm', {
|
this.$confirm(`Continue? ${command}`, 'Confirm', {
|
||||||
confirmButtonText: 'Confirm',
|
confirmButtonText: 'Confirm',
|
||||||
@@ -8761,6 +8775,9 @@ speechSynthesis.getVoices();
|
|||||||
case 'Change Description':
|
case 'Change Description':
|
||||||
this.promptChangeAvatarDescription(D);
|
this.promptChangeAvatarDescription(D);
|
||||||
break;
|
break;
|
||||||
|
case 'Download Unity Package':
|
||||||
|
this.openExternalLink(this.avatarDialog.ref.unityPackageUrl);
|
||||||
|
break;
|
||||||
case 'Add Favorite':
|
case 'Add Favorite':
|
||||||
this.showFavoriteDialog('avatar', D.id);
|
this.showFavoriteDialog('avatar', D.id);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1038,6 +1038,7 @@ html
|
|||||||
el-button(:type="(userDialog.incomingRequest || userDialog.outgoingRequest) ? 'success' : (userDialog.isBlock || userDialog.isMute || userDialog.isHideAvatar) ? 'danger' : 'default'" icon="el-icon-more" circle style="margin-left:5px")
|
el-button(:type="(userDialog.incomingRequest || userDialog.outgoingRequest) ? 'success' : (userDialog.isBlock || userDialog.isMute || userDialog.isHideAvatar) ? 'danger' : 'default'" icon="el-icon-more" circle style="margin-left:5px")
|
||||||
el-dropdown-menu(#default="dropdown")
|
el-dropdown-menu(#default="dropdown")
|
||||||
template(v-if="userDialog.ref.id === API.currentUser.id")
|
template(v-if="userDialog.ref.id === API.currentUser.id")
|
||||||
|
el-dropdown-item(icon="el-icon-check" command="Select Avatar") Select Avatar By ID
|
||||||
el-dropdown-item(icon="el-icon-s-custom" command="Show Avatar Author") Show Avatar Author
|
el-dropdown-item(icon="el-icon-s-custom" command="Show Avatar Author") Show Avatar Author
|
||||||
el-dropdown-item(icon="el-icon-s-custom" command="Show Fallback Avatar Details") Show Fallback Avatar Details
|
el-dropdown-item(icon="el-icon-s-custom" command="Show Fallback Avatar Details") Show Fallback Avatar Details
|
||||||
el-dropdown-item(icon="el-icon-edit" command="Edit Social Status" divided) Social Status
|
el-dropdown-item(icon="el-icon-edit" command="Edit Social Status" divided) Social Status
|
||||||
@@ -1336,10 +1337,15 @@ html
|
|||||||
el-dropdown-item(icon="el-icon-picture-outline" command="Change Image") Change Image
|
el-dropdown-item(icon="el-icon-picture-outline" command="Change Image") Change Image
|
||||||
el-dropdown-item(icon="el-icon-upload2" command="Upload Image") Upload Image
|
el-dropdown-item(icon="el-icon-upload2" command="Upload Image") Upload Image
|
||||||
input(type="file" multiple accept="image/*" @change="onFileChangeAvatarImage" id="AvatarImageUploadButton" style="display:none")
|
input(type="file" multiple accept="image/*" @change="onFileChangeAvatarImage" id="AvatarImageUploadButton" style="display:none")
|
||||||
|
el-dropdown-item(v-if="avatarDialog.ref.unityPackageUrl" icon="el-icon-download" command="Download Unity Package") Download Unity Package
|
||||||
el-dropdown-item(icon="el-icon-user" command="Delete" style="color:#F56C6C" divided) Delete
|
el-dropdown-item(icon="el-icon-user" command="Delete" style="color:#F56C6C" divided) Delete
|
||||||
el-tabs
|
el-tabs
|
||||||
el-tab-pane(label="Info")
|
el-tab-pane(label="Info")
|
||||||
.x-friend-list
|
.x-friend-list
|
||||||
|
.x-friend-item(style="width:100%;cursor:default")
|
||||||
|
.detail
|
||||||
|
span.name Avatar ID
|
||||||
|
span.extra(v-text="avatarDialog.id")
|
||||||
.x-friend-item(style="cursor:default")
|
.x-friend-item(style="cursor:default")
|
||||||
.detail
|
.detail
|
||||||
span.name Created
|
span.name Created
|
||||||
|
|||||||
Reference in New Issue
Block a user