mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
* feat: iap for apple now use storekit2 * fix: fixed error 101 on connection event * feat: enhance StoreKit2Helper to handle entitlements and improve restore service from App Store functionality * chore: add isInAppPurchase and isTestPurchase in primary config * refactor: use end_date from primary config for renew ui * fix: hide renew button for free * fix: hide renew button for appstore purchases * feat: add new premium info page * feat: add new free info page * chore: minor fixes * refactor: move plan and benefits into separate models * fix: fixed expired status when configs without an end date * feat: add trial api support * chore: add api message parsing for 422 error * feat: move privacy policy and term of use to gateway * feat: add iap support for new premium info page * chore: minor fixes * chore: minor fix * chore: minor fixes * feat: additional parsing for storekit subscription plans * chore: minor codestyle fixes * chore: simplify benefits * chore: hide extend buttons on external premium * feat: add trial error processing * fix: remove wrong check from tiral handler * chore: cleanup --------- Co-authored-by: spectrum <yyy@amnezia.org>
105 lines
2.8 KiB
QML
105 lines
2.8 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import PageEnum 1.0
|
|
import Style 1.0
|
|
|
|
import "../Controls2"
|
|
import "../Controls2/TextTypes"
|
|
|
|
DrawerType2 {
|
|
id: root
|
|
|
|
property bool isRenewalActionAvailable: false
|
|
|
|
onOpened: {
|
|
isRenewalActionAvailable = ApiAccountInfoModel.data("isSubscriptionRenewalAvailable")
|
|
&& !ApiAccountInfoModel.data("isInAppPurchase")
|
|
}
|
|
|
|
expandedStateContent: ColumnLayout {
|
|
id: content
|
|
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
spacing: 0
|
|
|
|
onImplicitHeightChanged: {
|
|
root.expandedHeight = content.implicitHeight + 32 + SettingsController.safeAreaBottomMargin
|
|
}
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 24
|
|
Layout.rightMargin: 16
|
|
Layout.leftMargin: 16
|
|
implicitHeight: titleText.implicitHeight
|
|
|
|
Header2TextType {
|
|
id: titleText
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
text: qsTr("Amnezia Premium subscription has expired")
|
|
horizontalAlignment: Text.AlignLeft
|
|
}
|
|
}
|
|
|
|
ParagraphTextType {
|
|
visible: root.isRenewalActionAvailable
|
|
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 8
|
|
Layout.rightMargin: 16
|
|
Layout.leftMargin: 16
|
|
|
|
text: qsTr("Renew your subscription to continue using VPN")
|
|
horizontalAlignment: Text.AlignLeft
|
|
}
|
|
|
|
BasicButtonType {
|
|
visible: root.isRenewalActionAvailable
|
|
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 16
|
|
Layout.rightMargin: 16
|
|
Layout.leftMargin: 16
|
|
|
|
text: qsTr("Renew")
|
|
|
|
defaultColor: AmneziaStyle.color.paleGray
|
|
hoveredColor: AmneziaStyle.color.lightGray
|
|
pressedColor: AmneziaStyle.color.mutedGray
|
|
textColor: AmneziaStyle.color.midnightBlack
|
|
|
|
clickedFunc: function() {
|
|
ApiSettingsController.getRenewalLink()
|
|
}
|
|
}
|
|
|
|
BasicButtonType {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
Layout.topMargin: 8
|
|
Layout.bottomMargin: 8
|
|
|
|
implicitHeight: 25
|
|
|
|
defaultColor: AmneziaStyle.color.transparent
|
|
hoveredColor: AmneziaStyle.color.translucentWhite
|
|
pressedColor: AmneziaStyle.color.sheerWhite
|
|
textColor: AmneziaStyle.color.goldenApricot
|
|
|
|
text: qsTr("Support")
|
|
|
|
clickedFunc: function() {
|
|
root.closeTriggered()
|
|
PageController.goToPage(PageEnum.PageSettingsApiSupport)
|
|
}
|
|
}
|
|
}
|
|
}
|