Add device removal button.

This commit is contained in:
Jared 2021-01-27 17:11:07 -08:00 committed by Jared Goodwin
parent 716fabaf6c
commit f7c9f57bbc
3 changed files with 9 additions and 3 deletions

View File

@ -116,7 +116,7 @@ button.navbar-toggler:hover {
color: limegreen;
}
td .fa-times {
td > .fa-times {
color: red;
}

View File

@ -112,7 +112,7 @@ button.navbar-toggler:hover {
color: forestgreen;
}
td .fa-times {
td > .fa-times {
color: red;
}

View File

@ -162,6 +162,10 @@ export function RenderDeviceRows() {
<i class="fas fa-edit" title="Edit"></i>
Edit
</a>
<a class="dropdown-item device-remove-button" href="#">
<i class="fas fa-times" title="Remove"></i>
Remove
</a>
</div>
</div>
</td>`;
@ -180,7 +184,9 @@ export function RenderDeviceRows() {
(recordRow.querySelector(".device-viewonly-button") as HTMLButtonElement).onclick = (ev) => {
AddConsoleOutput("Launching remote control on client device...");
BrowserHubConnection.StartRemoteControl(device.ID, true);
};
(recordRow.querySelector(".device-remove-button") as HTMLButtonElement).onclick = (ev) => {
BrowserHubConnection.Connection.invoke("RemoveDevices", [ device.ID ]);
};
}
}