1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 23:17:43 +02:00
See https://github.com/flarum/core/pull/1367

* Replace gulp with webpack and npm scripts for JS compilation
* Set up Travis CI to commit compiled JS
* Restructure `js` directory; only one instance of npm, forum/admin are "submodules"
* Restructure `less` directory
This commit is contained in:
Toby Zerner
2018-06-20 13:35:33 +09:30
committed by GitHub
parent 87f2966bf9
commit d1f4d5a739
28 changed files with 4762 additions and 1387 deletions

View File

@@ -0,0 +1,22 @@
import { extend } from 'flarum/extend';
import Button from 'flarum/components/Button';
import CommentPost from 'flarum/components/CommentPost';
import reply from './utils/reply';
export default function () {
extend(CommentPost.prototype, 'actionItems', function (items) {
const post = this.props.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)
})
);
});
}