Commit Graph

575 Commits

Author SHA1 Message Date
JC Brand
8780f7a128 Fix linting errors (no-unused-vars) 2019-10-09 16:27:58 +02:00
Christoph Scholz
1c7c25091f new config option: allow_message_corrections 2019-10-04 15:42:38 +02:00
JC Brand
1a7b7f1bea modtools: fix typo 2019-09-09 12:10:44 +02:00
JC Brand
2ec70adc5d modtools: Add help text to explain roles and affiliations 2019-09-09 11:02:14 +02:00
JC Brand
f52ade1193 emoji-views: don't iterate over all emojis if...
new search term includes the previous one
2019-09-05 16:17:59 +02:00
JC Brand
01468fc087 converse-emoji: Sort search results
Also, don't show the categories while searching.
2019-09-05 14:49:06 +02:00
JC Brand
3f0d88e88d Fix ids for the modtools modal 2019-09-04 15:18:51 +02:00
JC Brand
3b40f6964f Update Emoji JSON
* Order by category
* Set odering pre category (instead of just showing them alphabetically)
2019-08-22 16:21:27 +02:00
JC Brand
a59510bbf0 Highlight relevant category when scrolling 2019-08-22 13:56:47 +02:00
JC Brand
2c48096664 Add new spec with emoji tests 2019-08-22 13:56:47 +02:00
JC Brand
73c8002b76 Add search bar for emojis 2019-08-22 13:56:47 +02:00
JC Brand
13d419102a converse-emoji-views: Show categories in chosen skintone 2019-08-22 13:56:47 +02:00
JC Brand
1cf9a936a4 Move Views associated to emojis into a new plugin 2019-08-22 13:56:47 +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
4cb9fd88a8 Refactor emojis so that JSON is fetch asynchronously 2019-08-22 13:56:47 +02:00
JC Brand
89ac4a6969 Show error message with option to retry when MAM query times out 2019-08-13 11:08:03 +02:00
JC Brand
cb10c28082 modtools: Test that error renders when not allowed to fetch affiliation list
Also fix scrolling bug
2019-08-12 12:45:12 +02:00
JC Brand
aee6a192d1 Add a new command /modtools
in which you can set user affiliations and roles.

Also, let getAffiliationList return an Error instead of `null` if you're
not allowed to fetch a particular affiliation list.
2019-08-09 23:30:14 +02:00
JC Brand
45e19acfb1 Use cursor: pointer instead of href="#" 2019-07-24 14:09:53 +02:00
JC Brand
8a405ee88c Various bugfixes based on the previous refactoring.
These two commit should ideally be one, but I inadvertently pushed to
remote too early.
2019-07-10 16:55:55 +02:00
JC Brand
5c88d3e836 Add role and affiliation classes to message DOM element 2019-07-08 13:58:15 +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
38d0d8360b New config setting message_limit
for limiting messages to a certain number of characters.
2019-06-16 21:52:56 +02:00
JC Brand
1d9bbb8ddd Message display improvements
* Checkmark and edit modal button are now on the right
* Instead of showing checkmarks for MUC messages,
  we now show them as light grey before MUC reflection
* Simplify message markup by requiring less `if` statements
2019-06-04 11:12:22 +02:00
JC Brand
7a18f59f8f Simplify rendering of trimmed chats
Also fix issue where trimmed headline chatboxes don't show the proper
color
2019-05-29 13:28:45 +02:00
JC Brand
da713f3162 Improve chatroom name rendering
- Take locked_muc_domain into consideration in chatroom display name
- Use getDisplayName when rendering the heading name
- Give preference to bookmark name if it exists
2019-05-29 13:27:41 +02:00
JC Brand
f20aee6906 Fixes #1576
When using `auto_login` and logging out, Converse gets stucks with an infinite spinner.
2019-05-26 15:30:15 +02:00
JC Brand
f387c947f5 Allow the full app to be embedded.
- new config option `singleton`.
- new plugin `converse-uniview`
- removed `converse-embedded`.
- various CSS changes, to properly render an embedded full app
- don't re-open cached and non-autojoined chats in singleton mode

The goal here is to extend the `embedded` `view_mode` so that the full app can
also be embedded, not just a single MUC or private chat.

To do this, we'll need to differentiate between multi and singleton chat apps.

* A singleton chat app contains only a single chat.
* A multi-chat app can contain zero or more chats

So we introduce a new config option, `singleton`, which when used with
`view_mode` set to `embedded` will determine whether a single chat or the full
app is embedded.

Similarly, in `overlayed`, `fullscreen` and `mobile` view modes, `singleton`
set to true will allow only one chat within the parameters of that view mode.

We're appropriating the word `singleton` and introducing the concepts of
`uniview` and `multiview` (see a785ca8) to cover what was
previously meant with `singleton`.

updates #1297
2019-05-24 20:39:19 +02:00
JC Brand
271c79eae8 Refactor message corrections
- Save date for older message versions and display it in the modal
- Properly handle the correction being received *before* the corrected message
2019-05-22 13:26:46 +02:00
JC Brand
7cd69726a8 Loosen coupling between ChatRoomOccupantsView and ChatRoomView
Hide/show the sidebar based on state and not imperatively in ChatRoomView
2019-05-15 14:50:12 +02:00
JC Brand
ca5b6f9fde Add class on MUC message to indicate author's role 2019-05-13 20:10:48 +02:00
JC Brand
3bd9e09fd7 Don't wipe the nickname value when rerendering the form
Ideally Snabbdom wouldn't completely replace the input when we add the
`error` class, because that's what's causing the input value to be
cleared.
2019-04-25 08:35:44 +02:00
JC Brand
d311e14013 Render MUC forms with Backbone.VDOMView
That way we don't lose the user's input values, we avoid flashing and we
avoid unnecessary rendering.

In the process, fixed an annoying issue where Chrome auto-completes
what it thinks is the username into the "Language Tag" field of the MUC
config form.

Instead we tell Chrome that the MUC JID is the username, thereby also
letting it save the password to to that JID.
2019-04-24 14:51:12 +02:00
JC Brand
e1392895b0 Fix: when closing a modal the overlay doesn't get removed
Looks like the `webkitTransitionEnd` event doesn't fire because `fade`
is already on the modal, so there's no transition, which means that in
bootstrap.native the event doesn't get fired to remove the overlay.
2019-04-18 16:14:51 +02:00
JC Brand
725a382e3b Refactor initialization and defaults for chat boxes
- Let box_id start with char for valid HTML.
- No need to use SHA1 for box id
- No need for the user_id attribute.
- Set nickname when we set the roster contact.

Also...

- _converse.api.contacts.get is now async
- _converse.api.chats.create is now async
2019-04-18 16:14:51 +02:00
JC Brand
06f53e7f18 Add some padding to form error message 2019-04-11 23:42:19 +02:00
JC Brand
f84c201437 Hide the textarea when a user is muted in a groupchat 2019-04-11 01:40:16 +02:00
JC Brand
36761f290e Don't show checkmark for /me messages 2019-04-10 19:34:31 +02:00
JC Brand
a75c118a2c Prioritize roster nickname as message and chatbox display name
Set reference to roster contact on the message and chatbox object and
listen for changes to the nickname.

Currently, because chat boxes are fetched and initialized before the
roster, messages and chats are repainted with the correct display name
only later, causing a "flash" effect.

Ideally we would only initialize the chat boxes after the roster
contacts have been fetched, but this is currently not easily possible
because we need the control box to render before everything else.
2019-04-09 17:20:41 +02:00
JC Brand
be1abdb5ff Add classes for easy styling 2019-03-28 15:43:29 +01:00
Christoph Scholz
dde815e0a8 Allow manual entry of jid with xhr_user_search_url 2019-03-28 15:38:56 +01:00
JC Brand
34b8cd2ee6 Prevent user from adding themselves as contact 2019-03-28 15:36:08 +01:00
JC Brand
cc865de0f0 Add new config setting autocomplete_add_contact
Determines whether search suggestions are shown in the "Add Contact" modal.
2019-03-28 14:34:12 +01:00
JC Brand
b726a2353c Remove Awesomeplete in favor of _converse.AutoComplete 2019-03-28 12:43:34 +01:00
JC Brand
75ae76ad93 Use _converse.AutoComplete in "Add Contact" modal 2019-03-28 10:47:14 +01:00
JC Brand
616731b323 Don't show MUC domain if locked_muc_domain is set to 'hidden' 2019-03-27 13:13:07 +01:00
JC Brand
18ad34e194 Show emoji shortname in tooltip 2019-03-27 08:41:32 +01:00
JC Brand
3ce3d661bc Make sure required registration fields have "required" attribute 2019-03-26 14:52:26 +01:00
JC Brand
9f290dab25 New config setting locked_muc_nickname
When set, the "Nickname" field won't be shown in the "Add groupchat"
modal and instead the nickname will be automatically set (based on other
config settings).
2019-03-26 13:29:33 +01:00
JC Brand
32f0eb5488 Fixes #1407. Don't allow empty value for MUC nickname 2019-03-26 13:03:42 +01:00