discourse/app/assets/javascripts/admin/addon/models/backup-status.js
2020-12-01 15:31:26 -03:00

13 lines
403 B
JavaScript

import EmberObject from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators";
import { not } from "@ember/object/computed";
export default EmberObject.extend({
restoreDisabled: not("restoreEnabled"),
@discourseComputed("allowRestore", "isOperationRunning")
restoreEnabled(allowRestore, isOperationRunning) {
return allowRestore && !isOperationRunning;
},
});