Commit Graph

220 Commits

Author SHA1 Message Date
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
Kegan Dougal
e9884768f6 Persist console logs to an IndexedDB instance 2017-01-18 16:00:13 +00:00
Matthew Hodgson
6c88201e23 use ye olde rel='alternate stylesheets' for theming 2017-01-17 19:14:16 +00:00
Matthew Hodgson
691fe611d6 experimental postcss 2017-01-10 11:06:09 +00:00
Matthew Hodgson
c6beaa1631 initial stab at an official dark theme via the magic of SASS.
SVGs are all broken, and some of the more exotic colours haven't been updated. There's been no attempt to use SASS to remove duplication from the CSS yet.
no attempt to switch it at runtime yet.
2016-12-28 04:06:10 +00:00
Matthew Hodgson
bacb284415 basic jig for SASS-based themed CSS (one bundle per theme) 2016-12-28 02:01:28 +00:00
Matthew Hodgson
9a861f46d0 make electron send email validation URLs with a nextlink of riot.im rather than file:/// 2016-12-24 03:18:12 +00:00
David Baker
c786980454 Move getDefaultDeviceName into the Platforms
So we can have a sensible device name on Electron
2016-11-24 16:46:15 +00:00
Richard van der Hoff
8b0390f354 Fix a race which took us to the directory on load sometimes (#2602)
Sometimes window.onload would run before loadApp had finished (specifically, if
the browser had to wait for config.json to load). Avoid the race by moving all
of the onload logic into loadApp.
2016-11-18 17:32:01 +00:00
David Baker
cfe63fa274 Better support no-config when loading from file
We should still error if given a 5xx with an empty body.
2016-11-03 14:43:10 +00:00
David Baker
3601b44429 Fix loading with no config from HTTP 2016-11-03 14:17:23 +00:00
David Baker
4d0b492ba0 Merge remote-tracking branch 'origin/develop' into dbkr/platform_version 2016-11-03 11:51:23 +00:00
David Baker
19238b9326 Use the defaults if given a blank config file
This allows Vector to load from file:// URIs without breaking if
there is no config file (because we explicitly look for 404s, and
file:// URIs don't return 404s).
2016-11-02 17:57:27 +00:00
David Baker
64fdb290eb Move 'new version' support into Platform 2016-11-02 16:02:55 +00:00
David Baker
a714edbf2b Implement Platforms
Provide WebPlatform for functionality specific to the web version of vector.
2016-11-02 15:12:51 +00:00
Richard van der Hoff
8fe05fdff3 Correct path to components.css
Fix failure to find components.css which was introduced in e1919c5
(https://github.com/vector-im/vector-web/pull/2513)
2016-10-26 15:02:34 +01:00
Richard van der Hoff
e1919c5ea3 Don't include two copies of the CSS in the tarball
Aggregate our CSS into build/components.css instead of vector/components.css, so
that it isn't included in the tarball.
2016-10-26 14:43:42 +01:00
David Baker
d04201d069 Replace stage & es2017 with specific plugins
Also sort out regenerator runtime as it turns out importing
babel-polyfill in your code is insufficient if using webpack
because it's imported too late, so use both that and
regenerator-runtime. Sigh.
2016-10-17 16:28:14 +01:00
David Baker
82de2ca4ec Remove transform-runtime
We use instance methods (or at least, draft.js does) so we need
babel-polyfill instead.
2016-10-17 16:28:14 +01:00
David Baker
5608e97719 Remove babel-polyfill
Should be no need for it if we're using transform-runtime (and
we definitely don't need it twice...)
2016-10-17 16:28:13 +01:00
David Baker
ea09a25563 Revert "Switch to babel 6" 2016-10-14 18:50:22 +01:00
David Baker
40ac80a3e9 Replace stage & es2017 with specific plugins
Also sort out regenerator runtime as it turns out importing
babel-polyfill in your code is insufficient if using webpack
because it's imported too late, so use both that and
regenerator-runtime. Sigh.
2016-10-14 18:03:22 +01:00
David Baker
5f747e1a90 Remove transform-runtime
We use instance methods (or at least, draft.js does) so we need
babel-polyfill instead.
2016-10-13 10:57:10 +01:00
David Baker
64815b1b0b Remove babel-polyfill
Should be no need for it if we're using transform-runtime (and
we definitely don't need it twice...)
2016-10-12 17:23:01 +01:00
David Baker
8e4dcd9b41 Rebrand 2016-09-19 13:29:49 +01:00
Richard van der Hoff
17733a66f9 rename MatrixChat defaultDeviceDisplayName prop 2016-08-12 11:40:25 +01:00
Richard van der Hoff
3a819a29b7 Make up a device display name
Pass a default device name into react-sdk
2016-08-12 11:01:39 +01:00
Richard van der Hoff
9e15bda803 comment typo 2016-08-11 12:49:57 +01:00
David Baker
e7ac66ad04 Don't redirect to mobile app if verifying 3pid
Fixes https://github.com/vector-im/vector-web/issues/1933
2016-08-11 12:44:49 +01:00
Richard van der Hoff
c2cb4dff4c Support for refactored login token handling
loginToken handling is now done by the session loader, so we need to pass in
the queryparams to MatrixChat.

Also, MatrixChat no longer automatically reloads the page to drop the
querystring, so we have to do that ourselves (doing it in index.js allows
tokenlogin to be tested).
2016-08-11 01:55:51 +01:00
Richard van der Hoff
afc889ff4d Some tests of the application load process 2016-08-10 00:15:04 +01:00
Matthew Hodgson
28057fd086 improve upgrade-to-app warning on mobile app 2016-08-01 18:36:08 +01:00
Aviral Dasgupta
b2459b2dc6 Merge branch 'develop' of github.com:vector-im/vector-web into feature-rte 2016-06-10 04:43:06 +05:30
Richard van der Hoff
4dd477e064 index.js: fix comment typo
Fix dave's typo for him
2016-06-09 10:38:51 +01:00
David Baker
24602119c5 This doesn't actually need to be global
(because the rendering isn't in a render method here)
2016-06-09 09:59:37 +01:00
David Baker
3040d0a474 Comment typo 2016-06-09 09:57:44 +01:00
David Baker
e4ea00ca23 Return here, else we'll call resolve too 2016-06-09 09:56:57 +01:00
David Baker
f6aa9a7ea4 Make the config optional
Accept 404 errors from getting the config and start MatrixChat with no config, make other errors display a simple error message to prevent a completely blank page if the config does fail to load.
2016-06-08 18:46:21 +01:00
Richard van der Hoff
ed1554f4af index.js: fix wording in android popup 2016-06-07 22:01:56 +01:00
David Baker
c6cf5febd5 Merge pull request #1516 from vith/static-config-json
serve config.json statically instead of bundling it
2016-06-06 19:15:35 +01:00
Aviral Dasgupta
7e563b89c7 initial version of rich text editor 2016-05-27 10:17:01 +05:30
Jason Papakostas
6a6118e136 serve config.json statically instead of bundling it
issue #1344
2016-05-24 19:08:09 -05:00
Matthew Hodgson
8a9c85c97d fix wording 2016-05-16 23:00:17 +01:00
Matthew Hodgson
8fb521c83c 302 android to play store 2016-05-13 17:14:01 +01:00
Matthew Hodgson
8467d5d760 302 to iTunes if you don't have the app installed 2016-05-11 01:48:02 +02:00
Richard van der Hoff
a0b460b084 Include react-addons-perf for non-production builds
This makes it possible to gather a few performance stats
2016-04-19 15:01:24 +01:00
Richard van der Hoff
035b15f330 Moar debug for ff session restore issue 2016-04-13 22:18:26 +01:00
Richard van der Hoff
77355cbeb4 Add some debug to help with FF restore bug
(https://github.com/vector-im/vector-web/issues/1354)
2016-04-13 21:01:24 +01:00
Richard van der Hoff
090db5490b URI-decode the hash-fragment
It looks like % characters in the hash-fragment are meant to be interpreted as
a URI-encoding, so we should decode them.
2016-03-23 15:58:00 +00:00
Mark Haines
31915db6f6 Remove trailing whitespace 2016-03-15 18:38:24 +00:00
David Baker
a063efe250 Remove no-longer accurate comment. 2016-02-23 10:57:50 +00:00
David Baker
45c8500f28 Pass through params for other URLs (in this case, for keypair invite signing urls) 2016-02-23 10:22:22 +00:00
Matthew Hodgson
155728b136 make babel actually do full ES6 emulation for Safari 8 2016-02-10 14:54:55 +00:00
David Baker
1732805f31 Always parse the hash of a URL as we do elsewhere by looking for a query string part, otherwise we end up passing the query into showscreen which then spreads havok. 2016-02-10 13:45:24 +00:00
Kegan Dougal
b307a6d64e Invoke onVersion when we know the current version even if there is no new version (for settings) 2016-02-03 16:50:05 +00:00
Kegan Dougal
5eed734325 Add a version update checker and NewVersionBar to show on the UI. 2016-02-03 16:16:14 +00:00
Matthew Hodgson
68f846e129 Merge branch 'develop' into matthew/roomsettings2 2016-01-13 17:33:32 +00:00
Matthew Hodgson
fc3f356dc0 GA 2016-01-12 01:23:39 +00:00
Kegan Dougal
1a8a4728cd Enable guest access. Show r/w icons on room directory. 2016-01-07 14:43:12 +00:00
Matthew Hodgson
df111223fc copyrights for 2016 2016-01-07 04:17:56 +00:00
Kegan Dougal
63d0477223 Pass through the starting query params from the URL 2015-12-17 15:01:07 +00:00
David Baker
939733b736 Merge branch 'develop' into require-css 2015-12-02 10:26:26 +00:00
David Baker
a63bf7cb35 Merge branch 'develop' into skindex-nextgen 2015-12-01 18:10:57 +00:00
David Baker
7ff5e42f3e Run the CSS through webpack so we can pull in CSS files from modules with require rather than symlinking into the node_module directory which is breaking people on different npm versions. 2015-12-01 18:05:43 +00:00
David Baker
c281fe785a Merge branch 'develop' into skindex-nextgen 2015-12-01 15:53:11 +00:00
Kegan Dougal
8083e7f118 Move vector-only components to src/components. 2015-12-01 15:45:38 +00:00
Kegan Dougal
8f5f71ec80 Move MatrixChat to react-sdk. Move all login stuff to react SDK.
Removed Modulator stuff.
2015-11-30 18:10:09 +00:00
David Baker
6f646260aa WIP of component indexing update 2015-11-30 17:31:32 +00:00
Matthew Hodgson
2cae5e7a00 revert bad fix to managing history 2015-11-11 02:31:37 +01:00
Matthew Hodgson
2c9273a86c avoid the initial sync from clobbering the location bar 2015-11-11 02:00:51 +01:00
Matthew Hodgson
87bb7c9b7b upgrade to react 0.14 2015-11-09 23:13:46 +00:00
Steven Hammerton
fdf79d709e Replace CAS login with token login 2015-11-06 11:22:59 +00:00
Kegan Dougal
511b1f409c Add objectfit and localstorage to browser features 2015-10-29 15:56:03 +00:00
Kegan Dougal
22369729f9 Remove test feature 2015-10-28 17:42:19 +00:00
Kegan Dougal
59d8cbe742 Use Modernizr to check for browser compatibility
Add a CompatibilityPage which is shown for incompatible clients. If they
continue on regardless, proceed as if it never happened.
2015-10-28 17:39:50 +00:00
Steven Hammerton
293ee1bbcb Fix typo in comment and remove console.log leftover from debugging 2015-10-12 17:41:56 +01:00
Steven Hammerton
f5039ac9af Use node querystring module to parse query string like name value pairs from fragment 2015-10-12 10:27:21 +01:00
Steven Hammerton
a8d51cdf58 Add support for CAS auth 2015-10-10 18:52:44 +01:00
David Baker
490e56bfbb Improved url / hash change handling 2015-10-05 15:32:34 +01:00
David Baker
94a6f856d1 Use the new interface for providing conf call functionality. Doesn't shoe it in the right room yet. 2015-09-30 16:52:45 +01:00
David Baker
f020f4397c Switch to webpack
Webapck actually supports loading input source maps and generally seems a lot
more solid then browserify (even if their website has an annoying animated
logo).
2015-09-25 11:43:28 +01:00