mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 04:08:32 +08:00
12 lines
365 B
JavaScript
12 lines
365 B
JavaScript
import discourseComputed from "discourse-common/utils/decorators";
|
|
import { not } from "@ember/object/computed";
|
|
|
|
export default Discourse.Model.extend({
|
|
restoreDisabled: not("restoreEnabled"),
|
|
|
|
@discourseComputed("allowRestore", "isOperationRunning")
|
|
restoreEnabled(allowRestore, isOperationRunning) {
|
|
return allowRestore && !isOperationRunning;
|
|
}
|
|
});
|