mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Merge pull request #1186 from flarum/Luceos-patch-1
Update UserControls.js
This commit is contained in:
commit
7c86f7a34c
|
@ -18,11 +18,11 @@ export default {
|
|||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
controls(discussion, context) {
|
||||
controls(user, context) {
|
||||
const items = new ItemList();
|
||||
|
||||
['user', 'moderation', 'destructive'].forEach(section => {
|
||||
const controls = this[section + 'Controls'](discussion, context).toArray();
|
||||
const controls = this[section + 'Controls'](user, context).toArray();
|
||||
if (controls.length) {
|
||||
controls.forEach(item => items.add(item.itemName, item));
|
||||
items.add(section + 'Separator', Separator.component());
|
||||
|
|
Loading…
Reference in New Issue
Block a user