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

@ -169,8 +169,13 @@ PageType {
var noButtonText = qsTr("Cancel")
var yesButtonFunction = function() {
SettingsController.clearSettings()
PageController.replaceStartPage()
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
PageController.showNotificationMessage(qsTr("Cannot reset settings during active connection"))
} else
{
SettingsController.clearSettings()
PageController.replaceStartPage()
}
}
var noButtonFunction = function() {
}