mirror of
https://github.com/flarum/core.git
synced 2025-08-02 14:37:49 +02:00
Adapt to FontAwesome v5.0.6 icon name changes (#12)
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
"flarum-extension": {
|
"flarum-extension": {
|
||||||
"title": "Lock",
|
"title": "Lock",
|
||||||
"icon": {
|
"icon": {
|
||||||
"name": "lock",
|
"name": "fa fa-lock",
|
||||||
"backgroundColor": "#ddd",
|
"backgroundColor": "#ddd",
|
||||||
"color": "#666"
|
"color": "#666"
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ import PermissionGrid from 'flarum/components/PermissionGrid';
|
|||||||
app.initializers.add('lock', () => {
|
app.initializers.add('lock', () => {
|
||||||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||||
items.add('lock', {
|
items.add('lock', {
|
||||||
icon: 'lock',
|
icon: 'fa fa-lock',
|
||||||
label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),
|
label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),
|
||||||
permission: 'discussion.lock'
|
permission: 'discussion.lock'
|
||||||
}, 95);
|
}, 95);
|
||||||
|
@@ -8,7 +8,7 @@ export default function addLockBadge() {
|
|||||||
badges.add('locked', Badge.component({
|
badges.add('locked', Badge.component({
|
||||||
type: 'locked',
|
type: 'locked',
|
||||||
label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),
|
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()) {
|
if (discussion.canLock()) {
|
||||||
items.add('lock', Button.component({
|
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'),
|
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)
|
onclick: this.lockAction.bind(discussion)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@ import Notification from 'flarum/components/Notification';
|
|||||||
|
|
||||||
export default class DiscussionLockedNotification extends Notification {
|
export default class DiscussionLockedNotification extends Notification {
|
||||||
icon() {
|
icon() {
|
||||||
return 'lock';
|
return 'fa fa-lock';
|
||||||
}
|
}
|
||||||
|
|
||||||
href() {
|
href() {
|
||||||
|
@@ -3,8 +3,8 @@ import EventPost from 'flarum/components/EventPost';
|
|||||||
export default class DiscussionLockedPost extends EventPost {
|
export default class DiscussionLockedPost extends EventPost {
|
||||||
icon() {
|
icon() {
|
||||||
return this.props.post.content().locked
|
return this.props.post.content().locked
|
||||||
? 'lock'
|
? 'fa fa-lock'
|
||||||
: 'unlock';
|
: 'fa fa-unlock';
|
||||||
}
|
}
|
||||||
|
|
||||||
descriptionKey() {
|
descriptionKey() {
|
||||||
|
@@ -22,7 +22,7 @@ app.initializers.add('flarum-lock', () => {
|
|||||||
extend(NotificationGrid.prototype, 'notificationTypes', function (items) {
|
extend(NotificationGrid.prototype, 'notificationTypes', function (items) {
|
||||||
items.add('discussionLocked', {
|
items.add('discussionLocked', {
|
||||||
name: 'discussionLocked',
|
name: 'discussionLocked',
|
||||||
icon: 'lock',
|
icon: 'fa fa-lock',
|
||||||
label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')
|
label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user