From 5a904f911e75567174fc19dbf324b8bc9384dbb9 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Mon, 9 Jan 2023 06:45:59 -0700 Subject: [PATCH] show nixos version in cards --- flake.nix | 2 +- main.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 93684ea..5a46d9d 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ in { xintray = pkgs.buildGoModule { pname = "xintray"; - version = "v0.1.3"; + version = "v0.1.4"; src = ./.; vendorSha256 = diff --git a/main.go b/main.go index e3e0866..3a33b75 100644 --- a/main.go +++ b/main.go @@ -330,15 +330,20 @@ func buildCards(stat *xinStatus) fyne.CanvasObject { commitBStr := binding.BindString(&s.commit.message) bsl := widget.NewLabelWithData(commitBStr) + verBStr := binding.BindString(&s.NixosVersion) + bvl := widget.NewLabelWithData(verBStr) + restartBBool := binding.BindBool(&s.NeedsRestart) bbl := widget.NewCheckWithData("Reboot", restartBBool) bbl.Disable() stat.boundStrings = append(stat.boundStrings, commitBStr) + stat.boundStrings = append(stat.boundStrings, verBStr) stat.boundBools = append(stat.boundBools, restartBBool) card := widget.NewCard(s.Host, "", container.NewVBox( + container.NewHBox(bvl), container.NewHBox(bbl), container.NewHBox(bsl), ),