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