DEV: introduces prettier for es6 files

This commit is contained in:
Joffrey JAFFEUX
2018-06-15 17:03:24 +02:00
committed by GitHub
parent c7ee70941e
commit 03a7d532cf
1162 changed files with 60667 additions and 29659 deletions

View File

@ -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"));
});
}