Add professional historian modal with realtime analytics

This commit is contained in:
litoral05
2026-05-22 17:08:22 +01:00
parent a30d41d031
commit 6277653fed
9 changed files with 1705 additions and 44 deletions
+13 -3
View File
@@ -7,6 +7,7 @@ import { useNotifications } from "../../features/notifications/hooks/useNotifica
import { useCurrentUser } from "../../features/auth/hooks/useCurrentUser";
import { useRuntimeConfig } from "../../features/system/hooks/useRuntimeConfig";
import type { TelemetrySnapshot } from "../../types/telemetry";
import type { AppPage } from "../../app/App";
type AppShellRenderProps = {
theme: "dark" | "light";
@@ -14,14 +15,16 @@ type AppShellRenderProps = {
};
type AppShellProps = {
activePage: AppPage;
onNavigate: (page: AppPage) => void;
children: (props: AppShellRenderProps) => ReactNode;
};
export function AppShell({ children }: AppShellProps) {
export function AppShell({ activePage, onNavigate, children }: AppShellProps) {
const telemetry = useTelemetryStream();
const notifications = useNotifications();
const currentUser = useCurrentUser();
const runtime = useRuntimeConfig();
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
const [theme, setTheme] = useState<"dark" | "light">("dark");
@@ -41,7 +44,13 @@ export function AppShell({ children }: AppShellProps) {
>
<div className="flex h-full overflow-hidden">
<div className="relative h-full shrink-0 overflow-hidden">
<Sidebar theme={theme} />
<Sidebar
theme={theme}
activePage={activePage}
collapsed={sidebarCollapsed}
onNavigate={onNavigate}
onToggleCollapsed={() => setSidebarCollapsed((current) => !current)}
/>
<div className="pointer-events-none absolute right-0 top-0 h-full w-2 bg-gradient-to-r from-[#3A5064]/6 to-transparent blur-sm" />
</div>
@@ -52,6 +61,7 @@ export function AppShell({ children }: AppShellProps) {
notificationCount={notifications.unreadCount}
userInitials={currentUser.initials}
theme={theme}
activePage={activePage}
onToggleTheme={toggleTheme}
/>