mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: introduces prettier for es6 files
This commit is contained in:
@ -1,13 +1,15 @@
|
||||
import { ajax } from 'discourse/lib/ajax';
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
adminBackups: Ember.inject.controller(),
|
||||
status: Ember.computed.alias('adminBackups.model'),
|
||||
status: Ember.computed.alias("adminBackups.model"),
|
||||
|
||||
uploadLabel: function() { return I18n.t("admin.backups.upload.label"); }.property(),
|
||||
uploadLabel: function() {
|
||||
return I18n.t("admin.backups.upload.label");
|
||||
}.property(),
|
||||
|
||||
restoreTitle: function() {
|
||||
if (!this.get('status.allowRestore')) {
|
||||
if (!this.get("status.allowRestore")) {
|
||||
return "admin.backups.operations.restore.is_disabled";
|
||||
} else if (this.get("status.isOperationRunning")) {
|
||||
return "admin.backups.operations.is_running";
|
||||
@ -17,7 +19,6 @@ export default Ember.Controller.extend({
|
||||
}.property("status.{allowRestore,isOperationRunning}"),
|
||||
|
||||
actions: {
|
||||
|
||||
toggleReadOnlyMode() {
|
||||
var self = this;
|
||||
if (!this.site.get("isReadOnly")) {
|
||||
@ -38,9 +39,8 @@ export default Ember.Controller.extend({
|
||||
},
|
||||
|
||||
download(backup) {
|
||||
let link = backup.get('filename');
|
||||
ajax("/admin/backups/" + link, { type: "PUT" })
|
||||
.then(() => {
|
||||
let link = backup.get("filename");
|
||||
ajax("/admin/backups/" + link, { type: "PUT" }).then(() => {
|
||||
bootbox.alert(I18n.t("admin.backups.operations.download.alert"));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user