Add a regenerate impostor button (#1057)

* Refresh the avatar dialog when impostor is deleted

* Adds a regenerate impostor button

This feature adds a button to regenerate an impostor, to save a few clicks

* Reload dialog after creating the impostor again to add a bit of delay for reloading

* Changed the icon to the refresh icon
This commit is contained in:
poprox24
2025-01-09 00:42:38 +01:00
committed by GitHub
parent 4751bd51fa
commit 5eac7fa6a9
14 changed files with 29 additions and 0 deletions

View File

@@ -12227,6 +12227,7 @@ speechSynthesis.getVoices();
message: 'Imposter deleted',
type: 'success'
});
this.showAvatarDialog(D.id);
return args;
});
break;
@@ -12241,6 +12242,21 @@ speechSynthesis.getVoices();
return args;
});
break;
case 'Regenerate Imposter':
API.deleteImposter({
avatarId: D.id
}).then((args) => {return args;});
API.createImposter({
avatarId: D.id
}).then((args) => {
this.$message({
message: 'Imposter deleted and queued for creation',
type: 'success'
});
this.showAvatarDialog(D.id);
return args;
});
break;
}
}
});