mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 06:43:44 +08:00
a433b30650
This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
28 lines
789 B
JavaScript
28 lines
789 B
JavaScript
import {
|
|
attributeBindings,
|
|
classNameBindings,
|
|
classNames,
|
|
tagName,
|
|
} from "@ember-decorators/component";
|
|
import { alias } from "@ember/object/computed";
|
|
import Component from "@ember/component";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
@tagName("td")
|
|
@classNames("admin-report-table-cell")
|
|
@classNameBindings("type", "property")
|
|
@attributeBindings("value:title")
|
|
export default class AdminReportTableCell extends Component {
|
|
options = null;
|
|
|
|
@alias("label.type") type;
|
|
@alias("label.mainProperty") property;
|
|
@alias("computedLabel.formattedValue") formattedValue;
|
|
@alias("computedLabel.value") value;
|
|
|
|
@discourseComputed("label", "data", "options")
|
|
computedLabel(label, data, options) {
|
|
return label.compute(data, options || {});
|
|
}
|
|
}
|