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