Commit Graph

48 Commits

Author SHA1 Message Date
JC Brand
ad93407907 Replace modal templates with lit-html components 2020-01-30 17:36:55 +01:00
JC Brand
a8104d7498 Add Skeletor as dependency 2020-01-30 17:36:55 +01:00
JC Brand
7bf39a092f muc: move message handler into own method 2019-12-06 13:09:09 +01:00
JC Brand
1fa203c990 Support for IndexedDB. updates #1105
Depend on latest backbone.browserStorage which has support for IndexedDB
via localforage.

Storage operations are now asynchronous and transactional.

Bugs fixed (mostly by waiting for operations to complete):

* Rooms are now fetched asynchronously, so wait before triggering `show`
  or when closing.
* Make sure chat create/update transactions complete before firing events
* Make sure chats and messages have been fetched before creating new ones.
* When doing a `fetch` with `wait: false` on a collection and then
  creating a model in that collection, then once the read
  operation finishes (after creating the model), the collection is emptied again.
* Patch and wait when saving.
  Otherwise we have previously set attributes overriding later ones.
* Make sure api.roomviews.close returns a promise

Test fixes:

* Chats are now asynchronously returned, so we need to use `await`
* Wait for the storage transaction to complete when creating and updating messages
* Wait for all chatboxes to close
    Otherwise we get sessionStorage inconsistencies due to the async nature of localforage.
* Wait for room views to close in spec/chatroom.js

In the process, remove the `closeAllChatBoxes` override in
converse-controlbox by letting the `close` method decide whether it
should be closed or not.
2019-10-30 13:02:23 +01:00
JC Brand
75c11a2006 emoji-views: Specify dependency on muc-views
Otherwise plugins might be loaded out of order and then event handlers
in this module don't get registered.

Also, bump to dev version number
2019-10-08 16:30:23 +02:00
JC Brand
8aaf50d58c Use webpack's dynamic imports feature for fetching emoji JSON 2019-08-23 09:18:10 +02:00
JC Brand
d7ce231c51 Various emoji improvements:
* Add emoji tooltip
* Make categories configurable and add smileys category
* Rearrange emoji categories and style
& Show all emojis together
2019-08-22 13:56:47 +02:00
JC Brand
7a590f7c22 Stop using certain lodash methods.
* _.isNil
* _.noop
* _.isNull
2019-08-05 10:56:22 +02:00
JC Brand
d95a7987ce Fix linting errors and add @module jsdoc directives 2019-07-11 10:48:52 +02:00
JC Brand
67bcc00f10 Associate ChatRoomOccupant to ChatRoomMessage
and use promises to indicate when an occupant or contact has been set
2019-07-04 08:28:12 +02:00
JC Brand
98215deb21 Update to latest backbone.overview which debounces sorting on add event 2019-06-27 13:15:55 +02:00
JC Brand
dd91d3cc55 Use flexbox to keep the chat scrolled down
By using `display: flex` and `flex-direction: column-reverse`, the chat
now automatically scrolls down when loaded, without requiring any
extra JavaScript.

We still need to scroll down with JavaScript when sending a message.

By using `column-reverse`, the messages container now works in reverse.
So the newest message is the first element in the container and the
oldest message is the last. This is the reverse of before.

Due to this, this change will likely break some plugins.
2019-06-18 11:37:07 +02:00
JC Brand
7ab59ad63e Refactor MAM and clear private chats upon reconnection
- Add `onReconnected` method for chatboxes to clear messages
- Move MAM models to headless build.
- New event `onChatReconnected`
2019-05-22 14:10:19 +02:00
JC Brand
969f902d4a Playing around with removing more lodash calls 2019-04-29 09:47:46 +02:00
JC Brand
34469425d6 Use Object.assign instead of _.extend 2019-04-29 09:07:15 +02:00
JC Brand
c72dc74022 In the menu, only show allowed commands 2019-04-25 10:48:33 +02:00
JC Brand
5b25d5daaa Don't send markers to someone not on your roster
Updates #324
2019-02-13 19:32:02 +01:00
JC Brand
078281d0db Add a test for configuring a MUC 2018-12-17 15:18:36 +01:00
JC Brand
6904f9a897 Use es2015 modules instead of UMD 2018-10-23 12:25:58 +02:00
JC Brand
2df9b24211 Add option to auto-register your nickname to a room
See https://xmpp.org/extensions/xep-0045.html#register
2018-09-12 12:36:13 +02:00
JC Brand
e35fceff1a Remove the need for emojione 2018-09-03 14:16:59 +02:00
JC Brand
b4110dc162 Merge branch 'master' into converse-omemo 2018-08-18 10:24:55 +02:00
JC Brand
b6f4f05b9e Add converse-autocomplete and use that in the chat textarea 2018-08-16 15:17:53 +02:00
JC Brand
713f49453f Working example of AES-GCM encryption and decryption
with key import and export.

updates #497
2018-08-04 21:32:08 +02:00
JC Brand
bf13927946 Merge branch 'master' into converse-omemo 2018-07-21 11:34:51 +02:00
JC Brand
84a10d77d9 Cancel message correction by pressing the down arrow
Also, add a class `correcting` to the message being corrected, to
provide a visual cue.

updates #421
2018-07-08 11:30:15 +02:00
JC Brand
6785eff4a7 Merge branch 'master' into converse-omemo 2018-07-01 11:44:04 +02:00
JC Brand
7ee71b0132 Add a plugin for XEP-0357
Currently only allows enabling an "App Service", based on pass-in
configuration values.
2018-06-06 14:00:52 +02:00
JC Brand
bc872ee2cb Fix various failing tests and update Makefile 2018-06-04 11:20:34 +02:00
JC Brand
6042c233bc Add test that the OMEMO toolbar button renders
Fix and improve accordingly. updates #497
2018-05-23 12:51:01 +02:00
JC Brand
d871392039 updates #1094
Update the occupants list when occupants are added/removed from the
member lists.
2018-05-11 00:17:44 +02:00
JC Brand
b6f10f0efe Update eslint to ES2017 syntax so that we can use async/await 2018-05-01 11:30:46 +02:00
JC Brand
a19e7aeffe Add support for XEP-0066 Out of band data 2018-04-18 16:58:52 +02:00
JC Brand
584f293d05 Updated and refactored the work from @worlword
* Use Promises instead of callbacks
* Update to latest (Last Call) version of XEP-0363
* Move non-view specific methods to models instead
* Add more tests

updates #161
2018-04-17 15:21:09 +02:00
JC Brand
a9d2881888 Fix disco hierarchy
Previously we kept all entities and their items (which are also
instances of _converse.DiscoEntity) in a flat array.

Instead, we should have a tree-like structure where items are stored
on the relevant entity (and recursively on other items).
2018-04-14 07:36:24 +02:00
JC Brand
95406a149d Re-add xhr_user_search_url and autocomplete when adding contacts 2018-03-30 14:22:51 +02:00
JC Brand
6c6ef1f1f9 Refactoring of the roster view.
* Removed the dependency on jQuery
* Contacts are now shown inside a group element, simplifying the code
2017-12-19 18:44:31 +00:00
JC Brand
32d574039d Translateable strings must not be template literals
xgettext doesn't support them yet, which causes errors in the pot/po files.

https://savannah.gnu.org/bugs/?50920

updates #909
2017-08-23 12:00:49 +02:00
JC Brand
439e37feaa disco: Refactor service discovery and add tests.
* `disco#items` are now only fetched when advertised by the entity.
* `identity` information is now also stored on the `DiscoEntity` model.
2017-07-21 17:38:08 +02:00
JC Brand
7850c38faa disco: Create new plugin converse-disco.
We can now support feature discovery for multiple entities (although we
currently still only query for the user's own XMPP server).
2017-07-21 15:09:50 +02:00
JC Brand
bd38f0d634 Update the website to not use jquery.easing
It will now also no longer be included in the full bundle.
2017-07-14 23:01:09 +02:00
JC Brand
40e7ee1ae6 Initial stab at using ES2015
Mostly replaced ``var`` with ``let`` and ``const``.
Also added a few arrow functions.
2017-07-10 12:49:20 +02:00
JC Brand
e48015df66 Fixes #575 2017-06-15 17:51:56 +02:00
JC Brand
a128a70d41 Discriminate between which unread messages to indicate per tab 2017-06-07 00:55:57 +02:00
JC Brand
0c43e4b87c Upgrade to Jasmine 2.5.3 2017-04-06 11:31:05 +02:00
JC Brand
a2cea678fe Shut eslint up and fix test 2017-03-15 12:41:04 +00:00
JC Brand
84a21415f0 Shut eslint up 2017-02-27 10:41:46 +00:00
JC Brand
081f075aa9 Add eslint with lodash checking and apply its suggestions 2017-02-01 14:02:18 +01:00