mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
Fixes some Ember Deprecations for 1.13:
- Remove ArrayController - Remove {{view}} from templates - Replace many cases of needs: [‘controller’] with inject - Enable Ember Legacy Views
This commit is contained in:
@ -1,19 +1,20 @@
|
||||
import { ajax } from 'discourse/lib/ajax';
|
||||
export default Ember.ArrayController.extend({
|
||||
needs: ["adminBackups"],
|
||||
status: Ember.computed.alias("controllers.adminBackups"),
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
adminBackups: Ember.inject.controller(),
|
||||
status: Ember.computed.alias('adminBackups.model'),
|
||||
|
||||
uploadLabel: function() { return I18n.t("admin.backups.upload.label"); }.property(),
|
||||
|
||||
restoreTitle: function() {
|
||||
if (!this.get('status.model.allowRestore')) {
|
||||
if (!this.get('status.allowRestore')) {
|
||||
return "admin.backups.operations.restore.is_disabled";
|
||||
} else if (this.get("status.model.isOperationRunning")) {
|
||||
} else if (this.get("status.isOperationRunning")) {
|
||||
return "admin.backups.operations.is_running";
|
||||
} else {
|
||||
return "admin.backups.operations.restore.title";
|
||||
}
|
||||
}.property("status.model.{allowRestore,isOperationRunning}"),
|
||||
}.property("status.{allowRestore,isOperationRunning}"),
|
||||
|
||||
actions: {
|
||||
|
||||
|
Reference in New Issue
Block a user