mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: filter additional keywords for the sidebar (#26148)
With the new admin sidebar restructure, we have a link to "Installed plugins". We would like to ensure that when the admin is searching for a plugin name like "akismet" or "automation" this link will be visible. Also when entering the plugins page, related plugins should be highlighted.
This commit is contained in:
committed by
GitHub
parent
bbb18fa2ce
commit
9afb0b29f8
@@ -1,5 +1,6 @@
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { service } from "@ember/service";
|
||||
import PreloadStore from "discourse/lib/preload-store";
|
||||
import { ADMIN_PANEL, MAIN_PANEL } from "discourse/lib/sidebar/panels";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "discourse-i18n";
|
||||
@@ -7,7 +8,9 @@ import I18n from "discourse-i18n";
|
||||
export default class AdminRoute extends DiscourseRoute {
|
||||
@service sidebarState;
|
||||
@service siteSettings;
|
||||
@service store;
|
||||
@service currentUser;
|
||||
@service adminSidebarStateManager;
|
||||
@tracked initialSidebarState;
|
||||
|
||||
titleToken() {
|
||||
@@ -24,6 +27,13 @@ export default class AdminRoute extends DiscourseRoute {
|
||||
this.controllerFor("application").setProperties({
|
||||
showTop: false,
|
||||
});
|
||||
|
||||
const visiblePlugins = PreloadStore.get("visiblePlugins");
|
||||
if (visiblePlugins) {
|
||||
this.adminSidebarStateManager.keywords.admin_installed_plugins = {
|
||||
navigation: visiblePlugins.mapBy("name"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
deactivate(transition) {
|
||||
|
||||
Reference in New Issue
Block a user