Replace polling with websocket live sync

This commit is contained in:
2026-04-02 02:31:59 +03:00
parent 9a3785deb9
commit c04847b21c
15 changed files with 596 additions and 28 deletions

View File

@@ -81,6 +81,29 @@ export interface DashboardSnapshot {
};
}
export interface DashboardSnapshotPatch {
service?: DashboardSnapshot['service'];
traffic?: DashboardSnapshot['traffic'];
users?: DashboardSnapshot['users'];
attention?: DashboardSnapshot['attention'];
userRecords?: DashboardSnapshot['userRecords'];
system?: DashboardSnapshot['system'];
}
export type DashboardSyncMessage =
| {
type: 'snapshot.init';
snapshot: DashboardSnapshot;
}
| {
type: 'snapshot.patch';
patch: DashboardSnapshotPatch;
}
| {
type: 'session.expired';
error: string;
};
export interface CreateUserInput {
username: string;
password: string;