discourse/app/assets/javascripts/admin/addon/models/backup-status.js
David Taylor 64557c4076
DEV: Update admin models to native class syntax (#20704)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-17 10:18:42 +00:00

13 lines
420 B
JavaScript

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