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