-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- implements the basic Onboarding UI skeleton and the Create Profile flow Fixes #16719
- Loading branch information
Showing
33 changed files
with
1,331 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
import QtQml 2.15 | ||
|
||
import StatusQ 0.1 | ||
import StatusQ.Core 0.1 | ||
import StatusQ.Core.Utils 0.1 | ||
import StatusQ.Controls 0.1 | ||
import StatusQ.Components 0.1 | ||
import StatusQ.Core.Theme 0.1 | ||
|
||
import Models 1.0 | ||
import Storybook 1.0 | ||
|
||
import utils 1.0 | ||
|
||
import AppLayouts.Onboarding2 1.0 | ||
|
||
import shared.stores 1.0 as SharedStores | ||
|
||
// compat | ||
import AppLayouts.Onboarding.stores 1.0 as OOBS | ||
|
||
SplitView { | ||
id: root | ||
orientation: Qt.Vertical | ||
|
||
Logs { id: logs } | ||
|
||
OnboardingLayout { | ||
id: onboarding | ||
SplitView.fillWidth: true | ||
SplitView.fillHeight: true | ||
startupStore: OOBS.StartupStore { | ||
function getPasswordStrengthScore(password) { | ||
return Math.min(password.length, 4) | ||
} | ||
function validMnemonic(mnemonic) { | ||
return true | ||
} | ||
} | ||
metricsStore: SharedStores.MetricsStore { | ||
readonly property var d: QtObject { | ||
id: d | ||
property bool isCentralizedMetricsEnabled | ||
} | ||
|
||
function toggleCentralizedMetrics(enabled) { | ||
d.isCentralizedMetricsEnabled = enabled | ||
} | ||
|
||
function addCentralizedMetricIfEnabled(eventName, eventValue = null) {} | ||
|
||
readonly property bool isCentralizedMetricsEnabled : d.isCentralizedMetricsEnabled | ||
} | ||
splashScreenDurationMs: 3000 | ||
|
||
QtObject { | ||
id: localAppSettings | ||
property bool metricsPopupSeen | ||
} | ||
|
||
onFinished: (success, primaryPath, secondaryPath) => { | ||
console.warn("!!! ONBOARDING FINISHED; success:", success, "; primary path:", primaryPath, "; secondary:", secondaryPath) | ||
logs.logEvent("onFinished", ["success", "primaryPath", "secondaryPath"], arguments) | ||
|
||
console.warn("!!! RESTARTING FLOW") | ||
restartFlow() | ||
} | ||
} | ||
|
||
LogsAndControlsPanel { | ||
id: logsAndControlsPanel | ||
|
||
SplitView.minimumHeight: 150 | ||
SplitView.preferredHeight: 150 | ||
|
||
logsView.logText: logs.logText | ||
|
||
RowLayout { | ||
anchors.fill: parent | ||
ColumnLayout { | ||
Layout.fillWidth: true | ||
Label { | ||
text: "Current page: %1".arg(onboarding.stack.currentItem ? onboarding.stack.currentItem.title : "") | ||
} | ||
Label { | ||
text: `Current path: ${onboarding.primaryPath} -> ${onboarding.secondaryPath}` | ||
} | ||
Label { | ||
text: "Stack depth: %1".arg(onboarding.stack.depth) | ||
} | ||
} | ||
Item { Layout.fillWidth: true } | ||
Button { | ||
text: "Restart" | ||
focusPolicy: Qt.NoFocus | ||
onClicked: onboarding.restartFlow() | ||
} | ||
Button { | ||
text: "Copy password" | ||
focusPolicy: Qt.NoFocus | ||
onClicked: ClipboardUtils.setText("0123456789") | ||
} | ||
Button { | ||
text: "Copy seedphrase" | ||
focusPolicy: Qt.NoFocus | ||
onClicked: ClipboardUtils.setText("dog dog dog dog dog dog dog dog dog dog dog dog") | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Onboarding | ||
// status: good | ||
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1-25&node-type=canvas&m=dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import QtQml 2.15 | ||
|
||
QtObject {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import QtQuick 2.13 | ||
import QtQuick.Window 2.15 | ||
import QtQuick 2.15 | ||
|
||
/*! | ||
\qmltype StatusImage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
import StatusQ.Core 0.1 | ||
import StatusQ.Popups.Dialog 0.1 | ||
|
||
StatusDialog { | ||
width: 600 | ||
padding: 0 | ||
standardButtons: Dialog.Ok | ||
|
||
property alias content: contentText | ||
|
||
StatusScrollView { | ||
id: scrollView | ||
anchors.fill: parent | ||
contentWidth: availableWidth | ||
StatusBaseText { | ||
id: contentText | ||
width: scrollView.availableWidth | ||
wrapMode: Text.Wrap | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.