diff --git a/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml b/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml index f9f4a4dc..40d8803a 100644 --- a/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml @@ -41,7 +41,7 @@ PageType { anchors.left: parent.left anchors.right: parent.right - enabled: ServersModel.isCurrentlyProcessedServerHasWriteAccess() + enabled: ServersModel.isProcessedServerHasWriteAccess() ListView { id: listview @@ -126,21 +126,20 @@ PageType { text: qsTr("Remove WG") - onClicked: { - questionDrawer.headerText = qsTr("Remove WG from server?") - questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it.") - questionDrawer.yesButtonText = qsTr("Continue") - questionDrawer.noButtonText = qsTr("Cancel") + clickedFunc: function() { + var headerText = qsTr("Remove WG from server?") + var descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it.") + var yesButtonText = qsTr("Continue") + var noButtonText = qsTr("Cancel") - questionDrawer.yesButtonFunction = function() { - questionDrawer.visible = false + var yesButtonFunction = function() { PageController.goToPage(PageEnum.PageDeinstalling) InstallController.removeCurrentlyProcessedContainer() } - questionDrawer.noButtonFunction = function() { - questionDrawer.visible = false + var noButtonFunction = function() { } - questionDrawer.visible = true + + showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) } } diff --git a/client/ui/qml/Pages2/PageProtocolXraySettings.qml b/client/ui/qml/Pages2/PageProtocolXraySettings.qml index 05b958ac..588a7f8b 100644 --- a/client/ui/qml/Pages2/PageProtocolXraySettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXraySettings.qml @@ -42,7 +42,7 @@ PageType { anchors.left: parent.left anchors.right: parent.right - enabled: ServersModel.isCurrentlyProcessedServerHasWriteAccess() + enabled: ServersModel.isProcessedServerHasWriteAccess() ListView { id: listview @@ -112,21 +112,20 @@ PageType { text: qsTr("Remove XRay") - onClicked: { - questionDrawer.headerText = qsTr("Remove XRay from server?") - questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it.") - questionDrawer.yesButtonText = qsTr("Continue") - questionDrawer.noButtonText = qsTr("Cancel") + clickedFunc: function() { + var headerText = qsTr("Remove XRay from server?") + var descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it.") + var yesButtonText = qsTr("Continue") + var noButtonText = qsTr("Cancel") - questionDrawer.yesButtonFunction = function() { - questionDrawer.visible = false + var yesButtonFunction = function() { PageController.goToPage(PageEnum.PageDeinstalling) InstallController.removeCurrentlyProcessedContainer() } - questionDrawer.noButtonFunction = function() { - questionDrawer.visible = false + var noButtonFunction = function() { } - questionDrawer.visible = true + + showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) } }