mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
DEV: Convert admin component definitions to native class syntax (#20311)
This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
||||
@tagName("")
|
||||
export default class AdminPenaltySimilarUsers extends Component {
|
||||
@discourseComputed("penaltyType")
|
||||
penaltyField(penaltyType) {
|
||||
if (penaltyType === "suspend") {
|
||||
@ -12,7 +12,7 @@ export default Component.extend({
|
||||
} else if (penaltyType === "silence") {
|
||||
return "can_be_silenced";
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@action
|
||||
selectUserId(userId, event) {
|
||||
@ -25,5 +25,5 @@ export default Component.extend({
|
||||
} else {
|
||||
this.selectedUserIds.removeObject(userId);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user