Merge pull request #583 from amnezia-vpn/bugfix/double_clear_server_from_amnezia

fixed bug with double button clear server from amnezia software
This commit is contained in:
pokamest 2024-02-13 07:50:35 -08:00 committed by GitHub
commit b27442cf74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -227,38 +227,6 @@ PageType {
visible: content.isServerWithWriteAccess
}
LabelWithButtonType {
visible: content.isServerWithWriteAccess
Layout.fillWidth: true
text: qsTr("Clear server from Amnezia software")
textColor: "#EB5757"
clickedFunction: function() {
questionDrawer.headerText = qsTr("Do you want to 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
PageController.goToPage(PageEnum.PageDeinstalling)
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
ConnectionController.closeConnection()
}
InstallController.removeAllContainers()
}
questionDrawer.noButtonFunction = function() {
questionDrawer.visible = false
}
questionDrawer.visible = true
}
}
DividerType {
visible: content.isServerWithWriteAccess
}
LabelWithButtonType {
visible: ServersModel.isCurrentlyProcessedServerFromApi()
Layout.fillWidth: true