diff --git a/Server/wwwroot/scripts/DataGrid.ts b/Server/wwwroot/scripts/DataGrid.ts index cc763d2d..29f2cc57 100644 --- a/Server/wwwroot/scripts/DataGrid.ts +++ b/Server/wwwroot/scripts/DataGrid.ts @@ -46,7 +46,7 @@ export function AddOrUpdateDevice(device: Device) { .replace("true", "") .replace("false", "")} ${device.DeviceName} - ${device.Alias} + ${device.Alias || ""} ${device.CurrentUser} ${new Date(device.LastOnline).toLocaleString()} ${device.Platform} diff --git a/Server/wwwroot/scripts/RemoteControl/Main.ts b/Server/wwwroot/scripts/RemoteControl/Main.ts index 32c90000..195873c4 100644 --- a/Server/wwwroot/scripts/RemoteControl/Main.ts +++ b/Server/wwwroot/scripts/RemoteControl/Main.ts @@ -5,7 +5,6 @@ import { RemoteControlMode } from "../Enums/RemoteControlMode.js"; var queryString = Utilities.ParseSearchString(); -var rcBrowserSockets = new RCBrowserSockets(); export const RemoteControl = { @@ -16,7 +15,7 @@ export const RemoteControl = { Mode: RemoteControlMode.None, Init: () => { - UI.ApplyInputHandlers(rcBrowserSockets); + UI.ApplyInputHandlers(RemoteControl.RCBrowserSockets); if (queryString["clientID"]) { RemoteControl.Mode = RemoteControlMode.Unattended; diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts index d92c138e..4396022d 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts @@ -6,13 +6,15 @@ import { Sound } from "../Sound.js"; var signalR = window["signalR"]; +type HubConnection = { + start: () => Promise; + closedCallbacks: any[]; + invoke: (...rest) => any; + stop: () => any; +} + export class RCBrowserSockets { - Connection = { - start: async () => { }, - closedCallbacks: [], - invoke: (...rest) => { }, - stop: () => { } - }; + Connection: HubConnection; Connect() { this.Connection = new signalR.HubConnectionBuilder()