Merge remote-tracking branch 'upstream/master' into sc

This commit is contained in:
su-ex 2020-12-21 19:19:03 +01:00
commit f647f3e428
No known key found for this signature in database
GPG Key ID: D743C50C8B61984C
16 changed files with 123 additions and 43 deletions

View File

@ -1,3 +1,33 @@
Changes in [1.7.16](https://github.com/vector-im/element-web/releases/tag/v1.7.16) (2020-12-21)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.16-rc.1...v1.7.16)
* Upgrade to React SDK 3.11.1 and JS SDK 9.4.1
Changes in [1.7.16-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.16-rc.1) (2020-12-16)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.15...v1.7.16-rc.1)
* Upgrade to React SDK 3.11.0-rc.2 and JS SDK 9.4.0-rc.2
* Translations update from Weblate
[\#15979](https://github.com/vector-im/element-web/pull/15979)
* Bump ini from 1.3.5 to 1.3.7
[\#15949](https://github.com/vector-im/element-web/pull/15949)
* Document pull request previews
[\#15937](https://github.com/vector-im/element-web/pull/15937)
* Improve asset path for KaTeX fonts
[\#15939](https://github.com/vector-im/element-web/pull/15939)
* Fix an important semicolon
[\#15912](https://github.com/vector-im/element-web/pull/15912)
* Bump highlight.js from 10.1.2 to 10.4.1
[\#15898](https://github.com/vector-im/element-web/pull/15898)
* Add gitter.im to room directory
[\#15894](https://github.com/vector-im/element-web/pull/15894)
* Extend Platform to support idpId for SSO flows
[\#15771](https://github.com/vector-im/element-web/pull/15771)
* Include KaTeX CSS as a dependency
[\#15843](https://github.com/vector-im/element-web/pull/15843)
Changes in [1.7.15](https://github.com/vector-im/element-web/releases/tag/v1.7.15) (2020-12-07) Changes in [1.7.15](https://github.com/vector-im/element-web/releases/tag/v1.7.15) (2020-12-07)
=============================================================================================== ===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.15-rc.1...v1.7.15) [Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.15-rc.1...v1.7.15)

BIN
docs/img/pr-checks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

33
docs/pr-previews.md Normal file
View File

@ -0,0 +1,33 @@
# Pull Request Previews
Pull requests to the React SDK layer (and in the future other layers as well)
automatically set up a preview site with a full deployment of Element with the
changes from the pull request added in so that anyone can easily test and review
them. This is especially useful for checking visual and interactive changes.
To access the preview site, scroll down to the bottom of the PR where the
various CI results are displayed:
![Pull request: checks section](./img/pr-checks.png)
The checks section could be collapsed at first, so you may need to click "Show
all checks" to reveal them. Look for an entry that mentions `deploy-preview`. It
may be at the end of the list, so you may need scroll a bit to see it. To access
the preview site, click the "Details" link in the deploy preview row.
**Important:** Please always use test accounts when logging into preview sites,
as they may contain unreviewed and potentially dangerous code that could damage
your account, exfiltrate encryption keys, etc.
## FAQs
### Are preview sites created for pull requests from contributors?
Yes, they are created for all PRs from any author.
### Do preview sites expire after some time period?
No, there is no expiry date, so they should remain accessible indefinitely, but
of course they obviously aren't meant to live beyond the development workflow,
so please don't rely on them for anything important. They may disappear at any
time without notice.

View File

@ -73,10 +73,9 @@ functionality is:
required (though may still be useful) since we can continue tweaking required (though may still be useful) since we can continue tweaking
As it can be difficult to review design work from looking at just the changed 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 files in a PR, a [preview site](./pr-previews.md) that includes your changes
request a link to an ad-hoc build of Element (hosted anywhere) that can be used for will be added automatically so that anyone who's interested can try them out
the review. In the future, we [hope to automate easily.
this](https://github.com/vector-im/element-web/issues/12624) for every PR.
Before starting work on a feature, it's best to ensure your plan aligns well 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 with our vision for Element. Please chat with the team in

View File

@ -20,7 +20,8 @@
}, },
"roomDirectory": { "roomDirectory": {
"servers": [ "servers": [
"matrix.org" "matrix.org",
"gitter.im"
] ]
}, },
"enable_presence_by_hs_url": { "enable_presence_by_hs_url": {

View File

@ -24,7 +24,8 @@
}, },
"roomDirectory": { "roomDirectory": {
"servers": [ "servers": [
"matrix.org" "matrix.org",
"gitter.im"
] ]
}, },
"enable_presence_by_hs_url": { "enable_presence_by_hs_url": {

View File

@ -1,6 +1,6 @@
{ {
"name": "schildichat-web", "name": "schildichat-web",
"version": "1.7.15", "version": "1.7.16",
"description": "A Matrix Client based on Element with a more traditional instant messaging experience", "description": "A Matrix Client based on Element with a more traditional instant messaging experience",
"author": "SchildiChat", "author": "SchildiChat",
"repository": { "repository": {
@ -57,11 +57,11 @@
"dependencies": { "dependencies": {
"browser-request": "^0.3.3", "browser-request": "^0.3.3",
"gfm.css": "^1.1.2", "gfm.css": "^1.1.2",
"highlight.js": "^10.1.2", "highlight.js": "^10.4.1",
"jsrsasign": "^9.1.5", "jsrsasign": "^9.1.5",
"katex": "^0.12.0", "katex": "^0.12.0",
"matrix-js-sdk": "9.3.0", "matrix-js-sdk": "9.4.1",
"matrix-react-sdk": "3.10.0", "matrix-react-sdk": "3.11.1",
"matrix-widget-api": "^0.1.0-beta.10", "matrix-widget-api": "^0.1.0-beta.10",
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz", "olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",

View File

@ -28,5 +28,9 @@
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Pro nejlepší zážitek si prosím nainstalujte prohlížeč <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, nebo <safariLink>Safari</safariLink>.", "Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Pro nejlepší zážitek si prosím nainstalujte prohlížeč <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, nebo <safariLink>Safari</safariLink>.",
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Můžete pokračovat v užívání vašeho současného prohlížeče, ale některé (nebo dokonce všechny) funkce nemusí fungovat a vzhled a chování aplikace nemusí být správné.", "You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Můžete pokračovat v užívání vašeho současného prohlížeče, ale některé (nebo dokonce všechny) funkce nemusí fungovat a vzhled a chování aplikace nemusí být správné.",
"I understand the risks and wish to continue": "Rozumím a přesto chci pokračovat", "I understand the risks and wish to continue": "Rozumím a přesto chci pokračovat",
"Go to element.io": "Přejít na element.io" "Go to element.io": "Přejít na element.io",
"Failed to start": "Nepovedlo se nastartovat",
"Powered by Matrix": "Běží na Matrixu",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s pro desktopový počítač (%(platformName)s)",
"Missing indexeddb worker script!": "Nenačetl se skript spravující indexdb!"
} }

View File

@ -4,7 +4,7 @@
"Unknown device": "Appareil inconnu", "Unknown device": "Appareil inconnu",
"You need to be using HTTPS to place a screen-sharing call.": "Vous devez utiliser HTTPS pour effectuer un appel avec partage décran.", "You need to be using HTTPS to place a screen-sharing call.": "Vous devez utiliser HTTPS pour effectuer un appel avec partage décran.",
"Welcome to Element": "Bienvenue sur SchildiChat", "Welcome to Element": "Bienvenue sur SchildiChat",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Discussion &amp; collaboration décentralisées et chiffrées, propulsées par [matrix]", "Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Messagerie et collaboration décentralisées et chiffrées, propulsées par [matrix]",
"Sign In": "Se connecter", "Sign In": "Se connecter",
"Create Account": "Créer un compte", "Create Account": "Créer un compte",
"Explore rooms": "Explorer les salons", "Explore rooms": "Explorer les salons",

View File

@ -1,4 +1,6 @@
{ {
"Unknown device": "නොදන්නා උපකරණය", "Unknown device": "නොදන්නා උපාංගයකි",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)" "%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Welcome to Element": "ඉලමන්ට් වෙත සාදරයෙන් පිළිගනිමු",
"Open": "විවෘත කරන්න"
} }

View File

@ -7,7 +7,7 @@
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Децентралізований, зашифрований чат та засіб для співпраці, заснований на [matrix]", "Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Децентралізований, зашифрований чат та засіб для співпраці, заснований на [matrix]",
"Sign In": "Увійти", "Sign In": "Увійти",
"Create Account": "Створити обліковий запис", "Create Account": "Створити обліковий запис",
"Explore rooms": "Шукати кімнати", "Explore rooms": "Каталог кімнат",
"Unexpected error preparing the app. See console for details.": "Неочікувана помилка при підготовці програми. Дивіться деталі у виводі консолі.", "Unexpected error preparing the app. See console for details.": "Неочікувана помилка при підготовці програми. Дивіться деталі у виводі консолі.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Невірна конфігурація: можна вказати лише default_server_config, default_server_name або default_hs_url.", "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Невірна конфігурація: можна вказати лише default_server_config, default_server_name або default_hs_url.",
"Invalid configuration: no default server specified.": "Невірна конфігурація: не вказано сервер за замовчуванням.", "Invalid configuration: no default server specified.": "Невірна конфігурація: не вказано сервер за замовчуванням.",

View File

@ -236,7 +236,7 @@ async function verifyServerConfig() {
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true); validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) { } catch (e) {
const {hsUrl, isUrl, userId} = Lifecycle.getLocalStorageSessionVars(); const {hsUrl, isUrl, userId} = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) { if (hsUrl && userId) {
console.error(e); console.error(e);
console.warn("A session was found - suppressing config error and using the session's homeserver"); console.warn("A session was found - suppressing config error and using the session's homeserver");

View File

@ -23,7 +23,7 @@ limitations under the License.
// in webpack.config.js // in webpack.config.js
require('gfm.css/gfm.css'); require('gfm.css/gfm.css');
require('highlight.js/styles/github.css'); require('highlight.js/styles/github.css');
require('katex/dist/katex.css') require('katex/dist/katex.css');
// These are things that can run before the skin loads - be careful not to reference the react-sdk though. // These are things that can run before the skin loads - be careful not to reference the react-sdk though.
import {parseQsFromFragment} from "./url_utils"; import {parseQsFromFragment} from "./url_utils";

View File

@ -503,9 +503,9 @@ export default class ElectronPlatform extends VectorBasePlatform {
return url; return url;
} }
startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string) { startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string, idpId?: string) {
// this will get intercepted by electron-main will-navigate // this will get intercepted by electron-main will-navigate
super.startSingleSignOn(mxClient, loginType, fragmentAfterLogin); super.startSingleSignOn(mxClient, loginType, fragmentAfterLogin, idpId);
Modal.createTrackedDialog('Electron', 'SSO', InfoDialog, { Modal.createTrackedDialog('Electron', 'SSO', InfoDialog, {
title: _t("Go to your browser to complete Sign In"), title: _t("Go to your browser to complete Sign In"),
description: <Spinner />, description: <Spinner />,

View File

@ -269,12 +269,12 @@ module.exports = (env, argv) => {
options: { options: {
esModule: false, esModule: false,
name: '[name].[hash:7].[ext]', name: '[name].[hash:7].[ext]',
outputPath: getImgOutputPath, outputPath: getAssetOutputPath,
publicPath: function(url, resourcePath) { publicPath: function(url, resourcePath) {
// CSS image usages end up in the `bundles/[hash]` output // CSS image usages end up in the `bundles/[hash]` output
// directory, so we adjust the final path to navigate up // directory, so we adjust the final path to navigate up
// twice. // twice.
const outputPath = getImgOutputPath(url, resourcePath); const outputPath = getAssetOutputPath(url, resourcePath);
return toPublicPath(path.join("../..", outputPath)); return toPublicPath(path.join("../..", outputPath));
}, },
}, },
@ -285,9 +285,9 @@ module.exports = (env, argv) => {
options: { options: {
esModule: false, esModule: false,
name: '[name].[hash:7].[ext]', name: '[name].[hash:7].[ext]',
outputPath: getImgOutputPath, outputPath: getAssetOutputPath,
publicPath: function(url, resourcePath) { publicPath: function(url, resourcePath) {
const outputPath = getImgOutputPath(url, resourcePath); const outputPath = getAssetOutputPath(url, resourcePath);
return toPublicPath(outputPath); return toPublicPath(outputPath);
}, },
}, },
@ -392,15 +392,25 @@ module.exports = (env, argv) => {
/** /**
* Merge assets found via CSS and imports into a single tree, while also preserving * Merge assets found via CSS and imports into a single tree, while also preserving
* directories under `res`. * directories under e.g. `res` or similar.
* *
* @param {string} url The adjusted name of the file, such as `warning.1234567.svg`. * @param {string} url The adjusted name of the file, such as `warning.1234567.svg`.
* @param {string} resourcePath The absolute path to the source file with unmodified name. * @param {string} resourcePath The absolute path to the source file with unmodified name.
* @return {string} The returned paths will look like `img/warning.1234567.svg`. * @return {string} The returned paths will look like `img/warning.1234567.svg`.
*/ */
function getImgOutputPath(url, resourcePath) { function getAssetOutputPath(url, resourcePath) {
const prefix = /^.*[/\\]res[/\\]/; // `res` is the parent dir for our own assets in various layers
const outputDir = path.dirname(resourcePath).replace(prefix, ""); // `dist` is the parent dir for KaTeX assets
const prefix = /^.*[/\\](dist|res)[/\\]/;
if (!resourcePath.match(prefix)) {
throw new Error(`Unexpected asset path: ${resourcePath}`);
}
let outputDir = path.dirname(resourcePath).replace(prefix, "");
if (resourcePath.includes("KaTeX")) {
// Add a clearly named directory segment, rather than leaving the KaTeX
// assets loose in each asset type directory.
outputDir = path.join(outputDir, "KaTeX");
}
return path.join(outputDir, path.basename(url)); return path.join(outputDir, path.basename(url));
} }

View File

@ -5812,10 +5812,10 @@ hex-color-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
highlight.js@^10.1.2: highlight.js@^10.1.2, highlight.js@^10.4.1:
version "10.1.2" version "10.4.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.1.2.tgz#c20db951ba1c22c055010648dfffd7b2a968e00c" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0"
integrity sha512-Q39v/Mn5mfBlMff9r+zzA+gWxRsCRKwEMvYTiisLr/XUiFI/4puWt0Ojdko3R3JCNWGdOWaA5g/Yxqa23kC5AA== integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==
hmac-drbg@^1.0.0: hmac-drbg@^1.0.0:
version "1.0.1" version "1.0.1"
@ -6211,9 +6211,9 @@ inherits@2.0.3:
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
version "1.3.5" version "1.3.7"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==
inquirer@^7.0.0: inquirer@^7.0.0:
version "7.3.2" version "7.3.2"
@ -7925,10 +7925,10 @@ mathml-tag-names@^2.1.1:
resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3"
integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==
matrix-js-sdk@9.3.0: matrix-js-sdk@9.4.1:
version "9.3.0" version "9.4.1"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.3.0.tgz#e5fa3f6cb5a56e5c5386ecf3110dc35072170dbb" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.4.1.tgz#dc15ed0a8c2a2b588e2ce5011f881717bc6efd53"
integrity sha512-rzvYJS5mMP42iQVfGokX8DgmJpTUH+k15vATyB5JyBq/3r/kP22tN78RgoNxYzrIP/R4rB4OHUFNtgGzBH2u8g== integrity sha512-6iCzKym869OpZnose+g/Xg3GMNrVXn2TFJnlPEy7rshOHeKLVCoFuQcIdApcGftnfh3fi0t3qRuD7o17xt2wiA==
dependencies: dependencies:
"@babel/runtime" "^7.12.5" "@babel/runtime" "^7.12.5"
another-json "^0.2.0" another-json "^0.2.0"
@ -7948,10 +7948,10 @@ matrix-mock-request@^1.2.3:
bluebird "^3.5.0" bluebird "^3.5.0"
expect "^1.20.2" expect "^1.20.2"
matrix-react-sdk@3.10.0: matrix-react-sdk@3.11.1:
version "3.10.0" version "3.11.1"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.10.0.tgz#07575b7dc5f12093a1dab313068673a82a939dfc" resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.11.1.tgz#110c264862d2c36ea117711a1303dc89cd3d58b0"
integrity sha512-LatG4kCKKy7ybUnvpoV3p6KEMSaECBIh0alw1JisuVBMw4nAYXEIbM1kGOI0h2vBF2826YqwXGj/vEyFHr7Euw== integrity sha512-yiBnusSIb2Kk3cnw2pwn0A5F9t1d0rCxah/G75RGC/yCrJa/qNEC9cX7R+aXJ2HGkyRlNLk9PIyO7GcYm2wbYg==
dependencies: dependencies:
"@babel/runtime" "^7.10.5" "@babel/runtime" "^7.10.5"
await-lock "^2.0.1" await-lock "^2.0.1"
@ -7980,7 +7980,7 @@ matrix-react-sdk@3.10.0:
katex "^0.12.0" katex "^0.12.0"
linkifyjs "^2.1.9" linkifyjs "^2.1.9"
lodash "^4.17.19" lodash "^4.17.19"
matrix-js-sdk "9.3.0" matrix-js-sdk "9.4.1"
matrix-widget-api "^0.1.0-beta.10" matrix-widget-api "^0.1.0-beta.10"
minimist "^1.2.5" minimist "^1.2.5"
pako "^1.0.11" pako "^1.0.11"