From fecf349c2a499f74a4f42bd705c4d620a3fd3c0c Mon Sep 17 00:00:00 2001 From: Ivan Danyliuk Date: Fri, 16 Nov 2018 15:09:32 +0100 Subject: [PATCH] Change QR title text --- cmd/txqr-tester/app/qr.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/txqr-tester/app/qr.go b/cmd/txqr-tester/app/qr.go index 38ccff3..a543706 100644 --- a/cmd/txqr-tester/app/qr.go +++ b/cmd/txqr-tester/app/qr.go @@ -10,6 +10,7 @@ import ( // QR renders the QR code with accopmanying text. func (a *App) QR() vecty.ComponentOrHTML { + state := a.session.State() return elem.Div( vecty.Markup( vecty.Class("card"), @@ -27,7 +28,8 @@ func (a *App) QR() vecty.ComponentOrHTML { vecty.Class("has-text-weight-bold"), ), vecty.If(!a.connected, vecty.Text("Scan QR code to connect")), - vecty.If(a.connected, vecty.Text("Scan QR code to start testing")), + vecty.If(a.connected && (state == StateNew || state == StateWaitingNext), vecty.Text("Scan QR code to start testing")), + vecty.If(a.connected && state == StateAnimating, vecty.Text("Sending data via QR...")), ), ), ),