feat(webui): add live connection status for OneBot adapters in dashboard

This commit is contained in:
DrSmoothl committed 2026-05-30 18:02:01 +08:00
1 parent 90f26ca4f4
commit 0e4b881f76
18 files changed
+351 -13

No files matched your search

+5 -1
View File
@@ -1,4 +1,4 @@
import type { HookProcessInfo, LogEntry, LogLevel, QQInfo, SystemInfo } from '@/types';
import type { AccountConnections, HookProcessInfo, LogEntry, LogLevel, QQInfo, SystemInfo } from '@/types';
import type { PasswordRule } from '@/components/pages/change-password-page';
import { normalizeOneBotConfig } from '@/lib/onebot-config';
import {
@@ -222,6 +222,10 @@ class HttpApiClient implements ApiClient {
return this.getJson<SystemInfo>('/api/system');
}
connections(): Promise<AccountConnections[]> {
return this.getJson<{ list: AccountConnections[] }>('/api/connections').then((d) => d.list ?? []);
}
// ---------- SSE ----------
private openLogStream(options: LogsStreamOptions): () => void {