mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 13:04:32 +08:00
DEV: Refactor the last few bootbox dialogs (#18416)
This commit is contained in:
@ -10,7 +10,6 @@ import Controller from "@ember/controller";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import ThemeSettings from "admin/models/theme-settings";
|
||||
import bootbox from "bootbox";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
@ -306,14 +305,10 @@ export default Controller.extend({
|
||||
|
||||
editTheme() {
|
||||
if (this.get("model.remote_theme.is_git")) {
|
||||
bootbox.confirm(
|
||||
I18n.t("admin.customize.theme.edit_confirm"),
|
||||
(result) => {
|
||||
if (result) {
|
||||
this.transitionToEditRoute();
|
||||
}
|
||||
}
|
||||
);
|
||||
this.dialog.confirm({
|
||||
message: I18n.t("admin.customize.theme.edit_confirm"),
|
||||
didConfirm: () => this.transitionToEditRoute(),
|
||||
});
|
||||
} else {
|
||||
this.transitionToEditRoute();
|
||||
}
|
||||
|
Reference in New Issue
Block a user