feat: Add generate account button to login screen
This commit is contained in:
parent
0f59529c57
commit
a2e255e72c
|
@ -55,7 +55,7 @@ proc mainProc() =
|
|||
var profile = profile.newController(appEvents)
|
||||
engine.setRootContextProperty("profileModel", profile.variant)
|
||||
|
||||
appEvents.on("login") do(a: Args):
|
||||
appEvents.once("login") do(a: Args):
|
||||
var args = AccountArgs(a)
|
||||
status_core.startMessenger()
|
||||
wallet.init()
|
||||
|
@ -68,10 +68,9 @@ proc mainProc() =
|
|||
let showLogin = nodeAccounts.len > 0
|
||||
engine.setRootContextProperty("showLogin", newQVariant(showLogin))
|
||||
|
||||
if nodeAccounts.len > 0:
|
||||
login.init(nodeAccounts)
|
||||
engine.setRootContextProperty("loginModel", login.variant)
|
||||
else:
|
||||
|
||||
onboarding.init()
|
||||
engine.setRootContextProperty("onboardingModel", onboarding.variant)
|
||||
|
||||
|
@ -90,8 +89,8 @@ proc mainProc() =
|
|||
chat.load(channel.name)
|
||||
)
|
||||
|
||||
# accountsModel.appEvents.on("login") do(a: Args):
|
||||
# appEvents.on("login") do(a: Args):
|
||||
# accountsModel.appEvents.once("login") do(a: Args):
|
||||
# appEvents.once("login") do(a: Args):
|
||||
# appState.addChannel("test")
|
||||
# appState.addChannel("test2")
|
||||
# appState.addChannel("status")
|
||||
|
|
|
@ -9,7 +9,7 @@ SwipeView {
|
|||
anchors.fill: parent
|
||||
currentIndex: 0
|
||||
|
||||
signal loginDone(response: var)
|
||||
property alias btnGenKey: btnGenKey
|
||||
|
||||
onCurrentItemChanged: {
|
||||
currentItem.txtPassword.focus = true;
|
||||
|
@ -91,6 +91,15 @@ SwipeView {
|
|||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnGenKey
|
||||
text: "Generate new account"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 20
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Select"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
|
@ -73,6 +73,11 @@ Page {
|
|||
return !resp.error
|
||||
}
|
||||
}
|
||||
|
||||
DSM.SignalTransition {
|
||||
targetState: genKeyState
|
||||
signal: login.btnGenKey.clicked
|
||||
}
|
||||
}
|
||||
|
||||
DSM.FinalState {
|
||||
|
|
Loading…
Reference in New Issue