Commit Graph

230 Commits

Author SHA1 Message Date
David Baker
f701e2601a
Revert "Run lint on travis builds and use modern node versions" 2018-11-22 18:17:09 +00:00
David Baker
a7a5679bfa
Merge pull request #7490 from aaronraimist/lint
Run lint on travis builds and use modern node versions
2018-11-22 18:01:04 +00:00
David Baker
092ae7ef2f Fix missing js-sdk logging
Some of the js-sdk logging was going missing due to js-sdk's
loglevel library being initialised before the rageshake logging.

Fix by doing the rageshake setup within an import, as commented.
2018-11-22 16:21:55 +00:00
Bruno Windels
18daa186b0 Merge branch 'develop' into experimental 2018-10-26 15:33:57 +02:00
Travis Ralston
10efaaa078 Merge branch 'develop' into lint 2018-10-25 16:06:02 -06:00
David Baker
9b80aa76ce
Merge pull request #7385 from vector-im/dbkr/wasm
Support WebAssembly version of Olm
2018-10-25 15:58:24 +01:00
Bruno Windels
c68770c0aa ignore setting and always show dharma theme for now 2018-10-23 15:51:06 +02:00
Aaron Raimist
c470e2dcfb
Actually I'll just fix the errors myself and get rid of lintwithexclusions
I seemingly need babel-eslint version 8 for VectorHomePage.js but might as well just upgrade to version 10

Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-19 21:04:55 -05:00
Aaron Raimist
6abd1de8b8
eslint --fix on src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-19 20:59:06 -05:00
Travis Ralston
47ade14e07
Merge pull request #6831 from MTRNord/patch-8
Fix Tinter.setTheme to not fire using Firefox
2018-10-12 13:55:43 -06:00
Aaron Raimist
d836ad8dbc
Undo turning warnings back on (#7409)
I guess that turns on warnings for everything, not just riot-web

Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-05 11:05:25 -05:00
Aaron Raimist
d035efb14e
Fix lint warnings and turn warnings back on (#7409)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-05 10:41:45 -05:00
Aaron Raimist
54c46df0dc
Fix Promise.defer warnings in index.js (#7409)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-05 10:23:06 -05:00
David Baker
e277d02f83 Merge remote-tracking branch 'origin/develop' into dbkr/wasm 2018-10-05 14:04:43 +01:00
David Baker
bccccb2758 Silence bluebird warnings 2018-10-05 12:15:29 +01:00
David Baker
c5ee92f4c3 Fall back to legacy asm.js Olm 2018-10-04 20:11:34 +01:00
David Baker
30f0a7932b Merge remote-tracking branch 'origin/develop' into dbkr/wasm 2018-10-02 16:58:31 +01:00
David Baker
894e31fe73 Don't show mobile guide if deep linking
Other part of https://github.com/vector-im/riot-web/issues/7378
2018-09-28 11:23:46 +01:00
David Baker
1f34d2d644 Kill off olm-loader
Now that Olm needs to be inited asynchronously anyway, we can just
pass the options to Olm.init(), and as long as we do that before we
start the js-sdk, we're all good.

This will means the olm js is now part of the main bundle but since
it's now just a wrapper around the wasm, this is probably faster.

Also add the directwatch flag to olm.wasm because otherwise it
doesn't seem to copy the file in watch mode...
2018-09-26 16:44:52 +01:00
Bruno Windels
d10fda36af fix config not loading correctly anymore 2018-09-05 16:38:00 +02:00
David Baker
9c8ef4240c Instructions for installing mobile apps
Replace the native js dialog with a page telling you how to
download the apps and how to set your HS URL.
2018-09-03 20:38:30 +01:00
David Baker
e2bad5bdc8 Tidy up index.js
Non-functional changes (before I start messing with it).

Switch to import, move code out of the top level, switch to one
consistent way of declaring functions, keep imports at the top.
2018-09-03 13:01:52 +01:00
David Baker
dcde74bc09
Revert "Remove package-lock.json for now" 2018-08-02 10:02:09 +01:00
David Baker
10ed13acc0 Add package-lock to .gitignore 2018-08-01 15:08:12 +01:00
Marcel
5b32ecb719
[Tinter.setTheme fix] add missing comment and move old to correct position 2018-07-24 13:38:49 +02:00
Marcel
58de839621
Fix Tinter.setTheme to not fire using Firefox
This if checks if we got a Firefox using a variable that is undefined everywhere except in Firefox. In Firefox because of how it renders the DOM ensure that css is always loaded before it loads/runs the js code. Therefor onload 1. never triggers and 2. we can just call setTheme.
2018-05-31 22:32:29 +02:00
Luke Barnard
7f50fb3023 Merge branch 'master' into develop 2018-05-09 13:32:06 +01:00
Luke Barnard
9b055171ab Enforce loading babel-polyfill first
This is to avoid loading anything before loading the polyfill, otherwise
we risk loading dependencies (such as React) before it.

This was causing the compatibility page to fail somehow.

See https://github.com/facebook/react/issues/8379

Fixes https://github.com/vector-im/riot-web/issues/6562
2018-04-27 13:32:09 +01:00
David Baker
981bd94615 Change CSS dependencies to not hardcoded paths
Add add direct dependencies on the packages they come from, because
referring to them by path like this doesn't work in a frash
checkout / npm install because of how npm lays out the packages.
2018-04-25 17:33:18 +01:00
Matthew Hodgson
df3fb83da3 move deps to sdk for stuff now in the sdk 2018-04-18 10:53:17 +01:00
Matthew Hodgson
d6931252c1 move rageshake to sdk 2018-04-13 01:35:55 +01:00
Luke Barnard
647c7d7629 Fix themeing bug with Firefox where "disabled" ignored
A bug in firefox means "disabled" isn't honoured when set in the
HTML. Doing `a.disabled = false` does work however, and Chrome
also appears to honour this.
2018-03-12 16:15:17 +00:00
Matthew Hodgson
2a402985aa
Merge pull request #5685 from aidalgol/root-lang-attrib-fix
Set html lang attribute from language setting
2017-11-30 10:12:40 +00:00
David Baker
a346cf393d
Merge pull request #5630 from turt2live/travis/granular-theme
Make sure the SettingsStore is ready to load the theme before loading it
2017-11-27 18:11:07 +00:00
Travis Ralston
c825ab0fa3
Add comment about why we call SdkConfig twice
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-27 11:03:58 -07:00
Aidan Gauland
c4dc59dc41 Use documentElement instead of getElementById
Use documentElement to get the root <html> element instead of adding an id to
the root element.
2017-11-26 13:46:47 +13:00
Aidan Gauland
43b3c013f2 Change html root id
Change the root <html> element id to follow Matrix naming conventions.
2017-11-26 09:49:39 +13:00
Aidan Gauland
c0a5c28d80 Set html lang attribute from language setting 2017-11-25 22:58:52 +13:00
Travis Ralston
aab044a14c Exclude the default language on page load
This is so we correctly detect the browser language.

Fixes https://github.com/vector-im/riot-web/issues/5632

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-17 22:15:35 -07:00
Travis Ralston
eb40de4670 Make sure we load the config before trying to redirect to a mobile page
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-16 21:00:30 -07:00
Travis Ralston
67ca1515d8 Pull the theme through the default chain
This is so the `config` level is respected.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-16 20:50:55 -07:00
Travis Ralston
1ab5ff079c Set the SdkConfig values immediately after loading the config
This is to ensure that when we make a call to get the theme we'll have the SdkConfig available.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-16 20:50:29 -07:00
Travis Ralston
42e601005f Use SettingsStore to get the default theme
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-15 19:09:03 -07:00
Matthew Hodgson
bbcf74f774 fix @lampholder's NPE for real 2017-11-15 15:55:33 +00:00
Travis Ralston
a583c2b658 Merge branch 'develop' into travis/granular 2017-11-14 19:16:35 -07:00
Matthew Hodgson
86509abbfb no need to retint explicitly after changing theme 2017-11-15 01:46:11 +00:00
Matthew Hodgson
69b8ff8668 add fixme 2017-11-14 15:17:32 +00:00
Travis Ralston
977599a660 Use the SettingsStore to get the theme
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-13 13:14:29 -07:00
Travis Ralston
7570ce580f Merge branch 'develop' into travis/granular 2017-11-13 12:25:56 -07:00
Matthew Hodgson
809dd0856f add more fixmes 2017-11-13 16:35:39 +00:00
Matthew Hodgson
0a80774066 unstatusify redirects 2017-11-13 16:26:26 +00:00
Matthew Hodgson
5abee4fddc replace some of the status.im theme with general config options 2017-11-11 23:47:03 +00:00
Matthew Hodgson
2fa1f16284 use new theme-aware tinter api 2017-11-08 06:55:30 -08:00
Matthew Hodgson
555847e5e9 make default theme actually work 2017-11-05 00:40:13 +00:00
Travis Ralston
f1c81be633 Import the right SettingsStore
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 22:18:34 -06:00
Travis Ralston
ccf52b2a69 Convert local settings to granular settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 17:05:27 -06:00
David Baker
5063fef4f5 Redirect to instructions page if user on mobile 2017-10-27 19:08:35 +01:00
Matthew Hodgson
6fa2d35630 support concept of default theme 2017-10-20 18:41:39 +01:00
David Baker
42ddafcfd4 comment 2017-10-19 10:03:47 +01:00
David Baker
137cf32d3b Use _t as _t
Rather than through a languageHandler object. This way our
translation script knows about it.
2017-10-18 19:39:51 +01:00
Kegsay
40a47f8c7a Allow Riot to load up different configs depending on the domain (#4575)
Initially try to load `config.$domain.json` and only if that fails, load
`config.json`. Configs are not muxxed in any way, it either entirely uses
the domain config, or entirely uses `config.json`.
2017-07-14 15:05:07 +01:00
Richard van der Hoff
d5b550f89a replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-13 00:50:01 +01:00
Richard van der Hoff
10decf95f6 replace imports of q with bluebird
update `package.json`

```
find src test -name '*.js' |
    xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
    xargs perl -i -pe 'if (/import [qQ] /) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-13 00:48:31 +01:00
Richard van der Hoff
cc56ef3abd Attempt to flush the rageshake logs on close
... so that we get to see what happened in the last 30s.
2017-06-22 18:25:19 +01:00
Michael Telatynski
fe1b0b5cd8 Merge branch 'develop' of github.com:vector-im/riot-web into t3chguy/updating_stuff 2017-06-20 14:32:19 +01:00
Richard van der Hoff
6df1574b8b onLoadCompleted is now onTokenLoginCompleted 2017-06-16 15:05:14 +01:00
Michael Telatynski
0e6012ad45 absorb updater.js into the Platforms, gets rid of pointless setInterval in Electron
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 24e8a30)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 15:58:54 +01:00
Kegan Dougal
fd5e7ff37a Translate src/vector 2017-05-31 15:06:03 +01:00
Kegan Dougal
52ddcd8a60 Translate src/vector/platform 2017-05-31 14:51:08 +01:00
Michael Telatynski
3e7b738b11 move all piwik init stuff to MatrixChat/Analytics
as it now relies on SDKConfig

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-29 14:22:57 +01:00
Michael Telatynski
3e7ef112f0 opt out based on analyticsOptOut localSetting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-29 13:17:12 +01:00
Michael Telatynski
195fcba696 correct DNT check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-27 20:56:25 +01:00
Michael Telatynski
61a67c52c5 initial piwik stuff
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-27 20:39:52 +01:00
David Baker
003238c1e7 Update for new API in react-sdk
We now get multiple languages from the browser as there may be
a whole preference list
2017-05-25 16:47:12 +01:00
David Baker
7636212bed Remove refs to counterpart
and remove extCounterpart which is unnecessary now we just use a
single counterpart instance
2017-05-25 12:08:47 +01:00
David Baker
d5425b62a1 Don't inject languages into the config
If we're defaulting this it should really be by the component
itself or with the other defaukts in SdkConfig, but we've decided
to leave out support for reading languages from the config file as
it's only useful for a Riot admin to restrict the choice of
languages available to users which is of debateable use.
2017-05-24 11:27:06 +01:00
David Baker
ff1567ed2a Remove spurious import 2017-05-23 17:09:09 +01:00
David Baker
af6cc7bf9c I don't really see why this is necessary 2017-05-23 17:06:49 +01:00
David Baker
caca5cc00b Remove c+ped UserSettingsStore functions
as they don't seem to be necessary
2017-05-23 17:06:02 +01:00
David Baker
241d95293e Code style fixes
Use async/await consistently rather than flipping between that and
callbacks, s/var/let/, indenting
2017-05-23 16:44:54 +01:00
David Baker
a6b11968a4 s/tabs/spaces/ 2017-05-23 16:15:52 +01:00
David Baker
6b6fa59f3e Squash merge https://github.com/vector-im/riot-web/pull/3636 2017-05-23 14:12:53 +01:00
Matthew Hodgson
8e2e6cee35 require indexeddb & webworkers in modernizr 2017-05-15 01:07:25 +01:00
Matthew Hodgson
38fa9f78f1 prefix localstorage key as per the convention 2017-04-22 02:17:22 +01:00
turt2live
e877ad2e63 Remember acceptance for unsupported browsers.
Addresses #3624.

This stores the flag in localStorage, after checking if localStorage is available. If localStorage is not available, the user will be prompted just like before this commit.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-04-21 16:08:49 -06:00
Richard van der Hoff
cbfa4dd1ab Get rageshake endpoint from SdkConfig instead of storing in rageshake
- in preparation for factoring out the sending of the rageshake
2017-04-11 18:46:48 +01:00
David Baker
f187a359e6 Add support for indexeddb sync in webworker 2017-04-06 11:15:14 +01:00
David Baker
a3040e22d3 Rename ReactPerf to Perf
As this makes it work out of the box with react-perf chrome
extension (which doesn't do a whole lot other than save you having
to remember the commands, but is still quite nice).
2017-03-29 10:38:46 +01:00
David Baker
4e6541b404 Merge pull request #3385 from vector-im/luke/fix-screen-after-login
Refactor screen set after login
2017-03-14 13:47:55 +00:00
Luke Barnard
7ff2871ad5 const 2017-03-09 10:04:15 +00:00
Luke Barnard
cbc31a6c41 Remove redundant thing 2017-03-09 10:03:23 +00:00
Luke Barnard
eddf33a689 Refactor screen set after login 2017-03-08 14:57:13 +00:00
David Baker
a8e99109b1 Support InteractiveAuth based registration
Passes in a function to make a register URL rather than just
passing in the URL base
2017-02-24 11:45:28 +00:00
Matthew Hodgson
6a7daaf6c4 remove GA, given it's increasingly useless given Riot/Desktop doesn't use it, plus it obviously has privacy implications. It may get re-added as opt-in in future, so we're not sailing entirely blind on how folks use the app, or we may switch to Piwik etc instead. 2017-02-10 17:21:02 +00:00
Kegsay
80c1ec0502 Merge pull request #3000 from vector-im/kegan/rageshake
Implement bug reporting logic
2017-01-25 10:34:05 +00:00
Kegan Dougal
eaff0abfb0 Add link to Chrome issue status for fixing line numbers 2017-01-25 10:28:13 +00:00
Kegan Dougal
3996d23b19 Inject bug report endpoint URL from config.json 2017-01-19 16:49:25 +00:00
Kegan Dougal
81d437ac1e POST reports to localhost for now. Also send live console logs 2017-01-19 15:47:55 +00:00
Kegan Dougal
608c1b0208 Finish implementing consume()
- Fetches all logs in order and concatenates correctly.
- Purges old logs correctly.
2017-01-19 15:03:47 +00:00
Matthew Hodgson
acb85b7b72 f1x0r CSS comment 2017-01-18 16:06:02 +00:00