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

This commit is contained in:
AFR 2018-02-24 05:43:57 +07:00 committed by Franz Liedke
parent 85fa190f59
commit e868685609
7 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@
"flarum-extension": {
"title": "Lock",
"icon": {
"name": "lock",
"name": "fa fa-lock",
"backgroundColor": "#ddd",
"color": "#666"
}

View File

@ -5,7 +5,7 @@ import PermissionGrid from 'flarum/components/PermissionGrid';
app.initializers.add('lock', () => {
extend(PermissionGrid.prototype, 'moderateItems', items => {
items.add('lock', {
icon: 'lock',
icon: 'fa fa-lock',
label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),
permission: 'discussion.lock'
}, 95);

View File

@ -8,7 +8,7 @@ export default function addLockBadge() {
badges.add('locked', Badge.component({
type: 'locked',
label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),
icon: 'lock'
icon: 'fa fa-lock'
}));
}
});

View File

@ -8,7 +8,7 @@ export default function addLockControl() {
if (discussion.canLock()) {
items.add('lock', Button.component({
children: app.translator.trans(discussion.isLocked() ? 'flarum-lock.forum.discussion_controls.unlock_button' : 'flarum-lock.forum.discussion_controls.lock_button'),
icon: 'lock',
icon: 'fa fa-lock',
onclick: this.lockAction.bind(discussion)
}));
}

View File

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

View File

@ -3,8 +3,8 @@ import EventPost from 'flarum/components/EventPost';
export default class DiscussionLockedPost extends EventPost {
icon() {
return this.props.post.content().locked
? 'lock'
: 'unlock';
? 'fa fa-lock'
: 'fa fa-unlock';
}
descriptionKey() {

View File

@ -22,7 +22,7 @@ app.initializers.add('flarum-lock', () => {
extend(NotificationGrid.prototype, 'notificationTypes', function (items) {
items.add('discussionLocked', {
name: 'discussionLocked',
icon: 'lock',
icon: 'fa fa-lock',
label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')
});
});