mirror of
https://github.com/flarum/core.git
synced 2025-07-28 12:10:51 +02:00
Mithril 2 Update (#52)
Update for Mithril 2 - Please note that PostQuoteButton and AutocompleteDropdown are not Fragments, not Components. Accordingly, they have been moved to the components folder. Co-authored-by: Matthew Kilgore <tankerkiller125@gmail.com> Co-authored-by: Franz Liedke <franz@develophp.org>
This commit is contained in:
committed by
GitHub
parent
a48a84fcd0
commit
ea56f39a53
@@ -7,16 +7,14 @@ import reply from './utils/reply';
|
||||
export default function () {
|
||||
extend(CommentPost.prototype, 'actionItems', function (items) {
|
||||
|
||||
const post = this.props.post;
|
||||
const post = this.attrs.post;
|
||||
|
||||
if (post.isHidden() || (app.session.user && !post.discussion().canReply())) return;
|
||||
|
||||
items.add('reply',
|
||||
Button.component({
|
||||
className: 'Button Button--link',
|
||||
children: app.translator.trans('flarum-mentions.forum.post.reply_link'),
|
||||
onclick: () => reply(post)
|
||||
})
|
||||
<Button className='Button Button--link' onclick={() => reply(post)}>
|
||||
{app.translator.trans('flarum-mentions.forum.post.reply_link')}
|
||||
</Button>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user