mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 21:16:42 +08:00

`discourse-common` was created in the past to share logic between the 'wizard' app and the main 'discourse' app. Since then, the wizard has been consolidated into the main app, so the separation of `discourse-common` is no longer useful. This commit moves `discourse-common/(lib|utils)/*` into `discourse/lib/*`, adds shims for the imports, and updates existing uses in core.
23 lines
560 B
JavaScript
23 lines
560 B
JavaScript
import Component from "@ember/component";
|
|
import { classNames } from "@ember-decorators/component";
|
|
import discourseComputed from "discourse/lib/decorators";
|
|
|
|
@classNames("penalty-history")
|
|
export default class AdminPenaltyHistory extends Component {
|
|
@discourseComputed("user.penalty_counts.suspended")
|
|
suspendedCountClass(count) {
|
|
if (count > 0) {
|
|
return "danger";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
@discourseComputed("user.penalty_counts.silenced")
|
|
silencedCountClass(count) {
|
|
if (count > 0) {
|
|
return "danger";
|
|
}
|
|
return "";
|
|
}
|
|
}
|