diff --git a/app/qml/DevicePage.qml b/app/qml/DevicePage.qml index 944e1b8d6..165c268d7 100644 --- a/app/qml/DevicePage.qml +++ b/app/qml/DevicePage.qml @@ -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 {