fix: Fixed console resolution
Server Deploy / deploy (push) Successful in 44s

This commit is contained in:
2026-07-20 09:30:44 +01:00
parent db5b5e173f
commit a02747d02e
2 changed files with 19 additions and 6 deletions
+8 -1
View File
@@ -2,7 +2,11 @@
// The library attaches a global `Guacamole` object when loaded.
declare const Guacamole: any;
export function openConsole(container: HTMLElement, wsUrl: string, connectData = ""): { disconnect: () => void } {
export function openConsole(
container: HTMLElement,
wsUrl: string,
connectData = ""
): { disconnect: () => void; setScale: (scale: number) => void } {
// Guacamole's WebSocketTunnel builds the socket URL as `wsUrl + "?" + data`,
// so wsUrl must NOT already contain a query string — pass params via connectData.
const tunnel = new Guacamole.WebSocketTunnel(wsUrl);
@@ -25,5 +29,8 @@ export function openConsole(container: HTMLElement, wsUrl: string, connectData =
disconnect() {
client.disconnect();
},
setScale(scale: number) {
client.getDisplay().scale(scale);
},
};
}