update: check that current config is active

This commit is contained in:
MrMirDan
2026-02-12 12:45:37 +02:00
parent 7963c2f6bf
commit 573476499e

View File

@@ -859,7 +859,11 @@ PageType {
var noButtonFunction = function() {
}
if (ConnectionController.isConnectionInProgress()) {
var isActiveConfigForCurrentClient = ServersModel.isDefaultServerCurrentlyProcessed()
&& ServersModel.getDefaultServerData("defaultContainer") === ContainersModel.getProcessedContainerIndex()
if ((ConnectionController.isConnectionInProgress || ConnectionController.isConnected)
&& isActiveConfigForCurrentClient) {
PageController.showNotificationMessage("Disconnect from VPN to revoke this config")
} else {
showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)