mirror of
https://github.com/discourse/discourse.git
synced 2025-02-26 18:04:59 +08:00

* DEV: Import every instance of Ember.computed function * export default for Ember.computed
12 lines
352 B
JavaScript
12 lines
352 B
JavaScript
import { not } from "@ember/object/computed";
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Discourse.Model.extend({
|
|
restoreDisabled: not("restoreEnabled"),
|
|
|
|
@computed("allowRestore", "isOperationRunning")
|
|
restoreEnabled(allowRestore, isOperationRunning) {
|
|
return allowRestore && !isOperationRunning;
|
|
}
|
|
});
|