mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 23:20:03 +03:00
28 lines
621 B
QML
28 lines
621 B
QML
import QtQuick 2.5
|
|
import QtQuick.Controls 1.4
|
|
|
|
Label {
|
|
|
|
property var device
|
|
property int nCredentials
|
|
|
|
visible: device.hasDevice
|
|
text: getText()
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
wrapMode: Text.WordWrap
|
|
width: parent.width
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
function getText() {
|
|
if (credentials === null) {
|
|
return qsTr("Reading credentials...")
|
|
} else if (nCredentials === 0) {
|
|
return qsTr("No credentials found.")
|
|
} else {
|
|
return ""
|
|
}
|
|
}
|
|
}
|