Compare commits

..

No commits in common. "develop" and "release-v1.6.5" have entirely different histories.

202 changed files with 2258 additions and 2705 deletions

View File

@ -1,23 +1,3 @@
module.exports = {
"extends": ["matrix-org", "matrix-org/react"],
"env": {
"browser": true,
"node": true,
},
"rules": {
"quotes": "off",
},
"overrides": [{
"files": ["src/**/*.{ts, tsx}"],
"extends": ["matrix-org/ts", "matrix-org/react"],
"env": {
"browser": true,
},
"rules": {
"quotes": "off",
// While converting to ts we allow this
"@typescript-eslint/no-explicit-any": "off",
"prefer-promise-reject-errors": "off",
},
}],
};
extends: ["./node_modules/matrix-react-sdk/.eslintrc.js"],
}

View File

@ -29,7 +29,6 @@
"test/url/urlsearchparams",
"test/cors",
"test/crypto",
"test/iframe/sandbox",
"test/json",
"test/network/fetch",

View File

@ -1,144 +1,3 @@
Changes in [1.7.2](https://github.com/vector-im/riot-web/releases/tag/v1.7.2) (2020-07-27)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.7.1...v1.7.2)
* Upgrade to React SDK 3.0.0 and JS SDK 8.0.0
* Update from Weblate
[\#14778](https://github.com/vector-im/riot-web/pull/14778)
* Capitalize letters
[\#14566](https://github.com/vector-im/riot-web/pull/14566)
* Configure eslint package and fix lint issues
[\#14673](https://github.com/vector-im/riot-web/pull/14673)
* Riot → Element
[\#14581](https://github.com/vector-im/riot-web/pull/14581)
* Remove labs info for the new room list
[\#14603](https://github.com/vector-im/riot-web/pull/14603)
* Convince Webpack to use development on CI
[\#14593](https://github.com/vector-im/riot-web/pull/14593)
* Move dev dep to the right place
[\#14572](https://github.com/vector-im/riot-web/pull/14572)
* Bump lodash from 4.17.15 to 4.17.19
[\#14552](https://github.com/vector-im/riot-web/pull/14552)
* Update all mobile links to match marketing site
[\#14541](https://github.com/vector-im/riot-web/pull/14541)
Changes in [1.7.1](https://github.com/vector-im/riot-web/releases/tag/v1.7.1) (2020-07-16)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.7.0...v1.7.1)
* Upgrade to React SDK 2.10.1
* Fix SSO session ID paramater
[\#14544](https://github.com/vector-im/riot-web/pull/14544)
* Run pngcrush on vector-icons
[\#14488](https://github.com/vector-im/riot-web/pull/14488)
* Fix hosting signup link
[\#14502](https://github.com/vector-im/riot-web/pull/14502)
* Use the right protocol for SSO URLs
[\#14513](https://github.com/vector-im/riot-web/pull/14513)
* Fix mstile-310x150 by renaming it
[\#14485](https://github.com/vector-im/riot-web/pull/14485)
* Update blog and twitter links to point to Element
[\#14478](https://github.com/vector-im/riot-web/pull/14478)
Changes in [1.7.0](https://github.com/vector-im/riot-web/releases/tag/v1.7.0) (2020-07-15)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.8...v1.7.0)
* App name changed from Riot to Element
* Upgrade to React SDK 2.10.0
* Remove redundant enum
[\#14472](https://github.com/vector-im/riot-web/pull/14472)
* Remove font scaling from labs
[\#14355](https://github.com/vector-im/riot-web/pull/14355)
* Update documentation and remove labs flag for new room list
[\#14375](https://github.com/vector-im/riot-web/pull/14375)
* Update from Weblate
[\#14434](https://github.com/vector-im/riot-web/pull/14434)
* Release the irc layout from labs
[\#14350](https://github.com/vector-im/riot-web/pull/14350)
* Fix welcomeBackgroundUrl array causing background to change during use
[\#14368](https://github.com/vector-im/riot-web/pull/14368)
* Be more explicit about type when calling platform startUpdater
[\#14299](https://github.com/vector-im/riot-web/pull/14299)
Changes in [1.6.8](https://github.com/vector-im/riot-web/releases/tag/v1.6.8) (2020-07-03)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.8-rc.1...v1.6.8)
* Upgrade to JS SDK 7.1.0 and React SDK 2.9.0
Changes in [1.6.8-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.6.8-rc.1) (2020-07-01)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.7...v1.6.8-rc.1)
* Upgrade to JS SDK 7.1.0-rc.1 and React SDK 2.9.0-rc.1
* Update from Weblate
[\#14282](https://github.com/vector-im/riot-web/pull/14282)
* Show a download completed toast in electron
[\#14248](https://github.com/vector-im/riot-web/pull/14248)
* Add the new spinner feature labs flag
[\#14213](https://github.com/vector-im/riot-web/pull/14213)
* Fix loading-test for SSO plaf changes
[\#14212](https://github.com/vector-im/riot-web/pull/14212)
* Fix spelling on startup error page
[\#14199](https://github.com/vector-im/riot-web/pull/14199)
* Document fonts in custom theme
[\#14175](https://github.com/vector-im/riot-web/pull/14175)
* Update from Weblate
[\#14129](https://github.com/vector-im/riot-web/pull/14129)
* ElectronPlatform: Implement the isRoomIndexed method.
[\#13957](https://github.com/vector-im/riot-web/pull/13957)
* ElectronPlatform: Add support to set and get the index user version.
[\#14080](https://github.com/vector-im/riot-web/pull/14080)
* Mark the new room list as ready for general testing
[\#14102](https://github.com/vector-im/riot-web/pull/14102)
Changes in [1.6.7](https://github.com/vector-im/riot-web/releases/tag/v1.6.7) (2020-06-29)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.6...v1.6.7)
* Upgrade to React SDK 2.8.1
Changes in [1.6.6](https://github.com/vector-im/riot-web/releases/tag/v1.6.6) (2020-06-23)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.6-rc.1...v1.6.6)
* Upgrade to JS SDK 7.0.0 and React SDK 2.8.0
Changes in [1.6.6-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.6.6-rc.1) (2020-06-17)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.5...v1.6.6-rc.1)
* Upgrade to JS SDK 7.0.0-rc.1 and React SDK 2.8.0-rc.1
* Update from Weblate
[\#14067](https://github.com/vector-im/riot-web/pull/14067)
* Update from Weblate
[\#14032](https://github.com/vector-im/riot-web/pull/14032)
* Attempt to fix decoder ring for relative hosted riots
[\#13987](https://github.com/vector-im/riot-web/pull/13987)
* Upgrade deps
[\#13952](https://github.com/vector-im/riot-web/pull/13952)
* Fix riot-desktop manual update check getting stuck on Downloading...
[\#13946](https://github.com/vector-im/riot-web/pull/13946)
* Bump websocket-extensions from 0.1.3 to 0.1.4
[\#13943](https://github.com/vector-im/riot-web/pull/13943)
* Add e2ee-default:false docs
[\#13914](https://github.com/vector-im/riot-web/pull/13914)
* make IPC calls to get pickle key
[\#13846](https://github.com/vector-im/riot-web/pull/13846)
* fix loading test for new sso pattern
[\#13913](https://github.com/vector-im/riot-web/pull/13913)
* Fix login loop where the sso flow returns to `#/login`
[\#13889](https://github.com/vector-im/riot-web/pull/13889)
* Fix typo in docs
[\#13905](https://github.com/vector-im/riot-web/pull/13905)
* Remove cross-signing from labs
[\#13904](https://github.com/vector-im/riot-web/pull/13904)
* Add PWA Platform with PWA-specific badge controls
[\#13890](https://github.com/vector-im/riot-web/pull/13890)
* Modernizr check for subtle crypto as we require it all over the place
[\#13828](https://github.com/vector-im/riot-web/pull/13828)
Changes in [1.6.5](https://github.com/vector-im/riot-web/releases/tag/v1.6.5) (2020-06-16)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.6.4...v1.6.5)

View File

@ -1,5 +1,5 @@
# Builder
FROM node:12 as builder
FROM node:10 as builder
# Support custom branches of the react-sdk and js-sdk. This also helps us build
# images of riot-web develop.
@ -9,10 +9,7 @@ ARG REACT_SDK_BRANCH="master"
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
ARG JS_SDK_BRANCH="master"
RUN apt-get update && apt-get install -y git dos2unix \
# These packages are required for building Canvas on architectures like Arm
# See https://www.npmjs.com/package/canvas#compiling
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
RUN apt-get update && apt-get install -y git dos2unix
WORKDIR /src

View File

@ -1,41 +1,41 @@
Element
=======
Riot
====
Element (formerly known as Vector and Riot) is a Matrix web client built using the [Matrix
Riot (formerly known as Vector) is a Matrix web client built using the [Matrix
React SDK](https://github.com/matrix-org/matrix-react-sdk).
Supported Environments
======================
Element has several tiers of support for different environments:
Riot has several tiers of support for different environments:
* Supported
* Definition: Issues **actively triaged**, regressions **block** the release
* Last 2 major versions of Chrome, Firefox, and Safari on desktop OSes
* Latest release of official Element Desktop app on desktop OSes
* Latest release of official Riot Desktop app on desktop OSes
* Desktop OSes means macOS, Windows, and Linux versions for desktop devices
that are actively supported by the OS vendor and receive security updates
* Experimental
* Definition: Issues **accepted**, regressions **do not block** the release
* Element as an installed PWA via current stable version of Chrome, Firefox, and Safari
* Riot as an installed PWA via current stable version of Chrome, Firefox, and Safari
* Mobile web for current stable version of Chrome, Firefox, and Safari on Android, iOS, and iPadOS
* Not supported
* Definition: Issues only affecting unsupported environments are **closed**
* Everything else
For accessing Element on an Android or iOS device, we currently recommend the
For accessing Riot on an Android or iOS device, we currently recommend the
native apps [riot-android](https://github.com/vector-im/riot-android)
and [riot-ios](https://github.com/vector-im/riot-ios).
Getting Started
===============
The easiest way to test Element is to just use the hosted copy at https://app.element.io.
The `develop` branch is continuously deployed by Jenkins at https://develop.element.io
The easiest way to test Riot is to just use the hosted copy at https://riot.im/app.
The `develop` branch is continuously deployed by Jenkins at https://riot.im/develop
for those who like living dangerously.
To host your own copy of Element, the quickest bet is to use a pre-built
released version of Element:
To host your own copy of Riot, the quickest bet is to use a pre-built
released version of Riot:
1. Download the latest version from https://github.com/vector-im/riot-web/releases
1. Untar the tarball on your web server
@ -43,29 +43,29 @@ released version of Element:
1. Configure the correct caching headers in your webserver (see below)
1. If desired, copy `config.sample.json` to `config.json` and edit it
as desired. See the [configuration docs](docs/config.md) for details.
1. Enter the URL into your browser and log into Element!
1. Enter the URL into your browser and log into Riot!
Releases are signed using gpg and the OpenPGP standard, and can be checked against the public key located
at https://packages.riot.im/riot-release-key.asc.
Note that for the security of your chats will need to serve Element
Note that for the security of your chats will need to serve Riot
over HTTPS. Major browsers also do not allow you to use VoIP/video
chats over HTTP, as WebRTC is only usable over HTTPS.
There are some exceptions like when using localhost, which is
considered a [secure context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts)
and thus allowed.
To install Element as a desktop application, see [Running as a desktop
To install Riot as a desktop application, see [Running as a desktop
app](#running-as-a-desktop-app) below.
Important Security Note
=======================
We do not recommend running Element from the same domain name as your Matrix
We do not recommend running Riot from the same domain name as your Matrix
homeserver. The reason is the risk of XSS (cross-site-scripting)
vulnerabilities that could occur if someone caused Element to load and render
vulnerabilities that could occur if someone caused Riot to load and render
malicious user generated content from a Matrix API which then had trusted
access to Element (or other apps) due to sharing the same domain.
access to Riot (or other apps) due to sharing the same domain.
We have put some coarse mitigations into place to try to protect against this
situation, but it's still not good practice to do it in the first place. See
@ -74,7 +74,7 @@ https://github.com/vector-im/riot-web/issues/1977 for more details.
Building From Source
====================
Element is a modular webapp built with modern ES6 and uses a Node.js build system.
Riot is a modular webapp built with modern ES6 and uses a Node.js build system.
Ensure you have the latest LTS version of Node.js installed.
Using `yarn` instead of `npm` is recommended. Please see the Yarn [install
@ -88,7 +88,7 @@ guide](https://classic.yarnpkg.com/en/docs/install) if you do not have it alread
* If you're using the `develop` branch, then it is recommended to set up a
proper development environment (see [Setting up a dev
environment](#setting-up-a-dev-environment) below). Alternatively, you
can use https://develop.element.io - the continuous integration release of
can use https://riot.im/develop - the continuous integration release of
the develop branch.
1. Configure the app by copying `config.sample.json` to `config.json` and
modifying it. See the [configuration docs](docs/config.md) for details.
@ -97,14 +97,14 @@ guide](https://classic.yarnpkg.com/en/docs/install) if you do not have it alread
web server.
Note that `yarn dist` is not supported on Windows, so Windows users can run `yarn build`,
which will build all the necessary files into the `webapp` directory. The version of Element
which will build all the necessary files into the `webapp` directory. The version of Riot
will not appear in Settings without using the dist script. You can then mount the
`webapp` directory on your webserver to actually serve up the app, which is entirely static content.
Running as a Desktop app
========================
Element can also be run as a desktop app, wrapped in Electron. You can download a
Riot can also be run as a desktop app, wrapped in Electron. You can download a
pre-built version from https://riot.im/download/desktop/ or, if you prefer,
build it yourself.
@ -117,7 +117,7 @@ Other options for running as a desktop app:
```bash
yarn global add nativefier
nativefier https://app.element.io/
nativefier https://riot.im/app/
```
The [configuration docs](docs/config.md#desktop-app-configuration) show how to
@ -162,19 +162,19 @@ docker build -t vectorim/riot-web:develop \
config.json
===========
Element supports a variety of settings to configure default servers, behaviour, themes, etc.
Riot supports a variety of settings to configure default servers, behaviour, themes, etc.
See the [configuration docs](docs/config.md) for more details.
Labs Features
=============
Some features of Element may be enabled by flags in the `Labs` section of the settings.
Some features of Riot may be enabled by flags in the `Labs` section of the settings.
Some of these features are described in [labs.md](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md).
Caching requirements
====================
Element requires the following URLs not to be cached, when/if you are serving Element from your own webserver:
Riot requires the following URLs not to be cached, when/if you are serving Riot from your own webserver:
```
/config.*.json
/i18n
@ -188,7 +188,7 @@ Development
Before attempting to develop on Riot you **must** read the [developer guide
for `matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk#developer-guide), which
also defines the design, architecture and style for Element too.
also defines the design, architecture and style for Riot too.
Before starting work on a feature, it's best to ensure your plan aligns well
with our vision for Riot. Please chat with the team in
@ -199,7 +199,7 @@ You should also familiarise yourself with the ["Here be Dragons" guide
](https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM)
to the tame & not-so-tame dragons (gotchas) which exist in the codebase.
The idea of Element is to be a relatively lightweight "skin" of customisations on
The idea of Riot is to be a relatively lightweight "skin" of customisations on
top of the underlying `matrix-react-sdk`. `matrix-react-sdk` provides both the
higher and lower level React components useful for building Matrix communication
apps using React.
@ -207,15 +207,15 @@ apps using React.
After creating a new component you must run `yarn reskindex` to regenerate
the `component-index.js` for the app (used in future for skinning).
Please note that Element is intended to run correctly without access to the public
Please note that Riot is intended to run correctly without access to the public
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
hosted by external CDNs or servers but instead please package all dependencies
into Element itself.
into Riot itself.
Setting up a dev environment
============================
Much of the functionality in Element is actually in the `matrix-react-sdk` and
Much of the functionality in Riot is actually in the `matrix-react-sdk` and
`matrix-js-sdk` modules. It is possible to set these up in a way that makes it
easy to track the `develop` branches in git and to make local changes without
having to manually rebuild each time.
@ -243,7 +243,7 @@ yarn install
popd
```
Finally, build and start Element itself:
Finally, build and start Riot itself:
```bash
git clone https://github.com/vector-im/riot-web.git
@ -299,12 +299,12 @@ ___
When you make changes to `matrix-react-sdk` or `matrix-js-sdk` they should be
automatically picked up by webpack and built.
If you add or remove any components from the Element skin, you will need to rebuild
If you add or remove any components from the Riot skin, you will need to rebuild
the skin's index by running, `yarn reskindex`.
If any of these steps error with, `file table overflow`, you are probably on a mac
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
You'll need to do this in each new terminal you open before building Element.
You'll need to do this in each new terminal you open before building Riot.
Running the tests
-----------------

View File

@ -12,7 +12,7 @@
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"brand": "Element",
"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
@ -26,11 +26,12 @@
"defaultCountryCode": "GB",
"showLabsSettings": false,
"features": {
"feature_new_spinner": "labs",
"feature_font_scaling": "labs",
"feature_pinning": "labs",
"feature_custom_status": "labs",
"feature_custom_tags": "labs",
"feature_state_counters": "labs"
"feature_state_counters": "labs",
"feature_irc_ui": "labs"
},
"default_federate": true,
"default_theme": "light",

View File

@ -4,13 +4,13 @@ Configuration
You can configure the app by copying `config.sample.json` to
`config.json` and customising it:
For a good example, see https://develop.element.io/config.json.
For a good example, see https://riot.im/develop/config.json.
1. `default_server_config` sets the default homeserver and identity server URL for
Element to use. The object is the same as returned by [https://<server_name>/.well-known/matrix/client](https://matrix.org/docs/spec/client_server/latest.html#get-well-known-matrix-client),
Riot to use. The object is the same as returned by [https://<server_name>/.well-known/matrix/client](https://matrix.org/docs/spec/client_server/latest.html#get-well-known-matrix-client),
with added support for a `server_name` under the `m.homeserver` section to display
a custom homeserver name. Alternatively, the config can contain a `default_server_name`
instead which is where Element will go to get that same object, although this option is
instead which is where Riot will go to get that same object, although this option is
deprecated - see the `.well-known` link above for more information on using this option.
Note that the `default_server_name` is used to get a complete server configuration
whereas the `server_name` in the `default_server_config` is for display purposes only.
@ -18,10 +18,10 @@ For a good example, see https://develop.element.io/config.json.
`default_is_url`, however these are deprecated. They are maintained for backwards
compatibility with older configurations. `default_is_url` is respected only
if `default_hs_url` is used.
* Element will fail to load if a mix of `default_server_config`, `default_server_name`, or
* Riot will fail to load if a mix of `default_server_config`, `default_server_name`, or
`default_hs_url` is specified. When multiple sources are specified, it is unclear
which should take priority and therefore the application cannot continue.
* As of Element 1.4.0, identity servers are optional. See [Identity servers](#identity-servers) below.
* As of Riot 1.4.0, identity servers are optional. See [Identity servers](#identity-servers) below.
1. `features`: Lookup of optional features that may be `enable`d, `disable`d, or
exposed to the user in the `labs` section of settings. The available
optional experimental features vary from release to release and are [documented](labs.md). The feature flag process is
@ -42,7 +42,7 @@ For a good example, see https://develop.element.io/config.json.
1. `adminMessageMD`: An extra message to show on the reporting dialog to
mention homeserver-specific policies. Accepts Markdown.
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
server is not Element and normally not your homeserver either. The integration server settings
server is not Riot and normally not your homeserver either. The integration server settings
may be left blank to disable integrations.
1. `integrations_rest_url`: URL to the REST interface for the integrations server.
1. `integrations_widgets_urls`: list of URLs to the REST interface for the widget integrations server.
@ -65,10 +65,10 @@ For a good example, see https://develop.element.io/config.json.
1. `whitelistedISUrls`: a list of IS URLs to not redact from the analytics
1. `siteId`: The Piwik Site ID to use when sending analytics to the Piwik server configured above
1. `welcomeUserId`: the user ID of a bot to invite whenever users register that can give them a tour
1. `embeddedPages`: Configures the pages displayed in portions of Element that
1. `embeddedPages`: Configures the pages displayed in portions of Riot that
embed static files, such as:
1. `welcomeUrl`: Initial content shown on the outside of the app when not
logged in. Defaults to `welcome.html` supplied with Element.
logged in. Defaults to `welcome.html` supplied with Riot.
1. `homeUrl`: Content shown on the inside of the app when a specific room is
not selected. By default, no home page is configured. If one is set, a
button to access it will be shown in the top left menu.
@ -80,7 +80,7 @@ For a good example, see https://develop.element.io/config.json.
is special cased to the `default_theme` in the config file).
1. `disable_custom_urls`: disallow the user to change the
default homeserver when signing up or logging in.
1. `permalinkPrefix`: Used to change the URL that Element generates permalinks with.
1. `permalinkPrefix`: Used to change the URL that Riot generates permalinks with.
By default, this is "https://matrix.to" to generate matrix.to (spec) permalinks.
Set this to your Riot instance URL if you run an unfederated server (eg:
"https://riot.example.org").
@ -91,7 +91,7 @@ For a good example, see https://develop.element.io/config.json.
call buttons - integration managers may use a different domain.
1. `enable_presence_by_hs_url`: The property key should be the URL of the homeserver
and its value defines whether to enable/disable the presence status display
from that homeserver. If no options are configured, presence is shown for all
from that homeserver. If no options are configurd, presence is shown for all
homeservers.
1. `disable_guests`: Disables guest access tokens and auto-guest registrations.
Defaults to false (guests are allowed).
@ -103,14 +103,14 @@ For a good example, see https://develop.element.io/config.json.
Defaults to true (room federation enabled).
Note that `index.html` also has an og:image meta tag that is set to an image
hosted on riot.im. This is the image used if links to your copy of Element
appear in some websites like Facebook, and indeed Element itself. This has to be
hosted on riot.im. This is the image used if links to your copy of Riot
appear in some websites like Facebook, and indeed Riot itself. This has to be
static in the HTML and an absolute URL (and HTTP rather than HTTPS), so it's
not possible for this to be an option in config.json. If you'd like to change
it, you can build Element, but run
it, you can build Riot, but run
`RIOT_OG_IMAGE_URL="http://example.com/logo.png" yarn build`.
Alternatively, you can edit the `og:image` meta tag in `index.html` directly
each time you download a new version of Element.
each time you download a new version of Riot.
Identity servers
================
@ -119,10 +119,10 @@ The identity server is used for inviting other users to a room via third party
identifiers like emails and phone numbers. It is not used to store your password
or account information.
As of Element 1.4.0, all identity server functions are optional and you are
As of Riot 1.4.0, all identity server functions are optional and you are
prompted to agree to terms before data is sent to the identity server.
Element will check multiple sources when looking for an identity server to use in
Riot will check multiple sources when looking for an identity server to use in
the following order of preference:
1. The identity server set in the user's account data
@ -132,7 +132,7 @@ the following order of preference:
login
3. The identity server provided by the Riot config file
If none of these sources have an identity server set, then Element will prompt the
If none of these sources have an identity server set, then Riot will prompt the
user to set an identity server first when attempting to use features that
require one.

View File

@ -1,16 +0,0 @@
# End to end encryption by default
By default, Element will create encrypted DM rooms if the user you are chatting with has keys uploaded on their account.
For private room creation, Element will default to encryption on but give you the choice to opt-out.
## Disabling encryption by default
Set the following on your homeserver's
`/.well-known/matrix/client` config:
```json
{
"im.vector.riot.e2ee": {
"default": false
}
}
```

View File

@ -1,6 +1,6 @@
# Feature flags
When developing new features for Element, we use feature flags to give us more
When developing new features for Riot, we use feature flags to give us more
flexibility and control over when and where those features are enabled.
For example, flags make the following things possible:
@ -88,7 +88,7 @@ and
configs.
**Warning:** While this does mean the feature is enabled by default for
https://app.element.io and official Element Desktop builds, it will not be enabled by
https://riot.im and official Riot Desktop builds, it will not be enabled by
default for self-hosted installs, custom desktop builds, etc. To cover those
cases as well, the best options at the moment are converting to a regular
setting defaulted on or to remove the flag. Simply enabling the existing flag by

View File

@ -1,10 +1,10 @@
# Jitsi wrapper developer docs
*If you're looking for information on how to set up Jitsi in your Element, see
*If you're looking for information on how to set up Jitsi in your Riot, see
[jitsi.md](./jitsi.md) instead.*
These docs are for developers wondering how the different conference buttons work
within Element. If you're not a developer, you're probably looking for [jitsi.md](./jitsi.md).
within Riot. If you're not a developer, you're probably looking for [jitsi.md](./jitsi.md).
## Brief introduction to widgets
@ -17,8 +17,8 @@ in the react-sdk), though for some widgets special integration can be done. v2 w
have a `data` object which helps achieve that special integration, though v1 widgets
are best iframed and left alone.
Widgets have a `postMessage` API they can use to interact with Element, which also allows
Element to interact with them. Typically this is most used by the sticker picker (an
Widgets have a `postMessage` API they can use to interact with Riot, which also allows
Riot to interact with them. Typically this is most used by the sticker picker (an
account-level widget), though widgets like the Jitsi widget will request permissions to
get 'stuck' into the room list during a conference.
@ -28,7 +28,7 @@ Widgets can be added with the `/addwidget <url>` command.
Integration managers (like Scalar and Dimension) are accessible via the 4 squares in
the top right of the room and provide a simple UI over top of bridges, bots, and other
stuff to plug into a room. They are a separate service to Element and are thus iframed
stuff to plug into a room. They are a separate service to Riot and are thus iframed
in a dialog as well. They also have a `postMessage` API they can use to interact with
the client to create things like widgets, give permissions to bridges, and generally
set everything up for the integration the user is working with.
@ -51,7 +51,7 @@ over `postMessage`, even if they aren't going to be using the widget APIs).
Widgets added with the `/addwidget` command will *not* be wrapped as they are not going
through an integration manager. The widgets themselves *should* also work outside of
Element. Widgets currently have a "pop out" button which opens them in a new tab and
Riot. Widgets currently have a "pop out" button which opens them in a new tab and
therefore have no connection back to Riot.
## Jitsi widgets from integration managers
@ -65,27 +65,27 @@ server they specified in their config.json - this is expected.
Some integration managers allow the user to change the conference name while others
will generate one for the user.
## Jitsi widgets generated by Element itself
## Jitsi widgets generated by Riot itself
When the user clicks on the call buttons by the composer, the integration manager is
not involved in the slightest. Instead, Element itself generates a widget event, this time
not involved in the slightest. Instead, Riot itself generates a widget event, this time
using the config.json parameters, and publishes that to the room. If there's only two
people in the room, a plain WebRTC call is made instead of using a widget at all - these
are defined in the Matrix specification.
The Jitsi widget created by Element uses a local `jitsi.html` wrapper (or one hosted by
`https://app.element.io` for desktop users or those on non-https domains) as the widget
`url`. The wrapper has some basic functionality for talking to Element to ensure the
The Jitsi widget created by Riot uses a local `jitsi.html` wrapper (or one hosted by
`https://riot.im/app` for desktop users or those on non-https domains) as the widget
`url`. The wrapper has some basic functionality for talking to Riot to ensure the
required `postMessage` calls are fulfilled.
**Note**: Per [jitsi.md](./jitsi.md) the `preferredDomain` can also come from the server's
client .well-known data.
## The Jitsi wrapper in Element
## The Jitsi wrapper in Riot
Whenever Element sees a Jitsi widget, it ditches the `url` and instead replaces it with
Whenever Riot sees a Jitsi widget, it ditches the `url` and instead replaces it with
its local wrapper, much like what it would do when creating a widget. However, instead
of using one from [app.element.io](https://app.element.io), it will use one local to the client instead.
of using one from riot.im/app, it will use one local to the client instead.
The wrapper is used to provide a consistent experience to users, as well as being faster
and less risky to load. The local wrapper URL is populated with the conference information

View File

@ -1,6 +1,6 @@
# Jitsi in Element
# Jitsi in Riot
Element uses [Jitsi](https://jitsi.org/) for conference calls, which provides options for
Riot uses [Jitsi](https://jitsi.org/) for conference calls, which provides options for
self-hosting your own server and supports most major platforms.
1:1 calls, or calls between you and one other person, do not use Jitsi. Instead, those
@ -14,13 +14,13 @@ will add a Jitsi widget which allows anyone in the room to join.
Integration managers (available through the 4 squares in the top right of the room) may
provide their own approaches for adding Jitsi widgets.
## Configuring Element to use your self-hosted Jitsi server
## Configuring Riot to use your self-hosted Jitsi server
Element will use the Jitsi server that is embedded in the widget, even if it is not the
Riot will use the Jitsi server that is embedded in the widget, even if it is not the
one you configured. This is because conference calls must be held on a single Jitsi
server and cannot be split over multiple servers.
However, you can configure Element to *start* a conference with your Jitsi server by adding
However, you can configure Riot to *start* a conference with your Jitsi server by adding
to your [config](./config.md) the following:
```json
{
@ -30,13 +30,13 @@ to your [config](./config.md) the following:
}
```
The default is `jitsi.riot.im` (a free service offered by Element), and the demo site for
The default is `jitsi.riot.im` (a free service offered by Riot), and the demo site for
Jitsi uses `meet.jit.si` (also free).
Once you've applied the config change, refresh Element and press the call button. This
Once you've applied the config change, refresh Riot and press the call button. This
should start a new conference on your Jitsi server.
**Note**: The widget URL will point to a `jitsi.html` page hosted by Element. The Jitsi
**Note**: The widget URL will point to a `jitsi.html` page hosted by Riot. The Jitsi
domain will appear later in the URL as a configuration parameter.
**Hint**: If you want everyone on your homeserver to use the same Jitsi server by
@ -52,7 +52,7 @@ default, and you are using riot-web 1.6 or newer, set the following on your home
## Mobile app support
Currently the Element mobile apps do not support custom Jitsi servers and will instead
Currently the Riot mobile apps do not support custom Jitsi servers and will instead
use the default `jitsi.riot.im` server. When users on the mobile apps join the call,
they will be joining a different conference which has the same name, but not the same
participants. This is a known bug and which needs to be fixed.

View File

@ -1,15 +1,16 @@
# Labs features
If Labs is enabled in the [Element config](config.md), you can enable some of these features by going
If Labs is enabled in the [Riot config](config.md), you can enable some of these features by going
to `Settings->Labs`. This list is non-exhaustive and subject to change, chat in
[#element-web:matrix.org](https://matrix.to/#/#element-web:matrix.org) for more information.
[#riot-web:matrix.org](https://matrix.to/#/#riot-web:matrix.org) for more information.
**Be warned! Labs features are not finalised, they may be fragile, they may change, they may be
dropped. Ask in the room if you are unclear about any details here.**
## New spinner design (`feature_new_spinner`)
## Font scaling (`feature_font_scaling`)
Replaces the old spinner image with a new, svg-based one featuring a sleeker design.
Enables font scaling options for accessibility. To alter the scale check the
appearance tab in settings.
## Message pinning (`feature_pinning`)
@ -26,7 +27,7 @@ your avatar next to the message composer.
An experimental approach for dealing with custom tags. Custom tags will appear in the bottom portion
of the community filter panel.
Setting custom tags is not supported by Element.
Setting custom tags is not supported by Riot.
## Render simple counters in room header (`feature_state_counters`)
@ -53,7 +54,7 @@ That's it. Now should see your new counter under the header.
## Multiple integration managers (`feature_many_integration_managers`)
Exposes a way to access all the integration managers known to Element. This is an implementation of [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957).
Exposes a way to access all the integration managers known to Riot. This is an implementation of [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957).
## New ways to ignore people (`feature_mjolnir`)
@ -71,6 +72,22 @@ An implementation of [MSC2241](https://github.com/matrix-org/matrix-doc/pull/224
This also includes a new implementation of the user & member info panel, designed to share more code between showing community members & room members. Built on top of this new panel is also a new UX for verification from the member panel.
## Cross-signing
Cross-signing ([MSC1756](https://github.com/matrix-org/matrix-doc/pull/1756))
improves the device verification experience by allowing you to verify a user
instead of verifying each of their devices.
The feature is enabled by default and does not follow a traditional labs flag
at the moment. If something goes wrong, add this to your config to disable it:
```json
{
"settingDefaults": {
"feature_cross_signing": false
}
}
```
The setting will be removed in a future release, enabling it non-optionally for
all users.
@ -88,9 +105,21 @@ person is online.
## Custom themes (`feature_custom_themes`)
Custom themes are possible through Element's [theme support](./theming.md), though
normally these themes need to be defined in the config for Element. This labs flag
Custom themes are possible through Riot's [theme support](./theming.md), though
normally these themes need to be defined in the config for Riot. This labs flag
adds an ability for end users to add themes themselves by using a URL to the JSON
theme definition.
For some sample themes, check out [aaronraimist/element-themes](https://github.com/aaronraimist/element-themes).
For some sample themes, check out [aaronraimist/riot-web-themes](https://github.com/aaronraimist/riot-web-themes).
## New room list (`feature_new_room_list`) (in development)
A complete rewrite of the room list is underway to increase performance, stability,
and general usability. This is expected to take a while to complete and as such might
be missing critical features - please use at your own risk, though do report bugs!
## IRC message layout (`feature_irc_ui`)
Adds an option to change the message layout to an IRC style ` timestamp | avatar
| name | message `

View File

@ -1,6 +1,6 @@
## Memory leaks
Element usually emits slow behaviour just before it is about to crash. Getting a
Riot usually emits slow behaviour just before it is about to crash. Getting a
memory snapshot (below) just before that happens is ideal in figuring out what
is going wrong.
@ -14,14 +14,14 @@ this happens though so we can try and narrow down what might have gone wrong.
## Memory profiles/snapshots
When investigating memory leaks/problems it's usually important to compare snapshots
from different points in the Element session lifecycle. Most importantly, a snapshot
from different points in the Riot session lifecycle. Most importantly, a snapshot
to establish the baseline or "normal" memory usage is useful. Taking a snapshot
roughly 30-60 minutes after starting Element is a good time to establish "normal"
roughly 30-60 minutes after starting Riot is a good time to establish "normal"
memory usage for the app - anything after that is at risk of hiding the memory leak
and anything newer is still in the warmup stages of the app.
**Memory profiles can contain sensitive information.** If you are submitting a memory
profile to us for debugging purposes, please pick the appropriate Element developer and
profile to us for debugging purposes, please pick the appropriate Riot developer and
send them over an encrypted private message. *Do not share your memory profile in
public channels or with people you do not trust.*
@ -42,7 +42,7 @@ While the profile is in progress, the tab might be frozen or unresponsive.
1. Press CTRL+SHIFT+I (I as in eye).
2. Click the Memory tab.
3. Select "Heap Snapshot" and the app.element.io VM instance (not the indexeddb one).
3. Select "Heap Snapshot" and the riot.im VM instance (not the indexeddb one).
4. Click "Take Snapshot".
5. Wait a bit (coffee is a good option).
6. When the save button appears on the left side of the panel, click it to save the

View File

@ -1,24 +1,24 @@
# Native Node Modules
For some features, the desktop version of Element can make use of native Node
For some features, the desktop version of Riot can make use of native Node
modules. These allow Riot to integrate with the desktop in ways that a browser
cannot.
While native modules enable powerful new features, they must be complied for
each operating system. For official Element releases, we will always build these
each operating system. For official Riot releases, we will always build these
modules from source to ensure we can trust the compiled output. In the future,
we may offer a pre-compiled path for those who want to use these features in a
custom build of Element without installing the various build tools required.
custom build of Riot without installing the various build tools required.
Do note that compiling a module for a particular operating system
(Linux/macOS/Windows) will need to be done on that operating system.
Cross-compiling from a host OS for a different target OS may be possible, but
we don't support this flow with Element dependencies at this time.
we don't support this flow with Riot dependencies at this time.
At the moment, we need to make some changes to the Element release process before
At the moment, we need to make some changes to the Riot release process before
we can support native Node modules at release time, so these features are
currently disabled by default until that is resolved. The following sections
explain the manual steps you can use with a custom build of Element to enable
explain the manual steps you can use with a custom build of Riot to enable
these features if you'd like to try them out.
## Adding Seshat for search in E2E encrypted rooms
@ -53,7 +53,7 @@ Please make sure to include all the `--` as well as the `--release` command line
switch at the end. Modify your electron version accordingly depending on the
version that is installed on your system.
After this is done the Electron version of Element can be run from the main folder
After this is done the Electron version of Riot can be run from the main folder
as usual using:
yarn electron

View File

@ -1,7 +1,7 @@
# Review Guidelines
The following summarises review guidelines that we follow for pull requests in
Element Web and other supporting repos. These are just guidelines (not strict
Riot Web and other supporting repos. These are just guidelines (not strict
rules) and may be updated over time.
## Code Review
@ -58,7 +58,7 @@ When reviewing code, here are some things we look for and also things we avoid:
## Design and Product Review
We want to ensure that all changes to Element fit with our design and product
We want to ensure that all changes to Riot fit with our design and product
vision. We often request review from those teams so they can provide their
perspective.
@ -72,11 +72,11 @@ functionality is:
As it can be difficult to review design work from looking at just the changed
files in a PR, authors should be prepared for Design and / or Product teams to
request a link to an ad-hoc build of Element (hosted anywhere) that can be used for
request a link to an ad-hoc build of Riot (hosted anywhere) that can be used for
the review. In the future, we [hope to automate
this](https://github.com/vector-im/riot-web/issues/12624) for every PR.
Before starting work on a feature, it's best to ensure your plan aligns well
with our vision for Element. Please chat with the team in
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org) before you
with our vision for Riot. Please chat with the team in
[#riot-dev:matrix.org](https://matrix.to/#/#riot-dev:matrix.org) before you
start so we can ensure it's something we'd be willing to merge.

View File

@ -5,14 +5,14 @@ matrix-react-sdk
- base CSS
- all the components needed to build a workable app (including the top layer)
element-web: the Element skin
- Element-specific classes (e.g. login header/footer)
- Element-specific themes
riot-web: the riot skin
- riot-specific classes (e.g. login header/footer)
- riot-specific themes
- light
- dark
i.e. the only things which should go into element-web are bits which apply vector-specific skinning
specifically "Stuff that any other brand would not want to use. (e.g. Element logos, links, T&Cs)"
i.e. the only things which should go into riot-web are bits which apply vector-specific skinning
specifically "Stuff that any other brand would not want to use. (e.g. riot logos, links, T&Cs)"
- Questions:
- Electron app? (should probably be a separate repo in its own right? but might as well go here for now)
- index.html & index.js? (should be in matrix-react-sdk, given the SDK is useless without them?)
@ -21,7 +21,7 @@ ideally matrix-react-sdk itself should ship with a default skin which actually w
status skin (can go in the same app for now)
- has status theme
- which inherits from Element light theme
- which inherits from riot light theme
- how do we share graphics between skins?
- shove them into react-sdk, or...
- guess we do ../../vector/img
@ -64,5 +64,5 @@ random thoughts;
-----------------
Immediate plan for Status:
* Implement it as a theme for the Element skin
* Implement it as a theme for the riot skin
* Ideally move skins to a sensible level (possibly even including src?)

View File

@ -1,14 +1,14 @@
Theming Element
Theming Riot
============
Themes are a very basic way of providing simple alternative look & feels to the
Element app via CSS & custom imagery.
riot-web app via CSS & custom imagery.
They are *NOT* co be confused with 'skins', which describe apps which sit on top
of matrix-react-sdk - e.g. in theory Element itself is a react-sdk skin.
As of Jan 2017, skins are not fully supported; Element is the only available skin.
of matrix-react-sdk - e.g. in theory Riot itself is a react-sdk skin.
As of Jan 2017, skins are not fully supported; riot is the only available skin.
To define a theme for Element:
To define a theme for Riot:
1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`.
2. Fork `src/skins/vector/css/themes/dark.scss` to be `teal.scss`
@ -41,16 +41,6 @@ eg. in config.json:
{
"name": "Electric Blue",
"is_dark": false,
"fonts": {
"faces": [
{
"font-family": "Inter",
"src": [{"url": "/fonts/Inter.ttf", "format": "ttf"}]
}
],
"general": "Inter, sans",
"monospace": "'Courier New'"
},
"colors": {
"accent-color": "#3596fc",
"primary-color": "#368bd6",
@ -94,5 +84,3 @@ eg. in config.json:
`username-colors` is expected to contain 8 colors. `avatar-background-colors` is expected to contain 3 colors. Both values are optional and have fallbacks from the built-in theme.
These are exposed as `--username-colors_0`, ... and `--avatar-background-colors_0`, ... respectively in CSS.
All properties in `fonts` are optional, and will default to the standard Riot fonts.

View File

@ -1,4 +1,4 @@
# How to translate Element (Dev Guide)
# How to translate riot-web (Dev Guide)
## Requirements
@ -6,7 +6,7 @@
- Including up-to-date versions of matrix-react-sdk and matrix-js-sdk
- Latest LTS version of Node.js installed
- Be able to understand English
- Be able to understand the language you want to translate Element into
- Be able to understand the language you want to translate riot-web into
## Translating strings vs. marking strings for translation

View File

@ -1,10 +1,10 @@
# How to translate Element
# How to translate riot-web
## Requirements
- Web Browser
- Be able to understand English
- Be able to understand the language you want to translate Element into
- Be able to understand the language you want to translate riot-web into
## Step 0: Join #riotweb-translations:matrix.org
@ -17,7 +17,7 @@
2. After registering check if you got an email to verify your account and click the link (if there is none head to step 1.4)
3. Log into weblate
4. Head to https://translate.riot.im/accounts/profile/ and select the languages you know and maybe another language you know too.
6. Head to https://translate.riot.im/accounts/profile/#subscriptions and select Element Web as Project
6. Head to https://translate.riot.im/accounts/profile/#subscriptions and select Riot Web as Project
## How to check if your language already is being translated
@ -50,7 +50,7 @@ The yellow button has to be used if you are unsure about the translation but you
### What are "%(something)s"?
These things are variables that are expanded when displayed by Element. They can be room names, usernames or similar. If you find one, you can move to the right place for your language, but not delete it as the variable will be missing if you do.
These things are variables that are expanded when displayed by Riot. They can be room names, usernames or similar. If you find one, you can move to the right place for your language, but not delete it as the variable will be missing if you do.
A special case is `%(urlStart)s` and `%(urlEnd)s` which are used to mark the beginning of a hyperlink (i.e. `<a href="/somewhere">` and `</a>`. You must keep these markers surrounding the equivalent string in your language that needs to be hyperlinked.

View File

@ -1,7 +1,7 @@
{
"name": "riot-web",
"productName": "Riot",
"version": "1.7.2",
"version": "1.6.5",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@ -42,15 +42,16 @@
"build:genfiles": "yarn reskindex && yarn build:res && yarn build:jitsi",
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
"build:compile": "babel -d lib --verbose --extensions \".ts,.js,.tsx\" src",
"build:bundle": "webpack --progress --bail --mode production",
"build:bundle-stats": "webpack --progress --bail --mode production --json > webpack-stats.json",
"build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail --mode production",
"build:bundle-stats": "cross-env NODE_ENV=production webpack -p --progress --bail --mode production --json > webpack-stats.json",
"build:types": "tsc --emitDeclarationOnly --jsx react",
"dist": "scripts/package.sh",
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,riot-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js\"",
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint": "yarn lint:types && yarn lint:ts && yarn lint:js && yarn lint:style",
"lint:js": "eslint src",
"lint:ts": "echo 'We don't actually have a typescript linter at this layer because tslint is being removed from our stack. Presumably your TS is fine.'",
"lint:types": "tsc --noEmit --jsx react",
"lint:style": "stylelint 'res/css/**/*.scss'",
"test": "jest"
@ -59,9 +60,10 @@
"browser-request": "^0.3.3",
"gfm.css": "^1.1.2",
"highlight.js": "^9.13.1",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
"matrix-js-sdk": "6.2.2",
"matrix-react-sdk": "2.7.2",
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz",
"postcss-easings": "^2.0.0",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
@ -99,11 +101,13 @@
"chokidar": "^3.3.1",
"concurrently": "^4.0.1",
"cpx": "^1.3.2",
"cross-env": "^6.0.3",
"css-loader": "^3.3.2",
"eslint": "7.3.1",
"eslint-config-matrix-org": "^0.1.2",
"eslint": "^5.8.0",
"eslint-config-google": "^0.7.1",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-flowtype": "^2.50.3",
"eslint-plugin-jest": "^23.0.4",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^2.2.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
@ -123,7 +127,6 @@
"modernizr": "^3.6.0",
"node-fetch": "^2.6.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-easings": "^2.0.0",
"postcss-extend": "^1.0.5",
"postcss-hexrgba": "^2.0.0",
"postcss-import": "^12.0.1",

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Script to perform a release of element-web.
# Script to perform a release of riot-web.
#
# Requires github-changelog-generator; to install, do
# pip install git+https://github.com/matrix-org/github-changelog-generator.git

View File

@ -4,8 +4,8 @@ class StartupError extends Error {}
* We need to know the bundle path before we can fetch the sourcemap files. In a production environment, we can guess
* it using this.
*/
async function getBundleName(baseUrl) {
const res = await fetch(new URL("index.html", baseUrl).toString());
async function getBundleName() {
const res = await fetch("../index.html");
if (!res.ok) {
throw new StartupError(`Couldn't fetch index.html to prefill bundle; ${res.status} ${res.statusText}`);
}
@ -25,7 +25,7 @@ function validateBundle(value) {
* The purpose of this is just to validate that the user entered a real bundle, and provide feedback.
*/
const bundleCache = new Map();
function bundleSubject(baseUrl, bundle) {
function bundleSubject(bundle) {
if (!bundle.match(/^[0-9a-f]{20}$/)) throw new Error("Bad input");
if (bundleCache.has(bundle)) {
return bundleCache.get(bundle);
@ -33,7 +33,7 @@ function bundleSubject(baseUrl, bundle) {
const fetcher = new rxjs.BehaviorSubject(Pending.of());
bundleCache.set(bundle, fetcher);
fetch(new URL(`bundles/${bundle}/bundle.js.map`, baseUrl).toString()).then((res) => {
fetch(`/bundles/${bundle}/bundle.js.map`).then((res) => {
res.body.cancel(); /* Bail on the download immediately - it could be big! */
const status = res.ok;
if (status) {
@ -145,7 +145,6 @@ function ProgressBar({ fetchStatus }) {
* The main component.
*/
function BundlePicker() {
const [baseUrl, setBaseUrl] = React.useState(new URL("..", window.location).toString());
const [bundle, setBundle] = React.useState("");
const [file, setFile] = React.useState("");
const [line, setLine] = React.useState("1");
@ -154,25 +153,19 @@ function BundlePicker() {
const [bundleFetchStatus, setBundleFetchStatus] = React.useState(None);
const [fileFetchStatus, setFileFetchStatus] = React.useState(None);
/* On baseUrl change, try to fill in the bundle name for the user */
/* At startup, try to fill in the bundle name for the user */
React.useEffect(() => {
console.log("DEBUG", baseUrl);
getBundleName(baseUrl).then((name) => {
console.log("DEBUG", name);
getBundleName().then((name) => {
if (bundle === "" && validateBundle(name) !== None) {
setBundle(name);
}
}, console.log.bind(console));
}, [baseUrl]);
}, []);
/* ------------------------- */
/* Follow user state changes */
/* ------------------------- */
const onBaseUrlChange = React.useCallback((event) => {
const value = event.target.value;
setBaseUrl(value);
}, []);
const onBundleChange = React.useCallback((event) => {
const value = event.target.value;
setBundle(value);
@ -202,14 +195,14 @@ function BundlePicker() {
React.useEffect(() =>
validateBundle(bundle).fold({
some: (value) => {
const subscription = bundleSubject(baseUrl, value)
const subscription = bundleSubject(value)
.pipe(rxjs.operators.map(Some.of))
.subscribe(setBundleFetchStatus);
return () => subscription.unsubscribe();
},
none: () => setBundleFetchStatus(None),
}),
[baseUrl, bundle]);
[bundle]);
/* Whenever a valid javascript file is input, see if it corresponds to a sourcemap file and initiate a fetch
* if so. */
@ -218,7 +211,7 @@ function BundlePicker() {
setFileFetchStatus(None);
return;
}
const observable = fetchAsSubject(new URL(`bundles/${bundle}/${file}.map`, baseUrl).toString())
const observable = fetchAsSubject(`/bundles/${bundle}/${file}.map`)
.pipe(
rxjs.operators.map((fetchStatus) => fetchStatus.flatMap(value => {
try {
@ -231,7 +224,7 @@ function BundlePicker() {
);
const subscription = observable.subscribe(setFileFetchStatus);
return () => subscription.unsubscribe();
}, [baseUrl, bundle, file]);
}, [bundle, file]);
/*
* Whenever we have a valid fetched sourcemap, and a valid line, attempt to find the original position from the
@ -262,16 +255,6 @@ function BundlePicker() {
/* ------ */
return e('div', {},
e('div', { className: 'inputs' },
e('div', { className: 'baseUrl' },
e('label', { htmlFor: 'baseUrl'}, 'Base URL'),
e('input', {
name: 'baseUrl',
required: true,
pattern: ".+",
onChange: onBaseUrlChange,
value: baseUrl,
}),
),
e('div', { className: 'bundle' },
e('label', { htmlFor: 'bundle'}, 'Bundle'),
e('input', {

View File

@ -1,72 +1,72 @@
{
"name": "Element",
"short_name": "Element",
"name": "Riot - open team collaboration",
"short_name": "Riot",
"display": "standalone",
"theme_color": "#76CFA6",
"start_url": "index.html",
"icons": [
{
"src": "/vector-icons/44.png",
"src": "/vector-icons/20587a91-30e9-d583-2b9b-5c4c2aca967f.webPlatform.png",
"sizes": "44x44",
"type": "image/png"
},
{
"src": "/vector-icons/1240x600.png",
"src": "/vector-icons/20522817-fde7-6a88-54a9-496b1c8aee53.webPlatform.png",
"sizes": "1240x600",
"type": "image/png"
},
{
"src": "/vector-icons/300.png",
"src": "/vector-icons/4168a7e5-9d94-e9a3-4e60-45a58cc8ee4e.webPlatform.png",
"sizes": "300x300",
"type": "image/png"
},
{
"src": "/vector-icons/150.png",
"src": "/vector-icons/dd73cdd3-17c4-9b33-81b8-4789b7a4a250.webPlatform.png",
"sizes": "150x150",
"type": "image/png"
},
{
"src": "/vector-icons/88.png",
"src": "/vector-icons/8f19f71b-ab84-4fe7-1866-8ee9fb1362da.webPlatform.png",
"sizes": "88x88",
"type": "image/png"
},
{
"src": "/vector-icons/24.png",
"src": "/vector-icons/89ac632f-d735-868d-4b9b-cfe32121294c.webPlatform.png",
"sizes": "24x24",
"type": "image/png"
},
{
"src": "/vector-icons/50.png",
"src": "/vector-icons/5c925eef-dd2e-aa16-b6d4-13c90b81af1f.webPlatform.png",
"sizes": "50x50",
"type": "image/png"
},
{
"src": "/vector-icons/620x300.png",
"src": "/vector-icons/b3624ff1-eaf4-1082-4923-949bc8eb40ef.webPlatform.png",
"sizes": "620x300",
"type": "image/png"
},
{
"src": "/vector-icons/1024.png",
"src": "/vector-icons/32aa4ec4-8b3f-d7b8-e2df-a49ba887199a.webPlatform.png",
"sizes": "1024x1024",
"type": "image/png"
},
{
"src": "/vector-icons/180.png",
"src": "/vector-icons/a2e91e68-aa4e-45e7-e5e6-951e1d314675.webPlatform.png",
"sizes": "180x180",
"type": "image/png"
},
{
"src": "/vector-icons/152.png",
"src": "/vector-icons/627721aa-5331-ded6-b4a5-0bb4799985ee.webPlatform.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "/vector-icons/120.png",
"src": "/vector-icons/4f4b5190-3b9c-9173-3118-442179ae62d4.webPlatform.png",
"sizes": "120x120",
"type": "image/png"
},
{
"src": "/vector-icons/76.png",
"src": "/vector-icons/552c9d70-ff13-2235-8ef9-00db0d2fda0c.webPlatform.png",
"sizes": "76x76",
"type": "image/png"
}
@ -74,12 +74,12 @@
"related_applications": [
{
"platform": "play",
"url": "https://play.google.com/store/apps/details?id=im.vector.app",
"id": "im.vector.app"
"url": "https://play.google.com/store/apps/details?id=im.vector.alpha",
"id": "im.vector.alpha"
},
{
"platform": "itunes",
"url": "https://apps.apple.com/app/vector/id1083446067"
"url": "https://itunes.apple.com/gb/app/riot-open-source-team-collaboration-via-matrix/id1083446067"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 KiB

View File

@ -1,6 +0,0 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M414 204C414 180.804 432.804 162 456 162C610.64 162 736 287.36 736 442C736 465.196 717.196 484 694 484C670.804 484 652 465.196 652 442C652 333.752 564.248 246 456 246C432.804 246 414 227.196 414 204Z" fill="#0DBD8B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M610 820C610 843.196 591.196 862 568 862C413.36 862 288 736.64 288 582C288 558.804 306.804 540 330 540C353.196 540 372 558.804 372 582C372 690.248 459.752 778 568 778C591.196 778 610 796.804 610 820Z" fill="#0DBD8B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M204 610C180.804 610 162 591.196 162 568C162 413.36 287.36 288 442 288C465.196 288 484 306.804 484 330C484 353.196 465.196 372 442 372C333.752 372 246 459.752 246 568C246 591.196 227.196 610 204 610Z" fill="#0DBD8B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M820 414C843.196 414 862 432.804 862 456C862 610.64 736.64 736 582 736C558.804 736 540 717.196 540 694C540 670.804 558.804 652 582 652C690.248 652 778 564.248 778 456C778 432.804 796.804 414 820 414Z" fill="#0DBD8B"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -0,0 +1,6 @@
<svg width="42" height="50" viewBox="0 0 42 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.04021 42.174C1.04021 45.944 4.27657 49 8.26822 49C12.2603 49 15.4962 45.944 15.4962 42.174V35.2587L22.8119 35.2518C23.2234 35.2518 23.6386 35.2385 24.0415 35.2122C33.5209 34.6096 40.9465 27.1046 40.9465 18.1261C40.9465 8.68273 32.8114 1 22.8119 1H8.26822C4.27657 1 1.04021 4.05637 1.04021 7.82645V27.7141C1.01327 27.9548 0.999582 28.1987 1.00001 28.4459C1.00001 28.6887 1.01412 28.9286 1.04021 29.1645V42.174ZM15.4963 21.6066V14.6525H22.812C24.8405 14.6525 26.4901 16.2103 26.4901 18.1261C26.4901 19.9469 24.9881 21.4692 23.0665 21.5916C22.9822 21.5969 22.8975 21.5993 22.8047 21.5993L15.4963 21.6066Z" fill="#A2DDEF"/>
<path d="M15.4963 14.6525V14.0405H14.8844V14.6525H15.4963ZM15.4963 21.6066H14.8844V22.2191L15.4969 22.2185L15.4963 21.6066ZM22.8047 21.5993V20.9874H22.8041L22.8047 21.5993ZM23.0665 21.5916L23.1045 22.2024L23.1053 22.2023L23.0665 21.5916ZM1.04021 29.1645H1.65214V29.1308L1.64843 29.0972L1.04021 29.1645ZM1.00001 28.4459H1.61194L1.61193 28.4449L1.00001 28.4459ZM1.04021 27.7141L1.64834 27.7821L1.65214 27.7482V27.7141H1.04021ZM24.0415 35.2122L24.0027 34.6015L24.0017 34.6016L24.0415 35.2122ZM22.8119 35.2518V34.6399H22.8113L22.8119 35.2518ZM15.4962 35.2587L15.4957 34.6467L14.8843 34.6473V35.2587H15.4962ZM14.8844 14.6525V21.6066H16.1082V14.6525H14.8844ZM15.4969 22.2185L22.8053 22.2112L22.8041 20.9874L15.4957 20.9946L15.4969 22.2185ZM22.8047 22.2112C22.9085 22.2112 23.006 22.2085 23.1045 22.2024L23.0284 20.9809C22.9584 20.9852 22.8865 20.9874 22.8047 20.9874V22.2112ZM23.1053 22.2023C25.3203 22.0612 27.1021 20.2979 27.1021 18.1261H25.8782C25.8782 19.5959 24.6559 20.8772 23.0276 20.9809L23.1053 22.2023ZM27.1021 18.1261C27.1021 15.8399 25.145 14.0405 22.812 14.0405V15.2644C24.536 15.2644 25.8782 16.5808 25.8782 18.1261H27.1021ZM22.812 14.0405H15.4963V15.2644H22.812V14.0405ZM8.26822 48.3881C4.58104 48.3881 1.65214 45.5735 1.65214 42.174H0.428288C0.428288 46.3145 3.97209 49.6119 8.26822 49.6119V48.3881ZM1.65214 42.174V29.1645H0.428288V42.174H1.65214ZM1.64843 29.0972C1.62467 28.8824 1.61193 28.665 1.61193 28.4459H0.388085C0.388085 28.7124 0.403576 28.9748 0.431997 29.2318L1.64843 29.0972ZM1.61193 28.4449C1.61155 28.221 1.62394 28.0001 1.64834 27.7821L0.432085 27.646C0.402599 27.9094 0.387617 28.1765 0.388085 28.447L1.61193 28.4449ZM1.65214 27.7141V7.82645H0.428288V27.7141H1.65214ZM1.65214 7.82645C1.65214 4.42682 4.58109 1.61193 8.26822 1.61193V0.388075C3.97204 0.388075 0.428288 3.68592 0.428288 7.82645H1.65214ZM8.26822 1.61193H22.8119V0.388075H8.26822V1.61193ZM22.8119 1.61193C32.5069 1.61193 40.3346 9.05321 40.3346 18.1261H41.5584C41.5584 8.31226 33.1159 0.388075 22.8119 0.388075V1.61193ZM40.3346 18.1261C40.3346 26.7525 33.1898 34.0175 24.0027 34.6015L24.0804 35.8229C33.8521 35.2017 41.5584 27.4566 41.5584 18.1261H40.3346ZM24.0017 34.6016C23.6124 34.6269 23.2104 34.6399 22.8119 34.6399V35.8637C23.2363 35.8637 23.6649 35.85 24.0813 35.8228L24.0017 34.6016ZM22.8113 34.6399L15.4957 34.6467L15.4968 35.8706L22.8125 35.8637L22.8113 34.6399ZM14.8843 35.2587V42.174H16.1082V35.2587H14.8843ZM14.8843 42.174C14.8843 45.5736 11.9558 48.3881 8.26822 48.3881V49.6119C12.5648 49.6119 16.1082 46.3145 16.1082 42.174H14.8843Z" fill="#368BD6"/>
<path d="M8.26823 42.174V7.82642H22.8119C28.8351 7.82642 33.7181 12.4378 33.7181 18.1261C33.7181 23.5784 29.232 28.0412 23.5561 28.4019C23.3098 28.4176 23.0621 28.4257 22.8119 28.4257L8.22803 28.4395" stroke="#368BD6" stroke-width="1.22385" stroke-linecap="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4227 9.0113C15.758 7.21673 15.3325 5.4048 14.2243 3.91155C11.9366 0.828522 7.41753 0.0768486 4.15037 2.23574C2.56747 3.28105 1.51106 4.84579 1.17575 6.64116C0.84001 8.43653 1.26557 10.2481 2.37372 11.7413C4.66146 14.8243 9.18092 15.576 12.4481 13.4171C14.0306 12.3714 15.087 10.8071 15.4227 9.0113ZM27.852 46.0868C29.2587 47.9824 31.4998 48.9962 33.7777 48.9962C35.21 48.9962 36.6569 48.5951 37.9195 47.7594C41.1883 45.5965 41.9817 41.3397 39.6905 38.2522L29.4751 24.4846C27.1843 21.3972 22.6769 20.6475 19.408 22.8121C16.1392 24.975 15.3458 29.2318 17.6365 32.3192L27.852 46.0868Z" fill="#368BD6"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/vector-icons/mstile-70.png"/>
<square150x150logo src="/vector-icons/mstile-150.png"/>
<square310x310logo src="/vector-icons/mstile-310.png"/>
<wide310x150logo src="/vector-icons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/vector-icons/mstile-70x70.png"/>
<square150x150logo src="/vector-icons/mstile-150x150.png"/>
<square310x310logo src="/vector-icons/mstile-310x310.png"/>
<wide310x150logo src="/vector-icons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

Some files were not shown because too many files have changed in this diff Show More