Enable accepting/rejecting pairing from app
Test Plan: Open app, request pairing from other device, accept/reject it Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: kdeconnect, #kde_connect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D13452
This commit is contained in:
parent
bf70f311e4
commit
cb470ce311
1 changed files with 20 additions and 1 deletions
|
@ -42,7 +42,7 @@ Kirigami.Page
|
|||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
sourceComponent: deviceView.currentDevice.isTrusted ? trustedDevice : untrustedDevice
|
||||
sourceComponent: deviceView.currentDevice.hasPairingRequests ? pairDevice : deviceView.currentDevice.isTrusted ? trustedDevice : untrustedDevice
|
||||
Component {
|
||||
id: trustedDevice
|
||||
ColumnLayout {
|
||||
|
@ -114,5 +114,24 @@ Kirigami.Page
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: pairDevice
|
||||
Item {
|
||||
readonly property var actions: []
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
Button {
|
||||
text: i18n("Accept")
|
||||
onClicked: deviceView.currentDevice.acceptPairing()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: i18n("Reject")
|
||||
onClicked: deviceView.currentDevice.rejectPairing()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue