discourse/app/assets/javascripts/admin/components/save-controls.js.es6

19 lines
375 B
Plaintext
Raw Normal View History

2018-06-15 23:03:24 +08:00
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
2018-06-15 23:03:24 +08:00
classNames: ["controls"],
2018-06-15 23:03:24 +08:00
buttonDisabled: Ember.computed.or("model.isSaving", "saveDisabled"),
2018-06-15 23:03:24 +08:00
@computed("model.isSaving")
savingText(saving) {
2018-06-15 23:03:24 +08:00
return saving ? "saving" : "save";
},
actions: {
saveChanges() {
this.sendAction();
}
}
});