wip: Windows desktop app scaffold (WinUI 3/.NET 8) + NSIS installer + docs
Owner decision pending (STATE.md DC-100 tick): adopt/ship/park. Preserved from fragile git stash to named branch 2026-08-23. NOTE: requires a Windows build machine (WinUI XAML compiler + MSIX do not cross-build on Linux) — see WINDOWS_APP_BUILD.md in this tree. Secret-scanned clean 2026-08-23 (no keys/tokens/PEM in tree).
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace DashCaddy.Desktop.ViewModels;
|
||||
|
||||
public enum ServiceHealth
|
||||
{
|
||||
Healthy,
|
||||
Degraded,
|
||||
Unhealthy,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public partial class ServiceViewModel : ObservableObject
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Url { get; set; }
|
||||
public int Port { get; set; }
|
||||
public string Host { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private ServiceHealth _health;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _isRunning;
|
||||
|
||||
public ServiceModel ToServiceModel() => new()
|
||||
{
|
||||
Id = Id,
|
||||
Name = Name,
|
||||
Type = Type,
|
||||
Url = Url,
|
||||
Port = Port,
|
||||
Host = Host,
|
||||
Health = Health,
|
||||
State = IsRunning ? "running" : "stopped"
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user