mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 11:24:37 +08:00
Adapt to FontAwesome v5.0.6 icon name changes (#12)
This commit is contained in:
parent
85fa190f59
commit
e868685609
|
@ -29,7 +29,7 @@
|
|||
"flarum-extension": {
|
||||
"title": "Lock",
|
||||
"icon": {
|
||||
"name": "lock",
|
||||
"name": "fa fa-lock",
|
||||
"backgroundColor": "#ddd",
|
||||
"color": "#666"
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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)
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import Notification from 'flarum/components/Notification';
|
|||
|
||||
export default class DiscussionLockedNotification extends Notification {
|
||||
icon() {
|
||||
return 'lock';
|
||||
return 'fa fa-lock';
|
||||
}
|
||||
|
||||
href() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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')
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user