mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 15:53:50 +02:00
Impostors
This commit is contained in:
@@ -3054,6 +3054,42 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
params: {
|
||||
avatarId: string
|
||||
}
|
||||
*/
|
||||
API.createImposter = function (params) {
|
||||
return this.call(`avatars/${params.avatarId}/impostor/enqueue`, {
|
||||
method: 'POST'
|
||||
}).then((json) => {
|
||||
var args = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
this.$emit('AVATAR:IMPOSTER:CREATE', args);
|
||||
return args;
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
params: {
|
||||
avatarId: string
|
||||
}
|
||||
*/
|
||||
API.deleteImposter = function (params) {
|
||||
return this.call(`avatars/${params.avatarId}/impostor`, {
|
||||
method: 'DELETE'
|
||||
}).then((json) => {
|
||||
var args = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
this.$emit('AVATAR:IMPOSTER:DELETE', args);
|
||||
return args;
|
||||
});
|
||||
};
|
||||
|
||||
// #endregion
|
||||
// #region | API: Notification
|
||||
|
||||
@@ -18626,6 +18662,28 @@ speechSynthesis.getVoices();
|
||||
return args;
|
||||
});
|
||||
break;
|
||||
case 'Delete Imposter':
|
||||
API.deleteImposter({
|
||||
avatarId: D.id
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'Imposter deleted',
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
});
|
||||
break;
|
||||
case 'Create Imposter':
|
||||
API.createImposter({
|
||||
avatarId: D.id
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'Imposter queued for creation',
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user