disabled the ability to change the protocol/server when a vpn connection is active
This commit is contained in:
parent
e01b1db706
commit
9eb23e38bd
5 changed files with 41 additions and 23 deletions
|
|
@ -119,13 +119,17 @@
|
||||||
<name>HomeContainersListView</name>
|
<name>HomeContainersListView</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="58"/>
|
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="58"/>
|
||||||
|
<source>Unable change protocol while there is an active connection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="69"/>
|
||||||
<source>The selected protocol is not supported on the current platform</source>
|
<source>The selected protocol is not supported on the current platform</source>
|
||||||
<translation>Выбранный протокол не поддерживается на данном устройстве</translation>
|
<translation>Выбранный протокол не поддерживается на данном устройстве</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="76"/>
|
|
||||||
<source>Reconnect via VPN Procotol: </source>
|
<source>Reconnect via VPN Procotol: </source>
|
||||||
<translation>Переподключение через VPN протокол: </translation>
|
<translation type="vanished">Переподключение через VPN протокол: </translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
@ -267,6 +271,11 @@ Already installed containers were found on the server. All installed containers
|
||||||
<source>Servers</source>
|
<source>Servers</source>
|
||||||
<translation>Серверы</translation>
|
<translation>Серверы</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/qml/Pages2/PageHome.qml" line="480"/>
|
||||||
|
<source>Unable change server while there is an active connection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PageProtocolAwgSettings</name>
|
<name>PageProtocolAwgSettings</name>
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,17 @@
|
||||||
<name>HomeContainersListView</name>
|
<name>HomeContainersListView</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="58"/>
|
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="58"/>
|
||||||
|
<source>Unable change protocol while there is an active connection</source>
|
||||||
|
<translation>Невозможно изменить протокол при наличии активного соединения</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="69"/>
|
||||||
<source>The selected protocol is not supported on the current platform</source>
|
<source>The selected protocol is not supported on the current platform</source>
|
||||||
<translation>当前平台不支持所选协议</translation>
|
<translation>当前平台不支持所选协议</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/qml/Components/HomeContainersListView.qml" line="76"/>
|
|
||||||
<source>Reconnect via VPN Procotol: </source>
|
<source>Reconnect via VPN Procotol: </source>
|
||||||
<translation>重连VPN基于协议: </translation>
|
<translation type="vanished">重连VPN基于协议: </translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
@ -301,6 +305,11 @@ Already installed containers were found on the server. All installed containers
|
||||||
<source>Servers</source>
|
<source>Servers</source>
|
||||||
<translation>服务器</translation>
|
<translation>服务器</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/qml/Pages2/PageHome.qml" line="480"/>
|
||||||
|
<source>Unable change server while there is an active connection</source>
|
||||||
|
<translation>Невозможно изменить сервер при наличии активного соединения</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PageProtocolAwgSettings</name>
|
<name>PageProtocolAwgSettings</name>
|
||||||
|
|
|
||||||
|
|
@ -50,34 +50,26 @@ ListView {
|
||||||
imageSource: "qrc:/images/controls/download.svg"
|
imageSource: "qrc:/images/controls/download.svg"
|
||||||
showImage: !isInstalled
|
showImage: !isInstalled
|
||||||
|
|
||||||
checkable: isInstalled
|
checkable: isInstalled && !ConnectionController.isConnected && isSupported
|
||||||
checked: isDefault
|
checked: isDefault
|
||||||
|
|
||||||
onPressed: function(mouse) {
|
|
||||||
if (!isSupported) {
|
|
||||||
PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (ConnectionController.isConnected && isInstalled) {
|
||||||
var needReconnected = false
|
PageController.showNotificationMessage(qsTr("Unable change protocol while there is an active connection"))
|
||||||
if (!isDefault) {
|
return
|
||||||
needReconnected = true
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (checked) {
|
||||||
isDefault = true
|
isDefault = true
|
||||||
|
|
||||||
menuContent.currentIndex = index
|
menuContent.currentIndex = index
|
||||||
containersDropDown.menuVisible = false
|
containersDropDown.menuVisible = false
|
||||||
|
|
||||||
|
|
||||||
if (needReconnected && (ConnectionController.isConnected || ConnectionController.isConnectionInProgress)) {
|
|
||||||
PageController.showNotificationMessage(qsTr("Reconnect via VPN Procotol: ") + name)
|
|
||||||
PageController.goToPageHome()
|
|
||||||
ConnectionController.openConnection()
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
if (!isSupported && isInstalled) {
|
||||||
|
PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
||||||
InstallController.setShouldCreateServer(false)
|
InstallController.setShouldCreateServer(false)
|
||||||
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ RadioButton {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: root.headerText
|
text: root.headerText
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
color: "#D7D8DB"
|
color: "#D7D8DB"
|
||||||
font.pixelSize: 25
|
font.pixelSize: 25
|
||||||
font.weight: 700
|
font.weight: 700
|
||||||
|
|
@ -110,6 +111,7 @@ RadioButton {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: root.footerText
|
text: root.footerText
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
visible: root.footerText !== ""
|
visible: root.footerText !== ""
|
||||||
color: "#878B91"
|
color: "#878B91"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
|
|
|
||||||
|
|
@ -471,10 +471,16 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
checked: index === serversMenuContent.currentIndex
|
checked: index === serversMenuContent.currentIndex
|
||||||
|
checkable: !ConnectionController.isConnected
|
||||||
|
|
||||||
ButtonGroup.group: serversRadioButtonGroup
|
ButtonGroup.group: serversRadioButtonGroup
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (ConnectionController.isConnected) {
|
||||||
|
PageController.showNotificationMessage(qsTr("Unable change server while there is an active connection"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
serversMenuContent.currentIndex = index
|
serversMenuContent.currentIndex = index
|
||||||
|
|
||||||
ServersModel.currentlyProcessedIndex = index
|
ServersModel.currentlyProcessedIndex = index
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue