diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a31ba71 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +commit.txt diff --git a/rex_client/commit.txt b/rex_client/commit.txt deleted file mode 100644 index e5517e4..0000000 --- a/rex_client/commit.txt +++ /dev/null @@ -1 +0,0 @@ -HEAD \ No newline at end of file diff --git a/rex_client/main.go b/rex_client/main.go index 9e72e6b..24dbf52 100644 --- a/rex_client/main.go +++ b/rex_client/main.go @@ -3,8 +3,8 @@ package main import ( "encoding/json" "fmt" - "embed" "time" + _ "embed" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" @@ -23,9 +23,9 @@ type MyStruct struct { Name string } -//go:generate sh -c "printf %s $(git rev-parse HEAD) > commit.txt" +//go:generate sh -c "printf %s $(git rev-parse --short HEAD) > commit.txt" //go:embed commit.txt -var Commit string +var git_rev string // Download method for the struct func (s *MyStruct) Download() { @@ -38,13 +38,13 @@ func main() { clock.SetText(formatted) a := app.New() - w := a.NewWindow("RexForge") + w := a.NewWindow(fmt.Sprintf("RexForge %s", git_rev)) w.Resize(fyne.NewSize(900, 600)) myList := []MyStruct{ - {"File1"}, - {"File2"}, - {"File3"}, + {"AtlasLoot"}, + {"Bartender4"}, + {"Deadly Boss Mods"}, } enc, err := json.MarshalIndent(myList, "", " ") @@ -60,6 +60,7 @@ func main() { dlbutton := widget.NewButton("Download", func() { current.Download() }) + dlbutton.Importance = widget.LowImportance spacer := layout.NewSpacer() ct := container.NewHBox(namelabel, spacer, dlbutton)