2023-03-17 18:18:42 +08:00
|
|
|
import { not } from "@ember/object/computed";
|
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";
|
2015-08-17 22:21:23 +08:00
|
|
|
|
2023-03-17 18:18:42 +08:00
|
|
|
export default class BackupStatus extends EmberObject {
|
|
|
|
@not("restoreEnabled") restoreDisabled;
|
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;
|
2023-03-17 18:18:42 +08:00
|
|
|
}
|
|
|
|
}
|