Show text when device is not reachable
This commit is contained in:
parent
1cee137dcb
commit
793c74e89e
1 changed files with 28 additions and 1 deletions
|
@ -43,7 +43,22 @@ Kirigami.Page
|
|||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
sourceComponent: deviceView.currentDevice.hasPairingRequests ? pairDevice : deviceView.currentDevice.isTrusted ? trustedDevice : untrustedDevice
|
||||
sourceComponent: {
|
||||
if (deviceView.currentDevice.hasPairingRequests) {
|
||||
return pairDevice;
|
||||
}
|
||||
|
||||
if (deviceView.currentDevice.isReachable) {
|
||||
if (deviceView.currentDevice.isTrusted) {
|
||||
return trustedDevice;
|
||||
} else {
|
||||
return untrustedDevice;
|
||||
}
|
||||
} else {
|
||||
return notReachableDevice;
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: trustedDevice
|
||||
ColumnLayout {
|
||||
|
@ -154,6 +169,18 @@ Kirigami.Page
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: notReachableDevice
|
||||
Item {
|
||||
property var actions: []
|
||||
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: i18n("This device is not reachable")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
|
|
Loading…
Reference in a new issue