JC Brand
f6335dcabe
Document fired events with JSDoc
2019-03-29 21:04:33 +01:00
JC Brand
d41a7a14c3
Use API to emit and listen to events
2019-03-29 14:16:07 +01:00
JC Brand
27557d6a04
Document _converse.ChatBox.prototype.sendMessage
as an API method
...
Until now, we've only been explicitly documenting the `_converse.api`
namespace and only considered the methods under it as forming the API
contract (which determines how we do semver releases).
It appears as if we've reached a point where trying to keep everything
under the `_converse.api` namespace no longer makes sense. Certain
methods are applicable to particular models and trying to shoehorn them
into the `_converse.api` namespace seems clunky and non-intuitive.
I've therefore decided to slightly refactor `sendMessage` to let it take
two simple parameters and to document it with JSDoc so that it's
presented as an API method, albeit only available on a chat model.
updates #1496
updates #1504
2019-03-21 21:03:02 +01:00
Emmanuel Gil Peyrot
b7ae9f212c
Replace http: with https: in conversejs.org links
2019-03-04 17:47:45 +01:00
JC Brand
ce2ae87df2
Bugfix. Open groupchats not shown when logging in after disconnection
...
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
2019-02-20 23:08:27 +01:00
JC Brand
7753177ca9
Remove unnecessary aliases from webpack
2019-01-25 07:32:50 +01:00
JC Brand
9b61b2bdab
We do need a validate method, but it needed a fix.
2018-12-13 10:07:31 +01:00
JC Brand
c954610903
No need to call validate
here
...
Since the plugin is not enabled when it matters.
updates #1374
2018-12-13 08:57:58 +01:00
JC Brand
5dacb96b78
Don't try to create ChatBox from controlbox data in embedded mode
...
updates #1374
2018-12-12 18:52:41 +01:00
JC Brand
7109ff672e
Add api method to retrieve controlbox
2018-11-29 12:37:21 +01:00
JC Brand
d341c6a13b
Revert "Use getter to lazily create Strophe.Connection"
...
This reverts commit 7af73c3471
.
Doesn't look like the right approach for adding support for XEP-0156.
Work on that will continue in a branch in the meantime.
2018-11-20 17:31:53 +01:00
JC Brand
7af73c3471
Use getter to lazily create Strophe.Connection
2018-11-18 18:05:47 +01:00
JC Brand
1e7247b4d2
Add client info modal showing name and version number
2018-11-14 12:01:27 +01:00
Christoph Scholz
9a307da808
show version info in login dialog
2018-11-13 21:12:24 +01:00
Christoph Scholz
4b7d18f418
added values 'on' and 'off' for 'trusted' option
2018-11-13 18:36:24 +01:00
JC Brand
6904f9a897
Use es2015 modules instead of UMD
2018-10-23 12:25:58 +02:00
cmrd Senya
8ba8eb02fa
Update main converse.js package to use @converse/headless
...
* Update moved dependencies references to @converse/headless
* Remove unused webpack resolve aliases
2018-10-22 12:44:38 +02:00
JC Brand
31080bf2f9
Add a FormData polyfill for Edge comptaibility
...
Fixes #1220
2018-09-24 16:18:51 +02:00
JC Brand
6dfd0d1aa5
Make sure popovers also work in overlay view mode
2018-09-19 13:01:15 +02:00
JC Brand
023249f62e
Render profile avatar as canvas.
...
We now have uniform avatar rendering for the profile, messages and
chatboxes.
By rendering as canvas, we can avoid stretching the image.
In the process I also moved the ChatBoxViews collection into its own
plugin `converse-chatboxviews` and placed the AvatarAware views there.
fixes #1157
2018-09-06 15:33:13 +02:00
JC Brand
86a0fa280b
Call clearSession
when disconnecting
...
So that the chatboxes get closed/removed.
Also, don't render the login form when we're just reconnecting.
2018-08-31 10:17:24 +02:00
JC Brand
f72ace506f
Replace the onChatBoxAdded override with event handlers
2018-08-28 15:08:38 +02:00
JC Brand
9f8d30dde3
Create a new store, _converse.config
to store trusted
...
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.
Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
2018-08-23 09:41:39 +02:00
JC Brand
9ed2ad631a
Store whether this is a trusted device in _converse.session
...
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.
Additionally, update singleton models to have the 'id' available as a getter.
Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
2018-08-22 23:36:54 +02:00
linkmauve
d25b227ba4
Remove @locked_domain if it has been provided in the JID. ( #1132 )
...
Fixes #917 .
2018-07-17 08:15:27 +02:00
JC Brand
16faf62d3f
Fixes #1129 Hide "Contacts" section when logged in anonymously
2018-07-16 00:09:54 +02:00
JC Brand
6cd9d2e813
Rename _tearDown
to tearDown
and rebuild
2018-06-07 14:30:10 +02:00
JC Brand
6dc9e8edf1
Use webpack for module bundling
2018-05-25 14:23:32 +02:00
JC Brand
c920725832
Add a clearSession
event to avoid using overrides.
2018-05-18 15:44:42 +02:00
JC Brand
2508ef0e9e
Make the default value for the 'trusted' checkbox configurable
...
Also remove the `message_storage` setting.
2018-05-18 15:44:42 +02:00
JC Brand
59535656b6
Add checkbox to indicate whether this is a trusted device
2018-05-18 15:44:42 +02:00
JC Brand
7a254a56e0
Pad the toggle and rename to "Chat Contacts"
...
to make it clearer that this toggle relates to chatting.
2018-03-30 14:16:07 +02:00
JC Brand
81fb2f443d
Bugfix. Make sure roster is re-inserted after reconnection
2018-03-30 14:16:04 +02:00
JC Brand
d7de739001
Add close button for controlbox in overlay view mode
2018-03-09 23:53:05 +01:00
JC Brand
392a7e8ab3
Don't use the bootstrap responsive grid for chats in overlay mode
2018-03-09 23:06:41 +01:00
JC Brand
40f4555419
Only show controlbox head when logging in, in overlayed view mode
2018-03-09 11:46:23 +01:00
JC Brand
db44a4f44d
Update the login form for the overlayed view mode
2018-03-07 21:40:55 +01:00
JC Brand
d72463c939
Make more semantic by putting login/register column info in css
2018-03-07 18:06:02 +01:00
JC Brand
e344bf769a
New modal for adding contacts.
...
Remove the xhr_user_search and xhr_user_search_url options
Lazily create modals
2018-02-23 16:33:09 +01:00
JC Brand
b3409fd01b
Move common modal view code into a base class
2018-02-22 18:41:01 +01:00
JC Brand
a5513229de
Work on showing auto_joined chatrooms
2018-02-22 11:49:59 +01:00
JC Brand
1ce46a84ae
Make sure that statusInitialized
is always called
...
regardless of wether it's a connection or reconnection event.
We can then only listen for `statusInitialized` to handle both cases.
2018-02-22 11:20:26 +01:00
JC Brand
47aad31899
Tricky refactoring.
...
Removed `_converse.chatboxviews.showChat` and trying to simplify how
chats are created and when they're shown.
Prompted by the work to split the MUC views into a separate plugin
2018-02-21 23:47:02 +01:00
JC Brand
ede21e7c32
Remove controlbox tabs and show rooms and contacts panels together
2018-02-16 14:16:55 +01:00
JC Brand
5517e3554c
Add a new configuration setting: root
2018-02-09 16:08:39 +01:00
JC Brand
680f30412a
Bugfix. Object values for defaults
passed-by-reference
2018-02-08 17:06:36 +01:00
JC Brand
4742e66b69
Fix linting errors and failing tests
2018-02-07 14:21:46 +01:00
JC Brand
f724f49087
Add ability to run tests for transpiled code
2018-01-29 14:14:56 +01:00
JC Brand
c012351df2
Updates #994 . may not be defined
2018-01-22 12:37:29 +01:00
JC Brand
8d999b2802
Explicit plugin dependencies. Make hide_open_bookmarks false by default
2018-01-10 13:26:50 +00:00
JC Brand
199e2e7e27
The refreshWebkit
hack appears to no longer be necessary
2018-01-04 12:11:03 +00:00
JC Brand
671691353a
Use Backbone.NativeView instead of Backbone.View
2018-01-03 20:41:03 +00:00
JC Brand
ccb97eb7fd
Remove jquery from converse-controlbox
2018-01-03 16:49:08 +00:00
JC Brand
9fca25b6a9
Use snabbdom via backbone.vdomview
2017-12-13 22:04:58 +00:00
JC Brand
5939f11192
Some work on removing jquery from the controlbox code
2017-11-17 14:42:09 +01:00
JC Brand
9d1c6236ac
Move the xmpp status (e.g. profile) view into separate plugin
2017-11-17 13:32:03 +01:00
JC Brand
cfd5dad9c5
Use [backbone.vdomview]( https://github.com/jcbrand/backbone.vdomview )
...
For the MUCJoinView and the LoginPanel
2017-11-10 22:01:36 +01:00
JC Brand
a6f2877ed9
Disco API refactoring
...
This came out of the desire to let `converse-muc` use the API to
determine whether MUC is supported. However, we don't know the entity
JID before hand and I couldn't think of a good way to query all current
and future entities for a feature.
So `converse-muc` still does it's own thing without the API, but some
refactoring came as a result of attempting.
2017-11-10 21:37:35 +01:00
JC Brand
46ca6c7de2
Make the router global and clear login/register fragments
...
upon login or after registering.
2017-10-31 21:47:27 +01:00
JC Brand
724e66d0e5
Initial code for opening a room via URL
2017-09-29 00:07:16 +02:00
JC Brand
5ac1e00cdb
Don't add fade-in to controlbox. Causes flashes
2017-09-27 00:36:19 +02:00
JC Brand
74b91faf9a
Use browser-based "constraint validation"
...
to validate required fields, instead of doing it manually.
All supported browsers have this feature.
2017-09-25 13:55:17 +02:00
JC Brand
85078b403b
Use change
event instead of blur
.
...
This solves a bug whereby switching to the register form doesn't happen because
validation gets triggered which somehow prevents it.
2017-09-24 10:21:14 +02:00
JC Brand
3d53943f49
Generate pot file from the converse-no-dependencies
build
...
This is a workaround for the fact that getttext doesn't support ES2015 template
literals and it also allows us to scan for translateable strings in our HTML
templates.
2017-09-24 00:30:43 +02:00
JC Brand
92af05d510
Some more refactoring now that we use a vdom for the login panel
...
We can now simply call `render` whenever we want to show an error or
notification message.
The flip side is that the template is now larger and contains more login.
2017-09-24 00:30:43 +02:00
JC Brand
be7f8ab4c4
Use a virtual dom to render the login form
2017-09-24 00:30:43 +02:00
JC Brand
937b310733
Refactor login form to make it more reactive.
2017-09-24 00:30:43 +02:00
JC Brand
9cdb0dde8c
Various changes
...
* In certain places, use native methods instead of jQuery
* Nicer rendering of registration forms
* Use CSS3 fade-in animations.
2017-09-24 00:30:43 +02:00
JC Brand
57d2f9bce8
Add validation message for an invalid JID in the login form
2017-09-24 00:30:43 +02:00
JC Brand
158acbf1d7
Fixes #828 Add routing for login and register URL fragments
2017-09-24 00:30:43 +02:00
JC Brand
7e4fb52f8d
Render register and login forms via links
2017-09-24 00:30:43 +02:00
JC Brand
37fcc6b70e
Hide connection feedback parent element
2017-09-24 00:30:43 +02:00
JC Brand
1613c0d7de
Styling changes now that we don't have tabs.
2017-09-24 00:30:43 +02:00
JC Brand
196a42dc50
Make sure strings get translated and that interpolation is safe
2017-09-24 00:30:43 +02:00
JC Brand
681245584e
Remove Login
and Registration
tabs and consolidate into one panel
2017-09-24 00:30:42 +02:00
JC Brand
bd913734e4
Don't hang indefinitely + nicer error messages
...
when a connection can't be established.
2017-09-08 14:24:38 +02:00
JC Brand
b9b9689668
Fixes #912 maximize
method in converse-minimize
fails...
...
if the `controlbox` is not there.
Also, make `converse-controlbox` and `converse-muc` optional dependencies of
`converse-minimize`.
2017-08-29 12:21:53 +02:00
JC Brand
734991f1ce
Fixes #907 : unnecessary validation error
2017-08-29 10:32:44 +02:00
JC Brand
3b8c2d1b00
Various bug and timing fixes due to the previous refactoring
2017-08-16 14:16:24 +02:00
JC Brand
694eabfc0e
Use promises to determine when to create the controlbox
2017-08-16 13:22:18 +02:00
JC Brand
956340aa8c
Make initialized
a promise and use it in the controlbox
2017-08-16 12:32:15 +02:00
JC Brand
bc6b5ca930
controlbox: Set connected
immediately
2017-08-16 12:32:15 +02:00
JC Brand
3afe5eb8f3
Run the lodash converter only once.
2017-08-15 16:46:55 +02:00
JC Brand
e4d95eb794
Don't load lodash.fp
in converse-core. It's not being used there.
2017-08-15 16:36:43 +02:00
JC Brand
bfeb297ffc
Clarify usage of locked_domain
.
...
Also, declare it in the controlbox plugin, not in core, where it's not used.
2017-08-15 10:23:57 +02:00
JC Brand
27931d3e37
controlbox: Add JID validation to the login form
2017-07-21 20:14:38 +02:00
JC Brand
631ac6108f
controlbox: have only one dropdown menu open at one time.
2017-07-21 20:10:32 +02:00
JC Brand
6fea88fcc3
Add JID validation and error messages to the add contact
form
2017-07-17 22:08:15 +02:00
JC Brand
6ef0536e31
Some work on using es6 promises
2017-07-10 21:14:48 +02:00
JC Brand
9a9eae3fcf
Use esnext to auto-generate es2015 syntax
2017-07-10 17:46:22 +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
f81a94baf1
Move updateSettings
to the private API.
...
Also add an API method for exposing new promises.
Update the plugin and API documentation, specifically concerning the above
changes.
2017-07-05 11:03:13 +02:00
JC Brand
f09d01c930
roster: Move roster push and rosterX handlers to core.
...
There's nothing about them that's view specific.
2017-06-16 11:42:46 +02:00
JC Brand
be28e04c57
roster: render unread messages in tab upon reload
...
Also including css fixes around the unread messages indicator.
2017-06-15 18:38:38 +02:00
JC Brand
e48015df66
Fixes #575
2017-06-15 17:51:56 +02:00
JC Brand
d527f693c2
Updates #890 Destroy and recreate session upon reconnection
...
This ensures that carbons will be activated again.
2017-06-15 17:30:26 +02:00
JC Brand
3181956b61
controlbox: use `sticky_controlbox
` setting to reduce inverse code
2017-06-15 15:01:34 +02:00
JC Brand
d1bafdb38a
Re-render only the tab when num_unread
changes.
2017-06-09 23:45:54 +02:00
JC Brand
b5ecc1fc6a
Expose the fp version of lodash via the API
2017-06-07 09:15:22 +02:00
JC Brand
a128a70d41
Discriminate between which unread messages to indicate per tab
2017-06-07 00:55:57 +02:00