mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
moved protocol config generation to VpnConfigirationsController (#665)
Moved protocol config generation to VpnConfigurationsController
This commit is contained in:
@@ -17,16 +17,16 @@ Button {
|
||||
implicitWidth: 190
|
||||
implicitHeight: 190
|
||||
|
||||
text: ConnectionController.connectionStateText
|
||||
|
||||
Connections {
|
||||
target: ConnectionController
|
||||
|
||||
function onConnectionErrorOccurred(errorMessage) {
|
||||
PageController.showErrorMessage(errorMessage)
|
||||
function onPreparingConfig() {
|
||||
PageController.showNotificationMessage(qsTr("Unable to disconnect during configuration preparation"))
|
||||
}
|
||||
}
|
||||
|
||||
text: ConnectionController.connectionStateText
|
||||
|
||||
// enabled: !ConnectionController.isConnectionInProgress
|
||||
|
||||
background: Item {
|
||||
@@ -139,6 +139,6 @@ Button {
|
||||
|
||||
onClicked: {
|
||||
ServersModel.setProcessedServerIndex(ServersModel.defaultIndex)
|
||||
ApiController.updateServerConfigFromApi()
|
||||
ConnectionController.connectButtonClicked()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ ListView {
|
||||
return
|
||||
}
|
||||
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyDefaultServerContainersModel.mapToSource(index))
|
||||
ContainersModel.setProcessedContainerIndex(proxyDefaultServerContainersModel.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
containersDropDown.close()
|
||||
|
||||
@@ -41,7 +41,7 @@ ListView {
|
||||
clickedFunction: function() {
|
||||
if (isInstalled) {
|
||||
var containerIndex = root.model.mapToSource(index)
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(containerIndex)
|
||||
ContainersModel.setProcessedContainerIndex(containerIndex)
|
||||
|
||||
if (serviceType !== ProtocolEnum.Other) {
|
||||
if (config[ContainerProps.containerTypeToString(containerIndex)]["isThirdPartyConfig"]) {
|
||||
@@ -52,27 +52,6 @@ ListView {
|
||||
}
|
||||
|
||||
switch (containerIndex) {
|
||||
case ContainerEnum.OpenVpn: {
|
||||
OpenVpnConfigModel.updateModel(config)
|
||||
PageController.goToPage(PageEnum.PageProtocolOpenVpnSettings)
|
||||
break
|
||||
}
|
||||
case ContainerEnum.Xray: {
|
||||
XrayConfigModel.updateModel(config)
|
||||
PageController.goToPage(PageEnum.PageProtocolXraySettings)
|
||||
break
|
||||
}
|
||||
|
||||
case ContainerEnum.WireGuard: {
|
||||
WireGuardConfigModel.updateModel(config)
|
||||
PageController.goToPage(PageEnum.PageProtocolWireGuardSettings)
|
||||
break
|
||||
}
|
||||
case ContainerEnum.Awg: {
|
||||
AwgConfigModel.updateModel(config)
|
||||
PageController.goToPage(PageEnum.PageProtocolAwgSettings)
|
||||
break
|
||||
}
|
||||
case ContainerEnum.Ipsec: {
|
||||
ProtocolsModel.updateModel(config)
|
||||
PageController.goToPage(PageEnum.PageProtocolRaw)
|
||||
@@ -98,7 +77,7 @@ ListView {
|
||||
}
|
||||
|
||||
} else {
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(root.model.mapToSource(index))
|
||||
ContainersModel.setProcessedContainerIndex(root.model.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user