chore: Update AdminUiHandler to clear input fields and set mode to ADMIN

This commit is contained in:
Frederico Santos 2024-08-30 00:13:53 +01:00
parent 3b9b0c4091
commit f1111dc0d2
1 changed files with 4 additions and 2 deletions

View File

@ -66,11 +66,13 @@ export default class AdminUiHandler extends FormModalUiHandler {
if (!response.ok) { if (!response.ok) {
console.error(response); console.error(response);
} }
this.scene.ui.revertMode(); this.inputs[0].setText("");
this.inputs[1].setText("");
this.scene.ui.setMode(Mode.ADMIN);
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
this.scene.ui.revertMode(); this.scene.ui.setMode(Mode.ADMIN);
}); });
return false; return false;
}; };