mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 06:30:15 +08:00
13 lines
402 B
JavaScript
13 lines
402 B
JavaScript
import discourseComputed from "discourse-common/utils/decorators";
|
|
import { not } from "@ember/object/computed";
|
|
import EmberObject from "@ember/object";
|
|
|
|
export default EmberObject.extend({
|
|
restoreDisabled: not("restoreEnabled"),
|
|
|
|
@discourseComputed("allowRestore", "isOperationRunning")
|
|
restoreEnabled(allowRestore, isOperationRunning) {
|
|
return allowRestore && !isOperationRunning;
|
|
}
|
|
});
|