mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
Update for discussion controls API
This commit is contained in:
@@ -6,13 +6,13 @@ import TagDiscussionModal from 'flarum-tags/components/tag-discussion-modal';
|
||||
|
||||
export default function() {
|
||||
// Add a control allowing the discussion to be moved to another category.
|
||||
extend(Discussion.prototype, 'controls', function(items) {
|
||||
extend(Discussion.prototype, 'moderationControls', function(items) {
|
||||
if (this.canTag()) {
|
||||
items.add('tags', ActionButton.component({
|
||||
label: 'Edit Tags',
|
||||
icon: 'tag',
|
||||
onclick: () => app.modal.show(new TagDiscussionModal({ discussion: this }))
|
||||
}), {after: 'rename'});
|
||||
}));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user