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