2019-11-08 05:38:28 +08:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2019-10-31 04:28:29 +08:00
|
|
|
import { or } from "@ember/object/computed";
|
2019-10-24 00:30:52 +08:00
|
|
|
import Component from "@ember/component";
|
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
|
|
|
|
2019-10-31 04:28:29 +08:00
|
|
|
buttonDisabled: or("model.isSaving", "saveDisabled"),
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed("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
|
|
|
}
|
|
|
|
});
|