summaryrefslogtreecommitdiff
path: root/gui/qml/VpnState.qml
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2021-03-26 15:48:58 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-05-04 14:58:39 +0200
commit67a68be2290b3af6e7d2897e52b3cd19d1f4450d (patch)
tree60f477042a7764186e39db51f13a0733afd9bffd /gui/qml/VpnState.qml
parent4e1f3a4f88136e497962e4f976d5c7f216c31a15 (diff)
Location selection more responsive
Diffstat (limited to 'gui/qml/VpnState.qml')
-rw-r--r--gui/qml/VpnState.qml41
1 files changed, 38 insertions, 3 deletions
diff --git a/gui/qml/VpnState.qml b/gui/qml/VpnState.qml
index 886868f..7ec6695 100644
--- a/gui/qml/VpnState.qml
+++ b/gui/qml/VpnState.qml
@@ -25,6 +25,10 @@ StateGroup {
text: toHuman("off")
}
PropertyChanges {
+ target: autoSelectionItem
+ text: qsTr("Best")
+ }
+ PropertyChanges {
target: mainStatus
text: toHuman("off")
}
@@ -46,7 +50,18 @@ StateGroup {
}
PropertyChanges {
target: statusItem
- text: toHumanWithLocation("on")
+ text: toHuman("on")
+ }
+ PropertyChanges {
+ target: autoSelectionItem
+ text: {
+ if (autoSelectionButton.checked) {
+ //: %1 -> location to which the client is connected to
+ qsTr("Best (%1)").arg(locationStr())
+ } else {
+ qsTr("Best")
+ }
+ }
}
PropertyChanges {
target: mainStatus
@@ -54,7 +69,8 @@ StateGroup {
}
PropertyChanges {
target: mainCurrentGateway
- text: qsTr("Connected to ") + ctx.currentLocation
+ //: %1 -> location to which the client is connected to
+ text: qsTr("Connected to %1").arg(locationStr())
}
},
State {
@@ -66,7 +82,18 @@ StateGroup {
}
PropertyChanges {
target: statusItem
- text: toHumanWithLocation("connecting")
+ text: toHuman("connecting")
+ }
+ PropertyChanges {
+ target: autoSelectionItem
+ text: {
+ if (autoSelectionButton.checked) {
+ //: %1 -> location to which the client is connected to
+ qsTr("Best (%1)").arg(locationStr())
+ } else {
+ qsTr("Best")
+ }
+ }
}
PropertyChanges {
target: mainStatus
@@ -89,6 +116,10 @@ StateGroup {
text: toHuman("stopping")
}
PropertyChanges {
+ target: autoSelectionItem
+ text: qsTr("Best")
+ }
+ PropertyChanges {
target: mainStatus
text: toHuman("stopping")
}
@@ -109,6 +140,10 @@ StateGroup {
text: toHuman("failed")
}
PropertyChanges {
+ target: autoSelectionItem
+ text: qsTr("Best")
+ }
+ PropertyChanges {
target: mainStatus
text: toHuman("failed")
}