FIX: show update banner only once on categories with subcategory lists (#17782)
* FIX: show update banner only once on categories with subcategory lists
This commit is contained in:
parent
afa7c1ed9b
commit
8ab6b17c36
|
@ -23,6 +23,10 @@ export default DiscoveryController.extend({
|
|||
category: null,
|
||||
|
||||
canEdit: reads("currentUser.staff"),
|
||||
@discourseComputed
|
||||
isCategoriesRoute() {
|
||||
return this.router.currentRouteName === "discovery.categories";
|
||||
},
|
||||
@discourseComputed("model.parentCategory")
|
||||
categoryPageStyle(parentCategory) {
|
||||
let style = this.siteSettings.desktop_category_page_style;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<PluginOutlet @name="above-discovery-categories" @connectorTagName="div" @args={{hash categories=this.model.categories categoryPageStyle=this.categoryPageStyle topics=this.model.topics}} />
|
||||
|
||||
<DiscoveryCategories @refresh={{action "refresh"}}>
|
||||
{{#if this.topicTrackingState.hasIncoming}}
|
||||
{{#if (and this.topicTrackingState.hasIncoming this.isCategoriesRoute)}}
|
||||
<div class="show-more {{if this.hasTopics "has-topics"}}">
|
||||
<div role="button" class="alert alert-info clickable" {{action "showInserted"}}>
|
||||
<CountI18n @key="topic_count_" @suffix={{this.topicTrackingState.filter}} @count={{this.topicTrackingState.incomingCount}} />
|
||||
|
|
Loading…
Reference in New Issue