status-desktop/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- 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
2024-10-22 15:54:31 +02:00

67 lines
1.3 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import shared.views 1.0
import utils 1.0
import "../stores"
Item {
id: root
property StartupStore startupStore
Component.onCompleted: {
passwordView.forceInputFocus()
}
QtObject {
id: d
property bool submitEnabled: !submitBtn.loading && passwordView.passwordMatch
function submit() {
if (!d.submitEnabled) {
return
}
root.startupStore.doPrimaryAction()
}
}
ColumnLayout {
id: view
spacing: Theme.bigPadding
height: 460
anchors.centerIn: parent
PasswordConfirmationView {
id: passwordView
Layout.fillWidth: true
Layout.fillHeight: true
spacing: Theme.bigPadding
expectedPassword: root.startupStore.getPassword()
onSubmit: {
d.submit()
}
}
StatusButton {
id: submitBtn
objectName: "confirmPswSubmitBtn"
Layout.alignment: Qt.AlignHCenter
text: qsTr("Finalise Status Password Creation")
enabled: d.submitEnabled
onClicked: {
d.submit()
}
}
}
}