2019-09-09 15:12:58 +03:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtQuick.Controls.Material 2.2
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
readonly property int dynamicWidth: 380
|
2019-10-09 13:11:16 +03:00
|
|
|
readonly property int dynamicMargin: 32
|
2019-09-09 15:12:58 +03:00
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
2019-09-11 11:27:28 +03:00
|
|
|
Layout.bottomMargin: 16
|
2019-09-09 15:12:58 +03:00
|
|
|
|
|
|
|
StyledImage {
|
|
|
|
source: "../images/people.svg"
|
|
|
|
color: app.isDark() ? defaultLightForeground : defaultLightOverlay
|
|
|
|
iconWidth: 80
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
2019-10-08 15:56:42 +03:00
|
|
|
text: qsTr("No accounts")
|
2019-09-09 15:12:58 +03:00
|
|
|
Layout.rowSpan: 1
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 16
|
|
|
|
font.weight: Font.Normal
|
|
|
|
lineHeight: 1.5
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
color: formText
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
2019-10-09 14:01:47 +03:00
|
|
|
text: qsTr("Add accounts to this YubiKey to enable generation of security codes.")
|
2019-09-09 15:12:58 +03:00
|
|
|
horizontalAlignment: Qt.AlignHCenter
|
2019-10-09 13:11:16 +03:00
|
|
|
Layout.minimumWidth: 300
|
2019-09-09 15:12:58 +03:00
|
|
|
Layout.maximumWidth: app.width - dynamicMargin
|
|
|
|
< dynamicWidth ? app.width - dynamicMargin : dynamicWidth
|
|
|
|
Layout.rowSpan: 1
|
|
|
|
lineHeight: 1.1
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 13
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
color: formLabel
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledButton {
|
|
|
|
id: addBtn
|
2019-09-09 17:59:30 +03:00
|
|
|
text: qsTr("Add")
|
2019-09-09 15:12:58 +03:00
|
|
|
enabled: true
|
|
|
|
focus: true
|
|
|
|
Layout.alignment: Qt.AlignCenter | Qt.AlignVCenter
|
|
|
|
onClicked: yubiKey.scanQr()
|
|
|
|
Keys.onReturnPressed: yubiKey.scanQr()
|
|
|
|
Keys.onEnterPressed: yubiKey.scanQr()
|
|
|
|
Layout.topMargin: 8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|