mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Bulk invite with message
This commit is contained in:
@@ -8576,6 +8576,36 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.sendInviteConfirm = function () {
|
$app.methods.sendInviteConfirm = function () {
|
||||||
var D = this.sendInviteDialog;
|
var D = this.sendInviteDialog;
|
||||||
|
var J = this.inviteDialog;
|
||||||
|
if (J.visible) {
|
||||||
|
if (this.API.currentUser.status === 'busy' &&
|
||||||
|
J.userIds.includes(this.API.currentUser.id) === true) {
|
||||||
|
this.$message({
|
||||||
|
message: 'You can\'t invite yourself in \'Do Not Disturb\' mode',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var inviteLoop = () => {
|
||||||
|
if (J.userIds.length > 0) {
|
||||||
|
var receiverUserId = J.userIds.shift();
|
||||||
|
API.sendInvite({
|
||||||
|
instanceId: J.worldId,
|
||||||
|
worldId: J.worldId,
|
||||||
|
worldName: J.worldName,
|
||||||
|
messageSlot: D.messageSlot
|
||||||
|
}, receiverUserId).finally(inviteLoop);
|
||||||
|
} else {
|
||||||
|
J.loading = false;
|
||||||
|
J.visible = false;
|
||||||
|
this.$message({
|
||||||
|
message: 'Invite sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
inviteLoop();
|
||||||
|
} else {
|
||||||
if (D.messageType === 'invite') {
|
if (D.messageType === 'invite') {
|
||||||
D.params.messageSlot = D.messageSlot;
|
D.params.messageSlot = D.messageSlot;
|
||||||
API.sendInvite(D.params, D.userId).catch((err) => {
|
API.sendInvite(D.params, D.userId).catch((err) => {
|
||||||
@@ -8591,6 +8621,7 @@ speechSynthesis.getVoices();
|
|||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.sendInviteDialogVisible = false;
|
this.sendInviteDialogVisible = false;
|
||||||
this.sendInviteRequestDialogVisible = false;
|
this.sendInviteRequestDialogVisible = false;
|
||||||
this.sendInviteConfirmDialog.visible = false;
|
this.sendInviteConfirmDialog.visible = false;
|
||||||
|
|||||||
@@ -1227,6 +1227,7 @@ html
|
|||||||
span(v-else v-text="friend.id")
|
span(v-else v-text="friend.id")
|
||||||
template(#footer)
|
template(#footer)
|
||||||
el-button(type="primary" size="small" :disabled="inviteDialog.loading || !inviteDialog.userIds.length" @click="sendInvite()") Invite
|
el-button(type="primary" size="small" :disabled="inviteDialog.loading || !inviteDialog.userIds.length" @click="sendInvite()") Invite
|
||||||
|
el-button(type="primary" size="small" :disabled="inviteDialog.loading || !inviteDialog.userIds.length" @click="showSendInviteDialog()") Invite With Message
|
||||||
|
|
||||||
//- dialog: social status
|
//- dialog: social status
|
||||||
el-dialog.x-dialog(ref="socialStatusDialog" :visible.sync="socialStatusDialog.visible" title="Social Status" width="400px")
|
el-dialog.x-dialog(ref="socialStatusDialog" :visible.sync="socialStatusDialog.visible" title="Social Status" width="400px")
|
||||||
|
|||||||
Reference in New Issue
Block a user