2019-11-07 15:38:28 -06:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2019-10-30 15:28:29 -05:00
|
|
|
import { not } from "@ember/object/computed";
|
2019-11-08 14:13:35 -05:00
|
|
|
import EmberObject from "@ember/object";
|
2015-08-17 16:21:23 +02:00
|
|
|
|
2019-11-08 14:13:35 -05:00
|
|
|
export default EmberObject.extend({
|
2019-10-30 15:28:29 -05:00
|
|
|
restoreDisabled: not("restoreEnabled"),
|
2015-08-17 16:21:23 +02:00
|
|
|
|
2019-11-07 15:38:28 -06:00
|
|
|
@discourseComputed("allowRestore", "isOperationRunning")
|
2015-08-17 16:21:23 +02:00
|
|
|
restoreEnabled(allowRestore, isOperationRunning) {
|
|
|
|
return allowRestore && !isOperationRunning;
|
|
|
|
}
|
|
|
|
});
|