mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-24 04:28:58 +00:00
- create a reusable component - fix the bg and hover colors as specified in Figma Fixes #17102
86 lines
2.7 KiB
QML
86 lines
2.7 KiB
QML
import QtQuick 2.15
|
||
import QtQuick.Controls 2.15
|
||
import QtQuick.Layouts 1.15
|
||
|
||
import StatusQ.Core 0.1
|
||
import StatusQ.Controls 0.1
|
||
import StatusQ.Core.Theme 0.1
|
||
import StatusQ.Popups 0.1
|
||
|
||
import utils 1.0
|
||
import shared.views 1.0
|
||
|
||
import AppLayouts.Onboarding2.controls 1.0
|
||
|
||
OnboardingPage {
|
||
id: root
|
||
|
||
property var passwordStrengthScoreFunction: (password) => { console.error("passwordStrengthScoreFunction: IMPLEMENT ME") }
|
||
|
||
signal setPasswordRequested(string password)
|
||
|
||
title: qsTr("Create profile password")
|
||
|
||
QtObject {
|
||
id: d
|
||
|
||
function submit() {
|
||
if (!passView.ready)
|
||
return
|
||
root.setPasswordRequested(passView.newPswText)
|
||
}
|
||
}
|
||
|
||
Component.onCompleted: passView.forceNewPswInputFocus()
|
||
|
||
contentItem: Item {
|
||
ColumnLayout {
|
||
spacing: Theme.padding
|
||
anchors.centerIn: parent
|
||
width: Math.min(400, root.availableWidth)
|
||
|
||
PasswordView {
|
||
id: passView
|
||
Layout.fillWidth: true
|
||
Layout.alignment: Qt.AlignHCenter
|
||
highSizeIntro: true
|
||
title: root.title
|
||
introText: qsTr("This password can’t be recovered")
|
||
recoverText: ""
|
||
passwordStrengthScoreFunction: root.passwordStrengthScoreFunction
|
||
onReturnPressed: d.submit()
|
||
}
|
||
StatusButton {
|
||
objectName: "btnConfirmPassword"
|
||
Layout.alignment: Qt.AlignHCenter
|
||
text: qsTr("Confirm password")
|
||
enabled: passView.ready
|
||
onClicked: d.submit()
|
||
}
|
||
}
|
||
}
|
||
|
||
OnboardingInfoButton {
|
||
anchors.right: parent.right
|
||
anchors.top: parent.top
|
||
objectName: "infoButton"
|
||
onClicked: passwordDetailsPopup.createObject(root).open()
|
||
}
|
||
|
||
Component {
|
||
id: passwordDetailsPopup
|
||
StatusSimpleTextPopup {
|
||
objectName: "passwordDetailsPopup"
|
||
title: qsTr("Create profile password")
|
||
okButtonText: qsTr("Got it")
|
||
width: 480
|
||
destroyOnClose: true
|
||
content.text: qsTr("Your Status keys are the foundation of your self-sovereign identity in Web3. You have complete control over these keys, which you can use to sign transactions, access your data, and interact with Web3 services.
|
||
|
||
Your keys are always securely stored on your device and protected by your Status profile password. Status doesn't know your password and can't reset it for you. If you forget your password, you may lose access to your Status profile and wallet funds.
|
||
|
||
Remember your password and don't share it with anyone.")
|
||
}
|
||
}
|
||
}
|