Fix the check whether the energy plugin is available or not
This commit is contained in:
parent
67348308d1
commit
9ea8560643
@ -95,7 +95,7 @@ MainViewBase {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: app.margins / 2
|
anchors.margins: app.margins / 2
|
||||||
contentHeight: energyGrid.childrenRect.height
|
contentHeight: energyGrid.childrenRect.height
|
||||||
visible: !engine.thingManager.fetchingData && engine.jsonRpcClient.experiences.hasOwnProperty("Energy")
|
visible: !engine.thingManager.fetchingData && engine.jsonRpcClient.experiences.hasOwnProperty("Energy") && engine.jsonRpcClient.experiences["Energy"] >= "0.2"
|
||||||
topMargin: root.topMargin
|
topMargin: root.topMargin
|
||||||
|
|
||||||
// GridLayout directly in a flickable causes problems at initialisation
|
// GridLayout directly in a flickable causes problems at initialisation
|
||||||
@ -185,7 +185,7 @@ MainViewBase {
|
|||||||
EmptyViewPlaceholder {
|
EmptyViewPlaceholder {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - app.margins * 2
|
width: parent.width - app.margins * 2
|
||||||
visible: !engine.thingManager.fetchingData && !engine.jsonRpcClient.experiences.hasOwnProperty("Energy")
|
visible: !engine.thingManager.fetchingData && (!engine.jsonRpcClient.experiences.hasOwnProperty("Energy") || engine.jsonRpcClient.experiences["Energy"] <= "0.1")
|
||||||
title: qsTr("Energy plugin not installed installed.")
|
title: qsTr("Energy plugin not installed installed.")
|
||||||
text: qsTr("This %1 system does not have the energy extensions installed.").arg(Configuration.systemName)
|
text: qsTr("This %1 system does not have the energy extensions installed.").arg(Configuration.systemName)
|
||||||
imageSource: "../images/smartmeter.svg"
|
imageSource: "../images/smartmeter.svg"
|
||||||
@ -201,7 +201,7 @@ MainViewBase {
|
|||||||
EmptyViewPlaceholder {
|
EmptyViewPlaceholder {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - app.margins * 2
|
width: parent.width - app.margins * 2
|
||||||
visible: engine.jsonRpcClient.experiences.hasOwnProperty("Energy") && !engine.thingManager.fetchingData && energyMeters.count == 0 && consumers.count == 0
|
visible: engine.jsonRpcClient.experiences["Energy"] >= "0.2" && !engine.thingManager.fetchingData && energyMeters.count == 0 && consumers.count == 0
|
||||||
title: qsTr("There are no energy meters installed.")
|
title: qsTr("There are no energy meters installed.")
|
||||||
text: qsTr("To get an overview of your current energy usage, install an energy meter.")
|
text: qsTr("To get an overview of your current energy usage, install an energy meter.")
|
||||||
imageSource: "../images/smartmeter.svg"
|
imageSource: "../images/smartmeter.svg"
|
||||||
|
|||||||
@ -92,6 +92,10 @@ SettingsPageBase {
|
|||||||
visible: engine.systemController.deviceSerialNumber.length > 0
|
visible: engine.systemController.deviceSerialNumber.length > 0
|
||||||
progressive: false
|
progressive: false
|
||||||
prominentSubText: false
|
prominentSubText: false
|
||||||
|
onClicked: {
|
||||||
|
PlatformHelper.toClipBoard(engine.systemController.deviceSerialNumber)
|
||||||
|
ToolTip.show(qsTr("Serial copied to clipboard"), 500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user