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