Merge pull request #8 from amnezia-vpn/chore/minor-ui-fixes
chore: minor ui fixes
This commit is contained in:
commit
a1f04f5f0c
7 changed files with 14 additions and 52 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ namespace PageLoader
|
||||||
PageAbout,
|
PageAbout,
|
||||||
|
|
||||||
PageSettingsServersList,
|
PageSettingsServersList,
|
||||||
PageCountrySelector,
|
|
||||||
PageSettings,
|
PageSettings,
|
||||||
PageSettingsServerData,
|
PageSettingsServerData,
|
||||||
PageSettingsServerInfo,
|
PageSettingsServerInfo,
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ Page {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ServersModel.setProcessedServerIndex(ServersModel.defaultIndex)
|
ServersModel.setProcessedServerIndex(ServersModel.defaultIndex)
|
||||||
PageController.goToPage(PageEnum.PageCountrySelector)
|
PageController.goToPage(PageEnum.PageSettingsApiAvailableCountries)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue