Show install instructions for Android when there are no devices
This commit is contained in:
parent
9f4716c3c5
commit
24eb0799f1
2 changed files with 53 additions and 6 deletions
|
@ -23,17 +23,59 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
import org.kde.kdeconnect 1.0 as KdeConnect
|
import org.kde.kdeconnect 1.0 as KdeConnect
|
||||||
|
import QtQuick.Layouts 1.9
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: kdeconnect
|
id: kdeconnect
|
||||||
property alias devicesModel: devicesView.model
|
property alias devicesModel: devicesView.model
|
||||||
|
|
||||||
PlasmaExtras.Heading {
|
ColumnLayout {
|
||||||
|
spacing: 5
|
||||||
|
visible: devicesView.count == 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
level: 3
|
height: parent.height
|
||||||
opacity: 0.6
|
|
||||||
text: i18n("No paired devices available")
|
PlasmaExtras.Heading {
|
||||||
visible: devicesView.count==0
|
id: heading
|
||||||
|
Layout.fillWidth: true
|
||||||
|
level: 3
|
||||||
|
opacity: 0.6
|
||||||
|
text: i18n("No paired devices available")
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
PlasmaComponents.Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
text: i18n("Install KDE Connect on your Android device to integrate it with Plasma!")
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
|
||||||
|
PlasmaComponents.Button {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
text: i18n("Install from Google Play")
|
||||||
|
onClicked: Qt.openUrlExternally("https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp")
|
||||||
|
}
|
||||||
|
|
||||||
|
PlasmaComponents.Button {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
text: i18n("Install from F-Droid")
|
||||||
|
onClicked: Qt.openUrlExternally("https://f-droid.org/en/packages/org.kde.kdeconnect_tp/")
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
height: heading.height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,6 +90,7 @@ Item {
|
||||||
PlasmaExtras.ScrollArea {
|
PlasmaExtras.ScrollArea {
|
||||||
id: dialogItem
|
id: dialogItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
visible: devicesView.count > 0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: devicesView
|
id: devicesView
|
||||||
|
|
|
@ -32,13 +32,17 @@ Item
|
||||||
DevicesModel {
|
DevicesModel {
|
||||||
id: connectDeviceModel
|
id: connectDeviceModel
|
||||||
displayFilter: DevicesModel.Paired | DevicesModel.Reachable
|
displayFilter: DevicesModel.Paired | DevicesModel.Reachable
|
||||||
|
}
|
||||||
|
|
||||||
|
DevicesModel {
|
||||||
|
id: pairedDeviceModel
|
||||||
|
displayFilter: DevicesModel.Paired
|
||||||
}
|
}
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
target: plasmoid
|
target: plasmoid
|
||||||
property: "status"
|
property: "status"
|
||||||
value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.HiddenStatus
|
value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : ((pairedDeviceModel.count > 0) ? PlasmaCore.Types.HiddenStatus : PlasmaCore.Types.PassiveStatus)
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasmoid.fullRepresentation: FullRepresentation {
|
Plasmoid.fullRepresentation: FullRepresentation {
|
||||||
|
|
Loading…
Reference in a new issue