From 46d3ed76e31441023e731ce793bd5050ac1b2844 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Wed, 16 Apr 2025 22:39:06 +0800 Subject: [PATCH] chore: minor ui fixes --- client/resources.qrc | 2 +- client/ui/controllers/pageController.h | 1 - .../Components/ConfirmationDialog.qml | 16 ++++---- client/ui/qml/DefaultVpn/Pages/PageAbout.qml | 4 +- client/ui/qml/DefaultVpn/Pages/PageHome.qml | 2 +- ... => PageSettingsApiAvailableCountries.qml} | 0 .../Pages/PageSettingsApiServerInfo.qml | 41 +------------------ 7 files changed, 14 insertions(+), 52 deletions(-) rename client/ui/qml/DefaultVpn/Pages/{PageCountrySelector.qml => PageSettingsApiAvailableCountries.qml} (100%) diff --git a/client/resources.qrc b/client/resources.qrc index a0f99685..1da08178 100644 --- a/client/resources.qrc +++ b/client/resources.qrc @@ -245,7 +245,7 @@ ui/qml/DefaultVpn/Controls/TextTypes/XSmallTextType.qml ui/qml/DefaultVpn/Controls/ButtonType.qml ui/qml/DefaultVpn/Pages/PageSettingsServersList.qml - ui/qml/DefaultVpn/Pages/PageCountrySelector.qml + ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml ui/qml/DefaultVpn/Controls/TextTypes/Header1TextType.qml ui/qml/DefaultVpn/Controls/TextTypes/Header3TextType.qml diff --git a/client/ui/controllers/pageController.h b/client/ui/controllers/pageController.h index cfa1b4dc..7fc2ad44 100644 --- a/client/ui/controllers/pageController.h +++ b/client/ui/controllers/pageController.h @@ -18,7 +18,6 @@ namespace PageLoader PageAbout, PageSettingsServersList, - PageCountrySelector, PageSettings, PageSettingsServerData, PageSettingsServerInfo, diff --git a/client/ui/qml/DefaultVpn/Components/ConfirmationDialog.qml b/client/ui/qml/DefaultVpn/Components/ConfirmationDialog.qml index 8ed0db42..731d1d67 100644 --- a/client/ui/qml/DefaultVpn/Components/ConfirmationDialog.qml +++ b/client/ui/qml/DefaultVpn/Components/ConfirmationDialog.qml @@ -64,21 +64,21 @@ Popup { BlueButtonNoBorder { Layout.fillWidth: true - text: root.cancelButtonText + text: root.confirmButtonText onClicked: { - if (root.onCancel) { - root.onCancel() + if (root.onConfirm) { + root.onConfirm() } root.close() } } - WhiteButtonWithBorder { + WhiteButtonNoBorder { Layout.fillWidth: true - text: root.confirmButtonText + text: root.cancelButtonText onClicked: { - if (root.onConfirm) { - root.onConfirm() + if (root.onCancel) { + root.onCancel() } root.close() } @@ -106,4 +106,4 @@ Popup { color: Style.color.transparentWhite } } -} \ No newline at end of file +} diff --git a/client/ui/qml/DefaultVpn/Pages/PageAbout.qml b/client/ui/qml/DefaultVpn/Pages/PageAbout.qml index 35d4db2e..472abb37 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageAbout.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageAbout.qml @@ -117,7 +117,7 @@ Page { MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: Qt.openUrlExternally("https://dfvpn.com/policy") + onClicked: Qt.openUrlExternally("https://dfvpn.com/privacy") } } @@ -129,4 +129,4 @@ Page { color: Style.color.gray7 } } -} \ No newline at end of file +} diff --git a/client/ui/qml/DefaultVpn/Pages/PageHome.qml b/client/ui/qml/DefaultVpn/Pages/PageHome.qml index b0cf1ce6..2310feab 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageHome.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageHome.qml @@ -95,7 +95,7 @@ Page { return } ServersModel.setProcessedServerIndex(ServersModel.defaultIndex) - PageController.goToPage(PageEnum.PageCountrySelector) + PageController.goToPage(PageEnum.PageSettingsApiAvailableCountries) } } diff --git a/client/ui/qml/DefaultVpn/Pages/PageCountrySelector.qml b/client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml similarity index 100% rename from client/ui/qml/DefaultVpn/Pages/PageCountrySelector.qml rename to client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml diff --git a/client/ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml b/client/ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml index 94809fd4..01e33c73 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml @@ -14,31 +14,6 @@ import "../Controls/TextTypes" Page { id: root - Component.onCompleted: checkSubscriptionStatus() - - // This timer is used to delay the opening of the expired subscription dialog - // to avoid conflicts of blur effect with transition to the page animation - Timer { - id: subscriptionDialogTimer - interval: 280 - repeat: false - onTriggered: expiredSubscriptionDialog.open() - } - - Connections { - target: ApiAccountInfoModel - function onModelReset() { - checkSubscriptionStatus() - } - } - - function checkSubscriptionStatus() { - const status = ApiAccountInfoModel.data("subscriptionStatus") - if (status === "expired") { - subscriptionDialogTimer.start() - } - } - ColumnLayout { anchors.fill: parent spacing: 0 @@ -98,7 +73,7 @@ Page { Layout.topMargin: 24 Layout.fillWidth: true - text: qsTr("Reset API configuration") + text: qsTr("Reload API configuration") onClicked: { if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) { @@ -164,16 +139,4 @@ Page { PageController.showBusyIndicator(false) } } - - ConfirmationDialog { - id: expiredSubscriptionDialog - title: qsTr("Amnezia Premium subscription has expired") - description: qsTr("Order a new subscription") - confirmButtonText: qsTr("Go to order") - cancelButtonText: qsTr("Close") - - onConfirm: function() { - Qt.openUrlExternally("https://storage.googleapis.com/kldscp/vpnpay.io/ru/amnezia-premium") - } - } -} \ No newline at end of file +}