Add a configuration option to hide links in menu

This commit is contained in:
Michael Zanetti 2021-08-13 18:32:27 +02:00
parent e501ed3b5b
commit 5a66d44445
3 changed files with 10 additions and 0 deletions

View File

@ -3,4 +3,6 @@ import QtQuick 2.0
ConfigurationBase {
showCommunityLinks: true
}

View File

@ -5,4 +5,6 @@ Item {
property string appName: "nymea:app"
property string connectionWizard: "/ui/connection/NewConnectionWizard.qml"
property bool showCommunityLinks: false
}

View File

@ -198,6 +198,7 @@ Drawer {
iconName: "../images/help.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://nymea.io/documentation/users/usage/first-steps")
visible: Configuration.showCommunityLinks
}
NymeaItemDelegate {
Layout.fillWidth: true
@ -205,6 +206,7 @@ Drawer {
iconName: "../images/discourse.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://forum.nymea.io")
visible: Configuration.showCommunityLinks
}
NymeaItemDelegate {
Layout.fillWidth: true
@ -212,6 +214,7 @@ Drawer {
iconName: "../images/telegram.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://t.me/nymeacommunity")
visible: Configuration.showCommunityLinks
}
NymeaItemDelegate {
Layout.fillWidth: true
@ -219,6 +222,7 @@ Drawer {
iconName: "../images/discord.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://discord.gg/tX9YCpD")
visible: Configuration.showCommunityLinks
}
NymeaItemDelegate {
Layout.fillWidth: true
@ -226,6 +230,7 @@ Drawer {
iconName: "../images/twitter.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://twitter.com/nymea_io")
visible: Configuration.showCommunityLinks
}
NymeaItemDelegate {
Layout.fillWidth: true
@ -233,6 +238,7 @@ Drawer {
iconName: "../images/facebook.svg"
progressive: false
onClicked: Qt.openUrlExternally("https://m.facebook.com/groups/nymea")
visible: Configuration.showCommunityLinks
}
}
}