diff --git a/client/ui/qml/Pages/PageServerContainers.qml b/client/ui/qml/Pages/PageServerContainers.qml index 4b8383e6..86363698 100644 --- a/client/ui/qml/Pages/PageServerContainers.qml +++ b/client/ui/qml/Pages/PageServerContainers.qml @@ -297,23 +297,24 @@ PageBase { implicitHeight: 30 checked: default_role - - MessageDialog { - id: dialogRemove - buttons: StandardButton.Yes | StandardButton.Cancel - title: "AmneziaVPN" - text: qsTr("Remove container") + " " + name_role + "?" + "\n" + qsTr("This action will erase all data of this container on the server.") - onAccepted: { - tb_c.currentIndex = -1 - ServerContainersLogic.onPushButtonRemoveClicked(proxyContainersModel.mapToSource(index)) - } - } - - onClicked: dialogRemove.open() + onClicked: popupRemove.open() VisibleBehavior on visible { } } + PopupWithQuestion { + id: popupRemove + questionText: qsTr("Remove container") + " " + name_role + "?" + "\n" + qsTr("This action will erase all data of this container on the server.") + yesFunc: function() { + tb_c.currentIndex = -1 + ServerContainersLogic.onPushButtonRemoveClicked(proxyContainersModel.mapToSource(index)) + close() + } + noFunc: function() { + close() + } + } + ImageButtonType { id: button_share visible: (index === tb_c.currentIndex) && ServerContainersLogic.isManagedServer @@ -418,7 +419,7 @@ PageBase { BlueButtonType { id: pb_add_container - visible: container_selector.selectedIndex < 0 + visible: container_selector.selectedIndex < 0 && ServerContainersLogic.isManagedServer anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom @@ -430,6 +431,5 @@ PageBase { text: qsTr("Install new service") font.pixelSize: 16 onClicked: container_selector.visible ? container_selector.close() : container_selector.open() - } } diff --git a/client/ui/qml/Pages/Protocols/PageProtoCloak.qml b/client/ui/qml/Pages/Protocols/PageProtoCloak.qml index 86a2584a..bbccbad3 100644 --- a/client/ui/qml/Pages/Protocols/PageProtoCloak.qml +++ b/client/ui/qml/Pages/Protocols/PageProtoCloak.qml @@ -11,10 +11,9 @@ PageProtocolBase { protocol: ProtocolEnum.Cloak logic: UiLogic.protocolLogic(protocol) - enabled: logic.pageEnabled BackButton { id: back - enabled: logic.pageEnabled + enabled: !logic.pushButtonCancelVisible } Caption { diff --git a/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml b/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml index a0779d1c..590501d5 100644 --- a/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml +++ b/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml @@ -13,7 +13,7 @@ PageProtocolBase { BackButton { id: back - enabled: logic.pageEnabled + enabled: !logic.pushButtonCancelVisible } Caption { @@ -285,8 +285,6 @@ PageProtocolBase { } } } - - } BasicButtonType { @@ -338,8 +336,6 @@ PageProtocolBase { } } } - - } LabelType { diff --git a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml index 4d627fe2..160c3ef6 100644 --- a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml +++ b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml @@ -13,7 +13,7 @@ PageProtocolBase { BackButton { id: back - enabled: logic.pageEnabled + enabled: !logic.pushButtonCancelVisible } Caption { diff --git a/client/ui/qml/main.qml b/client/ui/qml/main.qml index 7f631f96..10552c11 100644 --- a/client/ui/qml/main.qml +++ b/client/ui/qml/main.qml @@ -232,18 +232,6 @@ Window { } } - MessageDialog { - id: closePrompt -// x: (root.width - width) / 2 -// y: (root.height - height) / 2 - title: qsTr("Exit") - text: qsTr("Do you really want to quit?") -// standardButtons: StandardButton.Yes | StandardButton.No -// onYesClicked: { -// Qt.quit() -// } - visible: false - } MessageDialog { id: publicKeyWarning title: "AmneziaVPN"