Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Reflect active tab in document.title

rcourtmanfeefc4bb4146
diff --git a/frontend-modern/src/AppLayout.tsx b/frontend-modern/src/AppLayout.tsx
index 825fc0bdaa..e71bb96d93 100644
--- a/frontend-modern/src/AppLayout.tsx
+++ b/frontend-modern/src/AppLayout.tsx
@@ -184,6 +184,24 @@ export function AppLayout(props: AppLayoutProps) {
}
});
+ // Reflect the active tab in the browser tab title so multi-tab use,
+ // browser history, and screen-reader page-title announcements all
+ // identify the current Pulse surface instead of every page reading
+ // as the bare app name.
+ const tabTitleByActive: Record<NonNullable<ReturnType<typeof getActiveTabForPath>>, string> = {
+ infrastructure: 'Infrastructure',
+ workloads: 'Workloads',
+ storage: 'Storage',
+ recovery: 'Recovery',
+ alerts: 'Alerts',
+ ai: 'Patrol',
+ settings: 'Settings',
+ };
+ createEffect(() => {
+ const active = getActiveTabForPath(location.pathname);
+ document.title = active ? `${tabTitleByActive[active]} · Pulse` : 'Pulse';
+ });
+
const toggleKioskMode = () => {
setKioskMode(!kioskMode());
};