added prohibition of using "dangerous" options on the server management page, when the connection is active (#726)

This commit is contained in:
Nethius 2024-04-07 01:42:41 +07:00 committed by GitHub
parent 10ea9b418a
commit a22c08a41d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 52 additions and 23 deletions

View file

@ -68,8 +68,14 @@ PageType {
var noButtonText = qsTr("Cancel")
var yesButtonFunction = function() {
PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeProcessedContainer()
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected
&& SettingsController.isAmneziaDnsEnabled()) {
PageController.showNotificationMessage(qsTr("Cannot remove Amnezia DNS from running server"))
} else
{
PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeProcessedContainer()
}
}
var noButtonFunction = function() {
}