Modify UI for Bluetooth and Wifi 45/7645/1
authorsrimaldia <hariasti.srimaldia-1@jp.alps.com>
Thu, 15 Dec 2016 10:12:47 +0000 (19:12 +0900)
committersrimaldia <hariasti.srimaldia-1@jp.alps.com>
Thu, 15 Dec 2016 10:12:47 +0000 (19:12 +0900)
Signed-off-by: srimaldia <hariasti.srimaldia-1@jp.alps.com>
app/bluetooth/Bluetooth.qml
app/wifi/Wifi.qml

index ded2c36..e8cca1a 100644 (file)
@@ -188,11 +188,29 @@ 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))
-                       }
-             }
-           }*/
         }
       }
 
index 7851967..eac27cb 100644 (file)
@@ -321,8 +321,6 @@ SettingPage {
                         connectButton.visible = false
                         passwordValidateButton.visible = true
 
-                        System.showKeyboard = visible
-
                         //passwordInputText.o
                         periodicRefresh.stop()
 
@@ -355,7 +353,6 @@ SettingPage {
                         //passwordInputText = ""
                         var passkey = passwordInputText.text.valueOf()
                         console.log("Validating", passkey)
-                        System.showKeyboard = false
 
                         console.log("Passkey is", passkey)
                         request(wifiAPIpath + 'security?passkey=' + passkey,
@@ -368,8 +365,6 @@ SettingPage {
                         passwordInputText.visible = false
                         connectButton.visible = true
 
-                        keyboard.currentString = ""
-
                         periodicRefresh.start()
                     }
                 }
@@ -386,7 +381,8 @@ SettingPage {
 
                 width: connectButton.width
                 visible: false
-                text: keyboard.currentString
+                text: "password"
+                /*hardcore until virtual keyboard works*/
             }
         }
     }