Fix device grid buttons.

This commit is contained in:
Jared 2020-09-09 16:51:31 -07:00 committed by Jared Goodwin
parent 3c61b5a468
commit 9cfe322dd5
4 changed files with 18 additions and 13 deletions

View File

@ -20,8 +20,7 @@ namespace Remotely.Desktop.Win.Services
await casterSocket.DisconnectAllViewers();
System.Windows.Forms.Application.Exit();
App.Current.Shutdown();
// TODO: Still needed?
//Environment.Exit(0);
Environment.Exit(0);
}
}
}

View File

@ -83,8 +83,8 @@ export function RenderDeviceRows() {
var endCurrentDevices = startCurrentDevices + GridState.RowsPerPage;
var currentPageDevices = FilteredDevices.slice(startCurrentDevices, endCurrentDevices);
for (var i = 0; i < currentPageDevices.length; i++) {
var device = currentPageDevices[i];
var recordRow = document.getElementById(device.ID);
let device = currentPageDevices[i];
let recordRow = document.getElementById(device.ID);
if (recordRow == null) {
recordRow = document.createElement("tr");
recordRow.classList.add("record-row");
@ -102,9 +102,11 @@ export function RenderDeviceRows() {
});
}
recordRow.innerHTML = `
<td>${String(device.IsOnline)
.replace("true", "<span class='fa fa-check-circle'></span>")
.replace("false", "<span class='fa fa-times'></span>")}</td>
<td>
${device.IsOnline ?
"<span class='fa fa-check-circle'></span>" :
"<span class='fa fa-times'></span>"}
</td>
<td>${device.DeviceName}</td>
<td>${device.Alias || ""}</td>
<td>${device.CurrentUser}</td>

File diff suppressed because one or more lines are too long

View File

@ -104,9 +104,9 @@ export function RenderDeviceRows() {
var currentPageDevices = FilteredDevices.slice(startCurrentDevices, endCurrentDevices);
for (var i = 0; i < currentPageDevices.length; i++) {
let device = currentPageDevices[i];
let recordRow = document.getElementById(device.ID) as HTMLTableRowElement;
var device = currentPageDevices[i];
var recordRow = document.getElementById(device.ID) as HTMLTableRowElement;
if (recordRow == null) {
recordRow = document.createElement("tr");
recordRow.classList.add("record-row");
@ -125,9 +125,13 @@ export function RenderDeviceRows() {
}
recordRow.innerHTML = `
<td>${String(device.IsOnline)
.replace("true", "<span class='fa fa-check-circle'></span>")
.replace("false", "<span class='fa fa-times'></span>")}</td>
<td>
${
device.IsOnline ?
"<span class='fa fa-check-circle'></span>" :
"<span class='fa fa-times'></span>"
}
</td>
<td>${device.DeviceName}</td>
<td>${device.Alias || ""}</td>
<td>${device.CurrentUser}</td>