mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 03:52:44 +08:00
FIX: hide 'category read only banner' in categories list page. (#11072)
Previously, while navigating away from single category page to categories list page "category read only" banner is not hiding automatically.
This commit is contained in:
parent
789e3775df
commit
9b593435b6
|
@ -1,4 +1,4 @@
|
|||
import { alias, not } from "@ember/object/computed";
|
||||
import { alias, not, equal } from "@ember/object/computed";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import Category from "discourse/models/category";
|
||||
|
@ -10,6 +10,10 @@ export default Controller.extend({
|
|||
navigationCategory: controller("navigation/category"),
|
||||
application: controller(),
|
||||
router: service(),
|
||||
viewingCategoriesList: equal(
|
||||
"router.currentRouteName",
|
||||
"discovery.categories"
|
||||
),
|
||||
|
||||
loading: false,
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
{{else}}
|
||||
<div class="container">
|
||||
{{discourse-banner user=currentUser banner=site.banner}}
|
||||
{{category-read-only-banner category=category readOnly=navigationCategory.cannotCreateTopicOnCategory}}
|
||||
{{#unless viewingCategoriesList}}
|
||||
{{category-read-only-banner category=category readOnly=navigationCategory.cannotCreateTopicOnCategory}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
||||
<div class="list-controls">
|
||||
|
|
Loading…
Reference in New Issue
Block a user