Commit Graph

72 Commits

Author SHA1 Message Date
JC Brand
b6692b17a2 Show roles from VCard next to name in messages 2018-05-08 19:51:56 +02:00
JC Brand
776f49d5c3 Bugfix. Don't remove model, simply remove view
Otherwise the model gets removed mid-creation, which causes the
`url required` error from Backbone.
2018-05-07 12:57:05 +02:00
JC Brand
6ac1df43e1 Render chat state notifications on the message view
and not via the chatbox view (fixes some failing tests also).
2018-05-04 17:26:43 +02:00
JC Brand
99915a26f4 Use vcard from the collection for rendering messages 2018-05-03 20:05:45 +02:00
JC Brand
adf34c845c Render chatbox avatar via the vcards collection 2018-05-03 19:01:57 +02:00
JC Brand
16b2a1b2a9 Avatar/VCard refactoring
- Refer to VCards instead of Avatars where appropriate
- Fetch VCards for non-groupchat messages as well
2018-05-03 18:34:28 +02:00
JC Brand
d5c8acea04 Create avatar objects for all messages, not just groupchat 2018-05-03 18:24:24 +02:00
JC Brand
cbc48629f1 Clear canvas before redrawing 2018-05-01 19:55:26 +02:00
JC Brand
53f5627b72 Add support for rendering avatars in groupchats 2018-05-01 18:18:02 +02:00
JC Brand
f9aa75b69e Refactored message attributes and rendering.
- set `username` on the message object,
  instead of always using `fullname` with fallback to `jid`.
- Distinguish better between `groupchat` messages and normal
  messages in `getMessageAttributesFromStanza`
2018-05-01 12:30:58 +02:00
JC Brand
1405d9cb49 Also style file upload and action messages. 2018-04-30 15:37:37 +02:00
JC Brand
56e4e8b8ee Fix rendering of headline messages.
Also, add urijs to more intelligently handle URIs
2018-04-30 15:37:36 +02:00
JC Brand
3d42425083 Some UI improvements
- Render images as thumbnails
- Use the image.html template when rendering images from pasted URLs
- Update message and spoiler markup to render avatars
- Use the default avatar as fallback when user doesn't have one
- Instead of 'me' render own name or JID
2018-04-30 15:37:36 +02:00
JC Brand
57f7e31aa1 Add a spoiler message to the mockups 2018-04-30 15:37:36 +02:00
JC Brand
a19e7aeffe Add support for XEP-0066 Out of band data 2018-04-18 16:58:52 +02:00
JC Brand
d048cff9a8 Provide metadata of file being uploaded.
updates #161
2018-04-18 11:49:53 +02:00
JC Brand
133df99aec Honor the filesize restrictions of the XMPP server
updates #161
2018-04-18 11:35:33 +02:00
JC Brand
c01e9f8265 Move methods from chatbox view to message view
Specifically the methods related to requesting an upload slot and uploading a file.
Also show a progress indicator while a file is being uploaded.

Updates #161
2018-04-17 15:21:38 +02:00
JC Brand
db790183d8 Remove unused code 2018-04-17 15:21:38 +02:00
JC Brand
dad8eb2f48 Remove separate file converse-http-file-upload
It contained only `overrides` and some HTTP upload code was in other
modules.

Current thinking concerning overrides:

Usage of `overrides`, while useful in certain cases, should in general
be discouraged, since it's in essence "monkey patching" which makes it
more difficult to know whats executing at runtime and more difficult to
refactor.

Splitting modules up between XEPs is not always that useful. Some XEPs,
like HTTP Upload (and MAM comes to mind) have their functionality spread
out over single and group chats (and pubsub) and might for practical
purposes be considered "core" enough to not try and keep them in
separate modules (which inevitably requires overrides or a fundamentally
rethinking the architecture).

Where splitting code between modules makes a lot of sense is in keeping
Backbone Models and Views separate (so that alternative view libraries
like Vue could be used) and probably in keeping Single chats, MUC,
PubSub and MIX separate.

updates #161
2018-04-17 15:21:30 +02:00
JC Brand
de6ecbf07a Render messages via a new MessageView view
updates #161
2018-04-17 15:21:26 +02:00
JC Brand
264e6830af Remove references to unused parameters
updates #161
2018-04-17 15:21:21 +02:00