Commit Graph

226 Commits

Author SHA1 Message Date
JC Brand
60826ac6c6 Move functions out of core.js 2021-07-19 16:40:40 +02:00
JC Brand
d1abf3a04e Wait for roster to be initialized 2021-07-19 16:40:40 +02:00
JC Brand
d2a35d4ce1 Turn converse-roster and converse-roster-filter into Lit elements 2021-07-15 17:26:09 +02:00
JC Brand
8de4671603 Replace more elements that use font icons with svg icons 2021-07-15 16:28:12 +02:00
JC Brand
2bcf01f5ab Use DOMPurify instead of XSS.js
Remove exports-loader, which is therefore no longer necessary
2021-07-15 14:16:41 +02:00
JC Brand
f2aa39e1c3 Identify media URLs during message parsing 2021-07-06 13:35:22 +02:00
JC Brand
b90a435833 Move url related utility methods to @converse/headless 2021-07-05 18:35:58 +02:00
JC Brand
bff714f24c OMEMO: Include XEP-0380 EME tag in encrypted messages 2021-07-05 18:35:58 +02:00
JC Brand
01efb02f9e Make sure XEP-0363 urls are also OMEMO encrypted
by re-using `ChatBox.prototype.sendMessage`.

updates #1182
2021-07-03 00:22:03 +02:00
JC Brand
3d8852950d Add ability to let dropdown appear at the top, left-aligned
And use that for the last message in the chat history, otherwise the
dropdown is obscured.
2021-07-01 15:23:37 +02:00
JC Brand
e675c853f3 Add XEP-0454 support for encrypting files
Fixes #1182
2021-07-01 14:35:48 +02:00
JC Brand
6665bef76c Fix failing tests
Handle missing message model (happens during tests)
2021-06-29 16:00:10 +02:00
JC Brand
dff5f485c9 Split out MUC tests 2021-06-29 15:59:49 +02:00
JC Brand
4047d619a1 Remove lodash dependency in tests 2021-06-29 15:59:49 +02:00
JC Brand
767d5ec91d fix failing test 2021-06-29 15:59:49 +02:00
JC Brand
335a491e0d Stop using the Jasmine "done" callback 2021-06-29 15:59:49 +02:00
JC Brand
8506646db2 Remove unnecessary event trigger 2021-06-29 12:57:48 +02:00
JC Brand
be329a2d10 Don't subclass the chatbox for the controlbox model 2021-06-29 12:55:29 +02:00
JC Brand
14020125b9 Remove sinon and bump npm 2021-06-25 11:21:17 +02:00
JC Brand
0f82b76c09 fix failing test due to i18n string change 2021-06-25 10:59:13 +02:00
JC Brand
ba0ea6c2c4 Update translations based on suggestions from Zash on weblate 2021-06-25 10:38:38 +02:00
JC Brand
7848d8cb2f Add support for decrypting XEP-0454 OMEMO media 2021-06-25 09:24:18 +02:00
JC Brand
2c0fbec43c Move arraybuffer utility methods into their own file 2021-06-24 18:57:32 +02:00
JC Brand
92093d6d28 Further style tweaks for embedded media 2021-06-24 13:04:25 +02:00
JC Brand
e00bf3da36 Make sure unread messages are cleared when showing a chat 2021-06-23 17:18:32 +02:00
JC Brand
9e21813251 Move tests into new file 2021-06-23 17:11:13 +02:00
JC Brand
629f382642 converse-roster: Move functions to utils 2021-06-23 12:02:47 +02:00
JC Brand
ad96db994e Fix failing tests on Travis 2021-06-23 10:52:32 +02:00
JC Brand
958d98a1a1 Use mock method in test 2021-06-22 17:04:27 +02:00
JC Brand
fb6bafdf6c Styling: Fix an offset bug
That caused empty inline code hints to be considered valid.

Also update the tests that were failing due to the changes in the
previous commit.
2021-06-22 16:54:05 +02:00
JC Brand
6dea5959cc Use API to get chat/room models in components 2021-06-22 14:47:35 +02:00
JC Brand
afd737f965 Fixes #2520 2021-06-22 12:50:50 +02:00
JC Brand
8de6e78729 In converse-muc-chatarea, use API to get room
and handle asynchronicity.
2021-06-18 11:56:35 +02:00
JC Brand
619fb538d7 Show video download URL 2021-06-17 15:50:10 +02:00
JC Brand
095d9b60cd Render audio from URLs in messages 2021-06-17 15:24:25 +02:00
JC Brand
33b426c79e Render videos from URLs in messages 2021-06-17 14:06:18 +02:00
JC Brand
2ac49fb9a5 Bugfix. Images being rendered when they shouldn't 2021-06-17 14:06:18 +02:00
JC Brand
b071a0e22f MAM: Prevent multiple simultaneous queries when scrolling up 2021-06-17 11:39:20 +02:00
JC Brand
b6f2662ad7 Set 'scrolled' flag on model.ui
This prevents it from being persisted across page loads and makes more
sense logically.

Also move markScrolled to utils and MUC unread messages indicator to bottom panel.
2021-06-17 11:39:20 +02:00
JC Brand
dc711d494f Add a placeholder to indicate a gap in the message history
The user can click the placeholder to fill in the gap.
2021-06-17 11:35:06 +02:00
JC Brand
bbc952b265 Fix MUC and headlines heaidngs, so that they still work
as ElementViews, since I ran out of time converting them to lit
components as well.

This reverts commit 1121a90af0.
2021-06-15 11:09:34 +02:00
JC Brand
1121a90af0 Revert "Turn heading into a lit component"
This reverts commit 969b2f2e11.
2021-06-15 10:52:17 +02:00
JC Brand
969b2f2e11 Turn heading into a lit component 2021-06-15 10:33:33 +02:00
JC Brand
8907adc236 Move method to utils 2021-06-15 10:03:10 +02:00
JC Brand
c8304497b5 Remove onStatusMessageChanged handler
It's no longer necessary and calls a method that doesn't exist anymore.
2021-06-15 09:59:40 +02:00
JC Brand
68f0be996f Let chats be closed by calling close on the models
Instead of on the views/components.

We still have `close` methods on the components, but they are just
event handlers and not external API methods to be called by other code.
Instead `close` should be called on the model.
2021-06-15 09:59:40 +02:00
JC Brand
9fb92080f2 Get rid of the APIs to fetch chat views
This is largely a leftover from the Backbone.View days and makes less
sense now that the UI is componentized.

Ideally we don't want to call commands on the "views themselves, instead
we should be working on the the models and let the "views" update
themselves automatically.

Also, given that the `jid` attribute on the chat views might change,
especially when rendered declaratively in other frameworks like React,
a view might not be available at times where we previously might have
expected it to be (since it's been repurposed for a different JID).
2021-06-15 09:59:40 +02:00
JC Brand
54d6a6af56 Unfurls: gracefully handle missing OGP data 2021-06-09 20:54:08 +02:00
JC Brand
825e2643ae Use flex-direction: column-reverse
On the `<converse-chat-content>` element. This removes the need for all
the manual scrolling.

Firefox finally supports this feature. Unfortunately Firefox ESR doesn't
yet, but I can't wait anymore.
2021-06-07 19:26:16 +02:00
JC Brand
9bcf5f2947 Scrolling fixes
* Remove extra `_markScrolled` function
* Only try to maintain scrolling position when some non-scrolling change has happened.
2021-06-07 17:54:38 +02:00