2019-11-07 16:38:28 -05:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2019-10-30 16:28:29 -04:00
|
|
|
import { or } from "@ember/object/computed";
|
2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
2015-11-12 16:08:19 -05:00
|
|
|
|
2019-10-23 12:30:52 -04:00
|
|
|
export default Component.extend({
|
2015-11-12 16:08:19 -05:00
|
|
|
classNames: ["controls"],
|
|
|
|
|
2019-10-30 16:28:29 -04:00
|
|
|
buttonDisabled: or("model.isSaving", "saveDisabled"),
|
2015-11-12 16:08:19 -05:00
|
|
|
|
2019-11-07 16:38:28 -05:00
|
|
|
@discourseComputed("model.isSaving")
|
2015-11-12 16:08:19 -05:00
|
|
|
savingText(saving) {
|
|
|
|
return saving ? "saving" : "save";
|
|
|
|
}
|
|
|
|
});
|