mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 06:43:57 +08:00
Add notification preference
This commit is contained in:
parent
c3cf1045b1
commit
fb9ed378e0
9
extensions/likes/js/bootstrap.js
vendored
9
extensions/likes/js/bootstrap.js
vendored
|
@ -3,6 +3,7 @@ import app from 'flarum/app';
|
||||||
import Post from 'flarum/models/post';
|
import Post from 'flarum/models/post';
|
||||||
import Model from 'flarum/model';
|
import Model from 'flarum/model';
|
||||||
import DiscussionPage from 'flarum/components/discussion-page';
|
import DiscussionPage from 'flarum/components/discussion-page';
|
||||||
|
import SettingsPage from 'flarum/components/settings-page';
|
||||||
import ActionButton from 'flarum/components/action-button';
|
import ActionButton from 'flarum/components/action-button';
|
||||||
import CommentPost from 'flarum/components/comment-post';
|
import CommentPost from 'flarum/components/comment-post';
|
||||||
import punctuate from 'flarum/helpers/punctuate';
|
import punctuate from 'flarum/helpers/punctuate';
|
||||||
|
@ -97,4 +98,12 @@ app.initializers.add('flarum-likes', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add a notification preference.
|
||||||
|
extend(SettingsPage.prototype, 'notificationTypes', function(items) {
|
||||||
|
items.add('postLiked', {
|
||||||
|
name: 'postLiked',
|
||||||
|
label: [icon('thumbs-o-up'), ' Someone likes my post']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user