Composer: add an upload button + file dialog

Upload not working yet
This commit is contained in:
miruka 2019-10-27 15:12:57 -04:00
parent 8c41142b43
commit a67d611958
4 changed files with 21 additions and 3 deletions

View File

@ -6,20 +6,18 @@
- Bottom/top bar - Bottom/top bar
- Uploading (+local echo) - Uploading (+local echo)
- Deduplicate uploads - Deduplicate uploads
- EventLink
- File thumbnails + ask matrix API? - File thumbnails + ask matrix API?
- Encrypted media - Encrypted media
- Loading animation - Loading animation
- GIF thumbnails: load the real animated image - GIF thumbnails: load the real animated image
- Copy thumbnail URL in context menu?
- EventLink
- GIFs can use the video player - GIFs can use the video player
- Video bug: when media is done playing, clicking on progress slider always - Video bug: when media is done playing, clicking on progress slider always
bring back to the beginning no matter where bring back to the beginning no matter where
- Video: missing buttons and small size problems - Video: missing buttons and small size problems
- Audio: online playback is buggy, must download+play file - Audio: online playback is buggy, must download+play file
- In the "Leave me" room, "join > Hi > left" aren't combined
- Combined pure media events time looks bad - Combined pure media events time looks bad
- RoomMessageNotice - RoomMessageNotice
@ -39,6 +37,7 @@
- When qml syntax highlighting supports ES6 string interpolation, use that - When qml syntax highlighting supports ES6 string interpolation, use that
- Fixes - Fixes
- In the "Leave me" room, "join > Hi > left" aren't combined
- Event delegates changing height don't scroll the list - Event delegates changing height don't scroll the list
- When selecting text and scrolling up, selection stops working after a while - When selecting text and scrolling up, selection stops working after a while
- Ensure all the text that should be copied is copied - Ensure all the text that should be copied is copied

View File

@ -0,0 +1,3 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m13.514 2.444-10.815 10.785c-.449.449-.678 1.074-.625 1.707l.393 4.696c.041.479.422.86.9.9l4.697.394c.633.053 1.258-.177 1.707-.626l11.875-11.844c.196-.196.195-.512 0-.707l-3.536-3.536c-.195-.195-.511-.196-.707 0l-8.878 8.848c-.162.162-.253.382-.253.611v.725c0 .184.148.332.332.332h.725c.229 0 .448-.092.61-.254l7.11-7.08 1.415 1.415-7.386 7.354c-.375.375-.885.586-1.414.586h-2.414c-.555 0-1-.448-1-1v-2.414c0-.53.211-1.039.586-1.414l9.506-9.477c.781-.781 2.049-.781 2.829-.001l4.243 4.243c.391.391.586.902.586 1.414s-.196 1.025-.587 1.416l-12.35 12.319c-.748.747-1.76 1.164-2.81 1.164-.257 0-6.243-.467-6.499-.487-.664-.052-1.212-.574-1.268-1.267-.019-.242-.486-6.246-.486-6.499 0-1.05.416-2.062 1.164-2.811l10.936-10.936z"/>
</svg>

After

Width:  |  Height:  |  Size: 831 B

View File

@ -1,6 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../Base"
import "../Dialogs"
import "../utils.js" as Utils import "../utils.js" as Utils
Rectangle { Rectangle {
@ -203,5 +204,17 @@ Rectangle {
}) })
} }
} }
HButton {
icon.name: "upload-file"
backgroundColor: theme.chat.composer.uploadButton.background
toolTip.text: qsTr("Upload files")
Layout.fillHeight: true
HFileDialogOpener {
dialog.title: qsTr("Select files to upload")
}
}
} }
} }

View File

@ -362,6 +362,9 @@ chat:
composer: composer:
color background: colors.strongBackground color background: colors.strongBackground
uploadButton:
color background: "transparent"
mediaPlayer: mediaPlayer:
hoverPreview: hoverPreview: