show nixos version in cards

This commit is contained in:
Aaron Bieber 2023-01-09 06:45:59 -07:00
parent 7394dbe119
commit 5a904f911e
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,7 @@
in { in {
xintray = pkgs.buildGoModule { xintray = pkgs.buildGoModule {
pname = "xintray"; pname = "xintray";
version = "v0.1.3"; version = "v0.1.4";
src = ./.; src = ./.;
vendorSha256 = vendorSha256 =

View File

@ -330,15 +330,20 @@ func buildCards(stat *xinStatus) fyne.CanvasObject {
commitBStr := binding.BindString(&s.commit.message) commitBStr := binding.BindString(&s.commit.message)
bsl := widget.NewLabelWithData(commitBStr) bsl := widget.NewLabelWithData(commitBStr)
verBStr := binding.BindString(&s.NixosVersion)
bvl := widget.NewLabelWithData(verBStr)
restartBBool := binding.BindBool(&s.NeedsRestart) restartBBool := binding.BindBool(&s.NeedsRestart)
bbl := widget.NewCheckWithData("Reboot", restartBBool) bbl := widget.NewCheckWithData("Reboot", restartBBool)
bbl.Disable() bbl.Disable()
stat.boundStrings = append(stat.boundStrings, commitBStr) stat.boundStrings = append(stat.boundStrings, commitBStr)
stat.boundStrings = append(stat.boundStrings, verBStr)
stat.boundBools = append(stat.boundBools, restartBBool) stat.boundBools = append(stat.boundBools, restartBBool)
card := widget.NewCard(s.Host, "", card := widget.NewCard(s.Host, "",
container.NewVBox( container.NewVBox(
container.NewHBox(bvl),
container.NewHBox(bbl), container.NewHBox(bbl),
container.NewHBox(bsl), container.NewHBox(bsl),
), ),