mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
DEV: Move computed to discourseComputed (#8312)
This commit is contained in:

committed by
GitHub

parent
d74546f50e
commit
6275c05c0d
@ -1,6 +1,6 @@
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import Controller from "@ember/controller";
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
import PenaltyController from "admin/mixins/penalty-controller";
|
||||
|
||||
export default Controller.extend(PenaltyController, {
|
||||
@ -12,7 +12,7 @@ export default Controller.extend(PenaltyController, {
|
||||
this.setProperties({ suspendUntil: null, suspending: false });
|
||||
},
|
||||
|
||||
@computed("suspendUntil", "reason", "suspending")
|
||||
@discourseComputed("suspendUntil", "reason", "suspending")
|
||||
submitDisabled(suspendUntil, reason, suspending) {
|
||||
return suspending || isEmpty(suspendUntil) || !reason || reason.length < 1;
|
||||
},
|
||||
|
Reference in New Issue
Block a user