Minor UI tweaks and clean up project.

This commit is contained in:
Black Hat
2019-04-30 17:02:00 +08:00
parent 5fe8bafbf3
commit 75eb4c5b52
25 changed files with 489 additions and 1336 deletions

View File

@@ -170,6 +170,12 @@ ColumnLayout {
MessageSourceDialog {}
}
Component {
id: openFileDialog
OpenFileDialog {}
}
Component {
id: imageDelegateContextMenu
@@ -179,7 +185,17 @@ ColumnLayout {
}
}
function saveFileAs() { currentRoom.saveFileAs(eventId) }
function saveFileAs() {
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay, {"selectFolder": true})
fileDialog.chosen.connect(function(path) {
if (!path) return
currentRoom.downloadFile(eventId, path + "/" + (content.filename || content.body))
})
fileDialog.open()
}
function downloadAndOpen()
{