The path adjustment for assets in bundles is only needed with CSS files. Paths
referenced in JS files are written to elements, where they are relative to the
document.
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
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.
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.
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.
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.
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.