Commit Graph

160 Commits

Author SHA1 Message Date
Michael Telatynski
8d445d54ec Use embedded piwik caller rather than piwik.js bcuz CSP :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-13 00:39:28 +00:00
J. Ryan Stinnett
81ee27f41e Replace device with session in UI text
This replaces "device" with "session" throughout user-visible text at the React
layer. Variable names and comments are left as-is for now.
2020-01-29 15:52:32 +00:00
Damir Jelić
cbfde4d78f Merge branch 'poljar/seshat-filepanel' into develop 2020-01-24 14:44:24 +01:00
Damir Jelić
9978fee512 Lifecycle: Comment why we need to initialize the index before the client. 2020-01-20 10:06:20 +01:00
David Baker
9e43abaf3a Toasts for new, unverified sessions
Fixes https://github.com/vector-im/riot-web/issues/11218
2020-01-17 11:43:35 +00:00
Damir Jelić
7fb3645e94 LifeCycle: Start the event index before the client. 2020-01-17 10:11:21 +01:00
Travis Ralston
042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston
d56f0f2a25 Convert many imports to handle ES6 exports
Reliant upon https://github.com/matrix-org/matrix-react-sdk/pull/3761
2019-12-22 21:04:42 -07:00
Michael Telatynski
6121420113
Merge branch 'develop' into t3chguy/remove_bluebird 2019-11-20 15:21:23 +00:00
Damir Jelić
44b212bc4c Merge branch 'poljar/seshat-pr' into develop 2019-11-20 13:33:03 +01:00
Damir Jelić
e9df973c82 EventIndex: Move the event indexing files into a separate folder. 2019-11-19 14:05:00 +01:00
Damir Jelić
979803797f Lifecycle: Make the clear storage method async. 2019-11-19 14:05:00 +01:00
Michael Telatynski
d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Damir Jelić
7516f2724a EventIndexing: Rework the index initialization and deletion. 2019-11-14 16:13:22 +01:00
Damir Jelić
1df28c7526 Fix some lint errors. 2019-11-13 10:30:38 +01:00
Damir Jelić
008554463d Lifecycle: Move the event index deletion into the clear storage method. 2019-11-13 09:52:59 +01:00
Michael Telatynski
79ebb9091c
Merge branch 'develop' into t3chguy/remove_bluebird_1 2019-11-12 18:16:34 +00:00
Damir Jelić
3502454c61 LifeCycle: Stop the crawler and delete the index when whe log out. 2019-11-12 15:58:38 +01:00
Damir Jelić
cfdcf45ac6 MatrixChat: Move the event indexing logic into separate modules. 2019-11-12 13:29:07 +01:00
Michael Telatynski
217dfc3eed Replace all trivial Promise.defer usages with regular Promises
(cherry picked from commit 44401d73b4)
2019-11-12 12:07:56 +00:00
Michael Telatynski
548e38cba9 Revert "Replace all trivial Promise.defer usages with regular Promises"
This reverts commit 44401d73
2019-11-12 11:56:53 +00:00
Michael Telatynski
168b1b68bb Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski
09a8fec261 s/.done(/.then(/ since modern es6 track unhandled promise exceptions 2019-11-12 11:51:23 +00:00
Michael Telatynski
44401d73b4 Replace all trivial Promise.defer usages with regular Promises 2019-11-12 11:40:38 +00:00
Travis Ralston
e9c8a31e1f Start and stop Mjolnir with the lifecycle 2019-10-31 13:28:00 -06:00
Michael Telatynski
821ad5703f LifeCycle onLoggedOut unmount before stopping client
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-25 16:37:57 +01:00
J. Ryan Stinnett
2880ade45c Unmount React components before stopping the client
This fixes an entire class of React soft crashes that can happen when you:

1. Log out, causing the client peg to become `null`
2. Some async process (event handler, timeout, request, etc.) tries to use the
   client in a component before it unmounts, triggering a soft crash
3. Several moments later, the app actually unmounts

With this change, we change the app's view and unmount components first and then
after that we stop the client.

Fixes https://github.com/vector-im/riot-web/issues/11078
2019-10-08 17:10:19 +01:00
Travis Ralston
d97ff8a692 Add debugging for soft logout too 2019-10-02 09:45:53 -06:00
Travis Ralston
74ce5c3541 Read integration managers from account data
For https://github.com/vector-im/riot-web/issues/4913 / https://github.com/vector-im/riot-web/issues/10161

Relies on the structure defined by [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957)

This is just the bit of code to parse the user's widgets (while watching for changes) and allow for it to be the default manager.
2019-08-09 17:35:59 -06:00
David Baker
bcf53c6e33 Make invite work without an IS
Also fix it so you can't try to invite a room ID to a room
2019-08-07 11:41:00 +01:00
David Baker
9ef24352d0 Use options object 2019-08-02 16:44:49 +01:00
David Baker
1c156f0a5a Don't load guest sessions on post-registration login link
If guest access was enabled, clicking the login link on the 'registration
completed' page would just load the guest account you had before registering.

Fixes https://github.com/vector-im/riot-web/issues/10482
2019-08-02 11:22:42 +01:00
David Baker
b1cc089062 Silence unnecessary warning
Don't complain that we can't enable guest login if nobody asked us to
2019-08-02 11:08:37 +01:00
Travis Ralston
8ebc03706a Also clear data when the deviceId doesn't match
When the HS implementation doesn't respect the device_id parameter erroneously
2019-07-08 15:35:34 -06:00
Travis Ralston
fca4ebcd72 Overwrite the old session if the new creds are for a different user
Fixes https://github.com/vector-im/riot-web/issues/10272
2019-07-05 14:45:34 -06:00
Travis Ralston
93872e6fa5 Ask for the user's password to rehydrate their soft logged out session
Fixes https://github.com/vector-im/riot-web/issues/10236

The changes to the MatrixClientPeg (assign/start) are to permit the SoftLogout page to access the MatrixClientPeg reliably. This is why assign() is called by Lifecycle as an alternative to start().

Minimal design work has been done here. The majority is deferred to https://github.com/vector-im/riot-web/issues/10262
2019-07-04 16:51:16 -06:00
Travis Ralston
42e6287bdb Implement basic soft logout handling
Fixes https://github.com/vector-im/riot-web/issues/10235

CSS and copy are left as an exercise for a later iteration.

Login page handling is left for https://github.com/vector-im/riot-web/issues/10236

This implementation reuses as much of the Lifecycle flow as it can without causing problems. Most importantly, it requires https://github.com/matrix-org/matrix-js-sdk/pull/975 to be able to detect a soft logout and react to it. When it comes time to starting/stopping the Lifecycle, additional parameters are provided so that the auxiliary services can (re)start themselves without the client starting to sync.
2019-07-03 16:46:37 -06:00
Travis Ralston
cd089a3f95 Track the user's own typing state external to the composer
Fixes https://github.com/vector-im/riot-web/issues/9986

There's a few reasons for pushing this out to its own place:
* In future, we might want to move WhoIsTyping here.
* We have multiple composers now, and although they don't send typing notifications, they could (see https://github.com/vector-im/riot-web/issues/10188)
* In future we may have status for where/what the user is typing (https://github.com/matrix-org/matrix-doc/issues/437)
* The composer is complicated enough - it doesn't need to dedupe typing states too.

Note: This makes use of the principles introduced in https://github.com/vector-im/riot-web/issues/8923 and https://github.com/vector-im/riot-web/issues/9090
2019-06-26 22:36:55 -06:00
David Baker
5e775e24fb Console log more helpfully
Appending objects to strings isn't really useful
2019-06-12 14:04:08 +01:00
Travis Ralston
1c41629376
Merge pull request #3043 from matrix-org/travis/check-login-for-config
Accept JSX into the GenericErrorPage and expose local session vars
2019-05-31 11:03:41 -06:00
Travis Ralston
d81804e0fe Merge branch 'develop' into matthew/low_bandwidth 2019-05-30 19:42:09 -06:00
Travis Ralston
5c85f4609e Accept JSX into the GenericErrorPage and expose local session vars 2019-05-29 12:09:04 -06:00
David Baker
da1bff1c5d Fix Single Sign-on
https://github.com/matrix-org/matrix-react-sdk/pull/2826 checked
that we had data in the crypto store if the had credentials in
localStorage. However, SSO stores creds in localStorage and then
redirects the browser to remove the loginToken parameter from the
URL without starting crypto, so after the redirect, we see creds
in localStorage but no crypto data, and error.

Fix by marking when we've successfully initialised crypto and only
erroring if that flag is set.

Fixes https://github.com/vector-im/riot-web/issues/9695
2019-05-15 13:47:48 +01:00
David Baker
7ac82a23ab Yes yes, eslint 2019-05-14 12:11:07 +01:00
David Baker
c11d26d809 Fix email registration, pt. 2
Regressed in https://github.com/matrix-org/matrix-react-sdk/pull/2768
where we check for an existing stored account first and restore that
instead if it exist, telling the user. We usually make a guest account
when the user first hits the page though, so this just restored this
guest account.

Don't restore the account if it's just a guest account (which, as per
comment, is not perfect, but is definitely better than the current
behaviour).

Fixes https://github.com/vector-im/riot-web/issues/9581
2019-05-14 11:59:38 +01:00
Travis Ralston
0e7688da98 Remove dead Login.loginAsGuest() 2019-04-05 11:00:25 -06:00
J. Ryan Stinnett
328f0cd6bf Notify user when crypto data is missing
If we have account data in local storage but nothing in the crypto store, it
generally means the browser has evicted IndexedDB out from under us. This adds a
modal to explain the situation and offer to completely clear storage to get
things back to normal.

Fixes https://github.com/vector-im/riot-web/issues/9109
2019-03-29 16:06:08 +00:00
J. Ryan Stinnett
4c0f459995 Add basic storage consistency check
This adds a storage consistency check just before creating a client on login.
Each data store we use is checked for data and any problems are logged to the
console.

Fixes https://github.com/vector-im/riot-web/issues/9271
2019-03-26 16:34:13 +00:00
David Baker
b39a7e01d3
Merge pull request #2770 from matrix-org/dbkr/fix_instant_rrs_pt2
Fix instantly sending RRs
2019-03-12 10:59:26 +00:00
Travis Ralston
1d71c05201 Localstorage -> LocalStorage 2019-03-08 09:55:50 -07:00