summaryrefslogtreecommitdiff
path: root/gui/components/Help.qml
blob: ed6f5431c31e17f7b16c48591776733ffbaf3dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import QtQuick 2.15
import QtQuick.Controls 2.2

import "../themes/themes.js" as Theme

ThemedPage {
    title: qsTr("Help")
    property var issueTracker: "https://0xacab.org/leap/bitmask-vpn/issues"
    property var uninstall: "https://0xacab.org/leap/bitmask-vpn/-/blob/main/docs/uninstall.md"

    Column {
        anchors.centerIn: parent
        spacing: 10

        Text {
            font.pixelSize: 14
            textFormat: Text.RichText
            color: Theme.green
            anchors.horizontalCenter: parent.horizontalCenter
            text: getDummyLink(qsTr("Troubleshooting and support"))
            onLinkActivated: Qt.openUrlExternally(ctx.helpURL)
            HoverHandler {
                cursorShape: Qt.PointingHandCursor
            }
        }
        Text {
            font.pixelSize: 14
            textFormat: Text.RichText
            color: Theme.green
            anchors.horizontalCenter: parent.horizontalCenter
            text: getDummyLink(qsTr("Report a bug"))
            onLinkActivated: Qt.openUrlExternally(issueTracker)
            HoverHandler {
                cursorShape: Qt.PointingHandCursor
            }
        }
        Text {
            font.pixelSize: 14
            textFormat: Text.RichText
            color: Theme.green
            anchors.horizontalCenter: parent.horizontalCenter
            text: getDummyLink(qsTr("How to uninstall"))
            onLinkActivated: Qt.openUrlExternally(uninstall)
            HoverHandler {
                cursorShape: Qt.PointingHandCursor
            }
        }
        /* XXX needs implementation in the backend
        Button {
            anchors.horizontalCenter: parent.horizontalCenter
            text: qsTr("Open logs")
        }
        */
    }

    function getDummyLink(text) {
        return "<style>a:link {color: '" + Theme.green + "';}</style><a href=\"#\">" + text + "</a>"
    }
}