Commit Graph

6768 Commits

Author SHA1 Message Date
J. Ryan Stinnett
d71e84b790
Merge pull request #8159 from vector-im/jryans/versioned-img-urls
Use content hashing for font and image URLs
2019-01-18 14:28:09 -06:00
J. Ryan Stinnett
aa388f1173 Copy images used by home.html
This allows home.html to remain a regular HTML file without templating while
still having a copy of the rooms directory icon.
2019-01-18 08:39:16 -06:00
J. Ryan Stinnett
7a3df1c7d6 Support image URLs in HTML templates
Expands the image build process to also support the right paths when used in
HTML templates.
2019-01-18 08:39:16 -06:00
J. Ryan Stinnett
59bedae15e Define SCSS variable for resource dir
Adds a `$res` SCSS variable set to the path from the root SCSS file to the `res`
directory.

This is a different base path than previously used in CSS URLs (it goes up 3
directories instead of 2), because Webpack will now be resolving images relative
to the root SCSS file, so the path corresponds to a source tree location,
instead of a path in the build output tree.

Defining this variable has two main goals:

* URLs are a bit easier to read
* The path can be overridden, which is needed for riot-web themes like Status
2019-01-18 08:39:16 -06:00
J. Ryan Stinnett
a127077bde Lift font SCSS partials to theme root
This means that themes which include `light/css/_base.scss` (currently Dark and
Status) won't be forced to have Light's font-faces included.  This only really
matters for Status, which uses different fonts throughout.
2019-01-18 08:39:16 -06:00
J. Ryan Stinnett
49be03e845 Process images with Webpack
This adds a `file-loader` rule to the Webpack build so that any requests for
image resource will be output into the app's output directory, but with an extra
content has appended so that we can safely use a long cache lifetime.

The CSS and SCSS rules are also changed to use `css-loader` so that any `url`
inside is automatically processed by the new image rule above.
2019-01-18 08:39:09 -06:00
Travis Ralston
e3d807b053
Merge pull request #8156 from vector-im/develop
Develop->Experimental
2019-01-17 16:00:52 -07:00
David Baker
ea17711616
Merge pull request #8150 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate.
2019-01-17 10:27:05 +00:00
Weblate
e0b4875615 Merge remote-tracking branch 'origin/develop' into develop 2019-01-17 10:16:34 +00:00
Paulo Miranda
bbfd1448c5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/pt_BR/
2019-01-17 10:16:34 +00:00
Paulo Miranda
d482d3c907 Translated using Weblate (Portuguese)
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/pt/
2019-01-17 10:16:34 +00:00
David Baker
3236f72031 Electron 4.0.1 2019-01-17 10:16:15 +00:00
Michael Telatynski
67ba81e80a
Merge pull request #8124 from vector-im/t3chguy/electron-mailto
Correct the copying of e-mail addresses in the electron app
2019-01-15 18:22:17 +00:00
Michael Telatynski
8c895cd435 Correct the copying of e-mail addresses in the electron app
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-01-15 08:37:01 +00:00
J. Ryan Stinnett
99b5695fec Fix SdkConfig import to use transformed module
This was originally added in #7755, which pulled in the original source for the
module, breaking ancient browsers without support for classes (#8082).
2019-01-11 17:51:19 -06:00
J. Ryan Stinnett
05f9cf453d Fix SdkConfig import to use transformed module
This was originally added in #7755, which pulled in the original source for the
module, breaking ancient browsers without support for classes (#8082).
2019-01-11 17:37:20 -06:00
David Baker
373c587ef8
Merge pull request #8003 from vector-im/develop
Merge develop into experimental
2019-01-03 18:56:03 +00:00
Paulo Miranda
ca024673b9 Translated using Weblate (Portuguese)
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/pt/
2019-01-03 14:55:05 +00:00
Weblate
ef7d8a6d94 Merge remote-tracking branch 'origin/develop' into develop 2019-01-03 10:09:38 +00:00
Le Dang Trung
0cc8027fd9 Translated using Weblate (Vietnamese)
Currently translated at 48.6% (18 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/vi/
2019-01-03 10:09:38 +00:00
David Baker
9e085511fd
Merge pull request #7943 from vector-im/dbkr/electron_custom_protocol
Electron: Load app from custom protocol
2019-01-03 10:09:31 +00:00
Le Dang Trung
344184f239 Added translation using Weblate (Vietnamese) 2018-12-25 03:54:18 +00:00
David Baker
62a49af23f Only serve origin migrator whilst migrating
as per comment
2018-12-21 22:21:06 +00:00
David Baker
751a1dc543 Add tool to migrate logins between origins
App checks at startup for an existing session, if there isn't one,
it will start the tool to check for a login in the file:// origin.
If there is one, it will copy the login over to the vector://vector
origin.

In principle this could also be used to migrate logins between
other origins on the web if this were ever required.

This includes a minified copy of the browserified js-sdk with
a getAllEndToEndSessions() function added to the crypto store
(https://github.com/matrix-org/matrix-js-sdk/pull/812). This is
not great, but for a short-lived tool this seems better than
introducing more entry points into webpack only used for the
electron app.
2018-12-21 19:14:25 +00:00
Nad Chishtie
8b97e2ceab
Merge pull request #7927 from vector-im/nadonomy/accent
Added new colour var to all themes
2018-12-20 17:25:03 +00:00
Nad Chishtie
d01d67c2b0 Added new colour variable. 2018-12-20 16:08:13 +00:00
David Baker
4274c7287a Fix the IndexedDB worker
Looks like this was broken in the webpack 4 upgrade due to the
worker script setter and the bundle being re-ordered in index.html.

 * Remove the loop: we only use two scripts now, so import them
   explicitly
 * Remove outdated olm import code.
 * Stop generating a script import for each theme: we were pulling
   in 3 js files that did absolutely nothing.
 * Fix worker 'onmessage' scope (set it as a global rather than
   trying to make it an ES6 module which it isn't).
 * Fail hard if the indexeddb worker script isn't set to avoid
   this happening again.
2018-12-20 11:11:52 +00:00
Weblate
2830b6caf4 Merge remote-tracking branch 'origin/develop' into develop 2018-12-20 07:49:36 +00:00
David Baker
baf3df5736
Merge pull request #7920 from vector-im/dbkr/fix_indexeddb_worker
Fix the IndexedDB worker
2018-12-20 07:49:29 +00:00
David Baker
7527bdd2c7 Fix the IndexedDB worker
Looks like this was broken in the webpack 4 upgrade due to the
worker script setter and the bundle being re-ordered in index.html.

 * Remove the loop: we only use two scripts now, so import them
   explicitly
 * Remove outdated olm import code.
 * Stop generating a script import for each theme: we were pulling
   in 3 js files that did absolutely nothing.
 * Fix worker 'onmessage' scope (set it as a global rather than
   trying to make it an ES6 module which it isn't).
 * Fail hard if the indexeddb worker script isn't set to avoid
   this happening again.
2018-12-19 22:05:04 +00:00
Weblate
7965011be9 Merge remote-tracking branch 'origin/develop' into develop 2018-12-19 21:11:07 +00:00
Michael Telatynski
6c6819f27c
Merge pull request #7919 from remram44/debian-pkg-is-electron
Make clear that the Debian package is for desktop
2018-12-19 21:11:01 +00:00
Remi Rampin
f7bdc9339c Make clear that the Debian package is for desktop 2018-12-19 21:05:21 +00:00
Weblate
7b43ec757c Merge remote-tracking branch 'origin/develop' into develop 2018-12-19 15:05:01 +00:00
J. Ryan Stinnett
8cd37d28da Clarify line number instructions
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-19 15:04:54 +00:00
David Baker
b6d70f4434 Missing include 2018-12-19 12:25:32 +00:00
David Baker
fc4e1485ad Electron: Load app from custom protocol
This puts the app into its own origin so it doesn't have access
to the filesystem via file:// URIs.

Next step: migrate over localstorage & indexeddb data from the old
origin...
2018-12-19 12:04:40 +00:00
Weblate
76833d478b Merge remote-tracking branch 'origin/develop' into develop 2018-12-19 09:48:16 +00:00
David Baker
b35903bb19
Merge pull request #7907 from vector-im/dbkr/electron_sandbox
Run the Desktop app in a sandbox
2018-12-19 09:48:10 +00:00
David Baker
ff45dc6430 Remove unused commented line 2018-12-19 09:29:05 +00:00
Weblate
b1c48ed346 Merge remote-tracking branch 'origin/develop' into develop 2018-12-18 19:14:28 +00:00
David Baker
5a549519a6
Merge pull request #7908 from vector-im/dbkr/electron_singleinstance_apiupdate
Update to new electron single instance API
2018-12-18 19:14:22 +00:00
David Baker
0e580635eb Update tests for new platform layout 2018-12-18 18:13:51 +00:00
David Baker
60d3076038 Update to new electron single instance API 2018-12-18 18:10:09 +00:00
David Baker
0c428efea0 lint 2018-12-18 18:03:47 +00:00
David Baker
19f1489c92 Run the Desktop app in a sandbox
* Turn off node integration in the electron renderer process
 * Enable the chromium sandbox to put the renderer into its own process
 * Expose just the ipc module with a preload script
 * Introduce a little IPC call wrapper so we can call into the
   renderer process and await on the result.
 * Use this in a bunch of places we previously used direct calls
   to electron modules.
 * Convert other uses of node, eg. use of process to derive the
   platform (just look at the user agent)
 * Strip out the desktopCapturer integration which doesn't appear
   to have ever worked (probably best to just wait until
   getDisplayMedia() is available in chrome at this point:
   https://github.com/vector-im/riot-web/issues/4880).
2018-12-18 17:42:55 +00:00
Weblate
15a8560f9a Merge remote-tracking branch 'origin/develop' into develop 2018-12-18 01:22:08 +00:00
random
0daf7c9af7 Translated using Weblate (Italian)
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/it/
2018-12-18 01:22:08 +00:00
J. Ryan Stinnett
17983c47d8 Link to CONTRIBUTING from JS SDK
The JS SDK's CONTRIBUTING file is a bit simpler to read. The Synapse version previously used includes mentions of Python lint tools that don't apply here.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-18 01:22:03 +00:00
Weblate
6e0145eeea Merge remote-tracking branch 'origin/develop' into develop 2018-12-11 16:41:37 +00:00