Minor UI tweaks and clean up project.
This commit is contained in:
@@ -111,7 +111,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
Label {
|
||||
text: progressInfo.active ? (progressInfo.progress + "/" + progressInfo.total) : content.info.size
|
||||
text: progressInfo.active ? (progressInfo.progress + "/" + progressInfo.total) : content.info ? content.info.size : "Unknown"
|
||||
color: MPalette.lighter
|
||||
}
|
||||
}
|
||||
@@ -152,6 +152,12 @@ ColumnLayout {
|
||||
MessageSourceDialog {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: openFileDialog
|
||||
|
||||
OpenFileDialog {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: fileDelegateContextMenu
|
||||
|
||||
@@ -162,7 +168,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()
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user