2023-02-23 10:32:53 -05:00
|
|
|
import { classNames } from "@ember-decorators/component";
|
2021-07-12 14:36:56 -04:00
|
|
|
import Component from "@ember/component";
|
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
|
2023-02-23 10:32:53 -05:00
|
|
|
@classNames("penalty-history")
|
|
|
|
export default class AdminPenaltyHistory extends Component {
|
2021-07-12 14:36:56 -04:00
|
|
|
@discourseComputed("user.penalty_counts.suspended")
|
|
|
|
suspendedCountClass(count) {
|
|
|
|
if (count > 0) {
|
|
|
|
return "danger";
|
|
|
|
}
|
|
|
|
return "";
|
2023-02-23 10:32:53 -05:00
|
|
|
}
|
2021-07-12 14:36:56 -04:00
|
|
|
|
|
|
|
@discourseComputed("user.penalty_counts.silenced")
|
|
|
|
silencedCountClass(count) {
|
|
|
|
if (count > 0) {
|
|
|
|
return "danger";
|
|
|
|
}
|
|
|
|
return "";
|
2023-02-23 10:32:53 -05:00
|
|
|
}
|
|
|
|
}
|