2019-10-24 00:30:52 +08:00
|
|
|
import Component from "@ember/component";
|
2018-06-15 23:03:24 +08:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2019-10-24 00:30:52 +08:00
|
|
|
export default Component.extend({
|
2018-06-15 23:03:24 +08:00
|
|
|
classNames: ["controls"],
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
buttonDisabled: Ember.computed.or("model.isSaving", "saveDisabled"),
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
@computed("model.isSaving")
|
2015-11-13 05:08:19 +08:00
|
|
|
savingText(saving) {
|
2018-06-15 23:03:24 +08:00
|
|
|
return saving ? "saving" : "save";
|
2015-11-13 05:08:19 +08:00
|
|
|
}
|
|
|
|
});
|