mirror of
https://github.com/discourse/discourse.git
synced 2025-01-11 06:13:49 +08:00
187b0bfb43
* FEATURE: Show similar users when penalizing a user Moderators will be notified if other users with the same IP address exist before penalizing a user. * FEATURE: Allow staff to penalize multiple users This allows staff members to suspend or silence multiple users belonging to the same person.
30 lines
669 B
JavaScript
30 lines
669 B
JavaScript
import Component from "@ember/component";
|
|
import { action } from "@ember/object";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
export default Component.extend({
|
|
tagName: "",
|
|
|
|
@discourseComputed("type")
|
|
penaltyField(penaltyType) {
|
|
if (penaltyType === "suspend") {
|
|
return "can_be_suspended";
|
|
} else if (penaltyType === "silence") {
|
|
return "can_be_silenced";
|
|
}
|
|
},
|
|
|
|
@action
|
|
selectUserId(userId, event) {
|
|
if (!this.selectedUserIds) {
|
|
return;
|
|
}
|
|
|
|
if (event.target.checked) {
|
|
this.selectedUserIds.pushObject(userId);
|
|
} else {
|
|
this.selectedUserIds.removeObject(userId);
|
|
}
|
|
},
|
|
});
|