Commit Graph

42 Commits

Author SHA1 Message Date
Slawek Kaplonski
f64608f87c Add config option to make link previews configurable
This patch adds new config option "ShowLinkPreview" which can
control if links' preview in the chat messages should be loaded and
shown or not.
2022-10-16 14:21:54 +02:00
James Graham
d2888bc479 Reply Refactor
The aim here is to tidy up the reply component and make it so it sizes automatically without any need to manually set widths or heights. This is achieved by putting the layout in a grid layout. The implicitwidth and height variables are also simplified meaning that the margins are no longer prone to being slightly off because the calculation didn't add up the margins and spacing right.

Also added here is a mime component which is used to provide a nicer representation for files, videos and audio in the reply because trying to put the full component in wouldn't look good.

This also fixes the situation in right to left mode where the layout now mirror properly and everything sits where it should.

New reply elements
![image](/uploads/bfdc81040b3477b064fe8a06d30bdb6e/image.png)
2022-10-11 20:36:15 +00:00
James Graham
058e8034d9 Make sure that contentMaxWidth is used instead of bubbleMaxWidth for the message delegate. 2022-09-29 16:10:50 +00:00
James Graham
f8e57d60f5 Fix margins for images and videos
This patch makes it so that the margins for images and videos is the same as other components.
2022-09-27 17:18:43 +00:00
Bharadwaj Raju
37780c2e3b Link Previews
Uses Matrix's preview API to generate embedded link previews.

Only title and description for now.

![image](/uploads/2c5d632480073fe54345cdbe22ea54dc/image.png)
2022-09-22 15:42:53 +00:00
Bharadwaj Raju
10030efd08 Fix text selection with context menu
Make the context menu actually work with selected text in a message.
2022-09-13 10:04:45 +00:00
Tobias Fella
8257a9d65e Refactor delegates and improve context menu opening
This unifies the context menu opening and makes sure that clicking *anywhere* on the delegate opens the context menu, not just on the content
2022-07-18 20:12:26 +02:00
James Graham
a96e8958c9 Centre the timline when using bubbles but not in compact mode 2022-07-13 17:27:13 +00:00
James Graham
7dc951d2cd Support user messages on the right even when wide
Limit maximum delegate width to ensure that the gap between user and non-user messages isn't too large
2022-07-13 17:27:13 +00:00
Tobias Fella
2bcd7118f4 Ensure that text isn't formatted in context menu 2022-07-09 23:01:13 +02:00
Tobias Fella
332d6c9782 Minor improvements
- Rename TextDelegate to RichLabel since it's not actually a delegate
- Allow web search for whole messages
2021-12-15 00:53:43 +01:00
Tobias Fella
599ab11656 Refactor delegates 2021-12-14 22:27:29 +00:00
Carl Schwan
612fb4924e Start implementing bubbles 2021-03-06 20:19:41 +00:00
Carl Schwan
2f06d45589 Input field fixes
* Message with multiple mentions are not broken in IRC. Fix #267
* Editing a message won't remove mentions anymore


(cherry picked from commit bb3b3bc088)
2021-03-01 13:26:25 +00:00
Yaroslav Sidlovsky
6893cb361e Fix displaying user names with bold text
Property "font.bold" is ignored for QQC2.Label (see: https://phabricator.kde.org/D14495)
2021-01-16 15:16:22 +03:00
Carl Schwan
c24c25eb38 Be less noisy 2021-01-14 20:32:15 +01:00
Carl Schwan
4be3eac7af Fix avatar loading in multiple places and prefers name instead of
display name for avatar fallback.

This also fixes a bug where users didn't get their avatar loaded in the
room list.

Fix #209
2021-01-09 00:37:13 +01:00
Carl Schwan
c69d3587ba Allow editing text and also hide edits from the timeline 2020-12-28 09:37:17 +00:00
Tobias Fella
724f10a895 Don't load empty images from imageprovider
Previously, when there was no avatar set, the source property of Avatar was still set to 'image://mxc/',
which caused Avatar to load that from the imageprovider. The imageprovider can't provide an empty image and aborts with error
2020-12-28 01:28:13 +01:00
Devin Lin
87a7a34d80 Show feedback on avatar hover 2020-12-23 08:51:07 +00:00
Tobias Fella
b3899f1e69 Port away from implicitly defined onFoo properties in Connections 2020-12-21 16:37:22 +01:00
Carl Schwan
5ed47e7397 Revert "Port timeline mouseare to tap handler"
This reverts commit d63811471c.
2020-12-03 17:50:27 +01:00
Carl Schwan
d63811471c Port timeline mouseare to tap handler
This fix inconsistency in behavior
2020-12-03 17:38:57 +01:00
Carl Schwan
8a3659efba Add option to toggle the display of users avatar in timeline on and off 2020-12-02 18:25:29 +01:00
Carl Schwan
550cef52d0 Use more adapted delegate for showing emote (/me)
Now use a standard MessageDelegate and don't display the title part.
This now make the reply and reaction button available and also make it
possible to see the reactions.

Fix: #69
Fix: #75
2020-11-27 15:29:11 +01:00
Carl Schwan
e838f7423d Add highlight effect on mentioned messages 2020-11-26 10:20:55 +00:00
Carl Schwan
fe63b0c9a7 Add emoji picker for reaction 2020-11-24 14:25:56 +01:00
Carl Schwan
792be7acff Improve spacing 2020-11-24 12:02:10 +01:00
Carl Schwan
dc06332c3f Add tooltips 2020-11-24 11:58:32 +01:00
Carl Schwan
9bcb8b3784 Add hover effect 2020-11-24 11:52:09 +01:00
Carl Schwan
6ef7e4cd1c Add quick way to reply to messages 2020-11-24 11:41:15 +01:00
Carl Schwan
06d1be146e Add time information to the messages 2020-11-22 19:05:40 +01:00
Carl Schwan
5316e32004 Improve look of reactions 2020-11-22 18:33:06 +01:00
Carl Schwan
4dedb87efa Clicking on an reply move the timeline view to the reply 2020-11-22 17:14:08 +00:00
Carl Schwan
8e52f645a2 Remove more old MPalette stuff 2020-11-17 11:21:56 +01:00
Carl Schwan
41b81dd744 Improve icon sizing and margins on mobile 2020-11-15 21:10:31 +00:00
Tobias Fella
3a70a9d91c Set all internal qml versions to 1.0
They're useless and anything else just causes problem
2020-11-11 20:14:43 +01:00
Tobias Fella
d8dde6e082 Add license headers to code files 2020-11-11 15:17:23 +00:00
Carl Schwan
9de51fc77e Dynamic load reply qml stuff if needed 2020-11-10 17:06:38 +00:00
Carl Schwan
344cb02309 Improve look of timeline 2020-11-10 15:21:44 +01:00
Carl Schwan
76e79b9dc4 Use an overlay sheet for user detail dialog 2020-11-09 18:04:02 +00:00
Carl Schwan
122a7cdd2f Rebrand files names Spectral -> NeoChat 2020-11-08 23:17:30 +01:00