status-desktop/storybook/pages/ProgressSelector.qml
Lukáš Tinkl 262f51a102 fix(Onboarding): Better handling of login errors
- remove `tryToSetPinFunction` and correct `setPin` functions; those
were not used in LoginScreen
- consistently report login errors to the LoginScreen, including details
for the keycard profiles
- display error details in a popup (extracted from `LoginKeycardBox` to
`LoginScreen`) for both password and keycard profiles
- add login error simulation buttons to SB pages

Fixes #17258
2025-02-12 14:07:03 +01:00

56 lines
1.0 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ 0.1
import StatusQ.Core.Utils 0.1
import Storybook 1.0
import AppLayouts.Onboarding.enums 1.0
Control {
id: root
readonly property alias value: d.value
property string label
QtObject {
id: d
property int value: Onboarding.ProgressState.Idle
}
contentItem: RowLayout {
Label {
id: label
text: root.label + ": "
}
Flow {
spacing: 2
ButtonGroup {
id: group
}
Repeater {
model: Onboarding.getModelFromEnum("ProgressState")
RoundButton {
focusPolicy: Qt.NoFocus
text: modelData.name
checkable: true
checked: root.value === modelData.value
ButtonGroup.group: group
onClicked: d.value = modelData.value
}
}
}
}
}