mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Show grandparent category badge in sticky header on desktop (#13184)
This commit is contained in:
@@ -126,6 +126,18 @@ export default createWidget("header-topic-info", {
|
|||||||
const parentCategory = category.get("parentCategory");
|
const parentCategory = category.get("parentCategory");
|
||||||
const categories = [];
|
const categories = [];
|
||||||
if (parentCategory) {
|
if (parentCategory) {
|
||||||
|
if (
|
||||||
|
this.siteSettings.max_category_nesting > 2 &&
|
||||||
|
!this.site.mobileView
|
||||||
|
) {
|
||||||
|
const grandParentCategory = parentCategory.get("parentCategory");
|
||||||
|
if (grandParentCategory) {
|
||||||
|
categories.push(
|
||||||
|
this.attach("category-link", { category: grandParentCategory })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
categories.push(
|
categories.push(
|
||||||
this.attach("category-link", { category: parentCategory })
|
this.attach("category-link", { category: parentCategory })
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user