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

15 lines
371 B
Plaintext
Raw Normal View History

import { or } from "@ember/object/computed";
import Component from "@ember/component";
2018-06-15 11:03:24 -04:00
import computed from "ember-addons/ember-computed-decorators";
export default Component.extend({
2018-06-15 11:03:24 -04:00
classNames: ["controls"],
buttonDisabled: or("model.isSaving", "saveDisabled"),
2018-06-15 11:03:24 -04:00
@computed("model.isSaving")
savingText(saving) {
2018-06-15 11:03:24 -04:00
return saving ? "saving" : "save";
}
});