Add a button to open the settings

If you already have kdeconnect on your phone, the call to action to install
it doesn't make sense.

This doesn't add a string because it reuses one that was already in the
plasmoid
This commit is contained in:
Albert Vaca Cintora 2019-09-19 18:46:21 +02:00
parent 9f8928513d
commit 7eeed141f0

View file

@ -24,6 +24,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kdeconnect 1.0 as KdeConnect
import QtQuick.Layouts 1.9
import org.kde.kquickcontrolsaddons 2.0
Item {
id: kdeconnect
@ -73,6 +74,18 @@ Item {
onClicked: Qt.openUrlExternally("https://f-droid.org/en/packages/org.kde.kdeconnect_tp/")
}
PlasmaComponents.Button {
Layout.leftMargin: units.largeSpacing
Layout.rightMargin: units.largeSpacing
Layout.topMargin: units.largeSpacing
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: i18n("KDE Connect Settings...")
onClicked: KCMShell.open("kcm_kdeconnect")
visible: KCMShell.authorize("kcm_kdeconnect.desktop").length > 0
}
Item {
Layout.fillHeight: true
}