Files
security-alert-center/frontend/src/utils/hostPatchBus.ts
T
PapaTramp 2eb06acb5b feat: SSH card UX, agent version sync, persistent ssh_admin_ok (0.11.5)
Silent SSH probe on host card open; manual test feedback auto-hides. Persist ssh_admin_ok in DB (migration 019). After agent update read version from host and refresh UI.
2026-06-20 01:01:56 +10:00

17 lines
423 B
TypeScript

import type { HostDetail } from "../api";
type HostPatchListener = (detail: HostDetail) => void;
const listeners = new Set<HostPatchListener>();
export function subscribeHostPatch(listener: HostPatchListener): () => void {
listeners.add(listener);
return () => listeners.delete(listener);
}
export function emitHostPatch(detail: HostDetail): void {
for (const listener of listeners) {
listener(detail);
}
}