mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-02 01:38:00 +00:00
fix(Onboarding/SyncProgressPagePage): fixup back buttons
- SyncProgressPagePage: enable the back button only in the failed state - SyncProgressPagePage: fix the "Try again" and "Back" button to go to the Scan QR step; the connection code is disposable and can't be used again anyway - adjust the respective SB pages to reflect the correct enum values
This commit is contained in:
parent
f64019fb09
commit
e2f9dab33b
@ -13,14 +13,14 @@ Item {
|
|||||||
id: progressPage
|
id: progressPage
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
addKeyPairState: Onboarding.AddKeyPairState.InProgress
|
addKeyPairState: ctrlState.currentValue
|
||||||
|
|
||||||
onKeypairAddTryAgainRequested: {
|
onKeypairAddTryAgainRequested: {
|
||||||
console.warn("!!! onKeypairAddTryAgainRequested")
|
console.warn("!!! onKeypairAddTryAgainRequested")
|
||||||
addKeyPairState = Onboarding.AddKeyPairState.InProgress
|
ctrlState.currentIndex = ctrlState.indexOfValue(Onboarding.AddKeyPairState.InProgress)
|
||||||
Backpressure.debounce(root, 2000, function() {
|
Backpressure.debounce(root, 2000, function() {
|
||||||
console.warn("!!! SIMULATION: SUCCESS")
|
console.warn("!!! SIMULATION: SUCCESS")
|
||||||
addKeyPairState = Onboarding.AddKeyPairState.Success
|
ctrlState.currentIndex = ctrlState.indexOfValue(Onboarding.AddKeyPairState.Success)
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
onKeypairAddContinueRequested: console.warn("!!! onKeypairAddContinueRequested")
|
onKeypairAddContinueRequested: console.warn("!!! onKeypairAddContinueRequested")
|
||||||
@ -33,8 +33,13 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: 350
|
width: 350
|
||||||
model: ["Onboarding.AddKeyPairState.InProgress", "Onboarding.AddKeyPairState.Success", "Onboarding.AddKeyPairState.Failed"]
|
textRole: "name"
|
||||||
onCurrentIndexChanged: progressPage.addKeyPairState = currentIndex
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{name: "InProgress", value: Onboarding.AddKeyPairState.InProgress},
|
||||||
|
{name: "Success", value: Onboarding.AddKeyPairState.Success},
|
||||||
|
{name: "Failed", value: Onboarding.AddKeyPairState.Failed}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ Item {
|
|||||||
SyncProgressPage {
|
SyncProgressPage {
|
||||||
id: progressPage
|
id: progressPage
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
syncState: Onboarding.SyncState.InProgress
|
syncState: ctrlState.currentValue
|
||||||
onRestartSyncRequested: {
|
onRestartSyncRequested: {
|
||||||
console.warn("!!! RESTART SYNC REQUESTED")
|
console.warn("!!! RESTART SYNC REQUESTED")
|
||||||
syncState = Onboarding.SyncState.InProgress
|
ctrlState.currentIndex = ctrlState.indexOfValue(Onboarding.SyncState.InProgress)
|
||||||
Backpressure.debounce(root, 2000, function() {
|
Backpressure.debounce(root, 2000, function() {
|
||||||
console.warn("!!! SIMULATION: SUCCESS")
|
console.warn("!!! SIMULATION: SUCCESS")
|
||||||
syncState = Onboarding.SyncState.Success
|
ctrlState.currentIndex = ctrlState.indexOfValue(Onboarding.SyncState.Success)
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
onLoginToAppRequested: console.warn("!!! LOGIN TO APP REQUESTED")
|
onLoginToAppRequested: console.warn("!!! LOGIN TO APP REQUESTED")
|
||||||
@ -30,8 +30,13 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: 300
|
width: 300
|
||||||
model: ["Onboarding.SyncState.InProgress", "Onboarding.SyncState.Success", "Onboarding.SyncState.Failed"]
|
textRole: "name"
|
||||||
onCurrentIndexChanged: progressPage.syncState = currentIndex
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{name: "InProgress", value: Onboarding.SyncState.InProgress},
|
||||||
|
{name: "Success", value: Onboarding.SyncState.Success},
|
||||||
|
{name: "Failed", value: Onboarding.SyncState.Failed}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ SQUtils.QObject {
|
|||||||
|
|
||||||
onSyncProceedWithConnectionString: {
|
onSyncProceedWithConnectionString: {
|
||||||
root.syncProceedWithConnectionString(connectionString)
|
root.syncProceedWithConnectionString(connectionString)
|
||||||
root.stackView.push(syncProgressPage, { connectionString })
|
root.stackView.push(syncProgressPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -38,17 +38,13 @@ SQUtils.QObject {
|
|||||||
id: syncProgressPage
|
id: syncProgressPage
|
||||||
|
|
||||||
SyncProgressPage {
|
SyncProgressPage {
|
||||||
property string connectionString
|
|
||||||
readonly property bool backAvailableHint:
|
readonly property bool backAvailableHint:
|
||||||
root.syncState !== Onboarding.SyncState.InProgress
|
root.syncState === Onboarding.SyncState.Failed
|
||||||
|
|
||||||
syncState: root.syncState
|
syncState: root.syncState
|
||||||
|
|
||||||
onLoginToAppRequested: root.finished()
|
onLoginToAppRequested: root.finished()
|
||||||
onRestartSyncRequested: {
|
onRestartSyncRequested: root.stackView.pop()
|
||||||
root.syncProceedWithConnectionString(connectionString)
|
|
||||||
root.stackView.replace(syncProgressPage)
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoginWithSeedphraseRequested: root.loginWithSeedphraseRequested()
|
onLoginWithSeedphraseRequested: root.loginWithSeedphraseRequested()
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ OnboardingPage {
|
|||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "inprogress"
|
name: "inprogress"
|
||||||
when: root.syncState === Onboarding.SyncState.InProgress
|
when: root.syncState === Onboarding.SyncState.InProgress || root.syncState === Onboarding.SyncState.Idle
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: root
|
target: root
|
||||||
title: qsTr("Profile sync in progress...")
|
title: qsTr("Profile sync in progress...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user