Skip to content

Commit

Permalink
COMPATIBILITY: Remove bootbox
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed May 28, 2024
1 parent 01bce49 commit 052f215
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import Component from "@ember/component";
import LandingPage from "../../models/landing-page";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { action } from "@ember/object";
import { service } from "@ember/service";
import bootbox from "bootbox";

export default Component.extend({
dialog: service(),

@action
uploadFile() {
this.set("pageFile", $("#file-input")[0].files[0]);
Expand All @@ -22,7 +25,7 @@ export default Component.extend({
})
.catch(function (e) {
if (typeof e === "string") {
bootbox.alert(e);
this.dialog.alert(e);
} else {
popupAjaxError(e);
}
Expand Down

0 comments on commit 052f215

Please sign in to comment.