chore: minor ui fixes

This commit is contained in:
vladimir.kuznetsov 2025-04-16 22:39:06 +08:00
parent 7a1bcfac90
commit 46d3ed76e3
7 changed files with 14 additions and 52 deletions

View file

@ -245,7 +245,7 @@
<file>ui/qml/DefaultVpn/Controls/TextTypes/XSmallTextType.qml</file> <file>ui/qml/DefaultVpn/Controls/TextTypes/XSmallTextType.qml</file>
<file>ui/qml/DefaultVpn/Controls/ButtonType.qml</file> <file>ui/qml/DefaultVpn/Controls/ButtonType.qml</file>
<file>ui/qml/DefaultVpn/Pages/PageSettingsServersList.qml</file> <file>ui/qml/DefaultVpn/Pages/PageSettingsServersList.qml</file>
<file>ui/qml/DefaultVpn/Pages/PageCountrySelector.qml</file> <file>ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml</file>
<file>ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml</file> <file>ui/qml/DefaultVpn/Pages/PageSettingsApiServerInfo.qml</file>
<file>ui/qml/DefaultVpn/Controls/TextTypes/Header1TextType.qml</file> <file>ui/qml/DefaultVpn/Controls/TextTypes/Header1TextType.qml</file>
<file>ui/qml/DefaultVpn/Controls/TextTypes/Header3TextType.qml</file> <file>ui/qml/DefaultVpn/Controls/TextTypes/Header3TextType.qml</file>

View file

@ -18,7 +18,6 @@ namespace PageLoader
PageAbout, PageAbout,
PageSettingsServersList, PageSettingsServersList,
PageCountrySelector,
PageSettings, PageSettings,
PageSettingsServerData, PageSettingsServerData,
PageSettingsServerInfo, PageSettingsServerInfo,

View file

@ -64,21 +64,21 @@ Popup {
BlueButtonNoBorder { BlueButtonNoBorder {
Layout.fillWidth: true Layout.fillWidth: true
text: root.cancelButtonText text: root.confirmButtonText
onClicked: { onClicked: {
if (root.onCancel) { if (root.onConfirm) {
root.onCancel() root.onConfirm()
} }
root.close() root.close()
} }
} }
WhiteButtonWithBorder { WhiteButtonNoBorder {
Layout.fillWidth: true Layout.fillWidth: true
text: root.confirmButtonText text: root.cancelButtonText
onClicked: { onClicked: {
if (root.onConfirm) { if (root.onCancel) {
root.onConfirm() root.onCancel()
} }
root.close() root.close()
} }
@ -106,4 +106,4 @@ Popup {
color: Style.color.transparentWhite color: Style.color.transparentWhite
} }
} }
} }

View file

@ -117,7 +117,7 @@ Page {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor 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 color: Style.color.gray7
} }
} }
} }

View file

@ -95,7 +95,7 @@ Page {
return return
} }
ServersModel.setProcessedServerIndex(ServersModel.defaultIndex) ServersModel.setProcessedServerIndex(ServersModel.defaultIndex)
PageController.goToPage(PageEnum.PageCountrySelector) PageController.goToPage(PageEnum.PageSettingsApiAvailableCountries)
} }
} }

View file

@ -14,31 +14,6 @@ import "../Controls/TextTypes"
Page { Page {
id: root 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 { ColumnLayout {
anchors.fill: parent anchors.fill: parent
spacing: 0 spacing: 0
@ -98,7 +73,7 @@ Page {
Layout.topMargin: 24 Layout.topMargin: 24
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Reset API configuration") text: qsTr("Reload API configuration")
onClicked: { onClicked: {
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) { if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
@ -164,16 +139,4 @@ Page {
PageController.showBusyIndicator(false) 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")
}
}
}