Compare commits

..

272 Commits

Author SHA1 Message Date
J. Ryan Stinnett
7fd26c3af9 Merge remote-tracking branch 'origin/develop' into jryans/p2p 2021-07-06 18:11:07 +01:00
J. Ryan Stinnett
9d1bed29b2 Use origin as the server to connect to 2021-07-05 14:51:49 +01:00
Michael Telatynski
7703108edb Merge pull request #17170 from dirkmueller/develop 2021-06-30 17:33:40 +01:00
J. Ryan Stinnett
34c308d0a4 Merge pull request #17847 from vector-im/jryans/rework-linting
Migrate to `eslint-plugin-matrix-org`
2021-06-30 14:39:21 +01:00
J. Ryan Stinnett
491b179971 Auto-fix lint errors 2021-06-30 13:28:31 +01:00
J. Ryan Stinnett
573698789e Migrate to eslint-plugin-matrix-org
This migrates to the new plugin form of our custom ESLint configs. As part of
this, some packages are de-duplicated, configs streamlined, etc.
2021-06-30 13:24:16 +01:00
J. Ryan Stinnett
160a1fd8c8 Use unquoted keys 2021-06-30 13:19:04 +01:00
J. Ryan Stinnett
77ea76a0e0 Remove Flow support
We no longer use Flow, so this removes linting and compiling support. New code
should use TypeScript for static typing.
2021-06-30 13:06:09 +01:00
Michael Telatynski
4bc53aaed1 Merge pull request #17647 from vector-im/t3chguy/fix/17282
Remove spurious overflow: auto on #matrixchat element
2021-06-29 22:23:49 +01:00
Germain
4ba0e6bdee Merge pull request #17818 from vector-im/gsouquet/fix-6162
Enhance security by disallowing CSP object-src rule
2021-06-29 15:33:32 +01:00
David Baker
6110e3df14 Merge pull request #17832 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-06-29 14:14:51 +01:00
Weblate
d626f16da4 Merge branch 'origin/develop' into Weblate. 2021-06-29 13:00:57 +00:00
Germain Souquet
33d05678b4 Enhance security by disallowing CSP object-src rule 2021-06-28 16:47:33 +01:00
Germain
334ddd8cba Merge pull request #17785 from vector-im/gsouquet/dependency-mock 2021-06-27 12:41:20 +01:00
Germain Souquet
98f3edf160 Fix canvas-filter-polyfill mock path 2021-06-25 17:04:06 +01:00
Germain
62a5f41ee4 Merge pull request #17774 from vector-im/gsouquet/dependency-mock 2021-06-25 16:40:27 +01:00
Neil Alexander
1e051365b1 Update dendrite.wasm 2021-06-25 14:59:46 +01:00
Neil Alexander
13251a4d6c Update dendrite.wasm 2021-06-25 14:52:09 +01:00
Neil Alexander
b28708fbf3 dendritejs-pinecone 2021-06-25 14:36:07 +01:00
Germain Souquet
50a9287107 Merge branch 'develop' into gsouquet/dependency-mock 2021-06-25 12:04:13 +01:00
Germain Souquet
1c168bb361 Mock context-filter-polyfill for app-tests 2021-06-25 11:44:49 +01:00
Neil Alexander
46d659a936 Update sql.js (to SQLite 3.35.0) and wasm_exec.js (to Go 1.16.5) 2021-06-25 11:25:17 +01:00
Travis Ralston
0bf78cd531 Merge pull request #17772 from aaronraimist/libera
Add libera.chat to default room directory
2021-06-25 00:23:07 -06:00
Aaron Raimist
d400bfeaeb Add libera.chat to default room directory
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-06-25 01:11:59 -05:00
Michael Telatynski
a470c7dd1c Merge pull request #17704 from vector-im/t3chguy/ts/5.1 2021-06-24 15:24:01 +01:00
Travis Ralston
0c1f0d5df6 Merge pull request #17478 from vector-im/dependabot/npm_and_yarn/dns-packet-1.3.4
Bump dns-packet from 1.3.1 to 1.3.4
2021-06-24 07:26:36 -06:00
Ridhubharan
67b8d769d9 Translated using Weblate (Tamil)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ta/
2021-06-23 18:34:45 +00:00
Travis Ralston
bc98ae8f05 Merge pull request #17747 from vector-im/travis/fix-wapi-202106
Update matrix-widget-api to fix build issues
2021-06-23 11:31:42 -06:00
Travis Ralston
a6f4c6f28d Update matrix-widget-api to fix build issues 2021-06-23 11:25:19 -06:00
Travis Ralston
f28a37aba5 Merge pull request #17742 from vector-im/jaywink/tiny-whitespace-fix
Fix whitespace in Dockerfile
2021-06-23 08:00:03 -06:00
Michael Telatynski
e2a109667a Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/ts/5.1
 Conflicts:
	src/vector/platform/ElectronPlatform.tsx
2021-06-23 14:54:06 +01:00
Jason Robinson
26380719a1 Fix whitespace in Dockerfile
Upstreamed whitespace fix from a fork, to be aligned with the other indented line :)
2021-06-23 15:42:30 +03:00
Michael Telatynski
54da2df8c0 Merge pull request #17723 from vector-im/t3chguy/types/react
Upgrade @types/react and @types/react-dom
2021-06-22 18:22:26 +01:00
Michael Telatynski
505eb13461 Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/types/react 2021-06-22 18:03:33 +01:00
Michael Telatynski
c22b195bbd Remove pinned resolution for @types/react to 16.x 2021-06-22 17:56:52 +01:00
Michael Telatynski
1805a28d51 Merge pull request #17457 from vector-im/t3chguy/fix/17128-1 2021-06-22 14:21:46 +01:00
Michael Telatynski
c86d79b7a5 Upgrade @types/react and @types/react-dom 2021-06-22 08:15:27 +01:00
RiotRobot
c2dea5a19f Reset matrix-react-sdk back to develop branch 2021-06-21 17:05:37 +01:00
RiotRobot
fe39de5126 Reset matrix-js-sdk back to develop branch 2021-06-21 17:05:26 +01:00
RiotRobot
905273c90c Merge branch 'master' into develop 2021-06-21 17:05:14 +01:00
RiotRobot
e02d17a6cc v1.7.31 2021-06-21 17:01:00 +01:00
RiotRobot
01c84212f9 Prepare changelog for v1.7.31 2021-06-21 17:00:59 +01:00
RiotRobot
1b48f4857a Upgrade matrix-react-sdk to 3.24.0 2021-06-21 16:58:14 +01:00
RiotRobot
57090243e1 Upgrade matrix-js-sdk to 12.0.0 2021-06-21 16:57:52 +01:00
J. Ryan Stinnett
6fc14effb7 Merge pull request #17694 from vector-im/yoric/msc3215
Labs: feature_report_to_moderators
2021-06-21 10:16:29 +01:00
Michael Telatynski
f461c900cf Improve typing of Event Index Manager / Seshat 2021-06-19 15:37:06 +01:00
David Teller
92ae57df3f Labs: feature_report_to_moderators
Signed-off-by: David Teller <davidt@element.io>
2021-06-18 18:07:16 +02:00
Michael Telatynski
9e4eebed26 Change spaces shortcut to have 1 = space 1, 0 = home 2021-06-18 08:24:36 +01:00
Dimitri Tabatadze
42bedefe10 Translated using Weblate (Georgian)
Currently translated at 52.9% (18 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ka/
2021-06-17 19:34:42 +00:00
libexus
634703c76b Translated using Weblate (German)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-06-17 19:34:42 +00:00
RiotRobot
673a5ccc9e v1.7.31-rc.1 2021-06-15 17:29:00 +01:00
RiotRobot
446833d931 Prepare changelog for v1.7.31-rc.1 2021-06-15 17:29:00 +01:00
RiotRobot
e98a183978 Upgrade matrix-react-sdk to 3.24.0-rc.1 2021-06-15 17:26:25 +01:00
RiotRobot
d23b30023a Upgrade matrix-js-sdk to 12.0.0-rc.1 2021-06-15 16:24:37 +01:00
J. Ryan Stinnett
48ff90fe8b Merge pull request #17655 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-06-15 15:40:04 +01:00
Weblate
79bd092697 Merge branch 'origin/develop' into Weblate. 2021-06-15 14:39:43 +00:00
waclaw66
9183cfdb01 Translated using Weblate (Czech)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/cs/
2021-06-15 14:39:41 +00:00
Germain
e999524e03 Merge pull request #17653 from vector-im/gsouquet/update-react-test-utils 2021-06-15 13:07:23 +01:00
Germain Souquet
4dcfd7c0dd fix lockfile dependencies for matrix-react-sdk 2021-06-15 12:51:10 +01:00
Germain Souquet
2ffb1a6015 upgrade matrix-react-test-utils for react 17 peer deps 2021-06-15 11:59:33 +01:00
Sanqui
1eea16ecdf Translated using Weblate (Czech)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/cs/
2021-06-15 05:54:16 +00:00
Michael Telatynski
d5ac6d8c7e Remove spurious overflow: auto on #matrixchat element 2021-06-14 22:07:41 +01:00
lvre
6c642b5f00 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/pt_BR/
2021-06-13 00:53:58 +00:00
lvre
46f8000b3d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/pt_BR/
2021-06-12 21:59:39 +00:00
J. Ryan Stinnett
b96a1551e1 Shake yarn.lock 2021-06-11 16:35:08 +01:00
J. Ryan Stinnett
378919cbfb Merge pull request #17626 from vector-im/jryans/webpack-lint
Fix lint errors in Webpack config
2021-06-11 16:30:39 +01:00
J. Ryan Stinnett
a1c53e59fb Fix lint errors in Webpack config 2021-06-10 15:19:38 +01:00
J. Ryan Stinnett
ef8e39050a Merge pull request #17614 from vector-im/jryans/preload-woff2-only
Preload only `woff2` fonts
2021-06-10 14:42:38 +01:00
J. Ryan Stinnett
8d05d8481a Preload only woff2 fonts
All of our supported browsers understand `woff2`, so there's no need to make
everyone preload the older `woff` as well.
2021-06-10 13:02:21 +01:00
Ihor Hordiichuk
0667c69688 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/uk/
2021-06-10 09:34:40 +00:00
Germain
c57feada47 Merge pull request #17601 from vector-im/gsouquet/react-17
⚛️ Upgrade to React@17
2021-06-10 10:13:30 +01:00
Germain Souquet
4b8a05a667 Upgrade to React@17 2021-06-09 11:40:36 +01:00
RiotRobot
2784bc7916 Reset matrix-react-sdk back to develop branch 2021-06-07 17:52:34 +01:00
RiotRobot
8fc12bddd7 Reset matrix-js-sdk back to develop branch 2021-06-07 17:52:24 +01:00
RiotRobot
74d51a3ab5 v1.7.30 2021-06-07 17:48:13 +01:00
RiotRobot
f6349dd37d Prepare changelog for v1.7.30 2021-06-07 17:48:12 +01:00
RiotRobot
0a3eb467fc Upgrade matrix-react-sdk to 3.23.0 2021-06-07 17:46:00 +01:00
RiotRobot
5da849099f Upgrade matrix-js-sdk to 11.2.0 2021-06-07 17:45:33 +01:00
Govindas
640ed0479a Translated using Weblate (Lithuanian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/lt/
2021-06-05 09:34:38 +00:00
RiotRobot
8e111e2b9d v1.7.30-rc.1 2021-06-01 16:24:53 +01:00
RiotRobot
24ec0ebbf9 Prepare changelog for v1.7.30-rc.1 2021-06-01 16:24:53 +01:00
RiotRobot
122e9ac087 Upgrade matrix-react-sdk to 3.23.0-rc.1 2021-06-01 16:21:14 +01:00
RiotRobot
d70c651040 Upgrade matrix-js-sdk to 11.2.0-rc.1 2021-06-01 16:20:57 +01:00
J. Ryan Stinnett
3254de8394 Merge pull request #17526 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-06-01 15:52:35 +01:00
Weblate
485f92840e Merge branch 'origin/develop' into Weblate. 2021-06-01 14:43:18 +00:00
Robin Townsend
77476451bd Fix Olm asm.js support
Signed-off-by: Robin Townsend <robin@robin.town>
2021-05-31 12:29:30 -04:00
Percy
055d55aac6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hans/
2021-05-30 09:34:36 +00:00
Tirifto
1f16ae98f5 Translated using Weblate (Esperanto)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/eo/
2021-05-30 09:34:36 +00:00
dependabot[bot]
e9acff975e Bump dns-packet from 1.3.1 to 1.3.4
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 08:09:48 +00:00
Michael Telatynski
07cf2f20fb Merge pull request #17464 from vector-im/t3chguy/allSettled
Add Modernizr test for Promise.allSettled given js-sdk and react-sdk depend on it
2021-05-25 17:27:55 +01:00
Michael Telatynski
a70803a36e Add Modernizr test for Promise.allSettled given js-sdk and react-sdk depend on it 2021-05-25 16:12:54 +01:00
Michael Telatynski
f7ea7b948a Wire space switch shortcut via dispatcher to prevent app load explosion due to skinning 2021-05-24 18:23:04 +01:00
Michael Telatynski
aa1145960a Spaces keyboard shortcuts first cut 2021-05-24 18:08:31 +01:00
RiotRobot
f78be2631a Reset matrix-react-sdk back to develop branch 2021-05-24 17:49:06 +01:00
RiotRobot
a380f9c9f2 Reset matrix-js-sdk back to develop branch 2021-05-24 17:48:59 +01:00
RiotRobot
3a537d9fdc Merge branch 'master' into develop 2021-05-24 17:45:59 +01:00
RiotRobot
3a67dc18e9 v1.7.29 2021-05-24 17:40:21 +01:00
RiotRobot
3d90242aba Prepare changelog for v1.7.29 2021-05-24 17:40:21 +01:00
Vibikim
11ba1a6ce8 Translated using Weblate (Romanian)
Currently translated at 97.0% (33 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ro/
2021-05-24 16:34:34 +00:00
RiotRobot
cef446d7fa Upgrade matrix-react-sdk to 3.22.0 2021-05-24 17:28:39 +01:00
RiotRobot
59e00cb41d Upgrade matrix-js-sdk to 11.1.0 2021-05-24 17:27:24 +01:00
J. Ryan Stinnett
c08b7be434 Merge pull request #17456 from vector-im/jryans/olm-3.2.3-release
[Release] Bump libolm dependency, and update package name
2021-05-24 16:49:50 +01:00
Hubert Chathi
4960838e58 bump to olm 3.2.3 2021-05-24 16:35:21 +01:00
Hubert Chathi
06ac124bab Bump libolm dependency, and update package name. 2021-05-24 16:34:13 +01:00
J. Ryan Stinnett
661e946e60 Merge pull request #17433 from uhoreg/olm_3.2.2
Bump libolm dependency, and update package name.
2021-05-24 16:22:28 +01:00
Hubert Chathi
4825cf1425 bump to olm 3.2.3 2021-05-24 11:13:11 -04:00
Graeme Power
8bafc273cb Translated using Weblate (Irish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ga/
2021-05-23 10:34:33 +00:00
1sw3
b5ffac2db1 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hans/
2021-05-22 07:34:33 +00:00
Éden Alencar
1c36138ae8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/pt_BR/
2021-05-22 07:34:33 +00:00
jelv
fb094fddba Translated using Weblate (Dutch)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/
2021-05-22 07:34:33 +00:00
Hubert Chathi
6029556291 Merge branch 'develop' into olm_3.2.2 2021-05-21 16:26:18 -04:00
Hubert Chathi
53eb0e0f26 Bump libolm dependency, and update package name. 2021-05-21 16:10:48 -04:00
Germain
a93c82fe9c Merge pull request #17423 from robintown/remove-logo-spinner
Remove logo spinner
2021-05-21 09:29:15 +01:00
Robin Townsend
4e1204f34e Remove logo spinner
Removed since design wants to avoid associating slowness with the brand.

Signed-off-by: Robin Townsend <robin@robin.town>
2021-05-20 17:28:25 -04:00
RiotRobot
618665f655 v1.7.29-rc.1 2021-05-19 15:33:04 +01:00
RiotRobot
ea01af7993 Prepare changelog for v1.7.29-rc.1 2021-05-19 15:33:04 +01:00
RiotRobot
d95a6a38ae Upgrade matrix-react-sdk to 3.22.0-rc.1 2021-05-19 14:45:45 +01:00
RiotRobot
1ef1c4fbae Upgrade matrix-js-sdk to 11.1.0-rc.1 2021-05-19 14:44:08 +01:00
J. Ryan Stinnett
7015d6e3eb Merge pull request #17384 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-05-19 13:34:57 +01:00
Weblate
fe90016f8d Merge branch 'origin/develop' into Weblate. 2021-05-19 12:30:50 +00:00
Fake Mail
b739b0faf9 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/bg/
2021-05-19 09:36:59 +00:00
J. Ryan Stinnett
700d894324 Merge pull request #17349 from fooness/patch-1
Prevent minification of `.html` files
2021-05-18 15:45:33 +01:00
fooness
10194fe445 Prevent minification of .html files generated by new verison html-webpack-plugin
This described in https://github.com/vector-im/element-web/issues/17330#issuecomment-842530812, this should prevent the newly introduced version of `html-webpack-plugin` from minifying `.html` files, like e.g. `index.html`, `jitsi.html`, et cetera …

Quoting @jryans via: https://github.com/vector-im/element-web/issues/17330#issuecomment-842415694

> The content of the `index.html` file is not a supported API surface, so it might change at any time.
> 
> This document minification was not done on purpose, but instead it happened as a side effect of upgrading. We would happily accept a PR to fix this, but it is also not a priority for the core team.

Could please someone test and, hopefully, accept this change back to not minifying the `.html` files?
2021-05-18 12:35:51 +02:00
Ege
90a20ce6a7 Translated using Weblate (Turkish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tr/
2021-05-18 09:19:39 +00:00
Ege Sertçetin
a380fe5883 Translated using Weblate (Turkish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tr/
2021-05-18 09:19:39 +00:00
Erkin Alp Güney
148149f765 Translated using Weblate (Turkish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tr/
2021-05-18 09:19:39 +00:00
J. Ryan Stinnett
7895fc1c78 Merge pull request #17346 from vector-im/travis/wapi-dev
Update matrix-widget-api/react-sdk dependency reference
2021-05-18 10:03:52 +01:00
Travis Ralston
51b380da65 Update matrix-widget-api/react-sdk dependency reference
To fix inevitable build errors.
2021-05-17 16:39:04 -06:00
RiotRobot
c41ba297e3 Reset matrix-react-sdk back to develop branch 2021-05-17 14:00:39 +01:00
RiotRobot
e565044aa3 Reset matrix-js-sdk back to develop branch 2021-05-17 14:00:27 +01:00
RiotRobot
304fccaec4 Merge branch 'master' into develop 2021-05-17 14:00:15 +01:00
RiotRobot
4e0ea04d3c v1.7.28 2021-05-17 13:57:04 +01:00
RiotRobot
0733cd6a9b Prepare changelog for v1.7.28 2021-05-17 13:57:03 +01:00
RiotRobot
0cd7d9a57d Upgrade matrix-react-sdk to 3.21.0 2021-05-17 13:52:21 +01:00
RiotRobot
8ce7de3b1c Upgrade matrix-js-sdk to 11.0.0 2021-05-17 13:51:42 +01:00
Trendyne
f04790e1cd Translated using Weblate (Icelandic)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/is/
2021-05-14 22:34:30 +00:00
libexus
0ac07c4522 Translated using Weblate (German)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-05-14 22:34:30 +00:00
Travis Ralston
e716e484a6 Merge pull request #16989 from SimonBrandner/https
Add `yarn start:https`
2021-05-13 20:16:11 -06:00
Oliver Gramberg
099f5844b4 Translated using Weblate (German)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-05-13 18:04:18 +00:00
jelv
918d9834ee Translated using Weblate (Dutch)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/
2021-05-13 12:34:30 +00:00
Šimon Brandner
009a56cee7 Merge branch 'develop' into https 2021-05-12 10:05:06 +02:00
J. Ryan Stinnett
040555772a Merge pull request #17239 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-05-11 17:46:51 +01:00
Travis Ralston
3b1193c1e6 Merge pull request #17204 from vector-im/travis/voicemessages/indev
Remove "in development" flag from voice messages labs documentation
2021-05-11 10:12:50 -06:00
Travis Ralston
c00abd6add Merge pull request #17193 from vector-im/travis/voicemessages/safari
Add required webpack+jest config to load Safari support modules
2021-05-11 10:12:36 -06:00
Weblate
f9db77758b Merge branch 'origin/develop' into Weblate. 2021-05-11 15:48:18 +00:00
RiotRobot
5eaaf34fe2 v1.7.28-rc.1 2021-05-11 16:47:53 +01:00
RiotRobot
a9c43e57a8 Prepare changelog for v1.7.28-rc.1 2021-05-11 16:47:53 +01:00
RiotRobot
4cb245b8d8 Upgrade matrix-react-sdk to 3.21.0-rc.1 2021-05-11 16:42:44 +01:00
RiotRobot
9502a11f6d Upgrade matrix-js-sdk to 11.0.0-rc.1 2021-05-11 16:41:56 +01:00
Hivaa
d998fa88e6 Translated using Weblate (Persian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/fa/
2021-05-11 10:34:29 +00:00
J. Ryan Stinnett
4ef7ceebe5 Merge pull request #17231 from vector-im/jryans/sanitize-upgrade
Switch back to release version of `sanitize-html`
2021-05-11 10:08:02 +01:00
J. Ryan Stinnett
4acde37698 Merge remote-tracking branch 'origin/develop' into jryans/sanitize-upgrade 2021-05-11 09:51:35 +01:00
Šimon Brandner
49bcf02db3 Merge remote-tracking branch 'upstream/develop' into https 2021-05-11 07:11:31 +02:00
Travis Ralston
45424f4a3b Better words? 2021-05-10 19:03:57 -06:00
J. Ryan Stinnett
dbd4e209d3 Switch back to release version of sanitize-html
The limit depth option has been available in a released version for a while now.
2021-05-10 17:48:06 +01:00
RiotRobot
10d5855bba Reset matrix-react-sdk back to develop branch 2021-05-10 15:33:40 +01:00
RiotRobot
182ec9cdb4 Reset matrix-js-sdk back to develop branch 2021-05-10 15:33:29 +01:00
RiotRobot
c07f2e1c18 Merge branch 'master' into develop 2021-05-10 15:33:16 +01:00
RiotRobot
93e6abefed v1.7.27 2021-05-10 15:29:37 +01:00
RiotRobot
fc02ecc3a1 Prepare changelog for v1.7.27 2021-05-10 15:29:36 +01:00
RiotRobot
25f2859a95 Upgrade matrix-react-sdk to 3.20.0 2021-05-10 15:26:39 +01:00
RiotRobot
64c44aef8e Upgrade matrix-js-sdk to 10.1.0 2021-05-10 15:23:51 +01:00
J. Ryan Stinnett
8dfc3797f0 Merge pull request #17199 from vector-im/dependabot/npm_and_yarn/url-parse-1.5.1
Bump url-parse from 1.4.7 to 1.5.1
2021-05-10 13:31:36 +01:00
J. Ryan Stinnett
bb979157e4 Merge pull request #17205 from vector-im/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21
2021-05-10 13:21:02 +01:00
J. Ryan Stinnett
1f2559a86d Merge pull request #17219 from vector-im/dependabot/npm_and_yarn/hosted-git-info-2.8.9
Bump hosted-git-info from 2.8.8 to 2.8.9
2021-05-10 13:15:19 +01:00
dependabot[bot]
114acc022f Bump hosted-git-info from 2.8.8 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 01:45:11 +00:00
Šimon Brandner
63f370c2db Merge branch 'develop' into https 2021-05-09 08:43:04 +02:00
dependabot[bot]
b1f9a96268 Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-08 07:46:06 +00:00
Travis Ralston
c246d7839f Remove "in development" flag from voice messages labs documentation
See https://github.com/matrix-org/matrix-react-sdk/pull/5995
2021-05-07 19:37:40 -06:00
Travis Ralston
cd127c51ae Merge pull request #17194 from vector-im/travis/dev1
Disable host checking on the webpack dev server
2021-05-07 08:02:04 -06:00
dependabot[bot]
6670859dc6 Bump url-parse from 1.4.7 to 1.5.1
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 11:26:45 +00:00
Travis Ralston
6c8d52f8df Add jest config too 2021-05-06 22:14:33 -06:00
Travis Ralston
b260621aff Disable host checking on the webpack dev server
This is useful when you're doing cross-browser testing on a service which demands you use "localhost.com" for reasons.
2021-05-06 21:51:43 -06:00
Travis Ralston
07a0af2aae Add required webpack config to load Safari support modules
See https://github.com/matrix-org/matrix-react-sdk/pull/5989
2021-05-06 21:51:03 -06:00
Travis Ralston
7cfec9255e Merge pull request #17190 from vector-im/dependabot/npm_and_yarn/ua-parser-js-0.7.24
Bump ua-parser-js from 0.7.23 to 0.7.24
2021-05-06 19:12:50 -06:00
dependabot[bot]
90825eac79 Bump ua-parser-js from 0.7.23 to 0.7.24
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.23 to 0.7.24.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.23...0.7.24)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 22:24:19 +00:00
Quang Trung
12c56fb647 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/vi/
2021-05-06 20:34:28 +00:00
Bartosz
b39b92eb20 Translated using Weblate (Polish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/pl/
2021-05-06 20:34:28 +00:00
Oliver Gramberg
008ea589dc Translated using Weblate (German)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-05-06 20:34:28 +00:00
Dirk Mueller
54f90f73ae Update jsrsasign to ^10.2.0 (Includes fix for CVE-2021-30246)
See https://github.com/kjur/jsrsasign/security/advisories/GHSA-27fj-mc8w-j9wg
for details.
2021-05-05 08:38:10 +02:00
RiotRobot
ee620be1ec v1.7.27-rc.1 2021-05-04 16:01:27 +01:00
RiotRobot
2db3bb5556 Prepare changelog for v1.7.27-rc.1 2021-05-04 16:01:26 +01:00
RiotRobot
bc70ef72ff Upgrade matrix-react-sdk to 3.20.0-rc.1 2021-05-04 15:58:02 +01:00
RiotRobot
d3fb0acdfb Upgrade matrix-js-sdk to 10.1.0-rc.1 2021-05-04 15:56:59 +01:00
J. Ryan Stinnett
17c566e31e Merge pull request #17160 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-05-04 15:28:33 +01:00
Weblate
ac42f774aa Merge branch 'origin/develop' into Weblate. 2021-05-04 14:27:58 +00:00
liimee
28fb9bfc75 Translated using Weblate (Indonesian)
Currently translated at 23.5% (8 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/id/
2021-05-02 11:34:26 +00:00
iaiz
b98effbf32 Translated using Weblate (Spanish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/es/
2021-05-02 11:34:26 +00:00
Hakim Oubouali
889ed4541b Translated using Weblate (Central Atlas Tamazight)
Currently translated at 41.1% (14 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tzm/
2021-04-30 12:34:26 +00:00
@a2sc:matrix.org
427ca9d92d Translated using Weblate (German)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-04-30 12:34:26 +00:00
Hakim Oubouali
3df2616f4e Translated using Weblate (Central Atlas Tamazight)
Currently translated at 41.1% (14 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tzm/
2021-04-28 11:34:25 +00:00
jelv
9ef7507750 Translated using Weblate (Dutch)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/
2021-04-28 11:34:25 +00:00
David Baker
c5f533011b Merge pull request #17008 from vector-im/dbkr/asserted_identity
Document option for obeying asserted identity
2021-04-28 09:47:50 +01:00
David Baker
d03032b808 Put asserted identity under voip section 2021-04-27 19:34:21 +01:00
Germain
17dcef621e Merge pull request #17052 from vector-im/gsouquet-desktop-i18n 2021-04-27 15:48:55 +01:00
Germain Souquet
bf305f76a7 Upgrade matrix-web-i18n to use matrix prefixed binaries 2021-04-27 15:07:48 +01:00
Michael Telatynski
5ad5af7f20 Merge pull request #17061 from vector-im/t3chguy/ts/1
Convert Vector skin react components to Typescript
2021-04-27 09:40:42 +01:00
RiotRobot
4b3ba43f38 Reset matrix-react-sdk back to develop branch 2021-04-26 18:05:19 +01:00
RiotRobot
7e6ce7fb76 Reset matrix-js-sdk back to develop branch 2021-04-26 18:04:54 +01:00
RiotRobot
5c126cb61e Merge branch 'master' into develop 2021-04-26 18:04:04 +01:00
Germain Souquet
86c61cab33 Move i18n utils to its own module 2021-04-26 16:52:11 +01:00
Weblate
416de8332a Merge branch 'origin/develop' into Weblate. 2021-04-26 15:19:01 +00:00
Robert M Campbell
e30137ce68 Translated using Weblate (Lao)
Currently translated at 2.9% (1 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/lo/
2021-04-26 15:19:01 +00:00
random
982b10464f Translated using Weblate (Italian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/it/
2021-04-26 15:19:01 +00:00
Germain Souquet
dc4cc02682 Change lang type to allow for multiple locales 2021-04-26 13:54:17 +01:00
Michael Telatynski
a8429f3e1d Convert Vector skin react components to Typescript 2021-04-26 09:49:21 +01:00
Robert M Campbell
3343d14323 Added translation using Weblate (Lao) 2021-04-26 07:22:19 +00:00
Besnik Bleta
94d05c7e25 Translated using Weblate (Albanian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sq/
2021-04-25 20:34:24 +00:00
Nikita Epifanov
2976d4c0cf Translated using Weblate (Russian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ru/
2021-04-25 20:34:24 +00:00
libexus
b2683fb675 Translated using Weblate (German)
Currently translated at 97.0% (33 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-04-25 20:34:24 +00:00
XoseM
f7180853fc Translated using Weblate (Galician)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/gl/
2021-04-24 06:34:24 +00:00
Jeff Huang
cb625469a5 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hant/
2021-04-24 06:34:24 +00:00
Ihor Hordiichuk
296e5913b7 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/uk/
2021-04-24 06:34:24 +00:00
LinAGKar
bd888ff7c9 Translated using Weblate (Swedish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sv/
2021-04-24 06:34:24 +00:00
Szimszon
26a229d745 Translated using Weblate (Hungarian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/hu/
2021-04-24 06:34:23 +00:00
Thibault Martin
47f1d2fb98 Translated using Weblate (French)
Currently translated at 100.0% (34 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/fr/
2021-04-24 06:34:23 +00:00
J. Ryan Stinnett
f0069c6ebd Merge pull request #16980 from vector-im/jryans/code-quality
Add code quality review policy
2021-04-23 18:11:22 +01:00
J. Ryan Stinnett
15fe7091ff Add section on quality when guarded by a feature flag 2021-04-23 17:46:08 +01:00
Germain Souquet
f5c2d51f1e Implement IPC call to Electron to set language 2021-04-23 17:14:40 +01:00
Travis Ralston
947c913d1c Merge pull request #17013 from vector-im/travis/voice/event_type
Register RecorderWorklet from react-sdk
2021-04-22 14:42:04 -06:00
Travis Ralston
69b4296fa7 Merge branch 'develop' into travis/voice/event_type 2021-04-22 14:37:23 -06:00
Germain
8692d6fa89 Merge pull request #17039 from vector-im/gsouquet-preload-fonts 2021-04-22 17:15:06 +01:00
Germain Souquet
83359afe5d Remove deprecated velocity-animate dependency from lock file 2021-04-22 16:28:21 +01:00
Germain Souquet
8abc7cd87c Only inject Inter fonts to HtmlWebpackPlugin 2021-04-22 14:31:06 +01:00
J. Ryan Stinnett
11b40eeff4 Merge pull request #17041 from vector-im/jryans/disable-calc-warn
Disable `postcss-calc`'s noisy `warnWhenCannotResolve` option
2021-04-22 13:18:24 +01:00
J. Ryan Stinnett
9cf35ab199 Disable postcss-calc's noisy warnWhenCannotResolve option
While it sounds like a useful warning at first, it turns out the warnings it
prints are ones we're unlike to ever act on, such as adding percentages and
pixels, which seem fine to have. This resets to default behaviour, which leaves
the warning off.
2021-04-22 13:05:02 +01:00
Germain Souquet
87806b8a67 Remove overzealous linter fixes 2021-04-22 12:22:10 +01:00
Germain Souquet
417835fcca Preload Inter font to avoid FOIT on slow connections 2021-04-22 12:09:50 +01:00
Germain Souquet
708f6a26b1 Upgrade html-webpack-plugin to v4.5.2 2021-04-22 10:22:52 +01:00
Travis Ralston
9c3627dca9 Register RecorderWorklet from react-sdk 2021-04-19 21:51:25 -06:00
David Baker
c98ca42bbd Document option for obeying asserted identity 2021-04-19 20:31:55 +01:00
J. Ryan Stinnett
b0c43890af Change #element-dev reference to a link 2021-04-19 17:02:11 +01:00
Šimon Brandner
3c8efd51ef Add yarn start:https
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-18 15:44:38 +02:00
J. Ryan Stinnett
c2e87dde85 Add code quality review policy
This adds a new review policy which encourages tests for new features. As with
everything, we'll continue to tune this based on feedback.
2021-04-16 18:53:18 +01:00
J. Ryan Stinnett
001b15b856 Rewrap review guide 2021-04-16 16:02:46 +01:00
Kegan Dougal
9e19d910c1 Bump to 0.2.0 and implement nuke db logic 2020-07-03 11:21:04 +01:00
Kegan Dougal
92fe2b8935 Only works on Go 1.14 now 2020-07-03 10:45:26 +01:00
Kegan Dougal
7e15090364 Wait for a room if it isn't there 2020-06-02 15:43:03 +01:00
Kegan Dougal
d83c475bb7 v0.1.1 2020-06-02 15:25:50 +01:00
Kegan Dougal
b4c7d54fc0 Add aliases automatically for pubilc rooms 2020-06-02 11:08:30 +01:00
Kegan Dougal
e10d5eb0be Pin to the commit so it picks it up 2020-05-29 18:59:26 +01:00
Kegan Dougal
ff6c4ac837 Use my fork so we can get IDBFS support 2020-05-29 18:26:47 +01:00
Kegan Dougal
bcba891df1 reskindex on react too 2020-05-29 17:48:15 +01:00
Kegan Dougal
708a7146d5 Maybe build p2p without relying on yarn start 2020-05-29 17:23:09 +01:00
Kegan Dougal
e4c67f39a6 Publish rooms where join_rule==public
- This currently doesn't add a room alias for the room, which should be fine
  provided the published room list returns data that includes servers in it.
2020-05-28 18:02:07 +01:00
Kegan Dougal
a5ba31e127 Automatically prompt to set display name then view the room directory on first login 2020-05-28 13:19:11 +01:00
Kegan Dougal
f6aceba566 Bump to 0.1.0 2020-05-22 14:28:48 +01:00
Kegan Dougal
35bcc152ea Write to indexeddb 2020-05-22 12:59:34 +01:00
Kegan Dougal
ec45bb7976 Write dendrite version to the database 2020-05-19 15:33:18 +01:00
Kegan Dougal
b0fb043c2b Add localforage support for persisting dendrite data 2020-05-19 11:54:08 +01:00
Kegan Dougal
4828869515 Restart dendrite when it exits 2020-05-18 18:26:30 +01:00
Kegan Dougal
671315c36e Use p2p branch of react-sdk 2020-04-17 11:28:59 +01:00
Kegan Dougal
9994c9ea65 Bugfixes for firefox 2020-04-02 18:20:34 +01:00
Kegan Dougal
9328519c29 Fix auto-register and constantly logging you out mess 2020-04-02 18:06:27 +01:00
Kegan Dougal
330aa285e6 Get login working on logout 2020-04-01 16:18:50 +01:00
Kegan Dougal
5c3f11a7c7 WIP: auto-registration 2020-03-31 18:05:34 +01:00
Kegan Dougal
cdd32590fe Make dendrite load again 2020-03-26 12:33:31 +00:00
Kegan Dougal
52641c5674 Merge tag 'v1.5.13' into matthew/p2p
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.13-rc.1...v1.5.13)
* Upgrade to JS SDK 5.1.1 and React SDK 2.2.3
2020-03-26 11:50:30 +00:00
Kegan Dougal
6f43a14c43 Remove go-sqlite-js and just use sql.js directly 2020-03-26 10:35:40 +00:00
Kegan Dougal
d80285d971 Spin up a new dendrite every time we get restarted 2020-03-16 12:57:15 +00:00
Kegan Dougal
3d74d336bf Use JSServer globals instead of fetchListener 2020-03-13 10:18:08 +00:00
Kegan Dougal
1f1f0f1264 Refresh service workers when new versions of sw.js come in
- Check once a minute
- When a new sw is here, skip waiting around for the old ones to die and claim the clients

NB: On Chrome, this results in a 2 minute wait with lost connectivity before logout. Refresh to
immediately use the new sw.

NBB: On Firefox, this automatically logs you out without needing to refresh.
2020-03-10 16:26:38 +00:00
Kegan Dougal
bf13ec2285 Claim clients to avoid the refresh 2020-03-10 14:46:18 +00:00
Kegan Dougal
4d1f969c4d Latest updates; set process stuff to make prometheus happy 2020-03-10 14:28:12 +00:00
Kegan Dougal
0935ccd737 Latest updates 2020-03-04 11:15:06 +00:00
Kegan Dougal
d2635bd282 Stuff from matrix meetup 2020-02-27 10:10:18 +00:00
Kegan Dougal
462fa91938 Better logging 2020-02-25 18:05:45 +00:00
Kegan Dougal
836236ea9b Rely on symlinking sqlite/libp2p 2020-02-25 16:46:41 +00:00
Kegan Dougal
3fcc3c8bfd Allow service workers to have the scope / which is needed for the interceptor 2020-02-25 15:27:31 +00:00
Matthew Hodgson
349d3e3d47 make it work 2020-01-23 20:16:08 -07:00
Matthew Hodgson
8a41f956f6 merge develop 2020-01-23 19:15:06 -07:00
Matthew Hodgson
80411d38f7 first cut at embedding dendrite into riot as a service-worker 2020-01-23 13:22:52 -07:00
70 changed files with 2444 additions and 1095 deletions

View File

@@ -1,23 +1,30 @@
module.exports = {
"extends": ["matrix-org", "matrix-org/react"],
"env": {
"browser": true,
"node": true,
plugins: ["matrix-org"],
extends: [
"plugin:matrix-org/babel",
"plugin:matrix-org/react",
],
env: {
browser: true,
node: true,
},
"rules": {
rules: {
// Things we do that break the ideal style
"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",
overrides: [{
files: ["src/**/*.{ts,tsx}"],
extends: [
"plugin:matrix-org/typescript",
"plugin:matrix-org/react",
],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
// We disable this while we're transitioning
"@typescript-eslint/no-explicit-any": "off",
},
}],
};

View File

@@ -1,3 +1,148 @@
Changes in [1.7.31](https://github.com/vector-im/element-web/releases/tag/v1.7.31) (2021-06-21)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.31-rc.1...v1.7.31)
* Upgrade to React SDK 3.24.0 and JS SDK 12.0.0
Changes in [1.7.31-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.31-rc.1) (2021-06-15)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.30...v1.7.31-rc.1)
* Upgrade to React SDK 3.24.0-rc.1 and JS SDK 12.0.0-rc.1
* Translations update from Weblate
[\#17655](https://github.com/vector-im/element-web/pull/17655)
* Upgrade matrix-react-test-utils for React 17 peer deps
[\#17653](https://github.com/vector-im/element-web/pull/17653)
* Fix lint errors in Webpack config
[\#17626](https://github.com/vector-im/element-web/pull/17626)
* Preload only `woff2` fonts
[\#17614](https://github.com/vector-im/element-web/pull/17614)
* ⚛️ Upgrade to React@17
[\#17601](https://github.com/vector-im/element-web/pull/17601)
Changes in [1.7.30](https://github.com/vector-im/element-web/releases/tag/v1.7.30) (2021-06-07)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.30-rc.1...v1.7.30)
* Upgrade to React SDK 3.23.0 and JS SDK 11.2.0
Changes in [1.7.30-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.30-rc.1) (2021-06-01)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.29...v1.7.30-rc.1)
* Upgrade to React SDK 3.23.0-rc.1 and JS SDK 11.2.0-rc.1
* Translations update from Weblate
[\#17526](https://github.com/vector-im/element-web/pull/17526)
* Add Modernizr test for Promise.allSettled given js-sdk and react-sdk depend
on it
[\#17464](https://github.com/vector-im/element-web/pull/17464)
* Bump libolm dependency, and update package name.
[\#17433](https://github.com/vector-im/element-web/pull/17433)
* Remove logo spinner
[\#17423](https://github.com/vector-im/element-web/pull/17423)
Changes in [1.7.29](https://github.com/vector-im/element-web/releases/tag/v1.7.29) (2021-05-24)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.29-rc.1...v1.7.29)
## Security notice
Element Web 1.7.29 fixes (by upgrading to olm 3.2.3) an issue in code used for
decrypting server-side stored secrets. The issue could potentially allow a
malicious homeserver to cause a stack buffer overflow in the affected function
and to control that function's local variables.
## All changes
* Upgrade to React SDK 3.22.0 and JS SDK 11.1.0
* [Release] Bump libolm dependency, and update package name
[\#17456](https://github.com/vector-im/element-web/pull/17456)
Changes in [1.7.29-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.29-rc.1) (2021-05-19)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.28...v1.7.29-rc.1)
* Upgrade to React SDK 3.22.0-rc.1 and JS SDK 11.1.0-rc.1
* Translations update from Weblate
[\#17384](https://github.com/vector-im/element-web/pull/17384)
* Prevent minification of `.html` files
[\#17349](https://github.com/vector-im/element-web/pull/17349)
* Update matrix-widget-api/react-sdk dependency reference
[\#17346](https://github.com/vector-im/element-web/pull/17346)
* Add `yarn start:https`
[\#16989](https://github.com/vector-im/element-web/pull/16989)
* Translations update from Weblate
[\#17239](https://github.com/vector-im/element-web/pull/17239)
* Remove "in development" flag from voice messages labs documentation
[\#17204](https://github.com/vector-im/element-web/pull/17204)
* Add required webpack+jest config to load Safari support modules
[\#17193](https://github.com/vector-im/element-web/pull/17193)
Changes in [1.7.28](https://github.com/vector-im/element-web/releases/tag/v1.7.28) (2021-05-17)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.28-rc.1...v1.7.28)
## Security notice
Element Web 1.7.28 fixes (by upgrading to matrix-react-sdk 3.21.0) a low
severity issue (GHSA-8796-gc9j-63rv) related to file upload. When uploading a
file, the local file preview can lead to execution of scripts embedded in the
uploaded file, but only after several user interactions to open the preview in
a separate tab. This only impacts the local user while in the process of
uploading. It cannot be exploited remotely or by other users. Thanks to
[Muhammad Zaid Ghifari](https://github.com/MR-ZHEEV) for responsibly disclosing
this via Matrix's Security Disclosure Policy.
## All changes
* Upgrade to React SDK 3.21.0 and JS SDK 11.0.0
Changes in [1.7.28-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.28-rc.1) (2021-05-11)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.27...v1.7.28-rc.1)
* Upgrade to React SDK 3.21.0-rc.1 and JS SDK 11.0.0-rc.1
* Switch back to release version of `sanitize-html`
[\#17231](https://github.com/vector-im/element-web/pull/17231)
* Bump url-parse from 1.4.7 to 1.5.1
[\#17199](https://github.com/vector-im/element-web/pull/17199)
* Bump lodash from 4.17.20 to 4.17.21
[\#17205](https://github.com/vector-im/element-web/pull/17205)
* Bump hosted-git-info from 2.8.8 to 2.8.9
[\#17219](https://github.com/vector-im/element-web/pull/17219)
* Disable host checking on the webpack dev server
[\#17194](https://github.com/vector-im/element-web/pull/17194)
* Bump ua-parser-js from 0.7.23 to 0.7.24
[\#17190](https://github.com/vector-im/element-web/pull/17190)
Changes in [1.7.27](https://github.com/vector-im/element-web/releases/tag/v1.7.27) (2021-05-10)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.27-rc.1...v1.7.27)
* Upgrade to React SDK 3.20.0 and JS SDK 10.1.0
Changes in [1.7.27-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.27-rc.1) (2021-05-04)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.26...v1.7.27-rc.1)
* Upgrade to React SDK 3.20.0-rc.1 and JS SDK 10.1.0-rc.1
* Translations update from Weblate
[\#17160](https://github.com/vector-im/element-web/pull/17160)
* Document option for obeying asserted identity
[\#17008](https://github.com/vector-im/element-web/pull/17008)
* Implement IPC call to Electron to set language
[\#17052](https://github.com/vector-im/element-web/pull/17052)
* Convert Vector skin react components to Typescript
[\#17061](https://github.com/vector-im/element-web/pull/17061)
* Add code quality review policy
[\#16980](https://github.com/vector-im/element-web/pull/16980)
* Register RecorderWorklet from react-sdk
[\#17013](https://github.com/vector-im/element-web/pull/17013)
* Preload Inter font to avoid FOIT on slow connections
[\#17039](https://github.com/vector-im/element-web/pull/17039)
* Disable `postcss-calc`'s noisy `warnWhenCannotResolve` option
[\#17041](https://github.com/vector-im/element-web/pull/17041)
Changes in [1.7.26](https://github.com/vector-im/element-web/releases/tag/v1.7.26) (2021-04-26)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.26-rc.1...v1.7.26)

View File

@@ -37,4 +37,4 @@ COPY --from=builder /src/webapp /app
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
RUN rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html
&& ln -s /app /usr/share/nginx/html

View File

@@ -10,7 +10,6 @@ module.exports = {
],
}],
"@babel/preset-typescript",
"@babel/preset-flow",
"@babel/preset-react",
],
"plugins": [
@@ -21,7 +20,6 @@ module.exports = {
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-transform-flow-comments",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",
],

View File

@@ -25,9 +25,7 @@
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"defaultCountryCode": "GB",
"showLabsSettings": false,
"features": {
"feature_new_spinner": false
},
"features": { },
"default_federate": true,
"default_theme": "light",
"roomDirectory": {

View File

@@ -132,6 +132,10 @@ For a good example, see https://develop.element.io/config.json.
1. `audioStreamUrl`: If supplied, show an option on Jitsi widgets to stream
audio using Jitsi's live streaming feature. This option is experimental and
may be removed at any time without notice.
1. `voip`: Behaviour related to calls
1. `obeyAssertedIdentity`: If set, MSC3086 asserted identity messages sent
on VoIP calls will cause the call to appear in the room corresponding to the
asserted identity. This *must* only be set in trusted environments.
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

View File

@@ -62,9 +62,7 @@ Then you can deploy it to your cluster with something like `kubectl apply -f my-
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"defaultCountryCode": "GB",
"showLabsSettings": false,
"features": {
"feature_new_spinner": false
},
"features": { },
"default_federate": true,
"default_theme": "light",
"roomDirectory": {

View File

@@ -7,6 +7,11 @@ to `Settings->Labs`. This list is non-exhaustive and subject to change, chat in
**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.**
## Submit Abuse Report to Moderators [MSC3215](https://github.com/matrix-org/matrix-doc/pull/3215) support (`feature_report_to_moderators`)
A new version of the "Report" dialog that lets users send abuse reports directly to room moderators,
if the room supports it.
## Matrix Spaces [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772) support (`feature_spaces`)
Enables showing, using, creating, and managing spaces. Create Spaces from the all new Space Panel (to left of Room List).
@@ -19,10 +24,6 @@ Still in heavy development.
Enables rendering of LaTeX maths in messages using [KaTeX](https://katex.org/). LaTeX between single dollar-signs is interpreted as inline maths and double dollar-signs as display maths (i.e. centred on its own line).
## New spinner design (`feature_new_spinner`)
Replaces the old spinner image with a new, svg-based one featuring a sleeker design.
## Message pinning (`feature_pinning`)
Allows you to pin messages in the room. To pin a message, use the 3 dots to the right of the message
@@ -124,12 +125,13 @@ or feedback for this functionality at this time.
Allows users to receive encrypted messages by creating a device that is stored
encrypted on the server, as described in [MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697).
## Voice messages (`feature_voice_messages`) [In Development]
## Voice messages (`feature_voice_messages`)
An in-progress implementation of [MSC2516](https://github.com/matrix-org/matrix-doc/pull/2516) to add
[voice messages](https://github.com/vector-im/element-web/issues/1358) to Element. Note that this feature
is currently under active development and therefore is entirely incomplete and may not work at all - it
is not recommended for general use at this time.
Offers a way to send more time-sensitive information through the power of voice. When enabled, use the microphone
icon on the lower right to start recording your message. You will have a chance to review after you're done recording,
and if it sounds fine then send it off for the rest of the room to hear.
Voice messages are automatically downloaded to ensure they are ready for playback as soon as possible.
## Do not disturb (`feature_dnd`)

View File

@@ -58,6 +58,43 @@ When reviewing code, here are some things we look for and also things we avoid:
* Assign issues only when in progress to indicate to others what can be picked
up
## Code Quality
In the past, we have occasionally written different kinds of tests for
Element and the SDKs, but it hasn't been a consistent focus. Going forward, we'd
like to change that.
* For new features, code reviewers will expect some form of automated testing to
be included by default
* For bug fixes, regression tests are of course great to have, but we don't want
to block fixes on this, so we won't require them at this time
The above policy is not a strict rule, but instead it's meant to be a
conversation between the author and reviewer. As an author, try to think about
writing a test when making your next change. As a reviewer, try to think about
how you might test the area of code you are reviewing. If the reviewer agrees
it would be quite difficult to test some new feature, then it's okay for them to
accept the change without tests for now, but we'd eventually like to be more
strict about this further down the road.
If you do spot areas that are quite hard to test today, please let us know in
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org). We can
work on improving the app architecture and testing helpers so that future tests
are easier for everyone to write, but we won't know which parts are difficult
unless people shout when stumbling through them.
We recognise that this testing policy will slow things down a bit, but overall
it should encourage better long-term health of the app and give everyone more
confidence when making changes as coverage increases over time.
For changes guarded by a feature flag, we currently lean towards prioritising
our ability to evolve quickly using such flags and thus we will not currently
require tests to appear at the same time as the initial landing of features
guarded by flags, as long as (for new flagged features going forward) the
feature author understands that they are effectively deferring part of their
work (adding tests) until later and tests are expected to appear before the
feature can be enabled by default.
## Design and Product Review
We want to ensure that all changes to Element fit with our design and product
@@ -79,5 +116,5 @@ easily.
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
start so we can ensure it's something we'd be willing to merge.
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org) before
you start so we can ensure it's something we'd be willing to merge.

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.7.26",
"version": "1.7.31",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -29,7 +29,7 @@
"scripts": {
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && matrix-gen-i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"reskindex": "reskindex -h src/header",
"reskindex:watch": "reskindex -h src/header -w",
"reskindex:watch-react": "node scripts/yarn-sub.js matrix-react-sdk reskindex:watch",
@@ -44,8 +44,9 @@
"build:bundle-stats": "webpack --progress --bail --mode production --json > webpack-stats.json",
"dist": "scripts/package.sh",
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,element-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js\"",
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,element-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js --https\"",
"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",
"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 --disable-host-check",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint src",
"lint:types": "tsc --noEmit --jsx react",
@@ -53,23 +54,27 @@
"test": "jest"
},
"dependencies": {
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz",
"browser-request": "^0.3.3",
"gfm.css": "^1.1.2",
"highlight.js": "^10.5.0",
"jsrsasign": "^10.1.5",
"jsrsasign": "^10.2.0",
"katex": "^0.12.0",
"matrix-js-sdk": "10.0.0",
"matrix-react-sdk": "3.19.0",
"matrix-widget-api": "^0.1.0-beta.13",
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
"localforage": "^1.7.3",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
"matrix-widget-api": "^0.1.0-beta.15",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"sanitize-html": "github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db",
"ua-parser-js": "^0.7.23"
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sanitize-html": "^2.3.2",
"sql.js": "github:neilalexander/sql.js#252a72bf57b0538cbd49bbd6f70af71e516966ae",
"ua-parser-js": "^0.7.24"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/eslint-parser": "^7.12.10",
"@babel/eslint-plugin": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.12",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
@@ -78,22 +83,22 @@
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-flow-comments": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-flow": "^7.12.1",
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@babel/register": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@types/flux": "^3.1.9",
"@types/modernizr": "^3.5.3",
"@types/node": "^14.14.22",
"@types/react": "^16.9",
"@types/react-dom": "^16.9.10",
"@types/sanitize-html": "^1.27.1",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/sanitize-html": "^2.3.1",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"canvas": "^2.6.1",
@@ -102,22 +107,22 @@
"cpx": "^1.5.0",
"css-loader": "^3.6.0",
"eslint": "7.18.0",
"eslint-config-matrix-org": "^0.2.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#main",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"fake-indexeddb": "^3.1.2",
"file-loader": "^5.1.0",
"fs-extra": "^0.30.0",
"html-webpack-plugin": "^3.2.0",
"html-webpack-plugin": "^4.5.2",
"jest": "^26.6.3",
"jest-environment-jsdom-sixteen": "^1.0.3",
"json-loader": "^0.5.7",
"loader-utils": "^1.4.0",
"matrix-mock-request": "^1.2.3",
"matrix-react-test-utils": "^0.2.2",
"matrix-react-test-utils": "^0.2.3",
"matrix-web-i18n": "github:matrix-org/matrix-web-i18n",
"mini-css-extract-plugin": "^0.12.0",
"minimist": "^1.2.5",
"mkdirp": "^1.0.4",
@@ -146,9 +151,6 @@
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
},
"resolutions": {
"**/@types/react": "^16.14"
},
"jest": {
"testEnvironment": "jest-environment-jsdom-sixteen",
"testMatch": [
@@ -165,7 +167,11 @@
"^react$": "<rootDir>/node_modules/react",
"^react-dom$": "<rootDir>/node_modules/react-dom",
"^matrix-js-sdk$": "<rootDir>/node_modules/matrix-js-sdk/src",
"^matrix-react-sdk$": "<rootDir>/node_modules/matrix-react-sdk/src"
"^matrix-react-sdk$": "<rootDir>/node_modules/matrix-react-sdk/src",
"decoderWorker\\.min\\.js": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"decoderWorker\\.min\\.wasm": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"waveWorker\\.min\\.js": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"context-filter-polyfill": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!matrix-js-sdk).+$",

View File

@@ -1,10 +0,0 @@
const fs = require("fs");
if (process.argv.length < 4) throw new Error("Missing source and target file arguments");
const sourceFile = fs.readFileSync(process.argv[2], 'utf8');
const targetFile = fs.readFileSync(process.argv[3], 'utf8');
if (sourceFile !== targetFile) {
throw new Error("Files do not match");
}

View File

@@ -69,7 +69,7 @@ const COPY_LIST = [
["res/vector-icons/**", "webapp/vector-icons"],
["res/decoder-ring/**", "webapp/decoder-ring"],
["node_modules/matrix-react-sdk/res/media/**", "webapp/media"],
["node_modules/olm/olm_legacy.js", "webapp", { directwatch: 1 }],
["node_modules/@matrix-org/olm/olm_legacy.js", "webapp", { directwatch: 1 }],
["./config.json", "webapp", { directwatch: 1 }],
["contribute.json", "webapp"],
];

View File

@@ -15,7 +15,7 @@ limitations under the License.
*/
import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first
import type {Renderer} from "react-dom";
import type { Renderer } from "react-dom";
type ElectronChannel =
"app_onAction" |

View File

@@ -27,7 +27,7 @@ interface IProps {
}
const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
const {brand, mobileBuilds} = SdkConfig.get();
const { brand, mobileBuilds } = SdkConfig.get();
let ios = null;
const iosCustomUrl = mobileBuilds?.ios;
@@ -71,7 +71,7 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
android = [];
}
let mobileHeader = <h2 id="step2_heading">{_t("Use %(brand)s on mobile", {brand})}</h2>;
let mobileHeader = <h2 id="step2_heading">{_t("Use %(brand)s on mobile", { brand })}</h2>;
if (!android.length && !ios) {
mobileHeader = null;
}

View File

@@ -27,7 +27,7 @@ interface IProps {
messages?: string[];
}
const ErrorView: React.FC<IProps> = ({title, messages}) => {
const ErrorView: React.FC<IProps> = ({ title, messages }) => {
return <div className="mx_ErrorView">
<div className="mx_ErrorView_container">
<div className="mx_HomePage_header">

View File

@@ -24,7 +24,7 @@ export default class VectorEmbeddedPage extends EmbeddedPage {
static replaces = 'EmbeddedPage';
// we're overriding the base component here, for Element-specific tweaks
translate(s) {
translate(s: string) {
s = sanitizeHtml(_t(s));
// ugly fix for https://github.com/vector-im/element-web/issues/4243
// eslint-disable-next-line max-len

View File

@@ -22,9 +22,9 @@ import { _t } from 'matrix-react-sdk/src/languageHandler';
const VectorAuthFooter = () => {
const brandingConfig = SdkConfig.get().branding;
let links = [
{"text": "Blog", "url": "https://element.io/blog"},
{"text": "Twitter", "url": "https://twitter.com/element_hq"},
{"text": "GitHub", "url": "https://github.com/vector-im/element-web"},
{ "text": "Blog", "url": "https://element.io/blog" },
{ "text": "Twitter", "url": "https://twitter.com/element_hq" },
{ "text": "GitHub", "url": "https://github.com/vector-im/element-web" },
];
if (brandingConfig && brandingConfig.authFooterLinks) {

View File

@@ -16,15 +16,10 @@ limitations under the License.
*/
import React from 'react';
import PropTypes from 'prop-types';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
export default class VectorAuthHeaderLogo extends React.PureComponent {
static replaces = 'AuthHeaderLogo'
static propTypes = {
icon: PropTypes.string,
}
static replaces = 'AuthHeaderLogo';
render() {
const brandingConfig = SdkConfig.get().branding;

View File

@@ -14,12 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import React, { CSSProperties } from 'react';
import * as sdk from 'matrix-react-sdk/src/index';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
export default class VectorAuthPage extends React.PureComponent {
static replaces = 'AuthPage'
static replaces = 'AuthPage';
static welcomeBackgroundUrl;
@@ -48,12 +48,12 @@ export default class VectorAuthPage extends React.PureComponent {
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
};
const modalStyle = {
const modalStyle: CSSProperties = {
position: 'relative',
background: 'initial',
};
const blurStyle = {
const blurStyle: CSSProperties = {
position: 'absolute',
top: 0,
right: 0,
@@ -63,7 +63,7 @@ export default class VectorAuthPage extends React.PureComponent {
background: pageStyle.background,
};
const modalContentStyle = {
const modalContentStyle: CSSProperties = {
display: 'flex',
zIndex: 1,
background: 'rgba(255, 255, 255, 0.59)',

View File

@@ -57,7 +57,7 @@ export default class Favicon {
private readyCb = () => {};
constructor(params: Partial<IParams> = {}) {
this.params = {...defaults, ...params};
this.params = { ...defaults, ...params };
this.icons = Favicon.getIcons();
// create work canvas
@@ -125,7 +125,7 @@ export default class Favicon {
}
private circle(n: number | string, opts?: Partial<IParams>) {
const params = {...this.params, ...opts};
const params = { ...this.params, ...opts };
const opt = this.options(n, params);
let more = false;
@@ -214,7 +214,7 @@ export default class Favicon {
if (!this.isReady) {
this.readyCb = () => {
this.badge(content, opts);
}
};
return;
}

View File

@@ -32,5 +32,6 @@
"Open": "Отвори",
"Your browser can't run %(brand)s": "Браузърът ви не може да изпълни %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s използва модерни функции на браузъра, които не се поддържат от Вашия.",
"Powered by Matrix": "Базирано на Matrix"
"Powered by Matrix": "Базирано на Matrix",
"Use %(brand)s on mobile": "Използвайте %(brand)s на мобилен телефон"
}

View File

@@ -32,5 +32,6 @@
"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!"
"Missing indexeddb worker script!": "Nenačetl se skript spravující indexdb!",
"Use %(brand)s on mobile": "Používání %(brand)s v mobilních zařízeních"
}

View File

@@ -2,9 +2,9 @@
"powered by Matrix": "betrieben mit Matrix",
"Dismiss": "Ausblenden",
"Unknown device": "Unbekanntes Gerät",
"You need to be using HTTPS to place a screen-sharing call.": "Du musst HTTPS nutzen um einen Anruf mit Bildschirmfreigabe durchzuführen.",
"You need to be using HTTPS to place a screen-sharing call.": "Du musst HTTPS nutzen, um einen Anruf mit Bildschirmfreigabe durchzuführen.",
"Welcome to Element": "Willkommen bei Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Dezentrale, verschlüsselte Chat- &amp; Kollaborationslösung mittels [matrix]",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Dezentrale, verschlüsselte Chat- &amp; Kollaborationslösung basierend auf [matrix]",
"Sign In": "Anmelden",
"Create Account": "Konto erstellen",
"Explore rooms": "Räume erkunden",
@@ -32,5 +32,6 @@
"Open": "Öffnen",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s verwendet erweiterte Browserfunktionen, die von deinem Browser nicht unterstützt werden.",
"Your browser can't run %(brand)s": "Dein Browser kann %(brand)s nicht ausführen",
"Powered by Matrix": "Betrieben mit Matrix"
"Powered by Matrix": "Betrieben mit Matrix",
"Use %(brand)s on mobile": "Verwende %(brand)s am Handy"
}

View File

@@ -11,6 +11,7 @@
"Download Completed": "Download Completed",
"Open": "Open",
"Dismiss": "Dismiss",
"Switch to space by number": "Switch to space by number",
"Open user settings": "Open user settings",
"Previous/next recently visited room or community": "Previous/next recently visited room or community",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Via agordaro de Elemento enhavas nevalidajn datumojn de JSON. Bonvolu korekti la problemon kaj aktualigi la paĝon.",
"Your browser can't run %(brand)s": "Via foliumilo ne povas ruli %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s uzas specialajn funkciojn de foliumilo, kiujn via nuna foliumilo ne subtenas.",
"Powered by Matrix": "Povigata de Matrix"
"Powered by Matrix": "Povigata de Matrix",
"Use %(brand)s on mobile": "Uzi %(brand)s telefone"
}

View File

@@ -32,5 +32,6 @@
"Open": "Abrir",
"Your browser can't run %(brand)s": "Tu navegador no es compatible con %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s usa funciones avanzadas que su navegador actual no soporta.",
"Powered by Matrix": "Funciona con Matrix"
"Powered by Matrix": "Funciona con Matrix",
"Use %(brand)s on mobile": "Usar %(brand)s en modo móvil"
}

View File

@@ -26,11 +26,12 @@
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s%(browserName)s، %(osName)s",
"Unsupported browser": "مرورگر پش‬تبانی نشده",
"Your browser can't run %(brand)s": "مرورگر شما نمیتواند %(brand)s را اجرا کند",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s از ویژگی های پیشرفته مرورگر استفاده میکند که که در مرورگر فعلی شما پشتیبانی نمیشوند.",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s از ویژگی های پیشرفته مرورگر استفاده میکند که در مرورگر فعلی شما پشتیبانی نمیشوند.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "لطفا برای تجربه بهتر <chromeLink>کروم</chromeLink>، <firefoxLink>فایرفاکس</firefoxLink>، یا <safariLink>سافاری</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.": "شما میتوانید با مرورگر فعلی خود ادامه دهید، اما ممکن است برخی یا کل ویژگی ها کار نکنند و نگاه و احساس از برنامه ممکن است درست نباشد.",
"I understand the risks and wish to continue": "از خطرات این کار آگاهم و مایلم که ادامه بدهم",
"Go to element.io": "برو به element.io",
"Failed to start": "مشکل در آغاز",
"Powered by Matrix": "قدرت‌گرفته از ماتریکس"
"Powered by Matrix": "قدرت‌گرفته از ماتریکس",
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "La configuration de votre Element contient du JSON invalide. Veuillez corriger le problème et recharger la page.",
"Your browser can't run %(brand)s": "Votre navigateur ne peut pas exécuter %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s nécessite des fonctionnalités avancées que votre navigateur actuel ne prend pas en charge.",
"Powered by Matrix": "Propulsé par Matrix"
"Powered by Matrix": "Propulsé par Matrix",
"Use %(brand)s on mobile": "Utiliser %(brand)s sur téléphone"
}

View File

@@ -32,5 +32,6 @@
"Powered by Matrix": "Cumhachtaithe ag Matrix",
"Go to element.io": "Téigh go element.io",
"Open user settings": "Oscail socruithe úsáideora",
"Open": "Oscail"
"Open": "Oscail",
"Use %(brand)s on mobile": "Úsáid %(brand)s ar guthán póca"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "A configuración de Element contén JSON non válido. Corrixe o problema e recarga a páxina.",
"Your browser can't run %(brand)s": "O teu navegador non pode executar %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s utiliza características avanzadas do navegador que non están dispoñibles no teu navegador.",
"Powered by Matrix": "Funciona grazas a Matrix"
"Powered by Matrix": "Funciona grazas a Matrix",
"Use %(brand)s on mobile": "Utiliza %(brand)s no móbil"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Az Element érvénytelen JSON-t tartalmazó konfigurációval rendelkezik. Javítsa és töltse újra az oldalt.",
"Your browser can't run %(brand)s": "A böngészője nem tudja futtatni ezt: %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s speciális böngészőfunkciókat használ, amelyeket a jelenlegi böngészője nem támogat.",
"Powered by Matrix": "A gépházban: Matrix"
"Powered by Matrix": "A gépházban: Matrix",
"Use %(brand)s on mobile": "Mobilon használd ezt: %(brand)s"
}

View File

@@ -4,5 +4,8 @@
"Unknown device": "Perangkat Tidak Diketahui",
"You need to be using HTTPS to place a screen-sharing call.": "Anda perlu menggunakan HTTPS untuk melakukan panggilan berbagi-layar.",
"Welcome to Element": "Selamat datang di Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Obrolan terenkripsi, terdesentralisasi &amp; kolaborasi didukung oleh [matrix]"
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Obrolan terenkripsi, terdesentralisasi &amp; kolaborasi didukung oleh [matrix]",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfigurasi Element Anda mengandung JSON yang tidak valid. Mohon perbaiki masalahnya dan muat ulang halaman nya.",
"Invalid configuration: no default server specified.": "Konfigurasi tidak valid: server default belum ditentukan.",
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Element stillingar þínar innihalda ógilda JSON. Vinsamlegast leiðréttu vandamálið og endurhladdu síðuna.",
"Your Element is misconfigured": "Element þitt er rangt stillt",
"Invalid configuration: no default server specified.": "Ógild stilling: enginn sjálfgefinn þjónn tilgreindur.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ógild stilling: getur aðeins tilgreint einn af default_server_config, default_server_name eða default_hs_url."
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ógild stilling: getur aðeins tilgreint einn af default_server_config, default_server_name eða default_hs_url.",
"Use %(brand)s on mobile": "Nota %(brand)s í síma"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "La configurazione del tuo elemento contiene un JSON non valido. Correggi il problema e ricarica la pagina.",
"Your browser can't run %(brand)s": "Il tuo browser non può eseguire %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s usa funzionalità avanzate del browser che non sono supportate dal tuo browser attuale.",
"Powered by Matrix": "Offerto da Matrix"
"Powered by Matrix": "Offerto da Matrix",
"Use %(brand)s on mobile": "Usa %(brand)s su mobile"
}

View File

@@ -4,5 +4,28 @@
"Dismiss": "უარის თქმა",
"powered by Matrix": "Matrix-ზე დაფუძნებული",
"Welcome to Element": "კეთილი იყოს თქვენი მობრძანება Element-ზე",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "დეცენტრალიზებული, დაშიფრული ჩატი &amp; კოლაბორაცია, დაფუძნებული [matrix]-ზე"
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "დეცენტრალიზებული, დაშიფრული ჩატი &amp; კოლაბორაცია, დაფუძნებული [matrix]-ზე",
"Explore rooms": "ოთახების დათავლიერება",
"Failed to start": "ჩართვა ვერ მოხერხდა",
"Use %(brand)s on mobile": "გამოიყენე %(brand)s-ი მობილურზე",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s დესკტოპი (%(platformName)s)",
"Unexpected error preparing the app. See console for details.": "მოულოდნელი ერორი აპლიკაციის შემზადებისას. იხილეთ კონსოლი დეტალებისთვის.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "თქვენი Element-ის კონფიგურაცია შეიცავს მიუღებელ JSON-ს. გთხოვთ გადაჭრათ პრობლემა და დაარაფრეშოთ გვერდი.",
"Sign In": "შესვლა",
"Invalid configuration: no default server specified.": "არასწორი კონფიგურაცია: მთავარი სერვერი არ არის მითითებული.",
"Create Account": "ანგარიშის შექმნა",
"Go to element.io": "გადადი element.io-ზე",
"I understand the risks and wish to continue": "მესმის რისკები და მსურს გაგრძელება",
"Unsupported browser": "ბრაუზერი არ არის მხარდაჭერილი",
"Your browser can't run %(brand)s": "შენ ბრაუზერს არ შეუძლია გაუშვას %(brand)s-ი",
"Unable to load config file: please refresh the page to try again.": "კონფიგურაციის ფაილის ჩატვირთვა ვერ მოხერხდა: დაარეფრეშე გვერდი თავიდან საცდელად",
"Invalid JSON": "მიუღებელი JSON-ი",
"Your Element is misconfigured": "შენი Element-ი არასწორადაა კონფიგურირებული",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "გთხოვთ დააინსტალოთ <chromeLink>Chrome-ი</chromeLink>, <firefoxLink>Firefox-ი</firefoxLink>, ან <safariLink>Safari</safariLink> საუკეთესო გამოცდილებისთვის.",
"Powered by Matrix": "მუშაობს Matrix-ის მეშვეობით",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Go to your browser to complete Sign In": "გახსენი ბრაუზერი Sign In-ის დასასრულებლად",
"Open user settings": "მომხმარებლების პარამეტრების გახსნა",
"Open": "გახსნა",
"Download Completed": "გადმოწერა დასრულებულია"
}

3
src/i18n/strings/lo.json Normal file
View File

@@ -0,0 +1,3 @@
{
"Open": "ເປີດ"
}

View File

@@ -32,5 +32,6 @@
"Your browser can't run %(brand)s": "Jūsų naršyklė negali paleisti %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s naudoja išplėstines naršyklės funkcijas, kurių jūsų dabartinė naršyklė nepalaiko.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Geriausiam veikimui suinstaliuokite <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, arba <safariLink>Safari</safariLink>.",
"Powered by Matrix": "Veikia su Matrix"
"Powered by Matrix": "Veikia su Matrix",
"Use %(brand)s on mobile": "Naudoti %(brand)s mobiliajame telefone"
}

View File

@@ -1,12 +1,12 @@
{
"Dismiss": "Afwijzen",
"Dismiss": "Sluiten",
"powered by Matrix": "draait op Matrix",
"Unknown device": "Onbekend apparaat",
"You need to be using HTTPS to place a screen-sharing call.": "Oproepen met schermdelen vergen HTTPS.",
"Welcome to Element": "Welkom bij Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Gedecentraliseerd en versleuteld chatten &amp; samenwerken dankzij [matrix]",
"Sign In": "Aanmelden",
"Create Account": "Account aanmaken",
"Sign In": "Inloggen",
"Create Account": "Registeren",
"Explore rooms": "Gesprekken ontdekken",
"Unexpected error preparing the app. See console for details.": "Er is een onverwachte fout opgetreden bij het voorbereiden van de app. Zie de console voor details.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuratiefout: kan slechts één van default_server_config, default_server_name, of default_hs_url opgeven.",
@@ -22,15 +22,16 @@
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Unsupported browser": "Niet-ondersteunde browser",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Installeer <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, of <safariLink>Safari</safariLink> voor de beste gebruikservaring.",
"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.": "Je kunt je huidige browser blijven gebruiken, maar sommige of alle functies zouden niet kunnen werken en de uitstraling van het programma kan verkeerd zijn.",
"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.": "U kunt uw huidige browser blijven gebruiken, maar sommige of alle functies zouden niet kunnen werken en de weergave van het programma kan verkeerd zijn.",
"I understand the risks and wish to continue": "Ik begrijp de risico's en wil verder gaan",
"Go to element.io": "Ga naar element.io",
"Failed to start": "Opstarten mislukt",
"Open": "Openen",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Je Element configuratie bevat ongeldige JSON. Gelieve het probleem te corrigeren daarna de pagina te herladen.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Uw Element configuratie bevat ongeldige JSON. Gelieve het probleem te corrigeren daarna de pagina te herladen.",
"Download Completed": "Download voltooid",
"Your Element is misconfigured": "Je Element is verkeerd geconfigureerd",
"Your browser can't run %(brand)s": "Je browser kan %(brand)s niet draaien",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s gebruikt geavanceerde functies die niet ondersteund worden in je huidige browser.",
"Powered by Matrix": "Gebruikt Matrix technologie"
"Your Element is misconfigured": "Uw Element is verkeerd geconfigureerd",
"Your browser can't run %(brand)s": "Uw browser kan %(brand)s niet starten",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s gebruikt geavanceerde functies die niet ondersteund worden in uw huidige browser.",
"Powered by Matrix": "Mogelijk gemaakt door Matrix",
"Use %(brand)s on mobile": "Gebruik %(brand)s op uw mobiel"
}

View File

@@ -32,5 +32,6 @@
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s używa zaawansowanych funkcji przeglądarki, które nie są dostępne w twojej przeglądarce.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfiguracja Elementa zawiera niepoprawny JSON. Popraw konfiguracje i odśwież stronę.",
"Your Element is misconfigured": "Element jest nieprawidłowo skonfigurowany",
"Powered by Matrix": "Zasilane przez Matrix"
"Powered by Matrix": "Zasilane przez Matrix",
"Use %(brand)s on mobile": "Użyj %(brand)s w telefonie"
}

View File

@@ -1,36 +1,37 @@
{
"Dismiss": "Descartar",
"Dismiss": "Dispensar",
"powered by Matrix": "oferecido por Matrix",
"Unknown device": "Aparelho desconhecido",
"You need to be using HTTPS to place a screen-sharing call.": "Você precisa usar HTTPS para compartilhar a tela durante uma chamada.",
"Welcome to Element": "Boas-vindas ao Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Chat descentralizado, criptografado e colaborativo construído com [matrix]",
"Sign In": "Entrar",
"Unknown device": "Dispositivo desconhecido",
"You need to be using HTTPS to place a screen-sharing call.": "Você precisa estar usando HTTPS para começar uma chamada de compartilhamento de tela.",
"Welcome to Element": "Boas-vindas a Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Chat &amp; colaboração descentralizados e encriptados powered by [matrix]",
"Sign In": "Fazer signin",
"Create Account": "Criar Conta",
"Explore rooms": "Explorar salas",
"The message from the parser is: %(message)s": "A mensagem do parser é: %(message)s",
"Invalid JSON": "JSON inválido",
"Unexpected error preparing the app. See console for details.": "Erro inesperado preparando o aplicativo. Veja o console para mais detalhes.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuração inválida: você só pode especificar um valor dentre default_server_config, default_server_name, ou default_hs_url.",
"Invalid configuration: no default server specified.": "Configuração inválida: servidor padrão não especificado.",
"Unable to load config file: please refresh the page to try again.": "Não foi possível carregar o arquivo de configuração: por favor, atualize a página para tentar novamente.",
"Download Completed": "Download concluído",
"Open user settings": "Abrir configurações do usuário",
"Unexpected error preparing the app. See console for details.": "Erro inesperado preparando o app. Veja console para detalhes.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuração inválida: só pode especificar um de default_server_config, default_server_name, ou default_hs_url.",
"Invalid configuration: no default server specified.": "Configuração inválida: nenhum servidor default especificado.",
"Unable to load config file: please refresh the page to try again.": "Incapaz de carregar arquivo de config: por favor atualize a página para tentar de novo.",
"Download Completed": "Download Completado",
"Open user settings": "Abrir configurações de usuária(o)",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Unsupported browser": "Navegador não suportado",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Por favor, instale o <chromeLink>Chrome</chromeLink>, o <firefoxLink>Firefox</firefoxLink> ou o <safariLink>Safari</safariLink> para obter a melhor experiência de uso.",
"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.": "Você pode continuar usando o navegador atual, mas alguns dos recursos podem não funcionar e a aparência do aplicativo pode estar incorreta.",
"I understand the risks and wish to continue": "Entendo os riscos e desejo continuar",
"Go to element.io": " para element.io",
"Failed to start": "Falha ao iniciar",
"Missing indexeddb worker script!": "O script indexeddb não foi encontrado!",
"Unsupported browser": "Browser insuportado",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Por favor instale <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, ou <safariLink>Safari</safariLink> para a melhor experiência.",
"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.": "Você pode continuar usando seu browser atual, mas alguma ou toda funcionalidade pode não funcionar e a aparência e sensação do aplicativo pode estar incorretas.",
"I understand the risks and wish to continue": "Eu entendo os riscos e desejo continuar",
"Go to element.io": "Ir para element.io",
"Failed to start": "Falha para iniciar",
"Missing indexeddb worker script!": "Worker script indexeddb faltando!",
"Open": "Abrir",
"Previous/next recently visited room or community": "Anterior/Próxima sala ou comunidade visitada recentemente",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s para Computador (%(platformName)s)",
"Go to your browser to complete Sign In": "Vá para o seu navegador para concluir o login",
"Your Element is misconfigured": "Seu Element está desconfigurado",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Sua configuração do Element contém JSON inválido. Por favor, corrija o problema e recarregue a página.",
"Your browser can't run %(brand)s": "Seu navegador não consegue rodar o %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s usa recursos avançados que não são suportados pelo seu navegador de internet atual.",
"Powered by Matrix": "Construído com tecnologia Matrix"
"Previous/next recently visited room or community": "Anterior/próxima sala ou comunidade visitada recentemente",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
"Go to your browser to complete Sign In": "Vá para seu browser para completar Sign In",
"Your Element is misconfigured": "Seu Element está malconfigurado",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Sua configuração de Element contém JSON inválido. Por favor corrija o problema e recarregue a página.",
"Your browser can't run %(brand)s": "Seu browser não consegue rodar %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s usa funcionalidade de browser avançada que não é suportada por seu browser atual.",
"Powered by Matrix": "Powered by Matrix",
"Use %(brand)s on mobile": "Usar %(brand)s em celular"
}

View File

@@ -6,7 +6,7 @@
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Chat decentralizat, criptat &amp; colaborare propulsata de [matrix]",
"You need to be using HTTPS to place a screen-sharing call.": "Trebuie să folosești HTTPS pentru a plasa un apel de tip screen-sharing.",
"Sign In": "Autentificare",
"Create Account": "Înregistare",
"Create Account": "Crează un cont",
"Explore rooms": "Explorează camerele",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuratie invalida: se poate specifica doar una dintre default_server_config, default_server_name, or default_hs_url.",
"Invalid JSON": "JSON invalid",
@@ -16,5 +16,22 @@
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Instalati va rog <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> pentru o experienta mai buna.",
"I understand the risks and wish to continue": "Inteleg riscul si doresc sa continui",
"Go to element.io": "Acceseaza element.io",
"Failed to start": "Nu reuseste sa porneasca"
"Failed to start": "Nu reuseste sa porneasca",
"Your Element is misconfigured": "Element-ul tău este configurat necorespunzător",
"Missing indexeddb worker script!": "Scriptul de lucru indexddb lipsește!",
"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.": "Poți continua să folosești browser-ul curent, însă aspectul și experiența câtorva sau tuturor funcțiilor poate fi incorectă.",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s folosește funcții avansate de browser ce nu sunt suportate de browser-ul dumneavoastră.",
"Your browser can't run %(brand)s": "Browserul tău nu poate rula %(brand)s",
"Use %(brand)s on mobile": "Folosește %(brand)s pe mobil",
"Powered by Matrix": "Bazat pe Matrix",
"Go to your browser to complete Sign In": "Du-te la browser pentru a finaliza Autentificarea",
"Previous/next recently visited room or community": "Precedenta/următoarea cameră sau comunitate vizitată recent",
"Open user settings": "Deschide setările de utilizator",
"Open": "Deschide",
"Download Completed": "Descărcare Completă",
"Unexpected error preparing the app. See console for details.": "Eroare neașteptată în aplicație. Vezi consola pentru detalii.",
"Unable to load config file: please refresh the page to try again.": "Nu se poate încărca fișierul de configurație: vă rugăm sa reîncărcați pagina și să încercați din nou.",
"The message from the parser is: %(message)s": "Mesajul de la parser este: %(message)s",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Configurația ta Element conține JSON invalid. Vă rugăm sa corectați problema și să reîncărcați pagina.",
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat."
}

View File

@@ -32,5 +32,6 @@
"Open": "Открыть",
"Your browser can't run %(brand)s": "Ваш браузер не может запустить %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s использует расширенные возможности, которые не поддерживаются вашим браузером.",
"Powered by Matrix": "На технологии Matrix"
"Powered by Matrix": "На технологии Matrix",
"Use %(brand)s on mobile": "Воспользуйтесь %(brand)s на мобильном телефоне"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Formësimi juaj i Element-it përmban JSON të pavlefshëm. Ju lutemi, ndreqeni problemin dhe ringarkoni faqen.",
"Your browser can't run %(brand)s": "Shfletuesi juaj smund të xhirojë %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s përdor veçori të thelluara të shfletuesit, të cilat shfletuesi juaj i tanishëm si mbulon.",
"Powered by Matrix": "Bazuar në Matrix"
"Powered by Matrix": "Bazuar në Matrix",
"Use %(brand)s on mobile": "Përdor %(brand)s në celular"
}

View File

@@ -32,5 +32,6 @@
"Open": "Öppna",
"Powered by Matrix": "Drivs av Matrix",
"Your browser can't run %(brand)s": "Din webbläsare kan inte köra %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s använder avancerade webbläsarfunktioner som inte stöds av din aktuella webbläsare."
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s använder avancerade webbläsarfunktioner som inte stöds av din aktuella webbläsare.",
"Use %(brand)s on mobile": "Använd %(brand)s på mobilen"
}

View File

@@ -1,16 +1,37 @@
{
"Dismiss": "நீக்கு",
"powered by Matrix": "Matrix-ஆல் ஆனது",
"Unknown device": "தெரியாத கருவி",
"You need to be using HTTPS to place a screen-sharing call.": "நீங்கள் திரைபகிர்வு அழைப்பை மேற்க்கொள்ள HTTPS-ஐ பயன்படுத்த வேண்டும்.",
"Welcome to Element": "Element -ற்க்கு வரவேற்க்கிறோம்",
"Unknown device": "அறியப்படாத சாதனம்",
"You need to be using HTTPS to place a screen-sharing call.": "நீங்கள் திரைபகிர்வு அழைப்பை மேற்க்கொள்ள HTTPS ஐ பயன்படுத்த வேண்டும்.",
"Welcome to Element": "எலிமெண்டிற்க்கு வரவேற்க்கிறோம்",
"The message from the parser is: %(message)s": "பாகுபடுத்தி அனுப்பிய செய்தி: %(message)s",
"Invalid JSON": "தவறான JSON",
"Unexpected error preparing the app. See console for details.": "பயன்பாட்டைத் தயாரிப்பதில் எதிர்பாராத பிழை. விவரங்களுக்கு console ஐப் பார்க்கவும்.",
"Unexpected error preparing the app. See console for details.": "பயன்பாட்டைத் தயார் செய்வதில் எதிர்பாராத பிழை. விவரங்களுக்கு console ஐப் பார்க்கவும்.",
"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.": "தவறான உள்ளமைவு: இயல்புநிலை சேவையகம் குறிப்பிடப்படவில்லை.",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "[matrix] ஆல் இயக்கப்படும் பரவலாக்கப்பட்ட, மறைகுறியாக்கப்பட்ட அரட்டை &amp; ஒத்துழைப்பு",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "[matrix] மூலம் இயக்கப்படும் பரவலாக்கப்பட்ட, மறைகுறியாக்கப்பட்ட அரட்டை பயன்பாட்டு",
"Sign In": "உள்நுழைக",
"Create Account": "உங்கள் கணக்கை துவங்குங்கள்",
"Explore rooms": "அறைகளை ஆராயுங்கள்"
"Explore rooms": "அறைகளை ஆராயுங்கள்",
"Missing indexeddb worker script!": "indexeddb வேலையாளி குறியீட்டை காணவில்லை!",
"Powered by Matrix": "மேட்ரிக்ஸ் மூலம் இயக்கப்படுகிறது",
"Previous/next recently visited room or community": "முந்தைய/அடுத்த சமீபத்தில் பார்வையிட்ட அறை அல்லது சமூகம்",
"Failed to start": "துவங்குவதில் தோல்வி",
"Go to element.io": "element.io க்குச் செல்லவும்",
"I understand the risks and wish to continue": "நான் அபாயங்களைப் புரிந்துகொண்டு தொடர விரும்புகிறேன்",
"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.": "உங்கள் தற்போதைய உலாவியை நீங்கள் தொடர்ந்து பயன்படுத்தலாம், ஆனால் சில அல்லது அனைத்து அம்சங்களும் செயல்படாமல் போகலாம் மற்றும் பயன்பாட்டின் தோற்றமும் உணர்வும் தவறாக இருக்கலாம்.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "சிறந்த அனுபவத்திற்காக <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, அல்லது அதை <safariLink>Safari</safariLink> ஐ நிறுவவும்.",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s உங்கள் தற்போதைய உலாவியால் ஆதரிக்கப்படாத மேம்பட்ட உலாவி அம்சங்களைப் பயன்படுத்துகிறது.",
"Your browser can't run %(brand)s": "உங்கள் உலாவியில் %(brand)s ஐ இயக்க முடியாது",
"Unsupported browser": "ஆதரிக்கப்படாத உலாவி",
"Use %(brand)s on mobile": "%(brand)s ஐ திறன்பேசியில் பயன்படுத்தவும்",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Go to your browser to complete Sign In": "உள்நுழைவை முடிவுசெய்ய உங்கள் உலாவிக்குச் செல்லவும்",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s திரைமுகப்பு (%(platformName)s)",
"Open user settings": "பயனர் அமைப்புகளைத் திறக்கவும்",
"Open": "திற",
"Download Completed": "பதிவிறக்கம் முடிவடைந்தது",
"Unable to load config file: please refresh the page to try again.": "கட்டமைப்பு கோப்பை ஏற்ற முடியவில்லை: மீண்டும் முயற்சிக்க பக்கத்தைப் புதுப்பிக்கவும்.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "உங்கள் எலிமெண்ட் உள்ளமைவில் தவறான JSON உள்ளது. தயவுசெய்து இதை சரிசெய்து பக்கத்தை மீண்டும் ஏற்றவும்.",
"Your Element is misconfigured": "உங்கள் எலிமெண்ட் தவறாக உள்ளமைக்கப்பட்டுள்ளது"
}

View File

@@ -8,9 +8,9 @@
"Sign In": "Giriş Yap",
"Create Account": "Hesap Oluştur",
"Explore rooms": "Odaları keşfet",
"Invalid JSON": "Geçersiz JSON",
"Invalid JSON": "JSON geçersiz",
"Unexpected error preparing the app. See console for details.": "Uygulama hazırlanırken beklenmeyen bir hata oldu. Detaylar için konsola bakın.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Geçersiz yapılandırma: default_server_config, default_server_name, yada default_hs_url den sadece birisi seçilebilir.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Hatalı ayarlar: default_server_config, default_server_name ve default_hs_url ayarlarından en fazla biri girilebilir.",
"Invalid configuration: no default server specified.": "Geçersiz yapılandırma: varsayılan sunucu seçilmemiş.",
"The message from the parser is: %(message)s": "Ayrıştırıcıdan gelen mesaj: %(message)s",
"Go to your browser to complete Sign In": "Oturum açmayı tamamlamak için tarayıcınıza gidin",
@@ -28,9 +28,10 @@
"Go to element.io": "element.io adresine git",
"Failed to start": "Başlatılamadı",
"Previous/next recently visited room or community": "Yakında ziyaret edilen önceki/sonraki oda veya topluluk",
"Powered by Matrix": "Matrix tarafından güçlendirildi",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Powered by Matrix": "Gücünü Matrix'ten alır",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName) (%(browserName), %(osName))",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Masaüstü (%(platformName)s)",
"Open": "Aç",
"Missing indexeddb worker script!": "Indexeddb worker kodu eksik!"
"Missing indexeddb worker script!": "Indexeddb worker kodu eksik!",
"Use %(brand)s on mobile": "Mobilde %(brand)s kullan"
}

View File

@@ -1,5 +1,5 @@
{
"Create Account": "Ssenflul amiḍan",
"Create Account": "senflul amiḍan",
"Download Completed": "Ittusmed wagam",
"Powered by Matrix": "Ittusker s Matrix",
"Sign In": "Kcem",
@@ -11,5 +11,6 @@
"Open user settings": "Ṛẓem tisɣal n unessemres",
"Dismiss": "Nexxel",
"Open": "Ṛẓem",
"The message from the parser is: %(message)s": "Tuzint seg tasna: %(message)s"
"The message from the parser is: %(message)s": "Tuzint n umeslad: %(message)s",
"Use %(brand)s on mobile": "Semres %(brand)s g utilifun"
}

View File

@@ -21,7 +21,7 @@
"Failed to start": "Запуск не вдався",
"Download Completed": "Завантаження завершено",
"Missing indexeddb worker script!": "Відсутній робочий сценарій IndexedDB!",
"Your Element is misconfigured": "Ваш Element налаштовано невірно",
"Your Element is misconfigured": "Ваш Element налаштовано неправильно",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Ваша конфігурація Element містить хибний JSON. Виправте проблему та оновіть сторінку.",
"Unable to load config file: please refresh the page to try again.": "Неможливо завантажити файл конфігурації. Оновіть, будь ласка, сторінку, щоб спробувати знову.",
"Open": "Відкрити",
@@ -32,5 +32,6 @@
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Powered by Matrix": "Працює на Matrix",
"Your browser can't run %(brand)s": "Ваш переглядач неспроможний запустити %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s використовує передові властивості, які ваш браузер не підтримує."
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s використовує передові властивості, які ваш браузер не підтримує.",
"Use %(brand)s on mobile": "Користуйтеся %(brand)s на мобільному"
}

View File

@@ -6,7 +6,7 @@
"Welcome to Element": "Chào mừng tới Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Chat phân tán, mã hóa &amp; giao tiếp được tài trợ bởi [matrix]",
"Unexpected error preparing the app. See console for details.": "Lỗi xảy ra trong lúc chuẩn bị app. Xem console log để biết chi tiết.",
"The message from the parser is: %(message)s": "Nội dung tin là: %(message)s",
"The message from the parser is: %(message)s": "Thông báo của trình xử lý là: %(message)s",
"Invalid JSON": "JSON không hợp lệ",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Thiết lập không hợp lệ: chỉ có thể điền một trong số default_server_config, default_server_name, hoặc default_hs_url.",
"Invalid configuration: no default server specified.": "Cấu hình không hợp lệ: máy chủ mặc định không được thiết lập.",
@@ -23,8 +23,15 @@
"Unsupported browser": "Trình duyệt không được hỗ trợ",
"Go to your browser to complete Sign In": "Mở trình duyệt web để hoàn thành đăng nhập",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Máy tính để bàn (%(platformName)s)",
"Previous/next recently visited room or community": "Phòng chat hoặc cộng đồng gần đây trước/tiếp theo",
"Previous/next recently visited room or community": "Phòng chat hoặc cộng đồng đã đi đến gần đây trước/tiếp theo",
"Open user settings": "Mở cài đặt người dùng",
"Open": "Mở",
"Unable to load config file: please refresh the page to try again.": "Không thể tải tệp cấu hình: hãy làm mới trang để thử lại."
"Unable to load config file: please refresh the page to try again.": "Không thể tải tệp cấu hình: hãy làm mới trang để thử lại.",
"Failed to start": "Khởi động thất bại",
"Use %(brand)s on mobile": "Sử dụng %(brand)s trên di động",
"Powered by Matrix": "Được chạy bởi công nghệ Matrix",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Missing indexeddb worker script!": "Thiếu tệp lệnh làm việc của indexeddb!",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Thiết lập Element của bạn chứa JSON không hợp lệ. Vui lòng sửa vấn đề và tải lại trang.",
"Your Element is misconfigured": "Element của bạn bị thiết lập sai"
}

View File

@@ -11,7 +11,7 @@
"The message from the parser is: %(message)s": "语法分析器的信息:%(message)s",
"Invalid JSON": "无效的 JSON",
"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_configdefault_server_name或 default_hs_url 中的一个。",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "无效的配置:只能设置 default_server_configdefault_server_name 或 default_hs_url 中的一个。",
"Invalid configuration: no default server specified.": "无效的配置:没有设置默认服务器。",
"Missing indexeddb worker script!": "缺少 IndexedDB 辅助脚本!",
"Unable to load config file: please refresh the page to try again.": "无法加载配置文件:请再次刷新页面。",
@@ -32,5 +32,6 @@
"Open": "打开",
"Your browser can't run %(brand)s": "浏览器无法运行 %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "当前浏览器不支持 %(brand)s 所需的高级浏览器特性。",
"Powered by Matrix": "由 Matrix 驱动"
"Powered by Matrix": "由 Matrix 驱动",
"Use %(brand)s on mobile": "在移动设备上使用 %(brand)s"
}

View File

@@ -32,5 +32,6 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Element 的配置中包含無效JSON請更正錯誤並重新加載網頁。",
"Your browser can't run %(brand)s": "當前瀏覽器無法運行%(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "當前瀏覽器不支持%(brand)s使用的高級特性。",
"Powered by Matrix": "由 Matrix 提供"
"Powered by Matrix": "由 Matrix 提供",
"Use %(brand)s on mobile": "在行動裝置上使用 %(brand)s"
}

View File

@@ -25,17 +25,24 @@ window.React = React;
import * as sdk from 'matrix-react-sdk';
import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg';
import {_td, newTranslatableError} from 'matrix-react-sdk/src/languageHandler';
import { _t, _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler';
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
import {AutoDiscovery} from "matrix-js-sdk/src/autodiscovery";
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
import {MatrixClientPeg} from 'matrix-react-sdk/src/MatrixClientPeg';
import { MatrixClientPeg } from 'matrix-react-sdk/src/MatrixClientPeg';
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import {parseQs, parseQsFromFragment} from './url_utils';
// P2P only, probably should be relocated
import Modal from 'matrix-react-sdk/src/Modal';
import { IDialogProps } from 'matrix-react-sdk/src/components/views/dialogs/IDialogProps';
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
import { getCachedRoomIDForAlias } from 'matrix-react-sdk/src/RoomAliasCache';
import { Room } from "matrix-js-sdk/src/models/room";
import { parseQs, parseQsFromFragment } from './url_utils';
import VectorBasePlatform from "./platform/VectorBasePlatform";
import {createClient} from "matrix-js-sdk/src/matrix";
import { createClient } from "matrix-js-sdk/src/matrix";
let lastLocationHashSet: string = null;
@@ -79,6 +86,184 @@ function onNewScreen(screen: string, replaceLast = false) {
} else {
window.location.assign(hash);
}
if (!window.matrixChat) {
return;
}
let creds = null;
if (screen === "register" || screen === "login" || screen === "welcome") {
autoRegister().then((newCreds) => {
creds = newCreds;
return (window.matrixChat as MatrixChatType).onUserCompletedLoginFlow(
newCreds, "-",
);
}, (err) => {
console.error("Failed to auto-register:", err);
}).then(() => {
// first time user
if (creds._registered) {
p2pFirstTimeSetup();
}
});
} else if (screen.startsWith("room/")) {
// room/!foo:bar
// room/#foo:bar
// if this room is public then make sure it is published.
p2pEnsurePublished(screen.split("/")[1]);
}
}
const P2PDisplayNameDialog: React.FC<IDialogProps> = ({ onFinished }) => {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const ChangeDisplayName = sdk.getComponent('settings.ChangeDisplayName');
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return <BaseDialog
onFinished={onFinished}
title={_t('Set a display name:')}
>
<ChangeDisplayName onFinished={onFinished} />
<DialogButtons
primaryButton={_t('OK')}
onPrimaryButtonClick={onFinished}
hasCancel={false}
/>
</BaseDialog>;
};
function p2pFirstTimeSetup() {
// Prompt them to set a display name
Modal.createDialog(P2PDisplayNameDialog,
{
onFinished: () => {
// View the room directory after display name has been sorted out
dis.dispatch({
action: 'view_room_directory',
});
},
}, null, /* priority = */ false, /* static = */ true,
);
}
async function fetchRoom(roomId: string): Room {
const client = MatrixClientPeg.get();
let room = client.getRoom(roomId);
if (room) {
return room;
}
console.log("p2pEnsurePublished fetchRoom waiting for room... ", roomId);
room = await new Promise((resolve, reject) => {
let fulfilled = false;
const cb = function(room) {
if (fulfilled) {
return;
}
const newRoomId = room.roomId;
if (roomId === newRoomId) {
fulfilled = true;
console.log("p2pEnsurePublished fetchRoom found ", roomId);
resolve(room);
}
};
client.on("Room", cb);
setTimeout(() => {
if (fulfilled) {
return;
}
console.log("p2pEnsurePublished fetchRoom timed out ", roomId);
fulfilled = true;
client.removeListener("Room", cb);
reject(new Error("timed out waiting to see room " + roomId));
}, 60 * 1000); // wait 60s
});
return room;
}
async function p2pEnsurePublished(roomIdOrAlias: string) {
// If the room has just been created, we need to wait for the join_rules to come down /sync
// If the app has just been refreshed, we need to wait for the DB to be loaded.
// Since we don't really care when this is done, just sleep a bit.
await sleep(3000);
console.log("p2pEnsurePublished ", roomIdOrAlias);
try {
const client = MatrixClientPeg.get();
// convert alias to room ID
let roomId;
let aliasLocalpart;
if (roomIdOrAlias.startsWith("!")) {
roomId = roomIdOrAlias;
} else {
roomId = getCachedRoomIDForAlias(roomIdOrAlias);
// extract the localpart so we can republish this alias on our server
aliasLocalpart = roomIdOrAlias.split(":")[0].substring(1);
}
// fetch the join_rules, check if public
const room = await fetchRoom(roomId);
if (!room) {
throw new Error("No room for room ID: " + roomId);
}
if (!aliasLocalpart) {
const roomName = room.currentState.getStateEvents("m.room.name", "");
if (roomName) {
aliasLocalpart = roomName.getContent().name;
// room alias grammar is poorly defined. Synapse rejects whitespace, Riot barfs on slashes, it's a mess.
// so for now, let's just do A-Za-z0-9_-
aliasLocalpart = aliasLocalpart.replace(/[^A-Za-z0-9_-]/g, "");
} else {
// use the random part of the room ID as a fallback.
aliasLocalpart = roomId.split(":")[0].substring(1);
}
}
const joinRules = room.currentState.getStateEvents("m.room.join_rules", "");
if (!joinRules) {
throw new Error("No join_rules for room ID: " + roomId);
}
const isPublic = joinRules.getContent().join_rule === "public";
if (isPublic) {
// make sure that there is an alias mapping
try {
for (let i = 0; i < 2; i++) {
const newRoomAlias = `#${aliasLocalpart}:${client.getDomain()}`;
let exists = false;
let matches = false;
try {
const aliasResponse = await client.getRoomIdForAlias(newRoomAlias);
matches = aliasResponse.room_id === roomId;
exists = true;
} catch (err) {}
console.log(
"p2pEnsurePublished: room ID:", roomId, " want alias: ", newRoomAlias,
" exists=", exists, " matches=", matches,
);
if (!exists) {
await client.createAlias(newRoomAlias, roomId);
break;
} else if (!matches) {
// clashing room alias, use the room ID.
aliasLocalpart = roomId.split(":")[0].substring(1);
} else {
// exists and matches, do nothing
break;
}
}
} catch (err) {
console.log("p2pEnsurePublished: problem creating alias: ", err);
}
// publish the room
await client.setRoomDirectoryVisibility(roomId, "public");
console.log("p2pEnsurePublished: Now published.");
} else {
// unpublish the room
await client.setRoomDirectoryVisibility(roomId, "private");
console.log("p2pEnsurePublished: Now hidden.");
}
} catch (err) {
console.log("p2pEnsurePublished encountered an error: ", err);
}
}
// We use this to work out what URL the SDK should
@@ -128,6 +313,60 @@ function onTokenLoginCompleted() {
window.history.replaceState(null, "", url.href);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function autoRegister() {
console.log("dendrite: Auto-registration in progress");
const cli = createClient({
baseUrl: window.location.origin,
});
const password = "this should be really really secure";
// Make sure the server is up (active service worker)
await navigator.serviceWorker.ready;
// On Firefox, the ready promise resolves just prior to activation.
// On Chrome, the ready promise resolves just after activation.
// We need to make requests AFTER we have been activated, else the /register request
// will fail.
await sleep(10);
let response = null;
let didRegister = false;
try {
response = await cli.registerRequest({
username: "p2p",
password,
auth: {
type: "m.login.dummy",
},
});
console.log("dendrite: Auto-registration done ", response);
didRegister = true;
} catch (err) {
console.error("dendrite: failed to register, trying to login:", err);
response = await cli.login("m.login.password", {
identifier: {
type: "m.id.user",
user: "p2p",
},
password,
initial_device_display_name: "p2p-dendrite",
});
}
return {
userId: response.user_id,
deviceId: response.device_id,
homeserverUrl: cli.getHomeserverUrl(),
identityServerUrl: cli.getIdentityServerUrl(),
accessToken: response.access_token,
guest: cli.isGuest(),
_registered: didRegister,
};
}
export async function loadApp(fragParams: {}) {
// XXX: the way we pass the path to the worker script from webpack via html in body's dataset is a hack
// but alternatives seem to require changing the interface to passing Workers to js-sdk
@@ -139,7 +378,46 @@ export async function loadApp(fragParams: {}) {
// make sure the indexeddb script is present, so fail hard.
throw newTranslatableError(_td("Missing indexeddb worker script!"));
}
MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript);
// MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript);
// load dendrite, if available
const vectorDendriteWorkerScript = document.body.dataset.vectorDendriteWorkerScript;
if (vectorDendriteWorkerScript && 'serviceWorker' in navigator) {
console.log("dendrite code exec... ", document.readyState);
const loadDendriteSw = () => {
console.log("Registering dendrite sw...", vectorDendriteWorkerScript);
console.log("swjs: invoke navigator.serviceWorker.register");
navigator.serviceWorker.register(vectorDendriteWorkerScript, { scope: "/" }).then(function(registration) {
console.log("swjs: navigator.serviceWorker.register resolved", registration);
// Registration was successful
console.log('ServiceWorker sw.js registration successful with scope: ', registration.scope);
// periodically check for updates
setInterval(function() {
console.log("swjs invoke registration.update");
registration.update();
}, 1000 * 60 * 30); // once every 30 minutes
}, (err) => {
// registration failed :(
console.log('dendrite: ServiceWorker registration failed: ', err);
});
// First, do a one-off check if there's currently a
// service worker in control.
if (navigator.serviceWorker.controller) {
console.log('dendrite: This page is currently controlled by:', navigator.serviceWorker.controller);
}
// Then, register a handler to detect when a new or
// updated service worker takes control.
navigator.serviceWorker.oncontrollerchange = function() {
console.log('dendrite: This page is now controlled by:', navigator.serviceWorker.controller);
};
};
if (document.readyState === "loading") {
window.addEventListener('DOMContentLoaded', loadDendriteSw);
} else {
loadDendriteSw();
}
}
window.addEventListener('hashchange', onHashChange);
@@ -257,12 +535,12 @@ async function verifyServerConfig() {
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) {
const {hsUrl, isUrl, userId} = await Lifecycle.getStoredSessionVars();
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {
console.error(e);
console.warn("A session was found - suppressing config error and using the session's homeserver");
console.log("Using pre-existing hsUrl and isUrl: ", {hsUrl, isUrl});
console.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
} else {
// the user is not logged in, so scream
@@ -277,7 +555,7 @@ async function verifyServerConfig() {
// Add the newly built config to the actual config for use by the app
console.log("Updating SdkConfig with validated discovery information");
SdkConfig.add({"validated_server_config": validatedConfig});
SdkConfig.add({ "validated_server_config": validatedConfig });
return SdkConfig.get();
}

279
src/vector/dendrite-sw.js Normal file
View File

@@ -0,0 +1,279 @@
// Copyright 2020 The Matrix.org Foundation C.I.C.
// Copyright 2020 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Dendrite Service Worker version
// Bumping the patch version of this has no side-effects.
// Bumping the minor version of this will delete databases.
const version = "0.2.0";
const isVersionBump = function(oldVer, newVer) {
oldVer = oldVer || "";
const newSegments = newVer.split(".");
const oldSegments = oldVer.split(".");
if (oldSegments.length != 3) {
return true; // brand new
}
return newSegments[1] > oldSegments[1];
}
const bundle_path = self.location.href.replace("/dendrite_sw.js", "")
const id = Math.random();
console.log("swjs: ", id," dendrite-sw.js file running...")
self.registration.addEventListener('updatefound', () => {
console.log("swjs: ", id," updatefound registration event fired")
const newWorker = self.registration.installing;
if (!newWorker) {
console.log("swjs: ", id," updatefound registration event fired, no installing worker")
return;
}
newWorker.addEventListener('statechange', () => {
console.log("swjs: ", id," worker statechange: ", newWorker.state)
});
})
self.importScripts(`${bundle_path}/wasm_exec.js`,
`${bundle_path}/sqlitejs.js`,
`${bundle_path}/localforage.js`);
let isWriting = false;
async function writeDatabasesToIndexedDB() {
while (true) {
await sleep(1000 * 30);
try {
await syncfs(false);
}
catch (err) {
console.error("syncfs: failed to write to IDB:", err);
}
}
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function syncfs(isStartup) {
return new Promise((resolve, reject) => {
global._go_sqlite.FS.syncfs(isStartup, function(err) {
if (err) {
console.error("syncfs failed:", err);
reject(err);
return;
}
console.log("syncfs OK");
resolve();
});
});
}
function deleteDatabase(name) {
return new Promise(function(resolve, reject) {
const req = indexedDB.deleteDatabase(name);
req.onsuccess = function () {
console.log("Deleted database successfully: ", name);
resolve();
};
req.onerror = function (event) {
console.log("Couldn't delete database: ", name, event);
reject(new Error("failed to delete database"));
};
});
}
async function initDendrite() {
console.log(`dendrite-sw.js: v${version} SW init`)
// check if we need to purge databases (minor version bump)
const prevVer = await global.localforage.getItem("dendrite_version")
if (prevVer != version) {
const nukeDatabase = isVersionBump(prevVer, version);
console.log(`dendrite-sw.js: previous ver ${prevVer} current ${version} nuke databases: ${nukeDatabase}`);
if (nukeDatabase) {
await deleteDatabase("/idb");
}
}
global.process = {
pid: 1,
env: {
DEBUG: "*",
}
};
// we do this for prometheus so it doesn't panic on init()
global.fs.stat = function(path, cb) {
cb({
code: "EINVAL",
});
}
const config = {
locateFile: filename => `${bundle_path}/../../sql-wasm.wasm`
}
const go = new Go();
await sqlitejs.init(config);
// periodically write databases to disk
if (!isWriting) {
isWriting = true;
// have to do this before we start dendrite for hopefully obvious reasons...
console.log("syncfs", global._go_sqlite.IDBFS);
global._go_sqlite.FS.mkdir("/idb");
//global._go_sqlite.FS.unmount("/");
console.log("syncfs at /idb mkdir ok");
global._go_sqlite.FS.mount(global._go_sqlite.IDBFS, {}, "/idb");
console.log("syncfs mounted");
await syncfs(true); // load from IDB
writeDatabasesToIndexedDB();
}
console.log(`dendrite-sw.js: v${version} starting dendrite.wasm...`)
const result = await WebAssembly.instantiateStreaming(fetch(`${bundle_path}/../../dendrite.wasm`), go.importObject)
go.run(result.instance).then(() => {
console.log(`dendrite-sw.js: v${version} dendrite.wasm terminated, restarting...`);
// purge databases and p2p nodes.
global._go_js_server = undefined;
global._go_sqlite_dbs.clear();
initDendritePromise = initDendrite();
});
// make fetch calls go through this sw - notably if a page registers a sw, it does NOT go through any sw by default
// unless you refresh or call this function.
console.log(`dendrite-sw.js: v${version} claiming open browser tabs`)
console.log("swjs: ", id," invoke self.clients.claim()")
self.clients.claim();
let serverIsUp = false;
for (let i = 0; i < 30; i++) { // 3s
if (global._go_js_server) {
console.log("swjs: ", id," init dendrite promise resolving");
serverIsUp = true;
break;
}
await sleep(100);
}
if (!serverIsUp) {
throw new Error("Timed out waiting for _go_js_server to be set.");
}
// persist the new version
await global.localforage.setItem("dendrite_version", version);
}
let initDendritePromise = initDendrite();
self.addEventListener('install', function(event) {
console.log("swjs: ", id," install event fired:", event)
console.log(`dendrite-sw.js: v${version} SW install`)
// Tell the browser to kill old sw's running in other tabs and replace them with this one
// This may cause spontaneous logouts.
console.log("swjs: ", id," invoke self.skipWaiting")
self.skipWaiting();
})
self.addEventListener('activate', function(event) {
console.log("swjs: ", id," activate event fired")
console.log(`dendrite-sw.js: v${version} SW activate`)
event.waitUntil(initDendritePromise)
})
async function sendRequestToGo(event) {
await initDendritePromise; // this sets the global fetch listener
if (!global._go_js_server || !global._go_js_server.fetch) {
console.log(`dendrite-sw.js: v${version} no fetch listener present for ${event.request.url}`);
return
}
console.log(`dendrite-sw.js: v${version} forwarding ${event.request.url} to Go`);
const req = event.request
let reqHeaders = ''
if (req.headers) {
for (const header of req.headers) {
// FIXME: is this a safe header encoding?
reqHeaders += `${header[0]}: ${header[1]}\n`
}
}
let jj = null;
if (req.method === "POST" || req.method === "PUT") {
jj = await req.json();
jj = JSON.stringify(jj);
reqHeaders += `Content-Length: ${new Blob([jj]).size}`; // include utf-8 chars properly
}
if (reqHeaders.length > 0) {
reqHeaders = `\r\n${reqHeaders}`
}
// Replace the timeout value for /sync calls to be 20s not 30s because Firefox
// will aggressively cull service workers after a 30s idle period. Chrome doesn't.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1378587
const fullurl = req.url.replace("timeout=30000", "timeout=20000");
const reqString = `${req.method} ${fullurl} HTTP/1.0${reqHeaders}\r\n\r\n${jj ? jj : ''}`
const res = await global._go_js_server.fetch(reqString)
if (res.error) {
console.error(`dendrite-sw.js: v${version} Error for request: ${event.request.url} => ${res.error}`)
return
}
const respString = res.result;
const m = respString.match(/^(HTTP\/1.[01]) ((.*?) (.*?))(\r\n([^]*?)?(\r\n\r\n([^]*?)))?$/)
if (!m) {
console.warn("couldn't parse resp", respString);
return;
}
const response = {
"proto": m[1],
"status": m[2],
"statusCode": parseInt(m[3]),
"headers": m[6],
"body": m[8],
}
const respHeaders = new Headers()
const headerLines = response.headers.split('\r\n')
for (const headerLine of headerLines) {
// FIXME: is this safe header parsing? Do we need to worry about line-wrapping?
const match = headerLine.match(/^(.+?): *(.*?)$/)
if (match) {
respHeaders.append(match[1], match[2])
}
else {
console.log("couldn't parse headerLine ", headerLine)
}
}
return new Response(response.body, {
status: response.statusCode,
headers: respHeaders,
})
}
self.addEventListener('fetch', function(event) {
event.respondWith((async () => {
/*
// If this is a page refresh for the current page, then shunt in the new sw
// https://github.com/w3c/ServiceWorker/issues/1238
if (event.request.mode === "navigate" && event.request.method === "GET" && registration.waiting && (await clients.matchAll()).length < 2) {
console.log("Forcing new sw.js into page")
registration.waiting.postMessage('skipWaiting');
return new Response("", {headers: {"Refresh": "0"}});
} */
if (event.request.url.match(/\/_matrix\/client/)) {
return await sendRequestToGo(event);
}
else {
return fetch(event.request);
}
})());
})

BIN
src/vector/dendrite.wasm Executable file

Binary file not shown.

View File

@@ -55,7 +55,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
resolve({});
}
}
reject({err: err, response: response});
reject({ err: err, response: response });
return;
}
@@ -65,7 +65,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
// loading from the filesystem (see above).
resolve(JSON.parse(body));
} catch (e) {
reject({err: e});
reject({ err: e });
}
},
);

View File

@@ -22,7 +22,7 @@
<meta name="msapplication-TileImage" content="<%= require('../../res/vector-icons/mstile-150.png') %>">
<meta name="msapplication-config" content="<%= require('../../res/vector-icons/browserconfig.xml') %>">
<meta name="theme-color" content="#ffffff">
<meta property="og:image" content="<%= htmlWebpackPlugin.options.vars.og_image_url %>" />
<meta property="og:image" content="<%= og_image_url %>" />
<meta http-equiv="Content-Security-Policy" content="
default-src 'none';
style-src 'self' 'unsafe-inline';
@@ -35,7 +35,6 @@
worker-src 'self';
frame-src * blob: data:;
form-action 'self';
object-src 'self';
manifest-src 'self';
">
<% for (var i=0; i < htmlWebpackPlugin.files.css.length; i++) {
@@ -49,11 +48,25 @@
<link rel="stylesheet" href="<%= file %>">
<% }
} %>
<% for (var i=0; i < htmlWebpackPlugin.tags.headTags.length; i++) {
var tag = htmlWebpackPlugin.tags.headTags[i];
var path = tag.attributes && tag.attributes.href;
if (path.indexOf("Inter") !== -1) { %>
<link rel="preload" as="font" href="<%= path %>" crossorigin="anonymous"/>
<% }
} %>
</head>
<body style="height: 100%; margin: 0;" data-vector-indexeddb-worker-script="<%= htmlWebpackPlugin.files.chunks['indexeddb-worker'].entry %>">
<body
style="height: 100%; margin: 0;"
data-vector-indexeddb-worker-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("indexeddb-worker.js")) %>"
data-vector-recorder-worklet-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("recorder-worklet.js")) %>"
data-vector-dendrite-worker-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("dendrite_sw.js")) %>"
>
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<section id="matrixchat" style="height: 100%; overflow: auto;" class="notranslate"></section>
<script src="<%= htmlWebpackPlugin.files.chunks['bundle'].entry %>"></script>
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
<script src="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("bundle.js")) %>"></script>
<!-- Legacy supporting Prefetch images -->
<img src="<%= require('matrix-react-sdk/res/img/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>

View File

@@ -26,7 +26,7 @@ require('highlight.js/styles/github.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.
import {parseQsFromFragment} from "./url_utils";
import { parseQsFromFragment } from "./url_utils";
import './modernizr';
async function settled(...promises: Array<Promise<any>>) {
@@ -51,6 +51,9 @@ function checkBrowserFeatures() {
// ES2018: http://262.ecma-international.org/9.0/#sec-promise.prototype.finally
window.Modernizr.addTest("promiseprototypefinally", () =>
typeof window.Promise?.prototype?.finally === "function");
// ES2020: http://262.ecma-international.org/#sec-promise.allsettled
window.Modernizr.addTest("promiseallsettled", () =>
typeof window.Promise?.allSettled === "function");
// ES2018: https://262.ecma-international.org/9.0/#sec-get-regexp.prototype.dotAll
window.Modernizr.addTest("regexpdotall", () => (
window.RegExp?.prototype &&

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import {IndexedDBStoreWorker} from 'matrix-js-sdk/src/indexeddb-worker.js';
import { IndexedDBStoreWorker } from 'matrix-js-sdk/src/indexeddb-worker.js';
const remoteWorker = new IndexedDBStoreWorker(postMessage);

View File

@@ -19,8 +19,8 @@ limitations under the License.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import olmWasmPath from "olm/olm.wasm";
import Olm from 'olm';
import olmWasmPath from "@matrix-org/olm/olm.wasm";
import Olm from '@matrix-org/olm';
import * as ReactDOM from "react-dom";
import * as React from "react";
@@ -31,10 +31,9 @@ import PWAPlatform from "./platform/PWAPlatform";
import WebPlatform from "./platform/WebPlatform";
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import {setTheme} from "matrix-react-sdk/src/theme";
import {initRageshake, initRageshakeStore} from "./rageshakesetup";
import { setTheme } from "matrix-react-sdk/src/theme";
import { initRageshake, initRageshakeStore } from "./rageshakesetup";
export const rageshakePromise = initRageshake();

View File

@@ -18,7 +18,7 @@ limitations under the License.
require("./index.scss");
import * as qs from 'querystring';
import {KJUR} from 'jsrsasign';
import { KJUR } from 'jsrsasign';
import {
IOpenIDCredentials,
IWidgetApiRequest,
@@ -138,7 +138,7 @@ let meetApi: any; // JitsiMeetExternalAPI
});
widgetApi.transport.reply(ev.detail, {}); // ack
} else {
widgetApi.transport.reply(ev.detail, {error: {message: "Conference not joined"}});
widgetApi.transport.reply(ev.detail, { error: { message: "Conference not joined" } });
}
},
);
@@ -168,7 +168,7 @@ function switchVisibleContainers() {
*/
function createJWTToken() {
// Header
const header = {alg: 'HS256', typ: 'JWT'};
const header = { alg: 'HS256', typ: 'JWT' };
// Payload
const payload = {
// As per Jitsi token auth, `iss` needs to be set to something agreed between

View File

@@ -1,4 +1,4 @@
import {getVectorConfig} from '../getconfig';
import { getVectorConfig } from '../getconfig';
function onBackToElementClick() {
// Cookie should expire in 4 hours

View File

@@ -17,36 +17,45 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import VectorBasePlatform from './VectorBasePlatform';
import {UpdateCheckStatus} from "matrix-react-sdk/src/BasePlatform";
import { UpdateCheckStatus } from "matrix-react-sdk/src/BasePlatform";
import BaseEventIndexManager, {
CrawlerCheckpoint,
EventAndProfile,
IndexStats,
MatrixEvent,
MatrixProfile,
SearchArgs,
SearchResult,
ICrawlerCheckpoint,
IEventAndProfile,
IIndexStats,
IMatrixEvent,
IMatrixProfile,
ISearchArgs,
ISearchResult,
} from 'matrix-react-sdk/src/indexing/BaseEventIndexManager';
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
import {_t, _td} from 'matrix-react-sdk/src/languageHandler';
import { _t, _td } from 'matrix-react-sdk/src/languageHandler';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
import * as rageshake from 'matrix-react-sdk/src/rageshake/rageshake';
import {MatrixClient} from "matrix-js-sdk/src/client";
import {Room} from "matrix-js-sdk/src/models/room";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { Room } from "matrix-js-sdk/src/models/room";
import Modal from "matrix-react-sdk/src/Modal";
import InfoDialog from "matrix-react-sdk/src/components/views/dialogs/InfoDialog";
import Spinner from "matrix-react-sdk/src/components/views/elements/Spinner";
import {Categories, Modifiers, registerShortcut} from "matrix-react-sdk/src/accessibility/KeyboardShortcuts";
import {Key} from "matrix-react-sdk/src/Keyboard";
import {
Categories,
CMD_OR_CTRL,
DIGITS,
Modifiers,
registerShortcut,
} from "matrix-react-sdk/src/accessibility/KeyboardShortcuts";
import { isOnlyCtrlOrCmdKeyEvent, Key } from "matrix-react-sdk/src/Keyboard";
import React from "react";
import {randomString} from "matrix-js-sdk/src/randomstring";
import {Action} from "matrix-react-sdk/src/dispatcher/actions";
import {ActionPayload} from "matrix-react-sdk/src/dispatcher/payloads";
import {showToast as showUpdateToast} from "matrix-react-sdk/src/toasts/UpdateToast";
import {CheckUpdatesPayload} from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload";
import { randomString } from "matrix-js-sdk/src/randomstring";
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads";
import { SwitchSpacePayload } from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
import { showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload";
import ToastStore from "matrix-react-sdk/src/stores/ToastStore";
import GenericExpiringToast from "matrix-react-sdk/src/components/views/toasts/GenericExpiringToast";
import SettingsStore from 'matrix-react-sdk/src/settings/SettingsStore';
import VectorBasePlatform from './VectorBasePlatform';
const electron = window.electron;
const isMac = navigator.platform.toUpperCase().includes('MAC');
@@ -110,8 +119,8 @@ class SeshatIndexManager extends BaseEventIndexManager {
// TODO this should be moved into the preload.js file.
const ipcCallId = ++this.nextIpcCallId;
return new Promise((resolve, reject) => {
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
window.electron.send('seshat', {id: ipcCallId, name, args});
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
window.electron.send('seshat', { id: ipcCallId, name, args });
});
}
@@ -143,7 +152,7 @@ class SeshatIndexManager extends BaseEventIndexManager {
return this._ipcCall('initEventIndex', userId, deviceId);
}
async addEventToIndex(ev: MatrixEvent, profile: MatrixProfile): Promise<void> {
async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
return this._ipcCall('addEventToIndex', ev, profile);
}
@@ -163,31 +172,31 @@ class SeshatIndexManager extends BaseEventIndexManager {
return this._ipcCall('commitLiveEvents');
}
async searchEventIndex(searchConfig: SearchArgs): Promise<SearchResult> {
async searchEventIndex(searchConfig: ISearchArgs): Promise<ISearchResult> {
return this._ipcCall('searchEventIndex', searchConfig);
}
async addHistoricEvents(
events: [EventAndProfile],
checkpoint: CrawlerCheckpoint | null,
oldCheckpoint: CrawlerCheckpoint | null,
events: IEventAndProfile[],
checkpoint: ICrawlerCheckpoint | null,
oldCheckpoint: ICrawlerCheckpoint | null,
): Promise<boolean> {
return this._ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
}
async addCrawlerCheckpoint(checkpoint: CrawlerCheckpoint): Promise<void> {
async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
return this._ipcCall('addCrawlerCheckpoint', checkpoint);
}
async removeCrawlerCheckpoint(checkpoint: CrawlerCheckpoint): Promise<void> {
async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
}
async loadFileEvents(args): Promise<[EventAndProfile]> {
async loadFileEvents(args): Promise<IEventAndProfile[]> {
return this._ipcCall('loadFileEvents', args);
}
async loadCheckpoints(): Promise<[CrawlerCheckpoint]> {
async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
return this._ipcCall('loadCheckpoints');
}
@@ -195,7 +204,7 @@ class SeshatIndexManager extends BaseEventIndexManager {
return this._ipcCall('closeEventIndex');
}
async getStats(): Promise<IndexStats> {
async getStats(): Promise<IIndexStats> {
return this._ipcCall('getStats');
}
@@ -249,9 +258,9 @@ export default class ElectronPlatform extends VectorBasePlatform {
dis.fire(Action.ViewUserSettings);
});
electron.on('userDownloadCompleted', (ev, {path, name}) => {
electron.on('userDownloadCompleted', (ev, { path, name }) => {
const onAccept = () => {
electron.send('userDownloadOpen', {path});
electron.send('userDownloadOpen', { path });
};
ToastStore.sharedInstance().addOrReplaceToast({
@@ -270,6 +279,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
// register OS-specific shortcuts
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
modifiers: [CMD_OR_CTRL],
key: DIGITS,
}],
description: _td("Switch to space by number"),
});
if (isMac) {
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
@@ -309,7 +326,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this._ipcCall('getConfig');
}
onUpdateDownloaded = async (ev, {releaseNotes, releaseName}) => {
onUpdateDownloaded = async (ev, { releaseNotes, releaseName }) => {
dis.dispatch<CheckUpdatesPayload>({
action: Action.CheckUpdates,
status: UpdateCheckStatus.Ready,
@@ -480,8 +497,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
async _ipcCall(name: string, ...args: any[]): Promise<any> {
const ipcCallId = ++this.nextIpcCallId;
return new Promise((resolve, reject) => {
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
window.electron.send('ipcCall', {id: ipcCallId, name, args});
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
window.electron.send('ipcCall', { id: ipcCallId, name, args });
// Maybe add a timeout to these? Probably not necessary.
});
}
@@ -510,6 +527,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this.eventIndexManager;
}
async setLanguage(preferredLangs: string[]) {
return this._ipcCall('setLanguage', preferredLangs);
}
setSpellCheckLanguages(preferredLangs: string[]) {
this._ipcCall('setSpellCheckLanguages', preferredLangs).catch(error => {
console.log("Failed to send setSpellCheckLanguages IPC to Electron");
@@ -541,9 +562,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
}
_navigateForwardBack(back: boolean) {
private navigateForwardBack(back: boolean) {
this._ipcCall(back ? "navigateBack" : "navigateForward");
}
private navigateToSpace(num: number) {
dis.dispatch<SwitchSpacePayload>({
action: Action.SwitchSpace,
num,
});
}
onKeyDown(ev: KeyboardEvent): boolean {
let handled = false;
@@ -552,7 +579,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
case Key.SQUARE_BRACKET_LEFT:
case Key.SQUARE_BRACKET_RIGHT:
if (isMac && ev.metaKey && !ev.altKey && !ev.ctrlKey && !ev.shiftKey) {
this._navigateForwardBack(ev.key === Key.SQUARE_BRACKET_LEFT);
this.navigateForwardBack(ev.key === Key.SQUARE_BRACKET_LEFT);
handled = true;
}
break;
@@ -560,7 +587,23 @@ export default class ElectronPlatform extends VectorBasePlatform {
case Key.ARROW_LEFT:
case Key.ARROW_RIGHT:
if (!isMac && ev.altKey && !ev.metaKey && !ev.ctrlKey && !ev.shiftKey) {
this._navigateForwardBack(ev.key === Key.ARROW_LEFT);
this.navigateForwardBack(ev.key === Key.ARROW_LEFT);
handled = true;
}
break;
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "0":
if (SettingsStore.getValue("feature_spaces") && isOnlyCtrlOrCmdKeyEvent(ev)) {
this.navigateToSpace(parseInt(ev.key, 10));
handled = true;
}
break;

View File

@@ -18,8 +18,8 @@ limitations under the License.
*/
import BasePlatform from 'matrix-react-sdk/src/BasePlatform';
import {_t} from 'matrix-react-sdk/src/languageHandler';
import {getVectorConfig} from "../getconfig";
import { _t } from 'matrix-react-sdk/src/languageHandler';
import { getVectorConfig } from "../getconfig";
import Favicon from "../../favicon";

View File

@@ -17,13 +17,13 @@ limitations under the License.
*/
import VectorBasePlatform from './VectorBasePlatform';
import {UpdateCheckStatus} from "matrix-react-sdk/src/BasePlatform";
import { UpdateCheckStatus } from "matrix-react-sdk/src/BasePlatform";
import request from 'browser-request';
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
import {_t} from 'matrix-react-sdk/src/languageHandler';
import {Room} from "matrix-js-sdk/src/models/room";
import {hideToast as hideUpdateToast, showToast as showUpdateToast} from "matrix-react-sdk/src/toasts/UpdateToast";
import {Action} from "matrix-react-sdk/src/dispatcher/actions";
import { _t } from 'matrix-react-sdk/src/languageHandler';
import { Room } from "matrix-js-sdk/src/models/room";
import { hideToast as hideUpdateToast, showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
import { CheckUpdatesPayload } from 'matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload';
import UAParser from 'ua-parser-js';
@@ -37,7 +37,7 @@ export default class WebPlatform extends VectorBasePlatform {
super();
// Register service worker if available on this platform
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
// navigator.serviceWorker.register('sw.js');
}
}

22
src/vector/sqlitejs.js Normal file
View File

@@ -0,0 +1,22 @@
// Copyright 2020 The Matrix.org Foundation C.I.C.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import initSqlJs from 'sql.js'
export function init(config) {
return initSqlJs(config).then(SQL => {
global._go_sqlite = SQL;
console.log("Loaded sqlite")
})
}

626
src/vector/wasm_exec.js Normal file
View File

@@ -0,0 +1,626 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
(() => {
// Map multiple JavaScript environments to a single common API,
// preferring web standards over Node.js API.
//
// Environments considered:
// - Browsers
// - Node.js
// - Electron
// - Parcel
// - Webpack
if (typeof global !== "undefined") {
// global already exists
} else if (typeof window !== "undefined") {
window.global = window;
} else if (typeof self !== "undefined") {
self.global = self;
} else {
throw new Error("cannot export Go (neither global, window nor self is defined)");
}
if (!global.require && typeof require !== "undefined") {
global.require = require;
}
if (!global.fs && global.require) {
const fs = require("fs");
if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) {
global.fs = fs;
}
}
const enosys = () => {
const err = new Error("not implemented");
err.code = "ENOSYS";
return err;
};
if (!global.fs) {
let outputBuf = "";
global.fs = {
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
writeSync(fd, buf) {
outputBuf += decoder.decode(buf);
const nl = outputBuf.lastIndexOf("\n");
if (nl != -1) {
console.log(outputBuf.substr(0, nl));
outputBuf = outputBuf.substr(nl + 1);
}
return buf.length;
},
write(fd, buf, offset, length, position, callback) {
if (offset !== 0 || length !== buf.length || position !== null) {
callback(enosys());
return;
}
const n = this.writeSync(fd, buf);
callback(null, n);
},
chmod(path, mode, callback) { callback(enosys()); },
chown(path, uid, gid, callback) { callback(enosys()); },
close(fd, callback) { callback(enosys()); },
fchmod(fd, mode, callback) { callback(enosys()); },
fchown(fd, uid, gid, callback) { callback(enosys()); },
fstat(fd, callback) { callback(enosys()); },
fsync(fd, callback) { callback(null); },
ftruncate(fd, length, callback) { callback(enosys()); },
lchown(path, uid, gid, callback) { callback(enosys()); },
link(path, link, callback) { callback(enosys()); },
lstat(path, callback) { callback(enosys()); },
mkdir(path, perm, callback) { callback(enosys()); },
open(path, flags, mode, callback) { callback(enosys()); },
read(fd, buffer, offset, length, position, callback) { callback(enosys()); },
readdir(path, callback) { callback(enosys()); },
readlink(path, callback) { callback(enosys()); },
rename(from, to, callback) { callback(enosys()); },
rmdir(path, callback) { callback(enosys()); },
stat(path, callback) { callback(enosys()); },
symlink(path, link, callback) { callback(enosys()); },
truncate(path, length, callback) { callback(enosys()); },
unlink(path, callback) { callback(enosys()); },
utimes(path, atime, mtime, callback) { callback(enosys()); },
};
}
if (!global.process) {
global.process = {
getuid() { return -1; },
getgid() { return -1; },
geteuid() { return -1; },
getegid() { return -1; },
getgroups() { throw enosys(); },
pid: -1,
ppid: -1,
umask() { throw enosys(); },
cwd() { throw enosys(); },
chdir() { throw enosys(); },
}
}
if (!global.crypto && global.require) {
const nodeCrypto = require("crypto");
global.crypto = {
getRandomValues(b) {
nodeCrypto.randomFillSync(b);
},
};
}
if (!global.crypto) {
throw new Error("global.crypto is not available, polyfill required (getRandomValues only)");
}
if (!global.performance) {
global.performance = {
now() {
const [sec, nsec] = process.hrtime();
return sec * 1000 + nsec / 1000000;
},
};
}
if (!global.TextEncoder && global.require) {
global.TextEncoder = require("util").TextEncoder;
}
if (!global.TextEncoder) {
throw new Error("global.TextEncoder is not available, polyfill required");
}
if (!global.TextDecoder && global.require) {
global.TextDecoder = require("util").TextDecoder;
}
if (!global.TextDecoder) {
throw new Error("global.TextDecoder is not available, polyfill required");
}
// End of polyfills for common API.
const encoder = new TextEncoder("utf-8");
const decoder = new TextDecoder("utf-8");
global.Go = class {
constructor() {
this.argv = ["js"];
this.env = {};
this.exit = (code) => {
if (code !== 0) {
console.warn("exit code:", code);
}
};
this._exitPromise = new Promise((resolve) => {
this._resolveExitPromise = resolve;
});
this._pendingEvent = null;
this._scheduledTimeouts = new Map();
this._nextCallbackTimeoutID = 1;
const setInt64 = (addr, v) => {
this.mem.setUint32(addr + 0, v, true);
this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);
}
const getInt64 = (addr) => {
const low = this.mem.getUint32(addr + 0, true);
const high = this.mem.getInt32(addr + 4, true);
return low + high * 4294967296;
}
const loadValue = (addr) => {
const f = this.mem.getFloat64(addr, true);
if (f === 0) {
return undefined;
}
if (!isNaN(f)) {
return f;
}
const id = this.mem.getUint32(addr, true);
return this._values[id];
}
const storeValue = (addr, v) => {
const nanHead = 0x7FF80000;
if (typeof v === "number" && v !== 0) {
if (isNaN(v)) {
this.mem.setUint32(addr + 4, nanHead, true);
this.mem.setUint32(addr, 0, true);
return;
}
this.mem.setFloat64(addr, v, true);
return;
}
if (v === undefined) {
this.mem.setFloat64(addr, 0, true);
return;
}
let id = this._ids.get(v);
if (id === undefined) {
id = this._idPool.pop();
if (id === undefined) {
id = this._values.length;
}
this._values[id] = v;
this._goRefCounts[id] = 0;
this._ids.set(v, id);
}
this._goRefCounts[id]++;
let typeFlag = 0;
switch (typeof v) {
case "object":
if (v !== null) {
typeFlag = 1;
}
break;
case "string":
typeFlag = 2;
break;
case "symbol":
typeFlag = 3;
break;
case "function":
typeFlag = 4;
break;
}
this.mem.setUint32(addr + 4, nanHead | typeFlag, true);
this.mem.setUint32(addr, id, true);
}
const loadSlice = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
return new Uint8Array(this._inst.exports.mem.buffer, array, len);
}
const loadSliceOfValues = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
const a = new Array(len);
for (let i = 0; i < len; i++) {
a[i] = loadValue(array + i * 8);
}
return a;
}
const loadString = (addr) => {
const saddr = getInt64(addr + 0);
const len = getInt64(addr + 8);
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
}
const timeOrigin = Date.now() - performance.now();
this.importObject = {
go: {
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported
// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).
// This changes the SP, thus we have to update the SP used by the imported function.
// func wasmExit(code int32)
"runtime.wasmExit": (sp) => {
sp >>>= 0;
const code = this.mem.getInt32(sp + 8, true);
this.exited = true;
delete this._inst;
delete this._values;
delete this._goRefCounts;
delete this._ids;
delete this._idPool;
this.exit(code);
},
// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)
"runtime.wasmWrite": (sp) => {
sp >>>= 0;
const fd = getInt64(sp + 8);
const p = getInt64(sp + 16);
const n = this.mem.getInt32(sp + 24, true);
fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));
},
// func resetMemoryDataView()
"runtime.resetMemoryDataView": (sp) => {
sp >>>= 0;
this.mem = new DataView(this._inst.exports.mem.buffer);
},
// func nanotime1() int64
"runtime.nanotime1": (sp) => {
sp >>>= 0;
setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);
},
// func walltime1() (sec int64, nsec int32)
"runtime.walltime1": (sp) => {
sp >>>= 0;
const msec = (new Date).getTime();
setInt64(sp + 8, msec / 1000);
this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);
},
// func scheduleTimeoutEvent(delay int64) int32
"runtime.scheduleTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this._nextCallbackTimeoutID;
this._nextCallbackTimeoutID++;
this._scheduledTimeouts.set(id, setTimeout(
() => {
this._resume();
while (this._scheduledTimeouts.has(id)) {
// for some reason Go failed to register the timeout event, log and try again
// (temporary workaround for https://github.com/golang/go/issues/28975)
console.warn("scheduleTimeoutEvent: missed timeout event");
this._resume();
}
},
getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early
));
this.mem.setInt32(sp + 16, id, true);
},
// func clearTimeoutEvent(id int32)
"runtime.clearTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this.mem.getInt32(sp + 8, true);
clearTimeout(this._scheduledTimeouts.get(id));
this._scheduledTimeouts.delete(id);
},
// func getRandomData(r []byte)
"runtime.getRandomData": (sp) => {
sp >>>= 0;
crypto.getRandomValues(loadSlice(sp + 8));
},
// func finalizeRef(v ref)
"syscall/js.finalizeRef": (sp) => {
sp >>>= 0;
const id = this.mem.getUint32(sp + 8, true);
this._goRefCounts[id]--;
if (this._goRefCounts[id] === 0) {
const v = this._values[id];
this._values[id] = null;
this._ids.delete(v);
this._idPool.push(id);
}
},
// func stringVal(value string) ref
"syscall/js.stringVal": (sp) => {
sp >>>= 0;
storeValue(sp + 24, loadString(sp + 8));
},
// func valueGet(v ref, p string) ref
"syscall/js.valueGet": (sp) => {
sp >>>= 0;
const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 32, result);
},
// func valueSet(v ref, p string, x ref)
"syscall/js.valueSet": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));
},
// func valueDelete(v ref, p string)
"syscall/js.valueDelete": (sp) => {
sp >>>= 0;
Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));
},
// func valueIndex(v ref, i int) ref
"syscall/js.valueIndex": (sp) => {
sp >>>= 0;
storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));
},
// valueSetIndex(v ref, i int, x ref)
"syscall/js.valueSetIndex": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));
},
// func valueCall(v ref, m string, args []ref) (ref, bool)
"syscall/js.valueCall": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const m = Reflect.get(v, loadString(sp + 16));
const args = loadSliceOfValues(sp + 32);
const result = Reflect.apply(m, v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 56, result);
this.mem.setUint8(sp + 64, 1);
} catch (err) {
storeValue(sp + 56, err);
this.mem.setUint8(sp + 64, 0);
}
},
// func valueInvoke(v ref, args []ref) (ref, bool)
"syscall/js.valueInvoke": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.apply(v, undefined, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueNew(v ref, args []ref) (ref, bool)
"syscall/js.valueNew": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.construct(v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueLength(v ref) int
"syscall/js.valueLength": (sp) => {
sp >>>= 0;
setInt64(sp + 16, parseInt(loadValue(sp + 8).length));
},
// valuePrepareString(v ref) (ref, int)
"syscall/js.valuePrepareString": (sp) => {
sp >>>= 0;
const str = encoder.encode(String(loadValue(sp + 8)));
storeValue(sp + 16, str);
setInt64(sp + 24, str.length);
},
// valueLoadString(v ref, b []byte)
"syscall/js.valueLoadString": (sp) => {
sp >>>= 0;
const str = loadValue(sp + 8);
loadSlice(sp + 16).set(str);
},
// func valueInstanceOf(v ref, t ref) bool
"syscall/js.valueInstanceOf": (sp) => {
sp >>>= 0;
this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);
},
// func copyBytesToGo(dst []byte, src ref) (int, bool)
"syscall/js.copyBytesToGo": (sp) => {
sp >>>= 0;
const dst = loadSlice(sp + 8);
const src = loadValue(sp + 32);
if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
// func copyBytesToJS(dst ref, src []byte) (int, bool)
"syscall/js.copyBytesToJS": (sp) => {
sp >>>= 0;
const dst = loadValue(sp + 8);
const src = loadSlice(sp + 16);
if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
"debug": (value) => {
console.log(value);
},
}
};
}
async run(instance) {
if (!(instance instanceof WebAssembly.Instance)) {
throw new Error("Go.run: WebAssembly.Instance expected");
}
this._inst = instance;
this.mem = new DataView(this._inst.exports.mem.buffer);
this._values = [ // JS values that Go currently has references to, indexed by reference id
NaN,
0,
null,
true,
false,
global,
this,
];
this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id
this._ids = new Map([ // mapping from JS values to reference ids
[0, 1],
[null, 2],
[true, 3],
[false, 4],
[global, 5],
[this, 6],
]);
this._idPool = []; // unused ids that have been garbage collected
this.exited = false; // whether the Go program has exited
// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.
let offset = 4096;
const strPtr = (str) => {
const ptr = offset;
const bytes = encoder.encode(str + "\0");
new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);
offset += bytes.length;
if (offset % 8 !== 0) {
offset += 8 - (offset % 8);
}
return ptr;
};
const argc = this.argv.length;
const argvPtrs = [];
this.argv.forEach((arg) => {
argvPtrs.push(strPtr(arg));
});
argvPtrs.push(0);
const keys = Object.keys(this.env).sort();
keys.forEach((key) => {
argvPtrs.push(strPtr(`${key}=${this.env[key]}`));
});
argvPtrs.push(0);
const argv = offset;
argvPtrs.forEach((ptr) => {
this.mem.setUint32(offset, ptr, true);
this.mem.setUint32(offset + 4, 0, true);
offset += 8;
});
this._inst.exports.run(argc, argv);
if (this.exited) {
this._resolveExitPromise();
}
await this._exitPromise;
}
_resume() {
if (this.exited) {
throw new Error("Go program has already exited");
}
this._inst.exports.resume();
if (this.exited) {
this._resolveExitPromise();
}
}
_makeFuncWrapper(id) {
const go = this;
return function () {
const event = { id: id, this: this, args: arguments };
go._pendingEvent = event;
go._resume();
return event.result;
};
}
}
if (
typeof module !== "undefined" &&
global.require &&
global.require.main === module &&
global.process &&
global.process.versions &&
!global.process.versions.electron
) {
if (process.argv.length < 3) {
console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
process.exit(1);
}
const go = new Go();
go.argv = process.argv.slice(2);
go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env);
go.exit = process.exit;
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
process.on("exit", (code) => { // Node.js exits if no event handler is pending
if (code === 0 && !go.exited) {
// deadlock, make Go print error and stack traces
go._pendingEvent = { id: 0 };
go._resume();
}
});
return go.run(result.instance);
}).catch((err) => {
console.error(err);
process.exit(1);
});
}
})();

View File

@@ -1,9 +1,11 @@
/* eslint-disable quote-props */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const webpack = require("webpack");
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png';
@@ -46,12 +48,27 @@ module.exports = (env, argv) => {
return {
...development,
node: {
// Mock out the NodeFS module: The opus decoder imports this wrongly.
// Also needed by sql.js in P2P mode.
fs: 'empty',
},
entry: {
"bundle": "./src/vector/index.ts",
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
"mobileguide": "./src/vector/mobile_guide/index.js",
"jitsi": "./src/vector/jitsi/index.ts",
"usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js",
"recorder-worklet": "./node_modules/matrix-react-sdk/src/voice/RecorderWorklet.ts",
// P2P
"dendrite_sw": "./src/vector/dendrite-sw.js",
"sqlitejs": "./src/vector/sqlitejs.js",
"localforage": "./node_modules/localforage/dist/localforage.min.js",
"sql_wasm": "./node_modules/sql.js/dist/sql-wasm.wasm",
"dendrite_wasm": "./src/vector/dendrite.wasm",
"wasm_exec": "./src/vector/wasm_exec.js",
// CSS themes
"theme-legacy": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss",
@@ -136,11 +153,11 @@ module.exports = (env, argv) => {
// overflows (https://github.com/webpack/webpack/issues/1721), and
// there is no need for webpack to parse them - they can just be
// included as-is.
/highlight\.js[\\\/]lib[\\\/]languages/,
/highlight\.js[\\/]lib[\\/]languages/,
// olm takes ages for webpack to process, and it's already heavily
// optimised, so there is little to gain by us uglifying it.
/olm[\\\/](javascript[\\\/])?olm\.js$/,
/olm[\\/](javascript[\\/])?olm\.js$/,
],
rules: [
{
@@ -243,7 +260,7 @@ module.exports = (env, argv) => {
require("postcss-easings")(),
require("postcss-strip-inline-comments")(),
require("postcss-hexrgba")(),
require("postcss-calc")({warnWhenCannotResolve: true}),
require("postcss-calc")(),
// It's important that this plugin is last otherwise we end
// up with broken CSS.
@@ -260,7 +277,9 @@ module.exports = (env, argv) => {
loader: "file-loader",
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
options: {
name: '[name].[hash:7].[ext]',
// fixme: reintroduce [hash] once we can figure out how to pass it into the
// dendrite service worker nicely
name: '[name].[ext]',
outputPath: '.',
},
},
@@ -276,6 +295,43 @@ module.exports = (env, argv) => {
outputPath: '.',
},
},
{
// This is from the same place as the encoderWorker above, but only needed
// for Safari support.
test: /decoderWorker\.min\.js$/,
loader: "file-loader",
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
options: {
// We deliberately override the name so it makes sense in debugging
name: 'opus-decoderWorker.min.[hash:7].[ext]',
outputPath: '.',
},
},
{
// This is from the same place as the encoderWorker above, but only needed
// for Safari support.
test: /decoderWorker\.min\.wasm$/,
loader: "file-loader",
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
options: {
// We deliberately don't change the name because the decoderWorker has this
// hardcoded. This is here to avoid the default wasm rule from adding a hash.
name: 'decoderWorker.min.wasm',
outputPath: '.',
},
},
{
// This is from the same place as the encoderWorker above, but only needed
// for Safari support.
test: /waveWorker\.min\.js$/,
loader: "file-loader",
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
options: {
// We deliberately override the name so it makes sense in debugging
name: 'wave-encoderWorker.min.[hash:7].[ext]',
outputPath: '.',
},
},
{
// cache-bust languages.json file placed in
// element-web/webapp/i18n during build by copy-res.js
@@ -342,8 +398,8 @@ module.exports = (env, argv) => {
// of the themes and which chunks we actually care about.
inject: false,
excludeChunks: ['mobileguide', 'usercontent', 'jitsi'],
minify: argv.mode === 'production',
vars: {
minify: false,
templateParameters: {
og_image_url: ogImageUrl,
},
}),
@@ -352,7 +408,7 @@ module.exports = (env, argv) => {
new HtmlWebpackPlugin({
template: './src/vector/jitsi/index.html',
filename: 'jitsi.html',
minify: argv.mode === 'production',
minify: false,
chunks: ['jitsi'],
}),
@@ -360,7 +416,7 @@ module.exports = (env, argv) => {
new HtmlWebpackPlugin({
template: './src/vector/mobile_guide/index.html',
filename: 'mobile_guide/index.html',
minify: argv.mode === 'production',
minify: false,
chunks: ['mobileguide'],
}),
@@ -368,13 +424,13 @@ module.exports = (env, argv) => {
new HtmlWebpackPlugin({
template: './src/vector/static/unable-to-load.html',
filename: 'static/unable-to-load.html',
minify: argv.mode === 'production',
minify: false,
chunks: [],
}),
new HtmlWebpackPlugin({
template: './src/vector/static/incompatible-browser.html',
filename: 'static/incompatible-browser.html',
minify: argv.mode === 'production',
minify: false,
chunks: [],
}),
@@ -382,10 +438,14 @@ module.exports = (env, argv) => {
new HtmlWebpackPlugin({
template: './node_modules/matrix-react-sdk/src/usercontent/index.html',
filename: 'usercontent/index.html',
minify: argv.mode === 'production',
minify: false,
chunks: ['usercontent'],
}),
new HtmlWebpackInjectPreload({
files: [{ match: /.*Inter.*\.woff2$/ }],
}),
...additionalPlugins,
],
@@ -401,6 +461,8 @@ module.exports = (env, argv) => {
// chunks even after the app is redeployed.
filename: "bundles/[hash]/[name].js",
chunkFilename: "bundles/[hash]/[name].js",
libraryTarget: "var",
library: "[name]",
},
// configuration for the webpack-dev-server
@@ -412,11 +474,16 @@ module.exports = (env, argv) => {
// This hides the massive list of modules.
stats: 'minimal',
headers: {
"Service-Worker-Allowed": "/",
},
// hot module replacement doesn't work (I think we'd need react-hot-reload?)
// so webpack-dev-server reloads the page on every update which is quite
// tedious in Riot since that can take a while.
hot: false,
inline: false,
writeToDisk: true,
},
};
};

1400
yarn.lock

File diff suppressed because it is too large Load Diff