diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js index a27d0ceba73..aaa9aec67b7 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js @@ -3,12 +3,11 @@ import getURL from "discourse-common/lib/get-url"; export const ADMIN_NAV_MAP = [ { name: "plugins", - route: "adminPlugins.index", label: "admin.plugins.title", links: [ { name: "admin_installed_plugins", - route: "adminPlugins", + route: "adminPlugins.index", label: "admin.plugins.installed", icon: "puzzle-piece", }, diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/admin-sidebar.js b/app/assets/javascripts/discourse/app/lib/sidebar/admin-sidebar.js index c575aea55ac..79d26d7e3b7 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/admin-sidebar.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/admin-sidebar.js @@ -90,7 +90,9 @@ function defineAdminSection(adminNavSectionData) { get links() { return this.sectionLinks.map( (sectionLinkData) => - new SidebarAdminSectionLink({ adminSidebarNavLink: sectionLinkData }) + new SidebarAdminSectionLink({ + adminSidebarNavLink: sectionLinkData, + }) ); } @@ -216,8 +218,12 @@ export default class AdminSidebarPanel extends BaseCustomSidebarPanel { @cached get sections() { - const currentUser = getOwnerWithFallback().lookup("service:current-user"); - const siteSettings = getOwnerWithFallback().lookup("service:site-settings"); + const currentUser = getOwnerWithFallback(this).lookup( + "service:current-user" + ); + const siteSettings = getOwnerWithFallback(this).lookup( + "service:site-settings" + ); if (!currentUser.use_admin_sidebar) { return []; }