diff --git a/nymea-app/ui/components/ShutterControls.qml b/nymea-app/ui/components/ShutterControls.qml index 51f1835c..aabc9e27 100644 --- a/nymea-app/ui/components/ShutterControls.qml +++ b/nymea-app/ui/components/ShutterControls.qml @@ -38,9 +38,10 @@ RowLayout { id: root implicitWidth: childrenRect.width - property var device: null + property Device device: null readonly property var deviceClass: device ? engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId) : null readonly property var openState: device ? device.states.getState(deviceClass.stateTypes.findByName("state").id) : null + readonly property bool canStop: device && device.deviceClass.actionTypes.findByName("stop") property bool invert: false @@ -66,6 +67,7 @@ RowLayout { ItemDelegate { Layout.preferredWidth: app.iconSize * 2 Layout.preferredHeight: width + visible: root.canStop // color: Material.foreground // radius: height / 2 diff --git a/nymea-app/ui/devicepages/ButtonDevicePage.qml b/nymea-app/ui/devicepages/ButtonDevicePage.qml index b3d092af..3182eb75 100644 --- a/nymea-app/ui/devicepages/ButtonDevicePage.qml +++ b/nymea-app/ui/devicepages/ButtonDevicePage.qml @@ -38,9 +38,20 @@ import "../customviews" DevicePageBase { id: root + EmptyViewPlaceholder { + anchors { left: parent.left; right: parent.right; margins: app.margins } + anchors.verticalCenter: parent.verticalCenter + + title: qsTr("This switch has not been used yet.") + text: qsTr("Press a button on the switch to see logs appearing here.") + visible: logView.logsModel.count === 0 + buttonVisible: false + imageSource: "../images/system-shutdown.svg" + } + GenericTypeLogView { - anchors.fill: parent id: logView + anchors.fill: parent logsModel: engine.jsonRpcClient.ensureServerVersion("1.10") ? logsModelNg : logsModel LogsModelNg { diff --git a/nymea-app/ui/mainviews/DevicesPageDelegate.qml b/nymea-app/ui/mainviews/DevicesPageDelegate.qml index 432a4bce..36694788 100644 --- a/nymea-app/ui/mainviews/DevicesPageDelegate.qml +++ b/nymea-app/ui/mainviews/DevicesPageDelegate.qml @@ -319,6 +319,7 @@ MainPageTile { ItemDelegate { Layout.preferredHeight: app.iconSize Layout.preferredWidth: height + enabled: centerIcon.name.length > 0 ColorIcon { id: centerIcon width: app.iconSize @@ -332,10 +333,10 @@ MainPageTile { return "" case "garagegate": case "blind": - case "extendedblind": case "awning": - case "extendedawning": case "shutter": + case "extendedblind": + case "extendedawning": case "extendedshutter": return "../images/media-playback-stop.svg" default: