Allow configuring the shown settings entries by branding
This commit is contained in:
parent
4f77ea819e
commit
79d1bae803
@ -10,4 +10,10 @@ ConfigurationBase {
|
|||||||
|
|
||||||
showCommunityLinks: true
|
showCommunityLinks: true
|
||||||
|
|
||||||
|
networkSettingsEnabled: true
|
||||||
|
apiSettingsEnabled: true
|
||||||
|
mqttSettingsEnabled: true
|
||||||
|
webServerSettingsEnabled: true
|
||||||
|
zigbeeSettingsEnabled: true
|
||||||
|
modbusSettingsEnabled: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,4 +8,12 @@ Item {
|
|||||||
property string connectionWizard: ""
|
property string connectionWizard: ""
|
||||||
|
|
||||||
property bool showCommunityLinks: false
|
property bool showCommunityLinks: false
|
||||||
|
|
||||||
|
// Enable/disable entries in the system settings
|
||||||
|
property bool networkSettingsEnabled: false
|
||||||
|
property bool apiSettingsEnabled: false
|
||||||
|
property bool mqttSettingsEnabled: false
|
||||||
|
property bool webServerSettingsEnabled: false
|
||||||
|
property bool zigbeeSettingsEnabled: false
|
||||||
|
property bool modbusSettingsEnabled: false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,8 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
|
|
||||||
|
visible: Configuration.networkSettingsEnabled
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -124,6 +126,8 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
|
|
||||||
|
visible: Configuration.apiSettingsEnabled
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -139,7 +143,7 @@ Page {
|
|||||||
Pane {
|
Pane {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
visible: engine.jsonRpcClient.ensureServerVersion("1.11")
|
visible: engine.jsonRpcClient.ensureServerVersion("1.11") && Configuration.mqttSettingsEnabled
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
@ -157,6 +161,8 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
|
|
||||||
|
visible: Configuration.webServerSettingsEnabled
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -167,13 +173,13 @@ Page {
|
|||||||
wrapTexts: false
|
wrapTexts: false
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("system/WebServerSettingsPage.qml"))
|
onClicked: pageStack.push(Qt.resolvedUrl("system/WebServerSettingsPage.qml"))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
visible: engine.jsonRpcClient.ensureServerVersion("5.3")
|
visible: engine.jsonRpcClient.ensureServerVersion("5.3") && Configuration.zigbeeSettingsEnabled
|
||||||
|
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
@ -190,7 +196,7 @@ Page {
|
|||||||
Pane {
|
Pane {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Material.elevation: layout.isGrid ? 1 : 0
|
Material.elevation: layout.isGrid ? 1 : 0
|
||||||
visible: engine.jsonRpcClient.ensureServerVersion("5.6")
|
visible: engine.jsonRpcClient.ensureServerVersion("5.6") && Configuration.modbusSettingsEnabled
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
NymeaSwipeDelegate {
|
NymeaSwipeDelegate {
|
||||||
|
|||||||
Reference in New Issue
Block a user