2019-11-08 14:13:35 -05:00
|
|
|
import EmberObject from "@ember/object";
|
2023-10-10 14:38:59 -04:00
|
|
|
import { not } from "@ember/object/computed";
|
2019-11-07 16:38:28 -05:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2015-08-17 10:21:23 -04:00
|
|
|
|
2023-03-17 06:18:42 -04:00
|
|
|
export default class BackupStatus extends EmberObject {
|
|
|
|
@not("restoreEnabled") restoreDisabled;
|
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;
|
2023-03-17 06:18:42 -04:00
|
|
|
}
|
|
|
|
}
|