mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 11:13: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', {
|
export default createWidget('topic-status', {
|
||||||
|
tagName: 'div.topic-statuses',
|
||||||
|
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
const topic = attrs.topic;
|
const topic = attrs.topic;
|
||||||
const canAct = this.currentUser && !attrs.disableActions;
|
const canAct = this.currentUser && !attrs.disableActions;
|
||||||
|
@ -26,13 +28,13 @@ export default createWidget('topic-status', {
|
||||||
if (topic.get('closed') && topic.get('archived')) {
|
if (topic.get('closed') && topic.get('archived')) {
|
||||||
renderIcon('lock', 'locked_and_archived');
|
renderIcon('lock', 'locked_and_archived');
|
||||||
} else {
|
} else {
|
||||||
renderIconIf('topic.closed', 'lock', 'locked');
|
renderIconIf('closed', 'lock', 'locked');
|
||||||
renderIconIf('topic.archived', 'lock', 'archived');
|
renderIconIf('archived', 'lock', 'archived');
|
||||||
}
|
}
|
||||||
|
|
||||||
renderIconIf('topic.pinned', 'thumb-tack', 'pinned');
|
renderIconIf('pinned', 'thumb-tack', 'pinned');
|
||||||
renderIconIf('topic.unpinned', 'thumb-tack', 'unpinned');
|
renderIconIf('unpinned', 'thumb-tack', 'unpinned');
|
||||||
renderIconIf('topic.invisible', 'eye-slash', 'invisible');
|
renderIconIf('invisible', 'eye-slash', 'invisible');
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user