mirror of
https://github.com/divan/txqr.git
synced 2026-09-05 17:47:40 +08:00
Change QR title text
This commit is contained in:
@@ -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...")),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user