Hide install more plugins hint when the system does not support it
This commit is contained in:
parent
c703a0a985
commit
1b7d1e1a0e
@ -157,7 +157,7 @@ Page {
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
bottomMargin: height
|
bottomMargin: packagesFilterModel.count > 0 ? height : 0
|
||||||
|
|
||||||
model: ThingClassesProxy {
|
model: ThingClassesProxy {
|
||||||
id: thingClassesProxy
|
id: thingClassesProxy
|
||||||
@ -190,14 +190,15 @@ Page {
|
|||||||
EmptyViewPlaceholder {
|
EmptyViewPlaceholder {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - Style.margins * 2
|
width: parent.width - Style.margins * 2
|
||||||
opacity: thingClassesProxy.count == 0 || listView.contentY >= listView.contentHeight + listView.originY ? 1 : 0
|
opacity: packagesFilterModel.count > 0 &&
|
||||||
|
(thingClassesProxy.count == 0 || listView.contentY >= listView.contentHeight + listView.originY)
|
||||||
|
? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: Style.shortAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Style.shortAnimationDuration } }
|
||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
title: qsTr("Looking for something else?")
|
title: qsTr("Looking for something else?")
|
||||||
text: qsTr("Try to install more plugins.")
|
text: qsTr("Try to install more plugins.")
|
||||||
imageSource: "/ui/images/save.svg"
|
imageSource: "/ui/images/save.svg"
|
||||||
buttonText: qsTr("Install plugins")
|
buttonText: qsTr("Install plugins")
|
||||||
buttonVisible: packagesFilterModel.count > 0
|
|
||||||
onButtonClicked: {
|
onButtonClicked: {
|
||||||
pageStack.push(Qt.resolvedUrl("/ui/system/PackageListPage.qml"), {filter: "nymea-plugin-"})
|
pageStack.push(Qt.resolvedUrl("/ui/system/PackageListPage.qml"), {filter: "nymea-plugin-"})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user