summaryrefslogtreecommitdiff
path: root/gui/qml/BridgesItem.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-05-31 01:49:43 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-06-01 12:34:03 +0200
commit00be891d3b0cb401e642a5331aedcc399641b8ef (patch)
tree19303b892d9bcae3f30cf6dae68af7f7324c1481 /gui/qml/BridgesItem.qml
parent1bd2637e3133d895d1e73931f8b3466a5761d9ef (diff)
[refactor] unclutter main qml
Diffstat (limited to 'gui/qml/BridgesItem.qml')
-rw-r--r--gui/qml/BridgesItem.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/gui/qml/BridgesItem.qml b/gui/qml/BridgesItem.qml
new file mode 100644
index 0000000..1cf152c
--- /dev/null
+++ b/gui/qml/BridgesItem.qml
@@ -0,0 +1,58 @@
+import QtQuick 2.9
+import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.4
+
+import "logic.js" as Logic
+
+Item {
+
+ anchors.centerIn: parent
+ width: parent.width
+ property alias displayReconnect: bridgeReconnect.visible
+
+ Column {
+
+ anchors.centerIn: parent
+ spacing: 10
+ width: parent.width
+
+ CheckBox {
+ id: bridgeCheck
+ checked: false
+ text: qsTr("Use obfs4 bridges")
+ font.pixelSize: 14
+ anchors.horizontalCenter: parent.horizontalCenter
+ onClicked: {
+ if (checked) {
+ Logic.setNeedsReconnect(true);
+ bridgeReconnect.visible = true;
+ } else {
+ // This would also need a "needs reconnect" for de-selecting bridges the next time.
+ // better to wait and see the new connection widgets though
+ Logic.setNeedsReconnect(false);
+ bridgeReconnect.visible = false;
+ }
+ }
+ }
+
+ Text {
+ id: bridgesInfo
+ width: 250
+ color: "grey"
+ text: qsTr("Select a bridge only if you know that you need it to evade censorship in your country or local network.")
+ anchors.horizontalCenter: parent.horizontalCenter
+ wrapMode: Text.WordWrap
+ }
+
+ Text {
+ id: bridgeReconnect
+ width: 250
+ font.pixelSize: 12
+ color: "red"
+ text: qsTr("We will attempt to connect to a bridge the next time you connect to the VPN.")
+ anchors.horizontalCenter: parent.horizontalCenter
+ wrapMode: Text.WordWrap
+ visible: false;
+ }
+ }
+}