diff options
Diffstat (limited to 'desktop/modules/kdeconnect/KdeConnectPage.qml')
| -rw-r--r-- | desktop/modules/kdeconnect/KdeConnectPage.qml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/desktop/modules/kdeconnect/KdeConnectPage.qml b/desktop/modules/kdeconnect/KdeConnectPage.qml index 46a42f9..ba2c8e3 100644 --- a/desktop/modules/kdeconnect/KdeConnectPage.qml +++ b/desktop/modules/kdeconnect/KdeConnectPage.qml @@ -38,6 +38,52 @@ Column { color: Theme.red } + // Incoming pairing requests. The property persists while the drawer is + // closed, so a request raised then is still here when it opens. + Repeater { + model: page.mod.requests + + Rectangle { + required property var modelData + + width: page.width + implicitHeight: reqCol.implicitHeight + 16 + radius: 8 + color: Qt.alpha(Theme.accent, 0.12) + border.width: 1 + border.color: Qt.alpha(Theme.accent, 0.4) + + Column { + id: reqCol + anchors { left: parent.left; right: parent.right; top: parent.top; margins: 10 } + spacing: 8 + + Text { + width: parent.width + elide: Text.ElideRight + text: page.mod.deviceName(modelData) + " wants to pair" + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } + color: Theme.text + } + + Row { + spacing: 8 + + Button { + text: "Accept" + onClicked: page.mod.accept(modelData) + } + + Button { + text: "Reject" + danger: true + onClicked: page.mod.reject(modelData) + } + } + } + } + } + Text { width: page.width visible: page.mod.paired.length > 0 |
