Add support for sharing files from plasmoid

Summary: This allows you to share a local file on your device to a remote device running kde connect.

Reviewers: nicolasfella

Reviewed By: nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16552
This commit is contained in:
Billy Laws 2018-10-31 20:58:52 +01:00 committed by Nicolas Fella
parent 787e76ee91
commit eaea0ab667

View file

@ -24,6 +24,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kdeconnect 1.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.0
PlasmaComponents.ListItem
{
@ -106,6 +107,29 @@ PlasmaComponents.ListItem
textFormat: Text.PlainText
}
//Share
PlasmaComponents.Button
{
Share {
id: share
device: root.device
}
FileDialog {
id: fileDialog
title: "Please choose a file"
folder: shortcuts.home
}
id: shareFile
iconSource: "document-share"
visible: share.available
tooltip: i18n("Share file")
onClicked: {
fileDialog.open()
share.plugin.shareUrl(fileDialog.fileUrl)
}
}
//Find my phone
PlasmaComponents.Button
{