mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
FIX: Missing topic status icons in header
This commit is contained in:
parent
8bad3c0eb5
commit
6978171f46
|
@ -11,6 +11,8 @@ function renderIcon(name, key, canAct) {
|
|||
}
|
||||
|
||||
export default createWidget('topic-status', {
|
||||
tagName: 'div.topic-statuses',
|
||||
|
||||
html(attrs) {
|
||||
const topic = attrs.topic;
|
||||
const canAct = this.currentUser && !attrs.disableActions;
|
||||
|
@ -26,13 +28,13 @@ export default createWidget('topic-status', {
|
|||
if (topic.get('closed') && topic.get('archived')) {
|
||||
renderIcon('lock', 'locked_and_archived');
|
||||
} else {
|
||||
renderIconIf('topic.closed', 'lock', 'locked');
|
||||
renderIconIf('topic.archived', 'lock', 'archived');
|
||||
renderIconIf('closed', 'lock', 'locked');
|
||||
renderIconIf('archived', 'lock', 'archived');
|
||||
}
|
||||
|
||||
renderIconIf('topic.pinned', 'thumb-tack', 'pinned');
|
||||
renderIconIf('topic.unpinned', 'thumb-tack', 'unpinned');
|
||||
renderIconIf('topic.invisible', 'eye-slash', 'invisible');
|
||||
renderIconIf('pinned', 'thumb-tack', 'pinned');
|
||||
renderIconIf('unpinned', 'thumb-tack', 'unpinned');
|
||||
renderIconIf('invisible', 'eye-slash', 'invisible');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user