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

+6
View File
@@ -18,6 +18,7 @@ import {
OneBotNetworkManager,
WsClientAdapter,
WsServerAdapter,
type AdapterStatus,
type NetworkAdapterContext,
} from './network';
import { ReactionStore } from './reaction-store';
@@ -46,6 +47,11 @@ export class OneBotInstance {
get nickname(): string { return this.bridge.identity.nickname; }
/** Live status of this account's OneBot network adapters. */
getConnectionStatuses(): AdapterStatus[] {
return this.networkManager.describeStatuses();
}
constructor(uin: string, bridge: BridgeInterface, config: OneBotConfig) {
this.uin = uin;
this.bridge = bridge;