add empty view placeholder for groups

This commit is contained in:
Michael Zanetti 2019-11-30 14:16:06 +01:00
parent c0ba41d2ef
commit 039dc92407
2 changed files with 18 additions and 1 deletions

View File

@ -269,7 +269,7 @@ Page {
anchors { left: parent.left; right: parent.right; margins: app.margins }
anchors.verticalCenter: parent.verticalCenter
visible: scenesView.count === 0 && !engine.deviceManager.fetchingData
title: qsTr("There are no scenes set up yet")
title: qsTr("There are no scenes set up yet.")
text: engine.deviceManager.devices.count === 0 ?
qsTr("It appears there are no things set up either yet. In order to use scenes you need to add some things first.") :
qsTr("Scenes provide a useful way to control your things with just one click.")
@ -302,6 +302,18 @@ Page {
property string title: qsTr("My groups");
width: swipeView.width
height: swipeView.height
EmptyViewPlaceholder {
anchors { left: parent.left; right: parent.right; margins: app.margins }
anchors.verticalCenter: parent.verticalCenter
visible: groupsView.count == 0
title: qsTr("There are no groups set up yet.")
text: qsTr("Grouping things can be useful to control multiple devices at once, for example an entire room. Watch out for the group symbol when interacting with things and use it to add them to groups.")
imageSource: "images/view-grid-symbolic.svg"
buttonVisible: false
// buttonText: qsTr("Create a group")
// onButtonClicked: pageStack.push(Qt.resolvedUrl("thingconfiguration/NewThingPage.qml"))
}
}
}

View File

@ -0,0 +1,5 @@
import QtQuick 2.0
Item {
}