Commit Graph

295 Commits (2146e89c0900d9752b58c3b3fb833b8bbcc0b4dc)

Author SHA1 Message Date
Luke Barnard 878e5593ba Implement tracking of referrals (#659)
* Implement tracking of referrals

This also modifies (or fixes) auto-joining.
2017-01-31 11:13:05 +00:00
Luke Barnard 4e0889454a GET /teams from RTS instead of config.json
Now that the RTS contains config for teams, use GET /teams to get that information so that users will see be able to register as a team (but not yet auto-join rooms, be sent to welcome page or be tracked as a referral).
2017-01-30 15:50:31 +00:00
Kegan Dougal 97387db014 Reduce log spam: Revert a16aeeef2a
As per #riot-dev, this is no longer required.
2017-01-24 16:40:26 +00:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Richard van der Hoff a16aeeef2a Temporarily add more logging, to try to catch failures on travis 2017-01-20 13:06:06 +00:00
Matthew Hodgson b76b0f755d fix context menu bg 2017-01-20 02:47:47 +00:00
Richard van der Hoff a88f9fdd73 (hopefully) fix theming on Chrome
Jump through some hoops to make Chrome behave sensibly on non-default themes.
2017-01-19 15:36:57 +00:00
Matthew Hodgson 4e5689082d correctly load synced themes without NPE 2017-01-18 20:06:54 +00:00
Matthew Hodgson 3d30553b7f review fixes, plus unbreak to work with new webpack layout 2017-01-18 14:06:47 +00:00
Matthew Hodgson a0bbe3a306 Merge branch 'develop' into matthew/postcss 2017-01-18 12:52:59 +00:00
Luke Barnard 5ef5204c8c Implement simple team-based registration (#620)
* Implement simple team-based registration

Config required goes in the `teams` top-level property in config.json. This consists of an array of team objects:
```json
{
  "name": "University of Bath",
  "emailSuffix": "bath.ac.uk"
}
```
These can be selected on registration and require a user to have a certain email address in order to register as part of a team. This is for vector-im/riot-web#2940. The next step would be sending users with emails matching the emailSuffix of a team to the correct welcome page as in vector-im/riot-web#2430.
2017-01-18 12:48:28 +01:00
Matthew Hodgson 8288eb730c a rather hacky implementation of theme switching 2017-01-17 19:13:23 +00:00
David Baker 13a5337e0f Fix 'create account' link in 'forgot password'
Fixes https://github.com/vector-im/riot-web/issues/2853
2017-01-10 15:16:39 +00:00
Mark Haines 81e429eb14 Fix e2e attachment download by using iframes. (#562)
* Render attachments inside iframes.

* Fix up the image and video views

* Fix m.audio

* Comments, and only use the cross domain renderer if the attachment is encrypted

* Fix whitespace

* Don't decrypt file attachments immediately

* Use https://usercontent.riot.im/v1.html by default

* typos

* Put the config in the React context.

Use it in MFileBody to configure the cross origin renderer URL.

* Call it appConfig in the context

* Return the promises so they don't get dropped
2016-12-02 14:21:07 +00:00
David Baker 8547d00f32 Don't default the page_type to room directory
As it breaks the behaviour of redirecting to /#/directory
2016-11-24 16:39:48 +00:00
David Baker 2aba646acd Clear room alias etc. on logout 2016-11-24 14:58:37 +00:00
David Baker 0069393650 Go back to same room after logging in 2016-11-24 13:28:51 +00:00
David Baker 0bc4659fe0 Fix crash on logging in
If you arrived at the page via a link to a room.

Fixes https://github.com/vector-im/vector-web/issues/2634
2016-11-24 12:33:31 +00:00
Matthew Hodgson a967ddd1cb quick and dirty support for custom welcome pages, with an example for geektime techfest 2016-11-13 14:10:46 +00:00
Richard van der Hoff cb5b311e44 Move saveScrollState into RoomView
It fits much more naturally here than in LoggedInView.
2016-11-04 09:28:35 +00:00
Richard van der Hoff f85a37c667 Factor out LoggedInView from MatrixChat
The idea here is to make a layer which sits around for as long as we have a
valid MatrixClient. Also it makes a plausible split for the render of
MatrixChat, even if they are much too tightly bound for now.
2016-11-03 18:59:32 +00:00
David Baker 3c4370c180 Move 'new version' support into Platform
Also adds support for the platform providing a changelog
2016-11-02 15:58:17 +00:00
David Baker f433f9ca32 Move platform-specific functionality into Platform
Platform classes are provided by the application via
PlatformPeg.set().
2016-11-02 15:10:21 +00:00
David Baker 91771ec17d Ce n'est pas Python 2016-10-01 10:34:21 +01:00
David Baker 6abf6c9ec0 Merge pull request #505 from matrix-org/dbkr/dont_replacestate
Fix version going blank after logging in
2016-09-30 14:32:01 +01:00
David Baker be99f17ee0 Oops, right variable 2016-09-30 14:05:01 +01:00
David Baker 8aeb0cfb68 Dedicated function for resetting screen state 2016-09-30 11:56:32 +01:00
David Baker c41a8da4be Argh, there's more 2016-09-30 11:40:27 +01:00
David Baker 2f7366cb8a Comment state fields 2016-09-30 11:37:50 +01:00
David Baker d5af2d2c52 Use 'Sign In' / 'Sign Out' universally
Rather than a mix of 'sign in/out' and 'log in/out'
2016-09-29 17:38:52 +01:00
David Baker 8cbddfcf28 Fix version going blank after logging in
Don't use replaceState in MatrixClient: there's lots of stuff in
MatrixClient's state now (including the app version) so replacing
the entire state doesn't really make sense (and also blows away
all of the nice defaults we set in getInitialState). Instead,
setState of the things we actually care about wherever we used
replaceState.

Also add a couple of state variables to getInitialState that were
missing.

Fixes https://github.com/vector-im/vector-web/issues/2322
2016-09-29 17:23:07 +01:00
David Baker 746aad9a18 Oops, missed one 2016-09-19 14:47:08 +01:00
David Baker 1341ffca59 Merge pull request #479 from matrix-org/dbkr/directory_network_selector
Pass through config for Room Directory
2016-09-16 17:08:44 +01:00
Matthew Hodgson ff00474aa5 show RightPanel when people click on users 2016-09-16 02:37:06 +01:00
David Baker 44fa851275 Pass through config for Room Directory 2016-09-15 17:18:53 +01:00
Matthew Hodgson 8508e006f0 Merge pull request #469 from matrix-org/wmwragg/chat-multi-invite
Wmwragg/chat multi invite
2016-09-13 19:30:02 +01:00
Matthew Hodgson 17cf2fc745 Merge pull request #470 from matrix-org/matthew/right-panel-collapse
Matthew/right panel collapse
2016-09-13 19:09:18 +01:00
David Baker 5450e93df1 Verbiage 2016-09-13 16:56:53 +01:00
David Baker 3741768a3a Add modal dialog on new room button
https://github.com/vector-im/vector-web/issues/2178
2016-09-13 16:40:15 +01:00
wmwragg 2db8f4ae67 Added pass through of roomId 2016-09-13 14:30:37 +01:00
wmwragg ca1bb0f700 Added new Invite button in the RHS footer which calls the new 'view_invite' action 2016-09-13 14:28:03 +01:00
Matthew Hodgson 3b52081092 wip for collapsable RHS 2016-09-13 12:18:22 +01:00
wmwragg 99dfcb4ed2 It's no longer a onde to one chat dialog, as you can invite multiple people 2016-09-13 10:33:15 +01:00
wmwragg 7dfb8857d8 Merge branch 'develop' into wmwragg/one-to-one-chat 2016-09-07 17:22:10 +01:00
David Baker df1cc8748f Change references to MatrixTools to Rooms
or remove where they were unused
2016-09-07 11:33:58 +01:00
wmwragg d9c6448a0f Adding better deafults and ErrorDialog message 2016-09-05 14:29:21 +01:00
wmwragg 9c0f51fb82 Merge branch 'develop' into wmwragg/one-to-one-chat 2016-09-05 12:06:31 +01:00
wmwragg ca443e01d8 Initial commit of the new ChatInviteDialog 2016-09-05 12:03:16 +01:00
wmwragg 67c623d410 Rename the action to make it clearer what it is doing 2016-09-05 10:29:03 +01:00
Richard van der Hoff b4521bc44c review feedback 2016-09-01 22:45:09 +01:00
wmwragg e7d4ef74d0 Placeholder for one to one chat dialog and functionality 2016-09-01 16:45:24 +01:00
Richard van der Hoff ba341c11fb Show session restore errors on the login screen
If we are unable to load the matrix session on startup, don't just get stuck at
a spinner; instead, show the error on the login screen.
2016-09-01 11:08:40 +01:00
Matthew Hodgson 5e105e1be6 make /user URLs work 2016-08-28 14:04:11 +01:00
Matthew Hodgson de82ac3bc0 don't change URL bar when clicking on linkified rooms or users.
be aware of /user paths.
2016-08-28 02:05:31 +01:00
Matthew Hodgson ad873c2b60 handle matrix.to links correctly. add partial support for #/user URLs 2016-08-28 01:55:42 +01:00
Aviral Dasgupta ff39d52431 add fancy changelog dialog 2016-08-16 03:33:47 +05:30
Richard van der Hoff b9870f2c23 defaultDeviceDisplayName should be a prop
... not a bit of config.
2016-08-12 11:41:45 +01:00
Richard van der Hoff a29325cc46 Set initial_device_display_name on login and register
Let Vector pass in a default device name, and thread it through everywhere to
set it on login and register calls
2016-08-12 10:55:02 +01:00
Richard van der Hoff e32c325863 Don't use MatrixClientPeg for temporary clients
Get rid of MatrixClientPeg.replaceUsingUrls, and instead create local,
temporary MatrixClients for the unauthed steps; we therefore only use
MatrixClientPeg for logged-in clients.
2016-08-11 16:23:03 +01:00
Richard van der Hoff e06763d421 Move guest registration into the login logic 2016-08-11 13:05:16 +01:00
Richard van der Hoff bbfb9291f8 Refactor login token
move the logic for handling login tokens into Lifecycle.loadSession

This means it needs access to the (real) query parmeters, so it depends on
corresponding changes in vector-web.
2016-08-11 11:02:52 +01:00
Richard van der Hoff 1fbddcf6af Use the current HS for guest login
Make sure that we use the homeserver from localstorage for guest regsistration,
in preference to the default.

Also rename the parameters for loadSession
2016-08-11 01:39:33 +01:00
Richard van der Hoff 68f8db3834 Avoid flashing up login screen during guest registration
Fix a bug where we would flash up the login screen during guest registration if
you followed a room link.
2016-08-10 14:34:44 +01:00
David Baker e0f71977b4 Merge pull request #397 from matrix-org/rav/factor_out_sessionloader
Start to factor out session-loading magic
2016-08-10 11:40:58 +01:00
Richard van der Hoff 26c7c9e994 Make SessionLoader a function
There's no point in it being a React component.
2016-08-10 11:36:26 +01:00
David Baker 13a4bfa8fe Merge pull request #396 from matrix-org/rav/fix_react_warning
Hack around a react warning
2016-08-10 10:09:18 +01:00
Richard van der Hoff 24841cc5c4 Start to factor out session-loading magic
Take some of the magic out of MatrixChat.componentDidMount() into a new
component.

Also delete the MatrixChat test. It wasn't really doing much, is broken by the
change, and I am replacing it with (better) app-level tests in the vector
project.
2016-08-10 00:05:44 +01:00
Richard van der Hoff a1d3db76e5 Hack around a react warning
when login completes, we replace the whole state, which means we unset
collapse_lhs, which then leads to complaints from the RoomList.

I think the 'default view' for MatrixChat ought to be factored out to another
component, which could manage collapse_lhs properly; but for now, hack around
it.
2016-08-09 23:57:36 +01:00
David Baker 4b8ad3c102 Merge pull request #393 from matrix-org/dbkr/enable_labs
Add config to hide the labs section
2016-08-05 17:25:25 +01:00
David Baker f8d02c1551 pr feedback 2016-08-05 16:36:35 +01:00
David Baker e8ee5c2f96 Add config to hide the labs section 2016-08-05 16:13:06 +01:00
Matthew Hodgson 90e5ab2ca3 merge in develop 2016-08-04 13:39:47 +01:00
David Baker cbfb0ad998 Merge pull request #377 from matrix-org/dbkr/use_logout_api
Call the logout API when we log out
2016-08-03 17:51:42 +01:00
David Baker d9a7d50a03 Add an interface for MatrixClientCreds
and make MatrixClientPeg functions use it consistently
2016-08-03 10:46:42 +01:00
David Baker cf7e7d65c8 Don't start the client twice
if we have a guest_access_token
2016-08-03 10:15:50 +01:00
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 0660b9feff Fixes to properly point to the moved components 2016-07-27 14:49:10 +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
Matthew Hodgson 94aec10512 Merge branch 'develop' into dbkr/scalar 2016-06-19 22:40:48 +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