From 50907448d2dccf00612adf075890b7753adfaa40 Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Fri, 17 Jul 2026 11:45:19 +0100 Subject: [PATCH] feat: web console page with protocol + key selection Includes web/lib/api.ts changes (console_protocols field, connectConsole method) required for the console page to type-check and build; the task brief's commit file list omitted this file. --- web/lib/api.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/web/lib/api.ts b/web/lib/api.ts index 9f8d8b8..cced293 100644 --- a/web/lib/api.ts +++ b/web/lib/api.ts @@ -19,6 +19,21 @@ export interface Server { created_at: string; available_updates?: PackageUpdate[]; updates_checked_at?: string; + console_protocols?: string[]; +} + +export interface ConsoleConnectRequest { + server_id: string; + protocol: string; + key_id?: string; + rdp_username?: string; + rdp_password?: string; +} + +export interface ConsoleConnectResponse { + session_id: string; + token: string; + ws_path: string; } export interface Key { @@ -290,4 +305,12 @@ export const api = { method: "DELETE", }); }, + + // Console + connectConsole(body: ConsoleConnectRequest): Promise { + return request("/console/connect", { + method: "POST", + body: JSON.stringify(body), + }); + }, };