summaryrefslogtreecommitdiff
path: root/gui/qml/AboutDialog.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-06-17 13:17:16 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-06-26 12:13:41 +0200
commit253b12e140905d3a38bcd09d55b9c5dbf0601d66 (patch)
tree3c2da8b70ebe0536cb4382b54d8a1a8c04f5cc4a /gui/qml/AboutDialog.qml
parent35971c9a80879728a7bec38494a1edc1ecbf740f (diff)
[feat] working about dialog
Diffstat (limited to 'gui/qml/AboutDialog.qml')
-rw-r--r--gui/qml/AboutDialog.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/gui/qml/AboutDialog.qml b/gui/qml/AboutDialog.qml
new file mode 100644
index 0000000..98cacdc
--- /dev/null
+++ b/gui/qml/AboutDialog.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.0
+import QtQuick.Dialogs 1.2
+
+MessageDialog {
+ title: qsTr("About")
+ text: getText()
+ informativeText: getVersion()
+
+ function getText() {
+ var _name = ctx ? ctx.appName : "vpn"
+ var _provider = ctx ? ctx.provider : "unknown"
+ var _donateURL= ctx ? ctx.donateURL : "..."
+ var _tosURL = ctx ? ctx.tosURL : "..."
+ var _txt = qsTr(
+ "<p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href=\"%3\">Please donate</a>.</p> <p>By using this application, you agree to the <a href=\"%4\">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p>").arg(_name).arg(_provider).arg(_donateURL).arg(_tosURL)
+ return _txt
+ }
+
+ function getVersion() {
+ var _name = ctx ? ctx.appName : "vpn"
+ var _ver = ctx ? ctx.version : "unknown"
+ var _txt = "%1 version: %2".arg(_name).arg(_ver)
+ return _txt
+ }
+}
+