From 0dda8bd96dab66edd0a922d219a10431247f41ff Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 17 Sep 2021 20:34:32 +0200 Subject: [ui] more dialogs icons, new font --- gui/components/MainView.qml | 56 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 8 deletions(-) (limited to 'gui/components/MainView.qml') 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 "" + url + "" } } -- cgit v1.2.3