X-Git-Url: https://www.flypig.org.uk/git/?a=blobdiff_plain;f=qml%2Fpages%2FConfigurePage.qml;h=1692d1e3d98d83ac2cdcefb1bbefa790c5764258;hb=ee3968ffa08d4e0fcbad87765efa3aeb32ff0554;hp=f02f3355f8a5652c56d21b4811e436b11a9c50d1;hpb=47f1326595263559a34d5db5e580fb2d1676e408;p=openvpnui.git diff --git a/qml/pages/ConfigurePage.qml b/qml/pages/ConfigurePage.qml index f02f335..1692d1e 100644 --- a/qml/pages/ConfigurePage.qml +++ b/qml/pages/ConfigurePage.qml @@ -35,12 +35,15 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 - Dialog { id: configurePage canAccept: true acceptDestinationAction: PageStackAction.Pop + Connections { + target:VpnControl + } + SilicaFlickable { // ComboBox requires a flickable ancestor width: parent.width @@ -64,6 +67,7 @@ Dialog { TextField { id: configureAddress width: parent.width + text: VpnControl.server label: "Server address" placeholderText: "Server address" focus: true @@ -73,6 +77,7 @@ Dialog { TextField { id: configurePort width: parent.width + text: VpnControl.port; inputMethodHints: Qt.ImhFormattedNumbersOnly label: "Port number" placeholderText: "Port number" @@ -82,22 +87,26 @@ Dialog { TextSwitch { id: configureCompression text: "Use Compression" + checked: VpnControl.compressed + automaticCheck: true } TextSwitch { id: configureTLS text: "Use TLS authentication" + checked: VpnControl.useTLS onCheckedChanged: { configureTLSdirection.enabled = checked configureTLSinfo.visible = checked } + automaticCheck: true } // set currentIndex to change the selected value ComboBox { id: configureTLSdirection width: parent.width label: "TLS direction" - currentIndex: 1 + currentIndex: VpnControl.tlsDirection; enabled: false menu: ContextMenu { @@ -106,6 +115,13 @@ Dialog { } } + Button { + id: connect + text: "Select key" + enabled: true + onClicked: VpnControl.vpnConnect() + } + Label { text: "Place key files on SD card:" color: Theme.secondaryColor @@ -143,6 +159,12 @@ Dialog { } onAccepted: { + VpnControl.setServer(configureAddress.text) + VpnControl.setPort(configurePort.text) + VpnControl.setCompressed(configureCompression.checked) + VpnControl.setUseTLS(configureTLS.checked) + VpnControl.setTlsDirection(configureTLSdirection.currentIndex) + VpnControl.updateConfiguration() } }