diff options
Diffstat (limited to 'app/bluetooth')
-rw-r--r-- | app/bluetooth/Bluetooth.qml | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml index ded2c36..e8cca1a 100644 --- a/app/bluetooth/Bluetooth.qml +++ b/app/bluetooth/Bluetooth.qml @@ -189,10 +189,28 @@ SettingPage { } Button { + id: removeButton + anchors.top:parent.top + anchors.topMargin: 15 + anchors.right: parent.right + text: "Unpair" + MouseArea { + anchors.fill: parent + onClicked: { + request(btAPIpath + 'remove_device?value=' + btAddr.text, function (o) { + console.log(o.responseText) + }) + btDeviceList.remove(findDevice(btAddr.text)) + } + } + + } + + Button { id: connectButton anchors.top:parent.top anchors.topMargin: 15 - anchors.right: parent.right + anchors.right: removeButton.left anchors.rightMargin: 10 text:(btConnectstatus.text == "True")? "Disconnect":((btPairable.text == "True")? "Connect":"Pair") @@ -231,26 +249,6 @@ SettingPage { } } } - /*Image{ - id: removeDevice - anchors.top:parent.top - anchors.topMargin: 15 - anchors.right: parent.right - anchors.rightMargin: 5 - width: 25 - height: 25 - source: "component/images/trash.png" - - MouseArea { - anchors.fill: parent - onClicked: { - request(btAPIpath + 'remove_device?value=' + btAddr.text, function (o) { - console.log(o.responseText) - }) - btDeviceList.remove(findDevice(btAddr.text)) - } - } - }*/ } } |