mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 15:33:55 +08:00
9afb0b29f8
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.
20 lines
584 B
JavaScript
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 });
|
|
}
|
|
}
|