mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add span
to various labels so they can be targetted
This commit is contained in:
parent
70d0e175a2
commit
8e88bf019f
@ -4,7 +4,7 @@
|
|||||||
{{#if category.read_restricted}}
|
{{#if category.read_restricted}}
|
||||||
{{d-icon "lock"}}
|
{{d-icon "lock"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{category.name}}
|
<span class='d-label'>{{category.name}}</span>
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if noSubcategories}}
|
{{#if noSubcategories}}
|
||||||
|
@ -37,9 +37,12 @@ createWidget('header-notifications', {
|
|||||||
|
|
||||||
const unreadNotifications = user.get('unread_notifications');
|
const unreadNotifications = user.get('unread_notifications');
|
||||||
if (!!unreadNotifications) {
|
if (!!unreadNotifications) {
|
||||||
contents.push(this.attach('link', { action: attrs.action,
|
contents.push(this.attach('link', {
|
||||||
className: 'badge-notification unread-notifications',
|
action: attrs.action,
|
||||||
rawLabel: unreadNotifications }));
|
className: 'badge-notification unread-notifications',
|
||||||
|
rawLabel: unreadNotifications,
|
||||||
|
omitSpan: true
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
const unreadPMs = user.get('unread_private_messages');
|
const unreadPMs = user.get('unread_private_messages');
|
||||||
@ -55,9 +58,12 @@ createWidget('header-notifications', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
contents.push(this.attach('link', { action: attrs.action,
|
contents.push(this.attach('link', {
|
||||||
className: 'badge-notification unread-private-messages',
|
action: attrs.action,
|
||||||
rawLabel: unreadPMs }));
|
className: 'badge-notification unread-private-messages',
|
||||||
|
rawLabel: unreadPMs,
|
||||||
|
omitSpan: true
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return contents;
|
return contents;
|
||||||
|
@ -54,7 +54,13 @@ export default createWidget('link', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!attrs.hideLabel) {
|
if (!attrs.hideLabel) {
|
||||||
result.push(this.label(attrs));
|
let label = this.label(attrs);
|
||||||
|
|
||||||
|
if (attrs.omitSpan) {
|
||||||
|
result.push(label);
|
||||||
|
} else {
|
||||||
|
result.push(h('span.d-label', label));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentUser = this.currentUser;
|
const currentUser = this.currentUser;
|
||||||
|
Loading…
Reference in New Issue
Block a user