mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 01:08:34 +08:00
b93075a445
We need to change the content of this modal in different plugins based on context, so move some parts of it into the JS file.
36 lines
817 B
JavaScript
36 lines
817 B
JavaScript
import Controller, { inject as controller } from "@ember/controller";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
|
|
export default Controller.extend(ModalFunctionality, {
|
|
adminBackupsLogs: controller(),
|
|
|
|
@discourseComputed
|
|
warningMessage() {
|
|
// this is never shown here, but we may want to show different
|
|
// messages in plugins
|
|
return "";
|
|
},
|
|
|
|
@discourseComputed
|
|
yesLabel() {
|
|
return "yes_value";
|
|
},
|
|
|
|
actions: {
|
|
startBackupWithUploads() {
|
|
this.send("closeModal");
|
|
this.send("startBackup", true);
|
|
},
|
|
|
|
startBackupWithoutUploads() {
|
|
this.send("closeModal");
|
|
this.send("startBackup", false);
|
|
},
|
|
|
|
cancel() {
|
|
this.send("closeModal");
|
|
},
|
|
},
|
|
});
|