Initial upload implementation

This commit is contained in:
miruka
2019-10-28 15:27:36 -04:00
parent 820cc68373
commit 001d6eff71
3 changed files with 82 additions and 7 deletions

View File

@@ -208,12 +208,17 @@ Rectangle {
HButton {
icon.name: "upload-file"
backgroundColor: theme.chat.composer.uploadButton.background
toolTip.text: qsTr("Upload files")
toolTip.text: qsTr("Send files")
Layout.fillHeight: true
HFileDialogOpener {
dialog.title: qsTr("Select files to upload")
onFileChanged: {
let path = Qt.resolvedUrl(file).replace(/^file:/, "")
let args = [chatPage.roomId, path]
py.callClientCoro(chatPage.userId, "send_file", args)
}
}
}
}