mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
parent
bb5c50d564
commit
6bad43e80b
|
@ -5,7 +5,7 @@ import mixin from 'flarum/utils/mixin';
|
|||
import stringToColor from 'flarum/utils/stringToColor';
|
||||
import ItemList from 'flarum/utils/ItemList';
|
||||
import computed from 'flarum/utils/computed';
|
||||
import Badge from 'flarum/components/Badge';
|
||||
import GroupBadge from 'flarum/components/GroupBadge';
|
||||
|
||||
export default class User extends mixin(Model, {
|
||||
username: Model.attribute('username'),
|
||||
|
@ -69,13 +69,7 @@ export default class User extends mixin(Model, {
|
|||
groups.forEach(group => {
|
||||
const name = group.nameSingular();
|
||||
|
||||
items.add('group' + group.id(),
|
||||
Badge.component({
|
||||
label: app.trans('core.group_' + name.toLowerCase(), undefined, name),
|
||||
icon: group.icon(),
|
||||
style: {backgroundColor: group.color()}
|
||||
})
|
||||
);
|
||||
items.add('group' + group.id(), GroupBadge.component({group}));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user