From 67a68be2290b3af6e7d2897e52b3cd19d1f4450d Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 26 Mar 2021 15:48:58 +0100 Subject: Location selection more responsive --- gui/qml/VpnState.qml | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'gui/qml/VpnState.qml') 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 @@ -24,6 +24,10 @@ StateGroup { target: statusItem 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 @@ -88,6 +115,10 @@ StateGroup { target: statusItem text: toHuman("stopping") } + PropertyChanges { + target: autoSelectionItem + text: qsTr("Best") + } PropertyChanges { target: mainStatus text: toHuman("stopping") @@ -108,6 +139,10 @@ StateGroup { target: statusItem text: toHuman("failed") } + PropertyChanges { + target: autoSelectionItem + text: qsTr("Best") + } PropertyChanges { target: mainStatus text: toHuman("failed") -- cgit v1.2.3