Commit Graph

11 Commits

Author SHA1 Message Date
JC Brand
115abdda27 muc-views: pass all model attributes to template
Makes it possible to show a validation message in a downstream
application.
2019-12-03 15:02:37 +01:00
JC Brand
d7d810ba89 Improvements to rendering MUC MAM logs before joining
- Add config variable `muc_show_logs_before_join`
- Restore nickname form for the original use-case (when not showing MAM logs before joining).
- Render nickname form in the `.muc-bottom-panel` when showing MAM logs (instead of in a modal)
- Show a message when there aren't any archived messages to show
- Fix converse-mam so that chat logs are properly fetched before entering a MUC

closes #1266
2019-11-29 09:23:15 +01:00
Emmanuel Gil Peyrot
a83911d67f WIP: Move the nickname selection form to a modal 2019-11-28 15:45:48 +01: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
9c80ab5d43 Use bootstrap button markup 2018-03-11 12:07:36 +01:00
JC Brand
8a4aa4efdd Use a named variable for _.template
This removes the need for `switch (obj)` in the template which is not
allowed in strict mode.

Additionally using a named variable speeds up rendering.
2017-11-05 18:59:29 +01:00
JC Brand
85f6a75fed Escape user-generated input to avoid injection attacks 2017-02-13 13:41:37 +00:00
JC Brand
890d87c980 Add initial demo of embedded MUC chat 2017-02-02 21:55:05 +00:00
JC Brand
be47ceaab5 In case of a nickname conflict, enable the user to choose a new one 2016-07-26 07:12:56 +00:00
JC Brand
cd75b2efab Let the user choose their nick after opening a chat room
This change is with an eye on supporting reserved nicknames, in which case the
user who has a reserved nickname won't have to choose a nick upon joining a
room.
2016-07-26 07:12:56 +00:00