added PageSetupWizardViewConfig
- added a popup with a question when deleting containers/servers - added import from code and import error handling
This commit is contained in:
parent
de0cd976de
commit
420c33d3ba
37 changed files with 701 additions and 312 deletions
|
|
@ -9,6 +9,7 @@ import ProtocolEnum 1.0
|
|||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Components"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
|
@ -33,7 +34,19 @@ PageType {
|
|||
descriptionText: "May be needed when changing other settings"
|
||||
|
||||
clickedFunction: function() {
|
||||
ContainersModel.clearCachedProfiles()
|
||||
questionDrawer.headerText = qsTr("Clear cached profiles?")
|
||||
questionDrawer.descriptionText = qsTr("some description")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
ContainersModel.clearCachedProfiles()
|
||||
}
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -46,15 +59,27 @@ PageType {
|
|||
textColor: "#EB5757"
|
||||
|
||||
clickedFunction: function() {
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed && ConnectionController.isConnected()) {
|
||||
ConnectionController.closeVpnConnection()
|
||||
questionDrawer.headerText = qsTr("Remove server?")
|
||||
questionDrawer.descriptionText = qsTr("All installed AmneziaVPN services will still remain on the server.")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed && ConnectionController.isConnected) {
|
||||
ConnectionController.closeConnection()
|
||||
}
|
||||
ServersModel.removeServer()
|
||||
if (!ServersModel.getServersCount()) {
|
||||
PageController.replaceStartPage()
|
||||
} else {
|
||||
goToStartPage()
|
||||
}
|
||||
}
|
||||
ServersModel.removeServer()
|
||||
if (!ServersModel.getServersCount()) {
|
||||
PageController.replaceStartPage()
|
||||
} else {
|
||||
goToStartPage()
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,14 +92,32 @@ PageType {
|
|||
textColor: "#EB5757"
|
||||
|
||||
clickedFunction: function() {
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed && ConnectionController.isConnected()) {
|
||||
ConnectionController.closeVpnConnection()
|
||||
questionDrawer.headerText = qsTr("Clear server from Amnezia software?")
|
||||
questionDrawer.descriptionText = qsTr(" All containers will be deleted on the server. This means that configuration files, keys and certificates will be deleted.")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
goToPage(PageEnum.PageDeinstalling)
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed && ConnectionController.isConnected) {
|
||||
ConnectionController.closeVpnConnection()
|
||||
}
|
||||
ContainersModel.removeAllContainers()
|
||||
closePage()
|
||||
}
|
||||
ContainersModel.removeAllContainers()
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
|
||||
QuestionDrawer {
|
||||
id: questionDrawer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue