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:
Jean 2022-08-03 15:27:03 -04:00 committed by GitHub
parent afa7c1ed9b
commit 8ab6b17c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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}} />