From a90a096c130ed5d32e0d14003d9fffa45df588ce Mon Sep 17 00:00:00 2001 From: Jared Date: Thu, 4 Feb 2021 09:56:19 -0800 Subject: [PATCH] Confirm device removal. --- Server/wwwroot/src/Main/DataGrid.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/wwwroot/src/Main/DataGrid.ts b/Server/wwwroot/src/Main/DataGrid.ts index 276f52ec..cbd131c5 100644 --- a/Server/wwwroot/src/Main/DataGrid.ts +++ b/Server/wwwroot/src/Main/DataGrid.ts @@ -186,7 +186,9 @@ export function RenderDeviceRows() { BrowserHubConnection.StartRemoteControl(device.ID, true); }; (recordRow.querySelector(".device-remove-button") as HTMLButtonElement).onclick = (ev) => { - BrowserHubConnection.Connection.invoke("RemoveDevices", [ device.ID ]); + if (confirm("Are you sure you want to remove this device?")) { + BrowserHubConnection.Connection.invoke("RemoveDevices", [ device.ID ]); + } }; } }