mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Merge branch 'develop' into travis/widget-api
This commit is contained in:
commit
97afe18310
6 changed files with 150 additions and 112 deletions
32
CHANGELOG.md
32
CHANGELOG.md
|
@ -1,3 +1,35 @@
|
|||
Changes in [1.7.8](https://github.com/vector-im/element-web/releases/tag/v1.7.8) (2020-09-28)
|
||||
=============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.8-rc.1...v1.7.8)
|
||||
|
||||
* Upgrade to React SDK 3.5.0 and JS SDK 8.4.1
|
||||
|
||||
Changes in [1.7.8-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.8-rc.1) (2020-09-23)
|
||||
=======================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.7...v1.7.8-rc.1)
|
||||
|
||||
* Upgrade to React SDK 3.5.0-rc.1 and JS SDK 8.4.0-rc.1
|
||||
* Update from Weblate
|
||||
[\#15262](https://github.com/vector-im/element-web/pull/15262)
|
||||
* Upgrade sanitize-html
|
||||
[\#15260](https://github.com/vector-im/element-web/pull/15260)
|
||||
* Document config for preferring Secure Backup setup methods
|
||||
[\#15251](https://github.com/vector-im/element-web/pull/15251)
|
||||
* Add end-user documentation for UI features
|
||||
[\#15190](https://github.com/vector-im/element-web/pull/15190)
|
||||
* Update git checkout instructions
|
||||
[\#15218](https://github.com/vector-im/element-web/pull/15218)
|
||||
* If no bug_report_endpoint_url, hide rageshaking from the App
|
||||
[\#15201](https://github.com/vector-im/element-web/pull/15201)
|
||||
* Bump node-fetch from 2.6.0 to 2.6.1
|
||||
[\#15153](https://github.com/vector-im/element-web/pull/15153)
|
||||
* Remove references to Travis CI
|
||||
[\#15137](https://github.com/vector-im/element-web/pull/15137)
|
||||
* Fix onNewScreen to use replace when going from roomId->roomAlias
|
||||
[\#15127](https://github.com/vector-im/element-web/pull/15127)
|
||||
* Enable Estonian in language menu
|
||||
[\#15136](https://github.com/vector-im/element-web/pull/15136)
|
||||
|
||||
Changes in [1.7.7](https://github.com/vector-im/element-web/releases/tag/v1.7.7) (2020-09-14)
|
||||
=============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.6...v1.7.7)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"version": "1.7.7",
|
||||
"version": "1.7.8",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
|
@ -60,8 +60,8 @@
|
|||
"gfm.css": "^1.1.2",
|
||||
"highlight.js": "^9.13.1",
|
||||
"jsrsasign": "^9.1.5",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
|
||||
"matrix-js-sdk": "8.4.1",
|
||||
"matrix-react-sdk": "3.5.0",
|
||||
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.9.0",
|
||||
|
@ -92,6 +92,7 @@
|
|||
"@types/node": "^12.12.41",
|
||||
"@types/react": "16.9",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"@types/sanitize-html": "^1.23.3",
|
||||
"autoprefixer": "^9.7.3",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-jest": "^24.9.0",
|
||||
|
|
|
@ -28,11 +28,6 @@ require('highlight.js/styles/github.css');
|
|||
import {parseQsFromFragment} from "./url_utils";
|
||||
import './modernizr';
|
||||
|
||||
// load service worker if available on this platform
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('service-worker.js');
|
||||
}
|
||||
|
||||
async function settled(...promises: Array<Promise<any>>) {
|
||||
for (const prom of promises) {
|
||||
try {
|
||||
|
|
|
@ -34,6 +34,17 @@ const POKE_RATE_MS = 10 * 60 * 1000; // 10 min
|
|||
export default class WebPlatform extends VectorBasePlatform {
|
||||
private runningVersion: string = null;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// load service worker if available on this platform
|
||||
// Service worker is disabled in development: https://github.com/GoogleChrome/workbox/issues/1790
|
||||
if ('serviceWorker' in navigator && process.env.NODE_ENV === "production") {
|
||||
navigator.serviceWorker.register('service-worker.js');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getHumanReadableName(): string {
|
||||
return 'Web Platform'; // no translation required: only used for analytics
|
||||
}
|
||||
|
|
|
@ -31,6 +31,84 @@ module.exports = (env, argv) => {
|
|||
const reactSdkSrcDir = path.resolve(require.resolve("matrix-react-sdk/package.json"), '..', 'src');
|
||||
const jsSdkSrcDir = path.resolve(require.resolve("matrix-js-sdk/package.json"), '..', 'src');
|
||||
|
||||
const plugins = [
|
||||
// This exports our CSS using the splitChunks and loaders above.
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'bundles/[hash]/[name].css',
|
||||
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
||||
}),
|
||||
|
||||
// This is the app's main entry point.
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/index.html',
|
||||
|
||||
// we inject the links ourselves via the template, because
|
||||
// HtmlWebpackPlugin will screw up our formatting like the names
|
||||
// of the themes and which chunks we actually care about.
|
||||
inject: false,
|
||||
excludeChunks: ['mobileguide', 'usercontent', 'jitsi'],
|
||||
minify: argv.mode === 'production',
|
||||
vars: {
|
||||
og_image_url: og_image_url,
|
||||
},
|
||||
}),
|
||||
|
||||
// This is the jitsi widget wrapper (embedded, so isolated stack)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/jitsi/index.html',
|
||||
filename: 'jitsi.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['jitsi'],
|
||||
}),
|
||||
|
||||
// This is the mobile guide's entry point (separate for faster mobile loading)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/mobile_guide/index.html',
|
||||
filename: 'mobile_guide/index.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['mobileguide'],
|
||||
}),
|
||||
|
||||
// These are the static error pages for when the javascript env is *really unsupported*
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/static/unable-to-load.html',
|
||||
filename: 'static/unable-to-load.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: [],
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/static/incompatible-browser.html',
|
||||
filename: 'static/incompatible-browser.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: [],
|
||||
}),
|
||||
|
||||
// This is the usercontent sandbox's entry point (separate for iframing)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './node_modules/matrix-react-sdk/src/usercontent/index.html',
|
||||
filename: 'usercontent/index.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['usercontent'],
|
||||
}),
|
||||
];
|
||||
|
||||
if (argv.mode === "production") {
|
||||
plugins.push(new WorkboxPlugin.GenerateSW({
|
||||
maximumFileSizeToCacheInBytes: 22000000,
|
||||
runtimeCaching: [{
|
||||
urlPattern: /i18n\/.*\.json$/,
|
||||
handler: 'CacheFirst',
|
||||
|
||||
options: {
|
||||
cacheName: 'i18n',
|
||||
expiration: {
|
||||
maxEntries: 2,
|
||||
},
|
||||
},
|
||||
}],
|
||||
}));
|
||||
}
|
||||
|
||||
return {
|
||||
...development,
|
||||
|
||||
|
@ -148,8 +226,8 @@ module.exports = (env, argv) => {
|
|||
},
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
cacheDirectory: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
|
@ -160,7 +238,7 @@ module.exports = (env, argv) => {
|
|||
options: {
|
||||
importLoaders: 1,
|
||||
sourceMap: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
|
@ -198,7 +276,7 @@ module.exports = (env, argv) => {
|
|||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
|
@ -209,7 +287,7 @@ module.exports = (env, argv) => {
|
|||
options: {
|
||||
importLoaders: 1,
|
||||
sourceMap: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
|
@ -236,7 +314,7 @@ module.exports = (env, argv) => {
|
|||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.wasm$/,
|
||||
|
@ -294,83 +372,10 @@ module.exports = (env, argv) => {
|
|||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
// This exports our CSS using the splitChunks and loaders above.
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'bundles/[hash]/[name].css',
|
||||
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
||||
}),
|
||||
|
||||
// This is the app's main entry point.
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/index.html',
|
||||
|
||||
// we inject the links ourselves via the template, because
|
||||
// HtmlWebpackPlugin will screw up our formatting like the names
|
||||
// of the themes and which chunks we actually care about.
|
||||
inject: false,
|
||||
excludeChunks: ['mobileguide', 'usercontent', 'jitsi'],
|
||||
minify: argv.mode === 'production',
|
||||
vars: {
|
||||
og_image_url: og_image_url,
|
||||
},
|
||||
}),
|
||||
|
||||
// This is the jitsi widget wrapper (embedded, so isolated stack)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/jitsi/index.html',
|
||||
filename: 'jitsi.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['jitsi'],
|
||||
}),
|
||||
|
||||
// This is the mobile guide's entry point (separate for faster mobile loading)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/mobile_guide/index.html',
|
||||
filename: 'mobile_guide/index.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['mobileguide'],
|
||||
}),
|
||||
|
||||
// These are the static error pages for when the javascript env is *really unsupported*
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/static/unable-to-load.html',
|
||||
filename: 'static/unable-to-load.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: [],
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/static/incompatible-browser.html',
|
||||
filename: 'static/incompatible-browser.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: [],
|
||||
}),
|
||||
|
||||
// This is the usercontent sandbox's entry point (separate for iframing)
|
||||
new HtmlWebpackPlugin({
|
||||
template: './node_modules/matrix-react-sdk/src/usercontent/index.html',
|
||||
filename: 'usercontent/index.html',
|
||||
minify: argv.mode === 'production',
|
||||
chunks: ['usercontent'],
|
||||
}),
|
||||
|
||||
new WorkboxPlugin.GenerateSW({
|
||||
runtimeCaching: [{
|
||||
urlPattern: /i18n\/.*\.json$/,
|
||||
handler: 'CacheFirst',
|
||||
|
||||
options: {
|
||||
cacheName: 'i18n',
|
||||
expiration: {
|
||||
maxEntries: 2,
|
||||
},
|
||||
},
|
||||
}],
|
||||
}),
|
||||
],
|
||||
plugins,
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, "webapp"),
|
||||
|
|
40
yarn.lock
40
yarn.lock
|
@ -2177,6 +2177,13 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/sanitize-html@^1.23.3":
|
||||
version "1.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/sanitize-html/-/sanitize-html-1.27.0.tgz#77702dc856f16efecc005014c1d2e45b1f2cbc56"
|
||||
integrity sha512-j7Vnh3P7W4ZcoRsHNO2HpwA2m1d0c2+l39xqSQqH0+WlfcvKypgZp45eCC7NJ75ZyXPxNb2PSbIL6LtZ6E0Qbw==
|
||||
dependencies:
|
||||
htmlparser2 "^4.1.0"
|
||||
|
||||
"@types/stack-utils@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
|
||||
|
@ -8283,9 +8290,10 @@ mathml-tag-names@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3"
|
||||
integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==
|
||||
|
||||
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop":
|
||||
version "8.3.0"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/b9886d4f3479c041fc6d91ebc88c4a998e9d2e7c"
|
||||
matrix-js-sdk@8.4.1:
|
||||
version "8.4.1"
|
||||
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-8.4.1.tgz#4e7e8bf8d5f6d8362aef68bed8e0d2f03f262194"
|
||||
integrity sha512-AfA2y/dt10ysXKzngwqzajzxTL0Xq8lW5bBr0mq21JUKndBP1f1AOOiIkX5nLA9IZGzVoe0anKV+cU2aGWcdkw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.8.3"
|
||||
another-json "^0.2.0"
|
||||
|
@ -8305,9 +8313,10 @@ matrix-mock-request@^1.2.3:
|
|||
bluebird "^3.5.0"
|
||||
expect "^1.20.2"
|
||||
|
||||
"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop":
|
||||
version "3.4.1"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/747126950b14ded4e09b3c0c8cc6beb04b64b052"
|
||||
matrix-react-sdk@3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.5.0.tgz#69421d447fd7d769abd01f43f03784da11d30ad4"
|
||||
integrity sha512-ld+q4Ku+aCwWOFB6iVw02auI5/SIcUcu/m0XByw4TfBzSdAkMzqoKczdaWMt+HIWkyJDBhcPuH2N915gELQK0g==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.10.5"
|
||||
await-lock "^2.0.1"
|
||||
|
@ -8334,7 +8343,7 @@ matrix-mock-request@^1.2.3:
|
|||
is-ip "^2.0.0"
|
||||
linkifyjs "^2.1.9"
|
||||
lodash "^4.17.19"
|
||||
matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop"
|
||||
matrix-js-sdk "8.4.1"
|
||||
minimist "^1.2.5"
|
||||
pako "^1.0.11"
|
||||
parse5 "^5.1.1"
|
||||
|
@ -8351,7 +8360,7 @@ matrix-mock-request@^1.2.3:
|
|||
react-transition-group "^4.4.1"
|
||||
resize-observer-polyfill "^1.5.1"
|
||||
rfc4648 "^1.4.0"
|
||||
sanitize-html "^1.27.1"
|
||||
sanitize-html "github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db"
|
||||
tar-js "^0.3.0"
|
||||
text-encoding-utf-8 "^1.0.2"
|
||||
url "^0.11.0"
|
||||
|
@ -11431,16 +11440,6 @@ sane@^4.0.3:
|
|||
minimist "^1.1.1"
|
||||
walker "~1.0.5"
|
||||
|
||||
sanitize-html@^1.27.1:
|
||||
version "1.27.1"
|
||||
resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.27.1.tgz#ce147951aa3defba13448e2ca8a4e18d8f2e2cd7"
|
||||
integrity sha512-C+N7E+7ikYaLHdb9lEkQaFOgmj+9ddZ311Ixs/QsBsoLD411/vdLweiFyGqrswUVgLqagOS5NCDxcEPH7trObQ==
|
||||
dependencies:
|
||||
htmlparser2 "^4.1.0"
|
||||
lodash "^4.17.15"
|
||||
postcss "^7.0.27"
|
||||
srcset "^2.0.1"
|
||||
|
||||
"sanitize-html@github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db":
|
||||
version "2.0.0-rc.3"
|
||||
resolved "https://codeload.github.com/apostrophecms/sanitize-html/tar.gz/3c7f93f2058f696f5359e3e58d464161647226db"
|
||||
|
@ -11936,11 +11935,6 @@ sprintf-js@~1.0.2:
|
|||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
|
||||
|
||||
srcset@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/srcset/-/srcset-2.0.1.tgz#8f842d357487eb797f413d9c309de7a5149df5ac"
|
||||
integrity sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ==
|
||||
|
||||
srcset@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/srcset/-/srcset-3.0.0.tgz#8afd8b971362dfc129ae9c1a99b3897301ce6441"
|
||||
|
|
Loading…
Reference in a new issue