Commit graph

165 commits

Author SHA1 Message Date
David Baker
e3a5776eae We should clear /login off the URL after login 2016-08-03 09:57:12 +01:00
David Baker
4825ab8fe7 No need to set options in WillStartClient
We can set them any time up to that point
2016-08-03 09:53:02 +01:00
David Baker
0c2bd10594 Comment functions 2016-08-02 19:05:05 +01:00
David Baker
0c61c52480 Just use Lifecycle.setLoggedIn 2016-08-02 19:02:07 +01:00
David Baker
d74a8e405d Remove unused function 2016-08-02 19:00:01 +01:00
David Baker
65865f879f We already know we're a guest here 2016-08-02 18:59:09 +01:00
David Baker
58bbb35096 s/login/setLoggedIn/ 2016-08-02 18:48:27 +01:00
David Baker
3818a89ca3 Comment guestCreds 2016-08-02 18:46:43 +01:00
David Baker
db9750a7e3 Call the logout API when we log out
Also try to refactor some of the login/logout code out of MatrixChat and into a separate Lifecycle.js. This still isn't great, but it at least gets some code out of MatrixClient.
2016-08-02 14:04:20 +01:00
wmwragg
a385955c6b Fixed MatrixChat Dialog Spinner. Still needs testing, unsure what triggers it. 2016-07-17 21:23:52 +01:00
Richard van der Hoff
2ddfccdab3 Merge pull request #318 from matrix-org/dbkr/fix_default_hs
Fix https://github.com/vector-im/vector-web/issues/1679
2016-06-21 17:55:27 +01:00
David Baker
d3265ab970 Redundant getDeafultHs()
This now can never be falsey so no point checking it
2016-06-21 17:46:55 +01:00
David Baker
213e284edf Fix https://github.com/vector-im/vector-web/issues/1679 2016-06-21 11:05:37 +01:00
David Baker
fc06ebcc63 Fix view_next_room 2016-06-20 18:43:56 +01:00
David Baker
4c214119b2 Fix PR feedback 2016-06-20 18:05:58 +01:00
David Baker
d8dedae084 Fix /join to be consistent with the other code
Plus a number of other tidyups:

 * Fix /join to dispatch a view_room for the room alias
   with the additional auto_join parameter
 * Make RoomView automatically join the room if the auto_join
   parameter is true and the user isn't already in it
 * Tidy up RoomView's peeking code, also fixing
   https://github.com/vector-im/vector-web/issues/1220
   in react-sdk (although it still requires a synapse change
   to actually fix, but react-sdk does 'the right thing').
 * Remove duplication of usage text from /join command
 * Amalgamate MatrixChat::_viewRoom's many, many parameters
   into an object and sort out case consistency a little.
2016-06-20 16:30:51 +01:00
David Baker
6adce649eb Use the first alias is there's no canonical alias 2016-06-17 16:56:34 +01:00
David Baker
3b5378fa53 Show canonical alias in URL bar
Use https://github.com/matrix-org/matrix-js-sdk/pull/140 to get the canonical alias, because that's a thing now.
2016-06-17 15:17:45 +01:00
David Baker
0ef5cc891e Add currentRoomId / Alias to getInitialState
with docs
2016-06-14 14:10:49 +01:00
David Baker
b8eee08d69 Fix member list vanishing
Add a callback to RoomView that it can give the room ID to once it's resolved it, since this lookup is now the responsibility of the roomview and only the roomview. The view_room action now has either an alias or an ID, not both. Also fix RoomView to load the room properly and not try to peek when it shouldn't.
2016-06-14 12:56:37 +01:00
David Baker
aaefdf19c5 Fix MatrixChat syntax fail 2016-06-14 11:57:07 +01:00
David Baker
11a38fce48 Fix peeking
Sorts out more of the room joining mess. currentRoom which held the room ID is now more appropriately called currentRoomId. RoomView will now take a roomID or alias as before but will now look up the room ID as required if given the alias. Also, now look up the alias every time you click on it so it's never stale, rather than looking in your current rooms for a room that thinks it has that ID.
2016-06-14 11:37:04 +01:00
David Baker
719928f389 Remove view_room_alias
As it was basically the same as view_room. Use view_room instead which will handle whether we pass an ID or an alias into RoomView
2016-06-10 15:12:42 +01:00
David Baker
72b3ce200d Make the room directory join rooms by alias
Also makes some improvement on the multiple code path mess for joining rooms
2016-06-09 18:49:06 +01:00
David Baker
049e3a968b Merge pull request #303 from matrix-org/rav/factor_out_createroom
Factor out common parts of room creation
2016-06-09 11:05:22 +01:00
Richard van der Hoff
de36aa63fb Factor out common parts of room creation
Take the duplicated code out of MatrixChat and MemberInfo, and put it in a
separate 'createRoom' module
2016-06-09 10:58:25 +01:00
David Baker
98ef793809 Default IS should be vector.im now 2016-06-09 10:56:14 +01:00
David Baker
bb405563c8 Fix default servers 2016-06-09 10:54:56 +01:00
David Baker
05404efa34 Remove if (this.props.config)
Since it now defaults to the empty dictionary (and if you pass null in, you deserve everything you get).
2016-06-09 09:53:37 +01:00
David Baker
c123f02842 Make the config optional 2016-06-08 18:45:46 +01:00
David Baker
7e8c8dd336 Remove SdkConfig
just take a config in MatrixChat, pass the individual things down through the chain.

This may become unwieldy: let's see how it goes.
2016-06-08 14:54:34 +01:00
David Baker
b54376aa2a Add singleton object to hold SDK configuration 2016-06-07 21:49:06 +01:00
Matthew Hodgson
83fd02bdfa specify a brand when registering accounts 2016-06-02 11:51:26 +01:00
Matthew Hodgson
272afe39dc do not list rooms by default 2016-06-01 02:03:53 +01:00
David Baker
118eec8cc0 Add a fallback home server to log into
If login fail with a credential error on the default HS, try
logging in on the fallback one.
2016-05-27 14:57:43 +01:00
Matthew Hodgson
fd09d5c570 switch badge count to per-conversation, and add per-room badges 2016-05-17 11:14:12 +01:00
Matthew Hodgson
b86af8939a fix usersettings cancel fail on new accounts 2016-05-05 15:30:56 +01:00
Richard van der Hoff
0fd0b0c5f3 Whitespace fixes
Fix some trailing whitespace
2016-04-22 17:05:48 +01:00
Matthew Hodgson
8db14bde60 switch Tinter from using dispatch to a synchronous update when changing the colourscheme, to avoid CSS getting out of sync with SVG colours 2016-04-16 01:00:10 +01:00
Matthew Hodgson
19770563f4 add cancelButton to simpleHeader 2016-04-15 22:16:19 +01:00
Richard van der Hoff
85277a237a Merge pull request #270 from matrix-org/rav/issue_1314_federated_rooms
RoomView: Handle joining federated rooms
2016-04-13 16:36:46 +01:00
Richard van der Hoff
ec5ca1ca28 s/roomAlias/roomAddress/ to reduce confusion 2016-04-13 12:26:40 +01:00
Richard van der Hoff
047524d093 Merge pull request #269 from matrix-org/rav/stop_client_on_unmount
Stop the MatrixClient when the MatrixChat is unmounted
2016-04-13 11:05:02 +01:00
Richard van der Hoff
93a142480c RoomView: Handle joining federated rooms
This hopefully fixes an issue where joining a federated room via the directory
would get stuck at a spinner of doom, due to us not recognising the room in
question when it came down the /sync. We now catch the room id in the response
from the /join, and use it to match up the room in onRoom.

props.roomAlias, props.roomId, and state.room.roomId were somewhat confusing,
so I've tried to rationalise them:

 * props.roomAlias (named thus to stop you assuming it's a room id) is the
   thing that the parent component uses to identify the room of interest, and
   can be either an ID or an alias (ie, it replaces props.roomId and
   props.roomAlias)

 * Everything that needs a room ID now has to get it from state.room.roomId.
2016-04-13 08:59:28 +01:00
Richard van der Hoff
1361333fdc Stop the MatrixClient when the MatrixChat is unmounted
The MatrixClient never gets unmounted in the real app, but I've been working on
some tests which would rather like to be able to create and destroy MatrixChats
and not have the clients hang around forever.
2016-04-12 18:38:10 +01:00
Matthew Hodgson
11f3d5f993 make the UI fadable to help with decluttering 2016-04-12 17:18:32 +01:00
Richard van der Hoff
8b8ee21765 Catch pageup/down and ctrl-home/end at the top level
Make the scroll keys work when the focus is outside the message panel.
2016-04-05 13:40:36 +01:00
Matthew Hodgson
1a62369a01 prioritise new version bar 2016-03-23 18:05:47 +00:00
David Baker
d6218ca153 Actually calling functions often helps. 2016-03-23 12:02:26 +00:00
David Baker
30b76d372c Error messages for guests creating rooms 2016-03-22 12:58:12 +00:00