Add notification preference

This commit is contained in:
Toby Zerner 2015-06-25 09:57:54 +09:30
parent c3cf1045b1
commit fb9ed378e0

View File

@ -3,6 +3,7 @@ import app from 'flarum/app';
import Post from 'flarum/models/post';
import Model from 'flarum/model';
import DiscussionPage from 'flarum/components/discussion-page';
import SettingsPage from 'flarum/components/settings-page';
import ActionButton from 'flarum/components/action-button';
import CommentPost from 'flarum/components/comment-post';
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']
});
});
});