diff --git a/app/assets/javascripts/discourse/app/components/sidebar/admin-header.gjs b/app/assets/javascripts/discourse/app/components/sidebar/admin-header.gjs new file mode 100644 index 00000000000..272f2acf344 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/sidebar/admin-header.gjs @@ -0,0 +1,28 @@ +import Component from "@glimmer/component"; +import { service } from "@ember/service"; +import { ADMIN_PANEL } from "discourse/lib/sidebar/panels"; +import BackToForum from "./back-to-forum"; +import Filter from "./filter"; +import ToggleAllSections from "./toggle-all-sections"; + +export default class AdminHeader extends Component { + @service sidebarState; + + get shouldDisplay() { + return this.sidebarState.isCurrentPanel(ADMIN_PANEL); + } + + +} diff --git a/app/assets/javascripts/discourse/app/components/sidebar/api-section.hbs b/app/assets/javascripts/discourse/app/components/sidebar/api-section.hbs index a57ebf51186..375c20780ce 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/api-section.hbs +++ b/app/assets/javascripts/discourse/app/components/sidebar/api-section.hbs @@ -9,6 +9,7 @@ @collapsable={{@collapsable}} @displaySection={{this.section.displaySection}} @hideSectionHeader={{this.section.hideSectionHeader}} + @collapsedByDefault={{this.section.collapsedByDefault}} > {{#each this.filteredLinks key="name" as |link|}} - + {{#each this.sections as |sectionConfig|}} {{#unless @hideSectionHeader}}