diff options
Diffstat (limited to 'desktop/modules/kdeconnect')
| -rw-r--r-- | desktop/modules/kdeconnect/KdeConnectPage.qml | 46 | ||||
| -rw-r--r-- | desktop/modules/kdeconnect/KdeConnectRow.qml | 8 |
2 files changed, 54 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 diff --git a/desktop/modules/kdeconnect/KdeConnectRow.qml b/desktop/modules/kdeconnect/KdeConnectRow.qml index 70cc6ce..0c58fc0 100644 --- a/desktop/modules/kdeconnect/KdeConnectRow.qml +++ b/desktop/modules/kdeconnect/KdeConnectRow.qml @@ -61,6 +61,8 @@ Rectangle { : (row.device.reachable ? "Found" : "Not reachable"); if (row.device.charge !== "") s += " " + row.device.charge + "%" + (row.device.charging ? " charging" : ""); + if (row.device.key !== "") + s += " key " + row.device.key; return s; } font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } @@ -96,6 +98,12 @@ Rectangle { danger: true onClicked: row.mod.unpair(row.device.id) } + + Button { + visible: !row.device.paired && row.device.reachable + text: "Pair" + onClicked: row.mod.pair(row.device.id) + } } } } |
