Commit graph

1142 commits

Author SHA1 Message Date
David Baker
e5a5ca9efc Don't set busy state at all for background request 2017-03-22 10:53:15 +00:00
David Baker
ec63e18b42 Show spinner whilst processing recaptcha response
The fact that we showed no feedback whilst submitting the captcha
response was causing confusion on slower connections where this
took a nontrivial amount of time.

Takes a new flag from the js-sdk that indicates whether the
request being made is a background request, presenting a spinner
appropriately.

Requires https://github.com/matrix-org/matrix-js-sdk/pull/396
2017-03-21 18:40:41 +00:00
David Baker
d5f7b3983b Merge remote-tracking branch 'origin/develop' into dbkr/add_msisdn 2017-03-21 13:44:55 +00:00
David Baker
4a29d674f8 Merge pull request #750 from matrix-org/dbkr/msisdn_signin_2
Login / registration with phone number, mark 2
2017-03-21 13:43:11 +00:00
Michael Telatynski
69c3bd7f80 Escape closes UserSettings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-03-20 12:13:21 +00:00
David Baker
92d5f55a46 Merge remote-tracking branch 'origin/develop' into dbkr/threepid_display 2017-03-17 13:55:07 +00:00
David Baker
f8a1634720 Merge pull request #759 from matrix-org/luke/display-redactions-better
Display timestamps and profiles for redacted events
2017-03-16 17:14:10 +00:00
Luke Barnard
d4ed9e816b Display timestamps and profiles for redacted events
This is part of fixing https://github.com/vector-im/riot-web/issues/3390
2017-03-16 17:00:10 +00:00
David Baker
b06111202d Display threepids slightly prettier
ie. Put a + on the front of msisdns.
2017-03-16 15:16:24 +00:00
David Baker
af8c3edba6 Support adding phone numbers in UserSettings 2017-03-16 14:56:26 +00:00
Kegan Dougal
544a6593e1 Unregister the UploadBar event listener on unmount 2017-03-16 14:19:17 +00:00
Luke Barnard
b21f016d37 Add "Export E2E keys" option to logout dialog
Fixes https://github.com/vector-im/riot-web/issues/3184
2017-03-16 14:18:18 +00:00
David Baker
67757a16f3 Don't remove the line that gets the error message 2017-03-16 12:54:18 +00:00
David Baker
d292a627d8 Handle no-auth-flow error from js-sdk 2017-03-15 16:44:56 +00:00
David Baker
648ad8d66c Merge pull request #753 from matrix-org/luke/fix-register-not-routing
Do routing to /register _onLoadCompleted
2017-03-15 13:18:34 +00:00
Luke Barnard
5330e47b3f Add null check 2017-03-15 13:05:03 +00:00
Luke Barnard
238e48e4af Do routing to /register _onLoadCompleted
_onLoadCompleted happens straight away because Lifecycle finishes loading the session instantly when registration parameters (client_secret etc.) are set.
2017-03-15 12:02:08 +00:00
Richard van der Hoff
3325dd6ede Merge pull request #747 from matrix-org/luke/increase-scrollback-window
Double UNPAGINATION_PADDING again
2017-03-15 11:46:34 +00:00
Luke Barnard
47958180a6 Add null check to start_login 2017-03-14 15:13:36 +00:00
Luke Barnard
5e93dde0dd Merge pull request #746 from matrix-org/luke/merge-RoomTile-context-menus
Merge the two RoomTile context menus into one
2017-03-14 14:19:36 +00:00
Luke Barnard
17c9fcbb85 Merge branch 'develop' into luke/UDE-file-upload 2017-03-14 13:59:04 +00:00
David Baker
30b442515e Merge pull request #743 from matrix-org/luke/fix-screen-after-login
Decide on which screen to show after login in one place
2017-03-14 13:44:08 +00:00
David Baker
878413f6a4 Support msisdn signin
Changes from https://github.com/matrix-org/matrix-react-sdk/pull/742
2017-03-14 11:50:13 +00:00
Luke Barnard
d8a30aa848 Double UNPAGINATION_PADDING again 2017-03-13 13:48:15 +00:00
Matthew Hodgson
3aaf37df1a beautify a tonne more errors 2017-03-12 22:59:41 +00:00
Matthew Hodgson
71e0780eee beautify search fail error 2017-03-12 22:24:16 +00:00
Matthew Hodgson
b7d5d2fd56 beautify UserSettings error msg
fix up default dialog cancel button
2017-03-12 20:03:14 +00:00
Richard van der Hoff
2786fb0f46 Revert "Support registration & login with phone number (#742)"
This reverts commit 0269562383.

This breaks against the current synapse release. We need to think more
carefully about backwards compatibility.
2017-03-09 18:32:44 +00:00
Luke Barnard
1f788feacd Merge the two RoomTile context menus into one
This will require riot-web changes https://github.com/vector-im/riot-web/pull/3395
2017-03-09 17:03:57 +00:00
David Baker
0269562383 Support registration & login with phone number (#742)
* WIP msisdn sign in

* A mostly working country picker

* Fix bug where you'dbe logged out after registering

Stop the guest sync, otherwise it gets 401ed for using a guest
access token for a non-guest, causing us to beliebe we've been
logged out.

* Use InteractiveAuth component for registration

* Fix tests

* Remove old signup code

* Signup -> Login

Now that Signup contains no code whatsoever related to signing up,
rename it to Login. Get rid of the Signup class.

* Stray newline

* Fix more merge failing

* Get phone country & number to the right place

* More-or-less working msisdn auth component

* Send the bind_msisdn param on registration

* Refinements to country dropdown

Rendering the whole lot when the component was rendered just makes
the page load really slow, so just show 2 at a time and rely on
type-to-search.

Make type-to-search always display an exact iso2 match first

* Propagate initial inputs to the phone input

* Support msisdn login

* semicolon

* Fix PropTypes

* Oops, use the 1qst element of the array

Not the array of object keys which has no particular order

* Make dropdown/countrydropdown controlled

* Unused line

* Add note on DOM layout

* onOptionChange is required

* More docs

* Add missing propTypes

* Don't resume promise on error

* Use React.Children to manipulate children

* Make catch less weird

* Fix null dereference

Assuming [0] of an empty list == undefined doesn't work if you're
then taking a property of it.
2017-03-09 10:59:22 +00:00
Luke Barnard
4f7914813d Make UDD appear when UDE on uploading a file
This has highlighted the fact that an unsent image looks very much like a sent image (https://github.com/vector-im/riot-web/issues/3391). Also, the "Resend" status bar doesn't appear when an image is unsent.
2017-03-09 10:44:09 +00:00
David Baker
676c5c21c1 Merge pull request #739 from matrix-org/luke/visible-redactions
Show message redactions as black event tiles
2017-03-09 09:41:31 +00:00
Luke Barnard
c4001b5c5d Use else instead of two returns 2017-03-08 15:11:38 +00:00
Luke Barnard
eca82bdb42 Make sure the screen is set, otherwise ignore screenAfterLogin 2017-03-08 10:45:07 +00:00
Luke Barnard
06a05c351d Decide on which screen to show after login in one place
This follows from a small amount of refactoring done when RTS was introduced. Instead of setting the screen after sync, do it only after login.

This requires as-yet-to-be-PRd riot-web changes.

This includes:
 - initialScreenAfterLogin, which can be used to set the screen after login, and represents the screen that would be viewed if the window.location at the time of initialising Riot were routed.
 - guestCreds are now part of state, because otherwise they don't cause the login/registration views to update when set.
 - instead of worrying about races and using this._setPage, use a dispatch.
2017-03-08 10:25:54 +00:00
David Baker
341f978743 Fix the team server registration
Pass extra info from the UI auth process as a second parameter to
onAuthFinished. Allows the email sid & client secret to be used
outside of the UI auth process.
2017-03-06 17:31:21 +00:00
Luke Barnard
c0fc3ba3fe Make redactions appear when the event has been redacted (on Room.redaction) 2017-03-06 14:20:24 +00:00
Luke Barnard
edccfeb20b No text required, do not continuate after redacted even
It's curious, however, that a continuation occured after a redacted event, given that the event shouldn't have a sender
2017-03-06 10:26:26 +00:00
Luke Barnard
2bd9885288 Start to show redacted events 2017-03-03 15:42:24 +00:00
David Baker
62d9439530 Remove old import & pass through result
in InteractiveAuthDialog
2017-03-03 14:31:52 +00:00
David Baker
1bdf213d67 Merge pull request #729 from matrix-org/dbkr/register_ui_auth
Port registration over to use InteractiveAuth
2017-03-03 13:37:41 +00:00
David Baker
977b8a7379 Make UIAuth Dialog show an error
when auth fails
2017-03-03 12:08:26 +00:00
David Baker
8522231d4f Revery unintentional change
to when teamToken was returned
2017-03-03 10:28:10 +00:00
David Baker
9c6782af6f Oops, lost trackPromise 2017-03-02 15:08:15 +00:00
David Baker
91ef26a7f8 makeRegistrationUrl is required 2017-03-02 15:04:10 +00:00
David Baker
51b2001f70 Remove todo which is now done! 2017-03-02 15:03:24 +00:00
David Baker
0914226327 Actuall pass our proxy makeRegistrationUrl 2017-03-02 14:47:47 +00:00
David Baker
3028b335a4 Oops, re-add referrer param
as Registration was still using it
2017-03-02 14:46:18 +00:00
David Baker
dd762cc835 Add makeRegistrationUrl to proptypes 2017-03-02 14:40:55 +00:00
David Baker
a5cf3a964b doc 2017-03-02 14:39:25 +00:00
David Baker
770c1ce11f Remove redundant prop 2017-03-02 14:35:08 +00:00
David Baker
8be66d0f04 Merge pull request #730 from Half-Shot/hs/video-gif-autoplay
Autoplay videos and GIFs if enabled by the user.
2017-03-02 13:41:30 +00:00
David Baker
0035a91596 Merge pull request #731 from matrix-org/luke/warn-users-e2e-first-time
Warn users about using e2e for the first time
2017-03-02 13:28:15 +00:00
David Baker
95cff17698 Merge pull request #721 from matrix-org/luke/fix-refactor-UnknownDeviceDialog
Show UDDialog on UDE during VoIP calls
2017-03-02 13:13:45 +00:00
David Baker
9c5fb00da4 Fix syntax 2017-03-01 18:33:45 +00:00
David Baker
ef5d2bca91 Get errorText from error in stageUpdated 2017-03-01 16:59:25 +00:00
David Baker
c9ef879afa PR feedback: Move the email token request here 2017-03-01 16:04:15 +00:00
Luke Barnard
b7bd93c613 var -> const 2017-03-01 15:55:15 +00:00
Luke Barnard
187c91b76a Adjust warning message 2017-03-01 15:42:05 +00:00
Luke Barnard
6d296a0e7a Warn users about using e2e for the first time 2017-03-01 15:41:13 +00:00
Luke Barnard
39427839b9 Use ES6 export style 2017-03-01 14:33:25 +00:00
David Baker
dd33624454 Merge remote-tracking branch 'origin/develop' into dbkr/register_ui_auth
(This ended up mostly being merged by hand as git made a complete
mess of the merge)
2017-03-01 10:45:17 +00:00
Luke Barnard
0ef8e2a8f4 Various fixes 2017-02-28 15:18:00 +00:00
Luke Barnard
48a3d0d595 Refactor to not set team token in bad ways
Use the on_logged_in dispatch instead. Call setPage in one place, _onLoggedIn, when deciding which page to view on login. Change some require to import, var to const. Remove onTeamMemberRegistered and just use a nullable argument to onRegistered
2017-02-28 15:05:49 +00:00
Will Hunt
1995c16013 Add a user option to enable autoplaying gifs and videos. 2017-02-27 22:17:43 +00:00
David Baker
c22db1db5f Fix race when signup is completed elsewhere
as commented
2017-02-27 18:22:26 +00:00
David Baker
e5853a6571 Put back server picker for registration
* Also fix bug where you couldn't picxk a different server if
   you were already registered as a guest (because it still sent
   the access token which the new server rejected)
 * Propagate errors from UI auth back to registration so it goes
   back to the registration screen
2017-02-27 17:24:28 +00:00
Luke Barnard
7221900497 Refactor remove resend_all_events and cancel_all_events dispatches 2017-02-27 13:39:12 +00:00
David Baker
454aa0757a Poll for authentication completion
on registration (both for email validation and completion of the
whole auth session).
2017-02-24 17:24:10 +00:00
David Baker
51467506f8 Port registration over to use InteractiveAuth
These changes are moved over from the dbkr/msisdn_signin branch
2017-02-24 11:41:23 +00:00
Luke Barnard
e1a40a8ef0 Notify MatrixChat of teamToken after login 2017-02-23 16:30:26 +00:00
David Baker
fd3c1ab9e1 Merge pull request #718 from matrix-org/luke/ignore-no-tile-events
Do not push a dummy element with a scroll token for invisible events
2017-02-23 10:17:16 +00:00
David Baker
8737112a8c Merge pull request #715 from matrix-org/luke/mels-scrolling-fix
MELS: check scroll on load + use mels-1,-2,... key
2017-02-23 10:12:26 +00:00
Luke Barnard
f92708fbe6 In practice the MELS-1,2,3 solves nothing, revert it 2017-02-22 16:54:32 +00:00
Luke Barnard
436e6b36f1 Move UDE handling to a its own file, adjust wording 2017-02-22 16:42:14 +00:00
Luke Barnard
f230b0a3c0 Fix status bar expanded on tab-complete
This had regressed when `_getSize` was introduced. It didn't consider tab completing.
2017-02-22 14:03:30 +00:00
Luke Barnard
c13ff254b1 Add "Retry" button to UDE 2017-02-22 10:21:43 +00:00
Luke Barnard
878e31eba2 Show UDDialog on m.call.invite failure
Requires https://github.com/matrix-org/matrix-js-sdk/pull/378

Also, refactored UDDialog creation into its own dispatch event, because there will be other parts of the code that will want to spawn one.
2017-02-21 17:22:22 +00:00
Luke Barnard
581c8c138e Do not push a dummy element with a scroll token for invisible events
If an event does not `wantTile`, do not add a dummy element with a scroll token, as this can be unperformant with 1000s of events.
2017-02-21 15:01:18 +00:00
Luke Barnard
995e59b973 Merge pull request #716 from matrix-org/luke/feature-default-hs
Allow setting the default HS from the query parameter
2017-02-21 14:43:36 +00:00
Matthew Hodgson
aabf9255d2 anchor the authcache on LoggedInView to prevent it persisting over logouts 2017-02-21 01:03:22 +00:00
Matthew Hodgson
6af0b9618a first cut of improving UX for deleting devices.
This adds a 5 minute auth cache to speed up the process of deleting
old devices.  It has the following nastinesses (mainly due to being
written on a flight whilst juggling kids):
 * the auth cache is done as context attached to MatrixChat.
   one could argue that it should be per-client instead, but we don't
   yet have multiple clients.
 * the auth cache is only maintained currently in DevicesPanelEntry
   (i.e. set & invalidated).  One could argue that it might be better
   maintained in InteractiveAuth.js or a dedicated cache object
   abstraction, but given the only use I can think of is when managing
   devices, perhaps this is good enough for now.
2017-02-21 00:19:49 +00:00
Luke Barnard
9eef3c53a3 Allow setting the default HS from the query parameter
Fixes https://github.com/vector-im/riot-web/issues/3207
2017-02-20 16:53:26 +00:00
Luke Barnard
6fead66f89 MELS: check scroll on load + use mels-1,-2,... key
To fix https://github.com/vector-im/riot-web/issues/2916, force the checking of scroll position by calling _onWidgetLoad (might need renaming...) when a MELS is expanded/contracted.

Also use an keying scheme for MELS that doesn't depend on the events contained, but rather a simple incrementing index based on the order of the MELS as it appears amongst all MELS.
2017-02-20 10:59:11 +00:00
Matthew Hodgson
8990e770b7 fix colouring in voip dark theme 2017-02-20 01:43:55 +02:00
David Baker
10534e7df4 Merge pull request #709 from matrix-org/dbkr/show_when_banned
Show when you've been kicked or banned
2017-02-17 16:48:59 +00:00
Kegsay
5abcb91e0d Merge pull request #708 from matrix-org/kegan/clear-cache
Add a 'Clear Cache' button
2017-02-17 15:51:08 +00:00
David Baker
de4773ba93 Show when you've been kicked or banned
Update the room state when you've been kicked or banned, and show
a message in the preview bar, including the reason.
2017-02-17 15:50:30 +00:00
Kegan Dougal
8d6c3cd3f4 Review comments 2017-02-17 15:37:49 +00:00
Kegan Dougal
0a31efa0b7 Add a 'Clear Cache' button
This deletes the IndexedDB database and reloads the page.

This solely exists as a get-out clause for users in case the indexedDB instance
gets corrupted. Hopefully we won't ever need to point users to it.
2017-02-17 15:16:28 +00:00
David Baker
a3746ea1b6 Merge remote-tracking branch 'origin/develop' into dbkr/update_on_room_name 2017-02-17 14:41:54 +00:00
David Baker
b2344ceb74 Update the room view on room name change 2017-02-17 11:44:56 +00:00
David Baker
4753552ddc Merge pull request #706 from matrix-org/luke/fix-team-token-referral-link
Make UserSettings use the right teamToken
2017-02-16 18:12:46 +00:00
Luke Barnard
406c34b715 Make UserSettings use the right teamToken
This threads the correct teamToken through to UserSettings for generating the referral section.
2017-02-16 18:00:52 +00:00
Luke Barnard
9d2bb70823 If the home page is somehow accessed, goto directory
For example, if someone ends up on /home somehow, just redirect to the directory instead of displaying a very awkward "File not found" plain text in the home page iFrame.
2017-02-16 17:03:22 +00:00
Luke Barnard
6945e7c154 Merge pull request #699 from matrix-org/luke/fix-avatar-initials
Display avatar initials in typing notifications
2017-02-16 14:06:05 +00:00
Luke Barnard
74487c655d If a referrer hasn't been specified, use empty string
This is interpretted by the RTS as a non-referred team member who still needs the team token to access their welcome page etc.
2017-02-16 09:22:44 +00:00
Luke Barnard
8067bb627f Display avatar initials in typing notifications
It seems they don't overlap hawkwawdly anymore, so this displays them always.

Fixes https://github.com/vector-im/riot-web/issues/3084
2017-02-15 16:29:08 +00:00
David Baker
973b92b8f6 Merge pull request #694 from matrix-org/dbkr/confirm_ban
Add confirmation dialog to kick/ban buttons
2017-02-14 17:31:51 +00:00
David Baker
6663f5bff0 Remove commented stuff
That I've now broken such that it wouldnt work if it were
uncommented
2017-02-14 16:12:04 +00:00