Build / build (push) Canceled after 0s
- 'Passwort merken' (aus = gespeichertes Passwort wird geloescht), Fehler beim Speichern in der Anmeldeinformationsverwaltung wird angezeigt (Mac v1.11.4) - Benutzername/Passwort nebeneinander, damit 'Verbindung testen' ohne Scrollen sichtbar ist - Schnittstellenliste mit Punkt gruen/grau fuer den Link-Status (Mac v1.3.0) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
950 B
C#
24 lines
950 B
C#
using MikrotikInstaller.Core.Devices;
|
|
|
|
namespace MikrotikInstaller.App.ViewModels.Steps;
|
|
|
|
/// <summary>Aufbereitete Anzeige einer Schnittstelle für die Geräte-Übersicht (laientaugliche Texte statt Enum-Werte).</summary>
|
|
public sealed record InterfaceDisplayItem(string Name, string KindLabel, string StatusLabel, bool IsProblem, bool HasLink)
|
|
{
|
|
public static InterfaceDisplayItem From(InterfaceInfo info)
|
|
{
|
|
var kindLabel = info.Kind switch
|
|
{
|
|
InterfaceKind.Ethernet => "Ethernet",
|
|
InterfaceKind.Bridge => "Bridge",
|
|
InterfaceKind.Vlan => "VLAN",
|
|
InterfaceKind.Wireless => "WLAN",
|
|
_ => "Sonstige",
|
|
};
|
|
|
|
var statusLabel = info.IsDisabled ? "Deaktiviert" : info.IsRunning ? "Aktiv" : "Inaktiv";
|
|
|
|
return new InterfaceDisplayItem(info.Name, kindLabel, statusLabel, IsProblem: info.IsDisabled, HasLink: info.IsRunning && !info.IsDisabled);
|
|
}
|
|
}
|