This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/save-controls.js
2020-03-12 13:29:55 -04:00

20 lines
489 B
JavaScript

import discourseComputed from "discourse-common/utils/decorators";
import { or } from "@ember/object/computed";
import Component from "@ember/component";
export default Component.extend({
classNames: ["controls", "save-button"],
buttonDisabled: or("model.isSaving", "saveDisabled"),
didInsertElement() {
this._super(...arguments);
this.set("saved", false);
},
@discourseComputed("model.isSaving")
savingText(saving) {
return saving ? "saving" : "save";
}
});