Commit Graph

503 Commits

Author SHA1 Message Date
JC Brand
1de2f7145c Let bookmarks list use same markup/css as the available rooms list 2016-10-18 11:34:46 +02:00
JC Brand
623c56c89f Minor refactoring.
Split showRoomInfo into two new methods.
2016-10-18 11:34:46 +02:00
JC Brand
0fe4031a1b Close all chat boxes when disconnected (with no reconnection attempt) 2016-10-18 11:34:46 +02:00
JC Brand
2d6d4df1f1 Use requestAnimationFrame instead of setTimeout
For better performance.
2016-10-17 13:16:41 +02:00
JC Brand
4b28f3f803 Bookmarks fixes.
- Remove bookmark from list when removed from collection
- Only render list after all bookmarks have been fetched
- Properly remove bookmarks from sessionStorage
2016-10-17 11:20:20 +02:00
JC Brand
b832285d93 Markup fix to allow bigger chatview avatar 2016-10-15 00:02:22 +02:00
JC Brand
862af642ff Move avatar markup to a template and make size configurable 2016-10-14 23:42:54 +02:00
JC Brand
2712bcb7cc Use strophejs-plugins from NPM 2016-10-13 21:55:39 +00:00
JC Brand
f60ee4d640 Refactor rooms to have separate handlers for presence and message stanzas 2016-10-13 18:22:37 +02:00
JC Brand
43ae702c7a Only fetch bookmarks once chatboxes can be handled. 2016-10-13 18:08:59 +02:00
JC Brand
5a3917925e Add a new configuration setting: connection_options
Allows you to pass in options for the `Strophe.Connection` constructor.
2016-10-12 14:16:34 +02:00
JC Brand
8d2788c543 Handle case where there aren't bookmarks 2016-10-06 14:21:08 +02:00
JC Brand
fc48e02937 More lazily render the bookmarks list
Could still be improved.
2016-10-06 13:21:59 +02:00
JC Brand
0020be34d7 Show a list of current bookmarks in the "Rooms" panel 2016-10-06 12:05:25 +02:00
JC Brand
e39999f3ec Check bookmarks for nicks when joining rooms 2016-10-05 23:15:42 +02:00
JC Brand
6972066076 Bookmarked rooms will now be automatically opened
If configured for it.
2016-10-05 23:15:42 +02:00
JC Brand
e80f001b35 Allow bookmarks to be removed from rooms
Refactored the code a bit in the process.
2016-10-05 23:15:42 +02:00
JC Brand
7ca7943706 Indicate whether a chatroom has been bookmarked. 2016-10-05 23:15:42 +02:00
JC Brand
3363041625 _super has been renamed to __super__. 2016-10-05 23:15:42 +02:00
JC Brand
3e77deee26 Bugfix in format of IQ stanza to save bookmarks. 2016-10-05 23:15:42 +02:00
JC Brand
052dd19252 Initial work on adding chatroom bookmarks. 2016-10-05 23:15:42 +02:00
Mathias Ertl
1ba68dc8b2 Csp compat (#695)
* Remove some inline CSS style to improve CSP compatibility

* update changelog
2016-10-03 19:45:06 +02:00
JC Brand
fa4e51f3ba Handle undefined settings being passed in. 2016-09-30 10:42:15 +02:00
JC Brand
90d1071df0 Load templates in the respective plugins 2016-09-23 12:35:01 +02:00
JC Brand
ab76f1da44 Let core populated the roster, and send the initial presence
This allows for cleaner separation between core and rosterview, making it
easier to remove that plugin for more stripped down deployments.
2016-09-21 15:06:48 +02:00
JC Brand
ac2c5f3e4e Allow the context to be passed in when registering event listeners
Similar to how backbone.js does it.
2016-09-21 13:15:45 +02:00
JC Brand
05a577059b Use converse instead of this, to be more explicit. 2016-09-21 11:48:53 +02:00
JC Brand
d8d1c283a7 Let the RosterView render and populate itself
instead of having the ControlBoxView do it. This provides for cleaner
separation between the two plugins.
2016-09-21 11:48:43 +02:00
JC Brand
7030495275 Refactor the rosterview.fetch method
So that we can also fetch the roster also without the controlbox and rosterview.
2016-09-20 17:38:01 +02:00
JC Brand
713922a9e1 Update to Strophe 1.2.8 and add support for SASL-EXTERNAL auth 2016-09-16 13:06:52 +02:00
JC Brand
600f98afcb Attempt to mitigate against performance degrading attacks. 2016-09-12 13:13:57 +02:00
JC Brand
89e5bd7c54 Update to pluggable.js 0.0.2 2016-08-31 10:39:11 +00:00
JC Brand
66c7c41888 Emit 'roster' event after updating contacts 2016-08-31 09:59:54 +00:00
JC Brand
3c9b5bd7a0 More work on session management.
When it's not possible to reconnect due to password no longer being cached,
render the login form.

Fixed a bug whereby after one failed reconnection event, reconnection becomes
impossible (due to 'connection' state of the controlbox).
2016-08-23 18:14:09 +00:00
JC Brand
f5b182c365 Set connected back to true after reconnect. 2016-08-23 13:25:34 +00:00
JC Brand
ba67f37473 Only show desktop notifications for error/warn feedback messages 2016-08-23 11:35:16 +00:00
JC Brand
7a428f4dc8 Configure path for almond.js 2016-08-23 09:35:34 +00:00
JC Brand
c65eee9ed3 Use almond.js via npm (instead of bower) 2016-08-23 09:16:12 +00:00
JC Brand
4a2048baae Found a better way to ensure roster is fetched after reconnecting. 2016-08-23 08:53:37 +00:00
JC Brand
a2ba3ccd4c Fixed chat state value, should be chat not chatty. 2016-08-23 08:43:20 +00:00
JC Brand
c6d37b57e7 Ability to specify both subject and message for feedback messages
This allows for better desktop notification messages.
Also improved the wording for some of the feedback messages.
2016-08-23 08:00:41 +00:00
JC Brand
814845e879 Provide a nicer notification when reconnecting
after a dropped connection.
2016-08-21 11:17:06 +00:00
JC Brand
b8aaf751d2 Changes concerning caching of data in the browser.
- Add new configuration setting messages_storage
- Hardcode the storage for roster contacts and chatroom occupants to `sessionStorage`.
2016-08-21 10:55:45 +00:00
JC Brand
95a0b91afa Update 'rooms' api to allow user to pass in room attributes. 2016-08-19 17:16:36 +02:00
JC Brand
1ee7d06a08 Further document the auto_reconnect option
and drop the reconnection timeout to 3 seconds (from 5).
2016-08-19 14:11:37 +00:00
JC Brand
59143c1c72 More work on auto-reconnecting and on maintaining sessions.
- Added the ability to reconnect to more disconnection causes.
- Make sure the roster is fetched again when reconnecting.
2016-08-19 12:16:55 +00:00
JC Brand
31f0e069ab Decided to use 30secs instead of 20. 2016-08-18 10:19:43 +00:00
JC Brand
4d28ae3c11 Tweak timeouts regarding status notifications.
Send a <paused/> notification after 10 seconds, instead of 20.
Auto-remove a typing notification in the chat box after 20 secs instead of 10.

This is to avoid situations where the status notification gets
auto-removed while the typer keeps on typing without long enough breaks in
between for <pause/> states, thereby causing the recipient to not be aware that
they're still typing.
2016-08-18 09:28:48 +00:00
JC Brand
fdb0425722 Make sure to scroll down after revealing the chat room messages. 2016-08-18 09:08:12 +00:00
JC Brand
6ac4f2601d Fixes #677 Chatbox does not open after close
Problem was a race condition between hide and show methods.
Solution was to not hide the chat box during the initialize method.
2016-08-12 20:38:39 +00:00