Commit Graph

493 Commits

Author SHA1 Message Date
Michael Telatynski
032efafe2e Rejig things around to catch Promises not being a thing at all 2020-02-04 13:35:05 +00:00
Michael Telatynski
087bcf0ae6 fix declaration order 2020-02-04 11:11:06 +00:00
Michael Telatynski
cdc1202bbe Add custom browser checks outside of Modernizr 2020-02-04 11:08:52 +00:00
Michael Telatynski
bceca49cdc Update vendored modernizr 2020-02-04 11:00:47 +00:00
Damir Jelić
7aff020d4d Merge branch 'poljar/seshat-ui' into develop 2020-01-24 14:40:54 +01:00
Damir Jelić
c0558f3527 Merge branch 'poljar/seshat-filepanel' into develop 2020-01-24 14:38:20 +01:00
Damir Jelić
e1e3bba290 ElectronPlatform: Replace the indexSize method with the getStats method. 2020-01-21 13:35:29 +01:00
Damir Jelić
e556bb242f ElectronPlatform: Add the indexSize method. 2020-01-21 13:35:29 +01:00
Travis Ralston
99e1ff9477 Load as little as possible in index.js for the skinner
Imports are optimized to be concurrent/async by webpack, which means that when the old index.js referenced the Lifecycle from the react-sdk it caused the app to explode. This is because in another branch the Lifecycle references a class member of a skinnable component, leading to the skinner complaining that the skin hasn't been loaded.

To work around this, we've shoved all the app stuff to a new app.js file, leaving just the skinning and some early bootstrap work in the index.js
2020-01-20 19:52:11 -07:00
Travis Ralston
cdd25ea45f Fix rageshake post-sourcemaps 2020-01-17 18:27:37 -07:00
Damir Jelić
a2e256b4c9 ElectronPlatform: Add the ability to load file events from the event index. 2020-01-17 10:11:57 +01:00
Travis Ralston
f73d2bae1f Merge branch 'develop' into travis/sourcemaps 2020-01-13 11:22:47 -07:00
Dale Harvey
a41484cb35 Add stub service worker so users can install on desktop with Chrome
Signed-off-by: Dale Harvey <dale@arandomurl.com>
2020-01-10 19:08:56 +00:00
Travis Ralston
ec66069e96 Update build scripts for new process
We have to convert *something* to TypeScript so it doesn't complain that there's nothing to compile, so this converts the easiest utility library.

Many of the scripts are copied from the react-sdk.
2020-01-08 16:09:42 -07:00
Travis Ralston
17e332bb48 Import from src/ for the react-sdk and js-sdk
We compile directly for accuracy of sourcemaps.
2019-12-23 20:02:11 -07:00
David Baker
89d622b8b2 Remove the code that calls the origin migrator
This will have done its job now, everyone's had long enough to
install a newer version of Riot and migrate to the new origin.

Laves the code on the backend that handles it for the time being,
as per comment.
2019-12-09 11:57:43 +00:00
David Baker
c063cec4d7 remove draft CSS reference 2019-12-06 13:44:51 +00:00
Aaron Raimist
3397165036
Remove mention of vector.im as default identity server on mobile guide
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-11-27 19:26:22 -06:00
Damir Jelić
222fea969d Merge branch 'poljar/seshat-pr' into develop 2019-11-26 18:47:58 +01:00
Michael Telatynski
eac6c46d28 Merge branches 'develop' and 't3chguy/remove_bluebird' of https://github.com/vector-im/riot-web into t3chguy/remove_bluebird 2019-11-22 14:00:02 +00:00
David Baker
8b2ca56283
Merge pull request #11445 from vector-im/dbkr/dedup_theming_code
De-dup theming code
2019-11-21 09:44:22 +00:00
David Baker
135d5f4cc7
Merge pull request #11442 from vector-im/dbkr/system_dark_mode
Use new theme API in react-sdk
2019-11-20 16:32:32 +00:00
David Baker
e34c46c893 Dedup theming code
Following on from https://github.com/matrix-org/matrix-react-sdk/pull/3637
this removes the code dealing with themes in vector/index.js and uses the
code from react-sdk. The two did almost exactly the same thing but in
subtley different ways.

This code can be incredibly subtle though, so doing this a separate
PR.
2019-11-20 15:42:15 +00:00
David Baker
7294bec1c8 Use new theme API in react-sdk
A thesis presented in two parts. This part has the absolute minimum
logic changes to the themeing code in vector/index.js because I know
how subtle and fragile this code is. However, it also looks like it's
completely duplicated from react-sdk, so in the next part I'm going
to remove that logic and make it use the logic in react-sdk, then we
can see what breaks.

Requires https://github.com/matrix-org/matrix-react-sdk/pull/3637
2019-11-20 13:43:08 +00:00
Bruno Windels
0c9f0e52bd preload warning triangle 2019-11-20 12:42:31 +01:00
Damir Jelić
137bedb3f9 ElectronPlatform: Update the path for the BaseEventIndexManager class. 2019-11-19 13:34:00 +01:00
Damir Jelić
73b302f432 ElectronPlatform: Fix some type annotations. 2019-11-19 13:34:00 +01:00
Damir Jelić
4a25252626 ElectronPlatform: Rename the SeshatIndexerManager. 2019-11-19 13:34:00 +01:00
Damir Jelić
dd2c210cfb electron-main: Rework the event index initialization and deletion. 2019-11-14 16:14:48 +01:00
Damir Jelić
7147af8f80 ElectronPlatform: Don't scope the event index per user. 2019-11-14 14:14:59 +01:00
Travis Ralston
6cf4fc1026 Trigger a theme change on startup, not just a tint change
Fixes https://github.com/vector-im/riot-web/issues/11370
2019-11-13 14:00:22 -07:00
Damir Jelić
c3c5756c7a ElectronPlatform: Implement the EventIndexManager for Seshat. 2019-11-13 15:55:07 +01:00
Travis Ralston
71fb2e04a9
fix catch block indentation 2019-11-12 15:14:11 -07:00
Travis Ralston
e84861f770 Apparently our eslint rules are different in different layers 2019-11-12 15:04:56 -07:00
Travis Ralston
ec9a38c2fe Perform favicon updates twice in Chrome
See diff for why this arcane magic is needed.

Fixes https://github.com/vector-im/riot-web/issues/11347
2019-11-12 15:02:52 -07:00
David Baker
7af68bddea Remove the 'auto hide menu bar' option on Mac
The menu bar is at the top of the screen on Mac so this setting
does absolutely nothing.
2019-11-05 20:31:08 +00:00
Michael Telatynski
10e1d9093e transform-async-to-promises: get rid of bluebird 2019-11-04 12:46:28 +00:00
Michael Telatynski
9820e59559 Merge hide-to-tray-icon with show-tray-icon 2019-10-30 14:32:28 +00:00
Michael Telatynski
1498872214 Add ability to hide tray icon on non-Mac (which has no tray icon) 2019-10-29 11:37:42 +00:00
Matthew Hodgson
4e619b1693
Merge branch 'develop' into patch-3 2019-10-20 11:44:38 +01:00
Damir Jelić
71023ae9df ElectronPlatform: Fix lint errors. 2019-10-11 17:17:24 +02:00
Damir Jelić
1dbdd0a366 ElectronPlatform: Add support for a event index using Seshat. 2019-10-11 16:05:14 +02:00
David Baker
57672ad384 Request persistent storage on Electron
It's still not 100% clear whether storage is always persistent on
Electron, but we seem to be getting reports of it being deleted in
the wild on Electron, so let's try calling the API to request
persistent storage. It won't pop up a dialog on Electron. In the
worst case it will give us some logging so we know what the API calls
return.

We could do this on non-desktop too but it's a bit of a mess because
Firefox prompts the user but Chrome makes a decision itself based on
how much the user visits the site.
2019-10-04 12:17:01 +01:00
Michael Telatynski
1018dc7ced Don't log query parameters as they may contain secrets
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-21 17:44:58 +01:00
Nad Chishtie
634141637b Remove extraneous content & styles. Style improvements. 2019-09-11 16:08:24 -07:00
Travis Ralston
0b6c29d274
Merge pull request #10480 from vector-im/t3chguy/react16
Switch to React 16
2019-09-11 10:42:24 -06:00
David Baker
89e9ac8039
Merge pull request #10810 from vector-im/nadonomy/install-guide
Update install guide
2019-09-10 18:36:35 +01:00
David Baker
58171e4479 lint 2019-09-10 18:30:02 +01:00
David Baker
b8b10e79fe Update button href dynamically
also make button a link 'cos buttons can't have hrefs
2019-09-10 18:27:57 +01:00
Nad Chishtie
845fbacd11 Update copy 2019-09-09 16:51:46 -07:00
Nad Chishtie
d1fb9c604a Add id to button 2019-09-09 16:46:53 -07:00
Nad Chishtie
27afa3af74 Update styling & remove extraneous elements and copy in mobile install guide 2019-09-09 16:40:06 -07:00
Michael Telatynski
7eefc9d856 Merge branch 'develop' of github.com:vector-im/riot-web into t3chguy/react16 2019-08-24 11:42:03 +01:00
Travis Ralston
9ed647d280 Remove t3chguy's debug lines 2019-08-14 09:28:35 -06:00
Michael Telatynski
46dac869d5 Load config.json before loading language so default can apply 2019-08-14 12:29:25 +01:00
Michael Telatynski
d347ab08e7 Merge branches 'develop' and 't3chguy/react16' of github.com:vector-im/riot-web into t3chguy/react16 2019-08-10 00:20:30 +01:00
Michael Telatynski
509839e79e Allow setting electron autoHideMenuBar and persist it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-05 11:58:16 +01:00
Michael Telatynski
06e7a48aaf Switch to React 16.8
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-01 15:31:33 +01:00
Bruno Windels
8a022a4be0
Merge pull request #10349 from vector-im/bwindels/cachebust-config
Cachebust config file requests
2019-07-16 11:06:57 +00:00
Bruno Windels
2cf1aabcba cachebust config file requests 2019-07-16 12:49:10 +02:00
Travis Ralston
79b519be72 Require a rageshake description in mxSendRageshake 2019-07-11 12:58:35 -06:00
Travis Ralston
9d14f92c01
Merge pull request #10197 from vector-im/t3chguy/preload_warning.svg
Add e2e/warning.svg to preload
2019-06-27 17:24:44 -06:00
Michael Telatynski
575f013bc9 Add e2e/warning.svg to preload
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-27 20:59:11 +01:00
Travis Ralston
e49583f8e0 Copy from toml 2019-06-27 12:09:58 -06:00
Travis Ralston
67664365bd Display a red box of anger for config syntax errors
Fixes https://github.com/vector-im/riot-web/issues/9519
2019-06-27 11:47:29 -06:00
Michael Telatynski
01a78feb41
unexport getConfig, it was never imported externally 2019-06-27 11:17:56 +01:00
Michael Telatynski
a70f6de2e4 cleanup
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-26 21:11:27 +01:00
Michael Telatynski
dbd198ec07 delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-26 21:10:28 +01:00
Michael Telatynski
974797648f Move config-getting to VectorBasePlatform
in Electron get config via IPC from main process
which has access to the "local" config.json override file
and can make people happy :D

Remove bunch of duplicated code,
and move comments around to put them in the right place

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-26 21:08:04 +01:00
Travis Ralston
490595cb35 Use new copy for big red box 2019-06-05 11:32:33 -06:00
Travis Ralston
42be1d633c Do not fail on server liveliness checks during startup
Also warn about deprecated config option usage.

See https://github.com/vector-im/riot-web/issues/9828
2019-06-04 23:44:33 -06:00
Travis Ralston
1459bfe7be
Merge pull request #9892 from vector-im/travis/check-login-for-config
Use the user's pre-existing HS when config validation fails
2019-05-31 11:03:38 -06:00
Travis Ralston
81ec75f81d Change warning message 2019-05-31 10:44:20 -06:00
Travis Ralston
c5461b4509 Don't try and render null avatars in desktop notifications
as much fun as http://localhost:8080/null is to see
2019-05-30 20:04:16 -06:00
Travis Ralston
52c3ff02ae appease the linter 2019-05-29 12:12:12 -06:00
Travis Ralston
48a634bff4 Use the user's pre-existing HS when config validation fails
Only applies if the user appears to be logged in. If the user is not logged in, we scream loudly.

This is a temporary measure for https://github.com/vector-im/riot-web/issues/9828

Fixes https://github.com/vector-im/riot-web/issues/9835
2019-05-29 12:07:31 -06:00
Travis Ralston
b772bc75a9 Update copyright 2019-05-22 22:57:39 -06:00
Travis Ralston
7a65dc96cd
Merge pull request #9726 from vector-im/travis/wk/mobileguide
Show resolved homeserver configuration on the mobile guide
2019-05-17 11:01:42 -06:00
Travis Ralston
39d1293350
Merge pull request #9721 from vector-im/travis/wk/fallback_hs
Flag the validated config as the default config
2019-05-16 12:47:01 -06:00
Travis Ralston
22cc33eb15 Do a simple .well-known lookup for default_server_name for mobile guide 2019-05-14 17:57:04 -06:00
Travis Ralston
559416dcae Show most homeserver options on the mobile guide
This doesn't cover default_server_name because that pulls in a questionable amount of JS.

See https://github.com/vector-im/riot-web/issues/9290
2019-05-14 17:00:06 -06:00
Travis Ralston
68a7550080 Flag the validated config as the default config
For use in the rest of the app.

See https://github.com/vector-im/riot-web/issues/9290
2019-05-14 13:12:34 -06:00
Travis Ralston
7f5589c01b Clarify comment on is_url and hs_url handling
We don't actually need to do anything because the app transparently handles this.

See https://github.com/vector-im/riot-web/issues/9290
2019-05-14 12:53:13 -06:00
Travis Ralston
886828caa8
Merge pull request #9496 from vector-im/travis/guests/block-ui
Validate default homeserver config before loading the app
2019-05-10 11:20:33 -06:00
Matthew Hodgson
03b2766ca8 use right android app id 2019-05-04 17:28:02 +01:00
Travis Ralston
bf97fd67b4 Handle cases of no default server 2019-05-03 11:06:32 -06:00
Travis Ralston
45caa8baab Add a couple notes 2019-05-03 11:06:32 -06:00
Travis Ralston
ab6ba0e0d8 Add some clarity to the config options 2019-05-03 11:06:32 -06:00
Travis Ralston
e7bf643d8b Don't repackage the ValidatedDiscoveryConfig
It's usable as-is, and we can add things to it when we need to (ie: integrations).
2019-05-03 11:06:32 -06:00
Travis Ralston
c8caf6797d Move bulk of discovery processing to react-sdk 2019-05-03 11:06:32 -06:00
Travis Ralston
51941eae49 Add note to self 2019-05-03 11:06:32 -06:00
Travis Ralston
5445632026 Use new js-sdk properties for getting discovery errors
Requires https://github.com/matrix-org/matrix-js-sdk/pull/899
2019-05-03 11:06:32 -06:00
Travis Ralston
f08491cee8 Validate default homeserver config before loading the app
Implements the process described here: https://github.com/vector-im/riot-web/issues/9290#issuecomment-481966910

The expectation is that later layers (like the react-sdk) will make use of the `validated_discovery_config` option instead of interpreting the config themselves.

We intentionally block the UI from loading here to avoid races between discovery and the app loading.
2019-05-03 11:06:32 -06:00
J. Ryan Stinnett
d4de7f5df3 Delay creating the Favico instance
This avoids a canvas permission prompt from appearing on page load for users in
Firefox's resist fingerprinting mode. The prompt will still happen once you log
in and receive a notification, but at least this prevents it from happening
during the initial app experience.

Fixes https://github.com/vector-im/riot-web/issues/9605
2019-05-02 13:29:25 +01:00
Nad Chishtie
c70a2925a8 More responsive styling. 2019-04-09 17:05:41 +02:00
Nad Chishtie
17788b2027 Improved responsive styling. 2019-04-09 16:40:41 +02:00
Nad Chishtie
527dc1982e Updated branding. 2019-04-09 16:40:04 +02:00
Travis Ralston
b72ae197e5 Use a different cookie to expire any cookies people may already have
We also check for a specific value in case people set it to `true` for some reason.
2019-04-03 18:11:25 -06:00
Travis Ralston
0d2668f2b1 Step cookie down to 4 hours 2019-04-03 18:01:09 -06:00
Travis Ralston
b1c885a266 Expire mobile guide cookie after 24 hours
See https://github.com/vector-im/riot-web/issues/9360

This is to prevent it from always working. Cookies without an expiration are supposed to expire at the end of the session, however the nature of mobile browsers means that the session is unlikely to ever end.
2019-04-02 11:18:05 -06:00