mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 13:32:22 +00:00
d9d6d90dc9
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
57 lines
1.5 KiB
QML
57 lines
1.5 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import shared.stores 1.0
|
|
import shared.views 1.0
|
|
|
|
import utils 1.0
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property var sharedKeycardModule
|
|
|
|
signal passwordValid(bool valid)
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.topMargin: Theme.xlPadding
|
|
anchors.bottomMargin: Theme.halfPadding
|
|
anchors.leftMargin: Theme.xlPadding
|
|
anchors.rightMargin: Theme.xlPadding
|
|
spacing: Theme.padding
|
|
|
|
PasswordView {
|
|
Layout.minimumWidth: 460
|
|
Layout.alignment: Qt.AlignHCenter
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
passwordStrengthScoreFunction: RootStore.getPasswordStrengthScore
|
|
highSizeIntro: true
|
|
|
|
newPswText: root.sharedKeycardModule.getNewPassword()
|
|
confirmationPswText: root.sharedKeycardModule.getNewPassword()
|
|
|
|
Component.onCompleted: {
|
|
forceNewPswInputFocus()
|
|
checkPasswordMatches()
|
|
root.passwordValid(ready)
|
|
}
|
|
|
|
onReadyChanged: {
|
|
root.passwordValid(ready)
|
|
if (!ready) {
|
|
return
|
|
}
|
|
root.sharedKeycardModule.setNewPassword(newPswText)
|
|
}
|
|
onReturnPressed: {
|
|
if(!ready) {
|
|
return
|
|
}
|
|
root.sharedKeycardModule.currentState.doPrimaryAction()
|
|
}
|
|
}
|
|
}
|
|
}
|