aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-11-02 12:29:39 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-11-02 12:29:39 +0100
commit09dbd21fef6c18bb79f5dd1b0c73a02dd9fba92d (patch)
tree5df86ed1844c51648db36a88fae324d442b9279f /qml
parent3ef429a1b6759d6fe84cc44ed7dea51a3c8be799 (diff)
downloadkdeltachat-09dbd21fef6c18bb79f5dd1b0c73a02dd9fba92d.tar.gz
kdeltachat-09dbd21fef6c18bb79f5dd1b0c73a02dd9fba92d.zip
Videochat message displayed, rm actions dups
- message.*, qml/Message.qml: Videochat invitation message send from the original DeltaChat app are displayed. Currently, it's best if the chat instance use http or https scheme, since it'll normally open in a browser - qml/ComposePane.qml : We made Shorcuts and actions are needed anymore, no need for duplicates - qml/main.qml: Fix shortcut help for opening Settings page, it's Shift+Tab not Shift+S.
Diffstat (limited to 'qml')
-rw-r--r--qml/ComposePane.qml18
-rw-r--r--qml/Message.qml23
-rw-r--r--qml/main.qml2
3 files changed, 26 insertions, 17 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index b2fcf88..d1140ba 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -84,12 +84,6 @@ Pane {
else
attachFileDialog.open();
}
-
- action: Action {
- shortcut: "Ctrl+O"
- onTriggered: attachButton.click()
- }
-
}
TextArea {
@@ -129,22 +123,14 @@ Pane {
text: qsTr("Send")
enabled: messageField.length > 0 | attachFileUrl.length > 0
onClicked: {
+ sendButton.down = true;
let msg = root.createMessage();
root.context.sendMessage(root.chatId, msg);
+ sendButton.down = false;
attachFileUrl = "";
messageField.text = "";
root.context.setDraft(chatId, null);
}
-
- action: Action {
- shortcut: "Ctrl+S"
- onTriggered: {
- if (sendButton.enabled == true)
- sendButton.click();
-
- }
- }
-
}
Button {
diff --git a/qml/Message.qml b/qml/Message.qml
index 37a7546..2798d95 100644
--- a/qml/Message.qml
+++ b/qml/Message.qml
@@ -276,6 +276,28 @@ RowLayout {
}
+ Component {
+ id: videoChatView
+ ColumnLayout {
+ Loader {
+ sourceComponent: textMessageView
+ }
+
+ Button {
+ text: "Join conference call"
+ icon.name: "call-start"
+ Layout.preferredWidth: root.width
+ Layout.maximumWidth: root.width
+ hoverEnabled: true
+ ToolTip.visible: hovered
+ ToolTip.text: "<u>"+root.message.videochatUrl+"</u>"
+ //Layout.leftMargin: 30
+ //Layout.rightMargin: 30
+ onClicked: Qt.openUrlExternally(root.message.videochatUrl)
+ }
+ }
+ }
+
// This is what show the display name in top of every messages
Component {
id: textMessageView
@@ -347,6 +369,7 @@ RowLayout {
: [40, 41].includes(root.message.viewtype) ? audioMessageView
: [50].includes(root.message.viewtype) ? videoMessageView
: [60].includes(root.message.viewtype) ? anyFileView
+ : [70].includes(root.message.viewtype) ? videoChatView
: textMessageView
}
diff --git a/qml/main.qml b/qml/main.qml
index fc49bb9..f0798fd 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -135,7 +135,7 @@ Kirigami.ApplicationWindow {
font.pixelSize: 14
},
Text {
- text: "<b>F1</b>: Displays this" + "<br><b>F2</b>: Work on/offline" + "<br><b>F5</b>: Network check" + "<br><b>Shift+S</b>: Account settings" + "<br><b>Alt+C</b>: Clear search" + "<br><b>Alt+Tab</b>: Switch accounts" + "<br><b>Ctrl+F</b>: Search contacts" + "<br><b>Ctrl+N</b>: New chat" + "<br><b>Ctrl+S</b>: Send message" + "<br><b>Ctrl+Tab</b>: Show sidebar" + "<br><b>Ctrl+Q</b>: Quit"
+ text: "<b>F1</b>: Displays this" + "<br><b>F2</b>: Work on/offline" + "<br><b>F5</b>: Network check" + "<br><b>Shift+Tab</b>: Account settings" + "<br><b>Alt+C</b>: Clear search" + "<br><b>Alt+Tab</b>: Switch accounts" + "<br><b>Ctrl+F</b>: Search contacts" + "<br><b>Ctrl+N</b>: New chat" + "<br><b>Ctrl+S</b>: Send message" + "<br><b>Ctrl+Tab</b>: Show sidebar" + "<br><b>Ctrl+Q</b>: Quit"
topPadding: 20
leftPadding: 10
bottomPadding: 20