A platform for community discussion. Free, open, simple.
DEV: Add sub-category-item plugin outlet (#32558)
Tom van Enckevortda8b822eb038
diff --git a/app/assets/javascripts/discourse/app/components/sub-category-item.gjs b/app/assets/javascripts/discourse/app/components/sub-category-item.gjsindex 69c2e81f735..d9283aae9e5 100644--- a/app/assets/javascripts/discourse/app/components/sub-category-item.gjs+++ b/app/assets/javascripts/discourse/app/components/sub-category-item.gjs@@ -1,26 +1,39 @@import CategoryListItem from "discourse/components/category-list-item";import CategoryTitleBefore from "discourse/components/category-title-before";import CategoryUnread from "discourse/components/category-unread";+import PluginOutlet from "discourse/components/plugin-outlet";import categoryLink from "discourse/helpers/category-link";+import lazyHash from "discourse/helpers/lazy-hash";export default class SubCategoryItem extends CategoryListItem {<template>- {{#unless this.isMuted}}- {{#if this.site.mobileView}}- {{categoryLink this.category}}- {{else}}- <span class="subcategory">- <CategoryTitleBefore @category={{this.category}} />- {{categoryLink this.category hideParent="true"}}- {{#unless this.hideUnread}}- <CategoryUnread- @category={{this.category}}- @unreadTopicsCount={{this.unreadTopicsCount}}- @newTopicsCount={{this.newTopicsCount}}- />- {{/unless}}- </span>- {{/if}}- {{/unless}}+ <PluginOutlet+ @name="sub-category-item"+ @outletArgs={{lazyHash+ category=this.category+ isMuted=this.isMuted+ hideUnread=this.hideUnread+ unreadTopicsCount=this.unreadTopicsCount+ newTopicsCount=this.newTopicsCount+ }}+ >+ {{#unless this.isMuted}}+ {{#if this.site.mobileView}}+ {{categoryLink this.category}}+ {{else}}+ <span class="subcategory">+ <CategoryTitleBefore @category={{this.category}} />+ {{categoryLink this.category hideParent="true"}}+ {{#unless this.hideUnread}}+ <CategoryUnread+ @category={{this.category}}+ @unreadTopicsCount={{this.unreadTopicsCount}}+ @newTopicsCount={{this.newTopicsCount}}+ />+ {{/unless}}+ </span>+ {{/if}}+ {{/unless}}+ </PluginOutlet></template>}