diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-09-17 20:34:32 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:51:07 +0100 |
commit | be36ce80cac534afda4393fc6bd904d489b63361 (patch) | |
tree | 742d3a3418b20cb8df97cfe74780fa3a197ecf60 /gui/components/MainView.qml | |
parent | d6c712d1b127d018c829b0b006fd94749916fb7d (diff) |
[ui] more dialogs
icons, new font
Diffstat (limited to 'gui/components/MainView.qml')
-rw-r--r-- | gui/components/MainView.qml | 56 |
1 files changed, 48 insertions, 8 deletions
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml index 5407178..bae34fb 100644 --- a/gui/components/MainView.qml +++ b/gui/components/MainView.qml @@ -51,7 +51,7 @@ Page { text: qsTr("Donate") icon: "../resources/donate.svg" triggered: function () { - aboutDialog.open() + donateDialog.open() } } ListElement { @@ -66,7 +66,8 @@ Page { text: qsTr("About") icon: "../resources/about.svg" triggered: function () { - aboutDialog.open() + stackView.push("About.qml") + settingsDrawer.close() } } ListElement { @@ -90,14 +91,53 @@ Page { } Dialog { - id: aboutDialog - title: qsTr("About") - Label { - anchors.fill: parent - text: qsTr("RiseupVPN\nhttps://riseupvpn.net/vpn") + id: donateDialog + width: 350 + title: qsTr("Please donate!") + standardButtons: Dialog.Ok + + Text { + id: donateText + width: 300 + wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter + anchors { + topMargin: 20 + bottomMargin: 40 + horizontalCenter: parent.horizontalCenter + } + font.pixelSize: 12 + text: qsTr("This service is paid for entirely by donations from users like you. The cost of running the VPN is approximately 5 USD per person every month, but every little bit counts.") } - standardButtons: StandardButton.Ok + Label { + id: donateURL + anchors { + top: donateText.bottom + topMargin: 20 + horizontalCenter: parent.horizontalCenter + } + font.pixelSize: 14 + text: getLink(ctx.donateURL) + onLinkActivated: Qt.openUrlExternally(ctx.donateURL) + } + + + Image { + height: 50 + source: "../resources/donate.svg" + fillMode: Image.PreserveAspectFit + anchors { + topMargin: 20 + top: donateURL.bottom + horizontalCenter: parent.horizontalCenter + } + } + + onAccepted: Qt.openUrlExternally(ctx.donateURL) + } + + function getLink(url) { + return "<a href='#'>" + url + "</a>" } } |