2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2023-09-01 13:32:21 +00:00
|
|
|
|
|
|
|
import shared.views 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var sharedKeycardModule
|
|
|
|
|
|
|
|
signal passwordMatch(bool result)
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.xlPadding
|
|
|
|
anchors.bottomMargin: Theme.halfPadding
|
|
|
|
anchors.leftMargin: Theme.xlPadding
|
|
|
|
anchors.rightMargin: Theme.xlPadding
|
|
|
|
spacing: Theme.padding
|
2023-09-01 13:32:21 +00:00
|
|
|
|
|
|
|
PasswordConfirmationView {
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.fillHeight: true
|
2024-10-15 19:26:12 +00:00
|
|
|
spacing: Theme.bigPadding
|
2023-09-01 13:32:21 +00:00
|
|
|
|
|
|
|
expectedPassword: root.sharedKeycardModule.getNewPassword()
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
forceInputFocus()
|
|
|
|
}
|
|
|
|
|
|
|
|
onPasswordMatchChanged: {
|
|
|
|
root.passwordMatch(passwordMatch)
|
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit: {
|
|
|
|
if(passwordMatch) {
|
|
|
|
root.sharedKeycardModule.currentState.doPrimaryAction()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|