mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
* feat: reintroduce frontend extenders * chore: used `Routes` extender in bundled extensions * chore: used `PostTypes` extender in bundled extensions * chore: `yarn format` * feat: `Model` frontend extender * chore: naming * chore(review): attributes can be nullable or undefined * chore(review): delay extender implementation * chore(review): unnecessary check * chore(review): stay consistent * chore: merge conflicts * chore: unused import * chore: multiline extenders * feat: add Store extender Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
27 lines
881 B
JavaScript
27 lines
881 B
JavaScript
import { extend } from 'flarum/common/extend';
|
|
import app from 'flarum/forum/app';
|
|
import NotificationGrid from 'flarum/forum/components/NotificationGrid';
|
|
|
|
import addLikeAction from './addLikeAction';
|
|
import addLikesList from './addLikesList';
|
|
import PostLikedNotification from './components/PostLikedNotification';
|
|
import addLikesTabToUserProfile from './addLikesTabToUserProfile';
|
|
|
|
export { default as extend } from './extend';
|
|
|
|
app.initializers.add('flarum-likes', () => {
|
|
app.notificationComponents.postLiked = PostLikedNotification;
|
|
|
|
addLikeAction();
|
|
addLikesList();
|
|
addLikesTabToUserProfile();
|
|
|
|
extend(NotificationGrid.prototype, 'notificationTypes', function (items) {
|
|
items.add('postLiked', {
|
|
name: 'postLiked',
|
|
icon: 'far fa-thumbs-up',
|
|
label: app.translator.trans('flarum-likes.forum.settings.notify_post_liked_label'),
|
|
});
|
|
});
|
|
});
|