Adapt to FontAwesome v5.0.6 icon name changes (#30)

This commit is contained in:
AFR 2018-02-24 05:43:43 +07:00 committed by Franz Liedke
parent 11292223a7
commit c5818ba87d
6 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@
"flarum-extension": {
"title": "Mentions",
"icon": {
"name": "at",
"name": "fa fa-at",
"backgroundColor": "#539EC1",
"color": "#fff"
}

View File

@ -115,7 +115,7 @@ export default function addMentionedByList() {
items.add('replies',
<div className="Post-mentionedBy" config={config}>
<span className="Post-mentionedBy-summary">
{icon('reply')}
{icon('fa fa-reply')}
{app.translator.transChoice('flarum-mentions.forum.post.mentioned_by' + (repliers[0].user() === app.session.user ? '_self' : '') + '_text', names.length, {
count: names.length,
users: punctuateSeries(names)

View File

@ -4,7 +4,7 @@ import punctuateSeries from 'flarum/helpers/punctuateSeries';
export default class PostMentionedNotification extends Notification {
icon() {
return 'reply';
return 'fa fa-reply';
}
href() {

View File

@ -9,7 +9,7 @@ export default class PostQuoteButton extends Button {
const content = extract(this.props, 'content');
this.props.className = 'Button PostQuoteButton';
this.props.icon = 'quote-left';
this.props.icon = 'fa fa-quote-left';
this.props.children = app.translator.trans('flarum-mentions.forum.post.quote_button');
this.props.onclick = () => {
this.hide();

View File

@ -2,7 +2,7 @@ import Notification from 'flarum/components/Notification';
export default class UserMentionedNotification extends Notification {
icon() {
return 'at';
return 'fa fa-at';
}
href() {

View File

@ -41,13 +41,13 @@ app.initializers.add('flarum-mentions', function() {
extend(NotificationGrid.prototype, 'notificationTypes', function(items) {
items.add('postMentioned', {
name: 'postMentioned',
icon: 'reply',
icon: 'fa fa-reply',
label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label')
});
items.add('userMentioned', {
name: 'userMentioned',
icon: 'at',
icon: 'fa fa-at',
label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label')
});
});
@ -61,7 +61,7 @@ app.initializers.add('flarum-mentions', function() {
href: app.route('user.mentions', {username: user.username()}),
name: 'mentions',
children: [app.translator.trans('flarum-mentions.forum.user.mentions_link')],
icon: 'at'
icon: 'fa fa-at'
}),
80
);