mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +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() {
|
export default function() {
|
||||||
// Add a control allowing the discussion to be moved to another category.
|
// 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()) {
|
if (this.canTag()) {
|
||||||
items.add('tags', ActionButton.component({
|
items.add('tags', ActionButton.component({
|
||||||
label: 'Edit Tags',
|
label: 'Edit Tags',
|
||||||
icon: 'tag',
|
icon: 'tag',
|
||||||
onclick: () => app.modal.show(new TagDiscussionModal({ discussion: this }))
|
onclick: () => app.modal.show(new TagDiscussionModal({ discussion: this }))
|
||||||
}), {after: 'rename'});
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user