diff --git a/cmd/txqr-tester/app/app.go b/cmd/txqr-tester/app/app.go index a9a6ef5..7031b1e 100644 --- a/cmd/txqr-tester/app/app.go +++ b/cmd/txqr-tester/app/app.go @@ -26,8 +26,9 @@ func NewApp() *App { wsAddress := js.Global.Get("WSAddress").String() fmt.Println("WSaddress:", wsAddress) app := &App{ - session: NewSession(), - settings: NewSettings(), + session: NewSession(), + settings: NewSettings(), + connected: false, } app.ws = NewWSClient(wsAddress, app) diff --git a/cmd/txqr-tester/app/start_qr.go b/cmd/txqr-tester/app/start_qr.go index d7abd6a..0732c80 100644 --- a/cmd/txqr-tester/app/start_qr.go +++ b/cmd/txqr-tester/app/start_qr.go @@ -32,7 +32,8 @@ func (a *App) StartQR() vecty.ComponentOrHTML { vecty.Markup( vecty.Class("has-text-weight-bold"), ), - vecty.Text("Scan QR code to start testing"), + vecty.If(!a.connected, vecty.Text("Scan QR code to connect")), + vecty.If(a.connected, vecty.Text("Scan QR code to start testing")), ), ), ), @@ -60,7 +61,7 @@ func (a *App) StartQR() vecty.ComponentOrHTML { vecty.If(a.connected, elem.Paragraph( vecty.Markup( - vecty.Class("card-footer-item"), + vecty.Class("card-footer-item", "has-background-success", "has-text-white", "has-text-weight-bold"), ), vecty.Text( fmt.Sprintf("Connected"),