discourse/app/assets/javascripts/admin/addon/models/backup-status.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
420 B
JavaScript
Raw Normal View History

2019-11-09 03:13:35 +08:00
import EmberObject from "@ember/object";
import { not } from "@ember/object/computed";
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;
}
}