mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Add warning on device card for outdated devices.
This commit is contained in:
parent
558dd1bc18
commit
5fa05fa0d1
@ -10,9 +10,21 @@
|
||||
|
||||
<div class="card-header">
|
||||
<div>
|
||||
|
||||
<i class="oi oi-power-standby @(Device.IsOnline ? "text-success" : "text-danger")"
|
||||
title="@(Device.IsOnline ? "Online" : "Offline")"></i>
|
||||
@if (Device.IsOnline)
|
||||
{
|
||||
if (IsOutdated)
|
||||
{
|
||||
<i class="oi oi-power-standby text-warning" title="Agent Outdated"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="oi oi-power-standby text-success" title="Online"></i>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="oi oi-power-standby text-danger" title="Offline"></i>
|
||||
}
|
||||
</div>
|
||||
<div class="overflow-hidden ml-2">
|
||||
<div class="d-inline-block">
|
||||
|
||||
@ -52,6 +52,10 @@ namespace Remotely.Server.Components.Devices
|
||||
|
||||
private bool IsSelected => AppState.DevicesFrameSelectedDevices.Contains(Device.ID);
|
||||
|
||||
private bool IsOutdated =>
|
||||
Version.TryParse(Device.AgentVersion, out var result) &&
|
||||
result < ParentFrame.HighestVersion;
|
||||
|
||||
[Inject]
|
||||
private IJsInterop JsInterop { get; set; }
|
||||
|
||||
|
||||
@ -42,6 +42,8 @@ namespace Remotely.Server.Components.Devices
|
||||
private string _selectedSortProperty = "DeviceName";
|
||||
private ListSortDirection _sortDirection;
|
||||
|
||||
public Version HighestVersion { get; private set; }
|
||||
|
||||
[Inject]
|
||||
private IClientAppState AppState { get; set; }
|
||||
|
||||
@ -222,6 +224,8 @@ namespace Remotely.Server.Components.Devices
|
||||
|
||||
_allDevices.AddRange(devices);
|
||||
|
||||
HighestVersion = _allDevices.Max(x => Version.TryParse(x.AgentVersion, out var result) ? result : default);
|
||||
|
||||
FilterDevices();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user