add more plugin options + don't inject in HVNC if DXGI is set to off.
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
import { mountNav } from "./nav/template.js";
|
||||
import { createAdaptiveNavController } from "./nav/layout.js";
|
||||
import { applyUserRoleUI } from "./nav/role-ui.js";
|
||||
import { loadPluginNavItems } from "./nav/plugins-loader.js";
|
||||
|
||||
const host = document.getElementById("top-nav");
|
||||
if (host) {
|
||||
@@ -38,23 +39,27 @@ if (host) {
|
||||
"/file-share": "file-share-link",
|
||||
"/purgatory": "enrollment-link",
|
||||
};
|
||||
const activeId = activeMap[path];
|
||||
if (activeId) {
|
||||
const el = document.getElementById(activeId);
|
||||
if (el) {
|
||||
el.classList.add("nav-active");
|
||||
// Also expand the parent sidebar group if applicable
|
||||
const group = el.closest(".sb-group");
|
||||
if (group) {
|
||||
const btn = group.querySelector(".sb-group-btn");
|
||||
const children = group.querySelector(".sb-group-children");
|
||||
const chevron = btn?.querySelector(".sb-chevron");
|
||||
if (btn) btn.setAttribute("aria-expanded", "true");
|
||||
if (children) children.classList.add("sb-group-open");
|
||||
if (chevron) chevron.classList.add("sb-chevron-open");
|
||||
|
||||
loadPluginNavItems(activeMap).then(() => {
|
||||
const activeId = activeMap[path];
|
||||
if (activeId) {
|
||||
const el = document.getElementById(activeId);
|
||||
if (el) {
|
||||
el.classList.add("nav-active");
|
||||
// Also expand the parent sidebar group if applicable
|
||||
const group = el.closest(".sb-group");
|
||||
if (group) {
|
||||
const btn = group.querySelector(".sb-group-btn");
|
||||
const children = group.querySelector(".sb-group-children");
|
||||
const chevron = btn?.querySelector(".sb-chevron");
|
||||
if (btn) btn.setAttribute("aria-expanded", "true");
|
||||
if (children) children.classList.add("sb-group-open");
|
||||
if (chevron) chevron.classList.add("sb-chevron-open");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (refs.logoutBtn && !refs.logoutBtn.dataset.boundLogout) {
|
||||
refs.logoutBtn.dataset.boundLogout = "true";
|
||||
refs.logoutBtn.addEventListener("click", async () => {
|
||||
|
||||
Reference in New Issue
Block a user