Update new page after review

Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
This commit is contained in:
Martin Lukas 2024-09-10 10:14:43 +02:00
parent a3efbe110c
commit 0595f69817
3 changed files with 13 additions and 3 deletions

View File

@ -13,7 +13,7 @@ InfoPaneBase {
readonly property bool setupFailure: root.thing.setupStatus == Thing.ThingSetupStatusFailed
readonly property State batteryState: root.thing.stateByName("batteryLevel")
readonly property State batteryCriticalState: root.thing.stateByName("batteryCritical")
readonly property bool connectedState: root.thing.thingClass.interfaces.indexOf("connectable") >= 0 && root.thing.stateByName("connected")
readonly property State connectedState: root.thing.thingClass.interfaces.indexOf("connectable") >= 0 ? root.thing.stateByName("connected") : null
readonly property State signalStrengthState: root.thing.stateByName("signalStrength")
readonly property State updateStatusState: root.thing.stateByName("updateStatus")
readonly property State childLockState: root.thing.stateByName("childLock")

View File

@ -6,9 +6,18 @@ import Nymea 1.0
import "../components"
import "../delegates"
ThingPageBase {
Page {
id: root
property Thing thing: null
header: NymeaHeader {
text: thing ? thing.name : ""
backButtonVisible: true
onBackPressed: pageStack.pop()
}
ListView {
id: flickable
anchors.fill: parent
@ -30,6 +39,7 @@ ThingPageBase {
model: ThingModel {
thing: root.thing
showActions: false
}
delegate: SwipeDelegate {
id: delegate

View File

@ -94,7 +94,7 @@ SettingsPageBase {
}
function thingDetails() {
var detailsPage = pageStack.push(Qt.resolvedUrl("qrc:/ui/devicepages/DeviceDetailsPage.qml"), {thing: root.thing})
pageStack.push(Qt.resolvedUrl("qrc:/ui/devicepages/DeviceDetailsPage.qml"), {thing: root.thing})
}
Component {