discourse/app/assets/javascripts/admin/addon/services/admin-sidebar-state-manager.js
Krzysztof Kotlarek 9afb0b29f8
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.
2024-03-14 12:28:08 +11:00

20 lines
584 B
JavaScript

import { tracked } from "@glimmer/tracking";
import Service from "@ember/service";
import { TrackedObject } from "@ember-compat/tracked-built-ins";
import KeyValueStore from "discourse/lib/key-value-store";
export default class AdminSidebarStateManager extends Service {
@tracked keywords = new TrackedObject();
STORE_NAMESPACE = "discourse_admin_sidebar_experiment_";
store = new KeyValueStore(this.STORE_NAMESPACE);
get navConfig() {
return this.store.getObject("navConfig");
}
set navConfig(value) {
this.store.setObject({ key: "navConfig", value });
}
}