DEV: Use the dialog service

This commit is contained in:
Jarek Radosz 2023-01-15 21:54:17 +01:00
parent 88376af572
commit a80bb569fa
1 changed files with 11 additions and 6 deletions

View File

@ -110,10 +110,15 @@ export default Controller.extend({
}, },
resetUpgrade() { resetUpgrade() {
bootbox.confirm( const message = `
"WARNING: You should only reset upgrades that have failed and are not running.\n\n" + WARNING: You should only reset upgrades that have failed and are not running.
"This will NOT cancel currently running builds and should only be used as a last resort.",
(result) => { This will NOT cancel currently running builds and should only be used as a last resort.
`;
this.dialog.confirm({
message,
didConfirm: (result) => {
if (result) { if (result) {
if (this.get("multiUpgrade")) { if (this.get("multiUpgrade")) {
return Repo.resetAll( return Repo.resetAll(
@ -129,8 +134,8 @@ export default Controller.extend({
this.reset(); this.reset();
}); });
} }
} },
); });
}, },
}, },
}); });