Confirm device removal.

This commit is contained in:
Jared 2021-02-04 09:56:19 -08:00 committed by Jared Goodwin
parent 91053e21a2
commit a90a096c13

View File

@ -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 ]);
}
};
}
}