Finish admin permissions page and clean up everything

This commit is contained in:
Toby Zerner
2015-07-31 20:16:47 +09:30
parent 5706c71c86
commit fde7afd3e2
33 changed files with 766 additions and 291 deletions

View File

@ -0,0 +1,16 @@
import Badge from 'flarum/components/Badge';
export default class GroupBadge extends Badge {
static initProps(props) {
super.initProps(props);
if (props.group) {
props.icon = props.group.icon();
props.style = {backgroundColor: props.group.color()};
props.label = typeof props.label === 'undefined' ? props.group.nameSingular() : props.label;
props.type = 'group--' + props.group.nameSingular();
delete props.group;
}
}
}