Compare commits

...

163 Commits

Author SHA1 Message Date
James Salter
c4bc759996 Include posthog sentry types override
Duplicating this config from matrix-react-sdk is necessary because the element-web lint process is also type checking matrix-react-sdk
2021-08-03 07:23:31 +01:00
RiotRobot
2504c062f1 Reset matrix-react-sdk back to develop branch 2021-08-02 13:20:41 +01:00
RiotRobot
9d356aa931 Reset matrix-js-sdk back to develop branch 2021-08-02 13:20:30 +01:00
RiotRobot
17f86b4c39 Merge branch 'master' into develop 2021-08-02 13:20:18 +01:00
RiotRobot
245d13875f v1.7.34 2021-08-02 13:16:47 +01:00
RiotRobot
e7cb419902 Released js-sdk & react-sdk 2021-08-02 13:10:00 +01:00
David Baker
54b78a64b8 Changelog for v1.7.34 2021-08-02 12:58:00 +01:00
Travis Ralston
95a5a83868 Merge pull request #18166 from vector-im/travis/voice-messages/delabs
Remove voice messages labs flag docs
2021-08-02 02:02:48 -06:00
Michael Telatynski
ba5e690a38 Merge pull request #18267 from vector-im/t3chguy/fix/18266
Dismiss electron download toast when clicking Open
2021-07-29 16:11:46 +01:00
RiotRobot
37faa1caa9 v1.7.34-rc.1 2021-07-27 16:10:26 +01:00
RiotRobot
49dfa4ee6c Prepare changelog for v1.7.34-rc.1 2021-07-27 16:10:25 +01:00
RiotRobot
e6e701f5e9 Upgrade matrix-react-sdk to 3.27.0-rc.1 2021-07-27 16:07:21 +01:00
RiotRobot
c04daeaa20 Upgrade matrix-js-sdk to 12.2.0-rc.1 2021-07-27 16:06:42 +01:00
Michael Telatynski
1cffed2336 Dismiss electron download toast when clicking Open 2021-07-27 15:04:55 +01:00
David Baker
1d54312c9f Merge pull request #18260 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-07-27 13:53:54 +01:00
Funclineal
fbb7d457e7 Translated using Weblate (Catalan)
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/ca/
2021-07-27 12:47:45 +00:00
Weblate
95d63d88ee Merge branch 'origin/develop' into Weblate. 2021-07-27 08:29:01 +00:00
Dariusz Niemczyk
af70b09fd7 Merge pull request #18236 from vector-im/fix/update-eslint-config
Update ESLint config
2021-07-27 10:28:56 +02:00
Dariusz Niemczyk
9b5db05115 Update ESLint config to 0.3.4 2021-07-27 10:23:36 +02:00
a5r0n
954ade8c23 Translated using Weblate (Hebrew)
Currently translated at 94.1% (32 of 34 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/he/
2021-07-26 15:25:09 +00:00
Weblate
5688079f72 Merge branch 'origin/develop' into Weblate. 2021-07-23 17:48:06 +00:00
Michael Telatynski
c5280f0d83 Merge pull request #18207 from vector-im/t3chguy/eslint1 2021-07-23 18:48:03 +01:00
Michael Telatynski
153f6f1583 Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/eslint1 2021-07-23 18:42:24 +01:00
Michael Telatynski
940f44c6d3 manually revert bit of yarn going mad 2021-07-23 18:25:34 +01:00
Michael Telatynski
481f67514b Update matrix-org-eslint-plugin and tighten max warning limit
Whilst it is down, make the most of it!
2021-07-23 16:12:07 +01:00
Weblate
90919c20c3 Merge branch 'origin/develop' into Weblate. 2021-07-23 15:09:25 +00:00
Michael Mihai
3219cc7605 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-07-23 15:09:25 +00:00
Danial Behzadi
89128f28fa 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-07-23 15:09:25 +00:00
Travis Ralston
e0c9a6cc8e Merge pull request #18187 from vector-im/travis/voice-messages/code-cleanup-1
Update webpack path for new voice message worker location
2021-07-23 09:09:20 -06:00
Travis Ralston
5e6b791617 Update webpack path for new worker location 2021-07-22 09:26:53 -06:00
Travis Ralston
858d71218c Remove voice messages labs flag docs
For https://github.com/matrix-org/matrix-react-sdk/pull/6437
2021-07-21 18:11:06 -06:00
Weblate
2f0129425d Merge branch 'origin/develop' into Weblate. 2021-07-21 15:59:35 +00:00
David Baker
5ec0ca9175 Merge pull request #18150 from vector-im/dbkr/yarn_upgrade_210721
yarn upgrade
2021-07-21 16:59:30 +01:00
David Baker
25b15d084d yarn upgrade 2021-07-21 15:44:13 +01:00
Weblate
3840fc23bd Merge branch 'origin/develop' into Weblate. 2021-07-21 13:53:52 +00:00
Michael Telatynski
9babd7bcd8 Merge pull request #18065 from vector-im/t3chguy/eslint 2021-07-21 14:53:47 +01:00
Weblate
f64b1a9f0e Merge branch 'origin/develop' into Weblate. 2021-07-20 14:40:09 +00:00
Travis Ralston
81da85dac4 Merge pull request #18102 from libexus/translations_guide
Add the Matrix Space to the translations guide
2021-07-20 08:40:04 -06:00
Libexus
bf88906de8 Add the Matrix Space to the translations guide 2021-07-20 16:18:33 +02:00
Michael Telatynski
fba49186ed Merge branch 'develop' into t3chguy/eslint 2021-07-20 09:44:04 +01:00
Michael Telatynski
4b5b0e9244 delint 2021-07-20 09:27:12 +01:00
Michael Telatynski
7cde32ed2e Update eslint-plugin-matrix-org 2021-07-20 09:15:26 +01:00
Michael Telatynski
e136afe2eb Conform to new typescript eslint rules 2021-07-19 22:47:32 +01:00
Weblate
cdb4c88b8c Merge branch 'origin/develop' into Weblate. 2021-07-19 20:27:34 +00:00
David Baker
77edbc27f8 Merge pull request #18058 from vector-im/dbkr/upgrade_eslint_plugin_matrix_org
Update eslint-plugin-matrix-org
2021-07-19 21:27:29 +01:00
Weblate
87fedc27b1 Merge branch 'origin/develop' into Weblate. 2021-07-19 15:27:09 +00:00
RiotRobot
9d56b56116 Reset matrix-react-sdk back to develop branch 2021-07-19 16:27:02 +01:00
RiotRobot
bdb03c4490 Reset matrix-js-sdk back to develop branch 2021-07-19 16:26:51 +01:00
Weblate
b70eb4aba7 Merge branch 'origin/develop' into Weblate. 2021-07-19 15:26:45 +00:00
RiotRobot
cfa47eec00 Merge branch 'master' into develop 2021-07-19 16:26:38 +01:00
RiotRobot
d75b0b4ee8 v1.7.33 2021-07-19 16:22:37 +01:00
RiotRobot
85e1225a2c Prepare changelog for v1.7.33 2021-07-19 16:22:36 +01:00
RiotRobot
bc07d91810 Upgrade matrix-react-sdk to 3.26.0 2021-07-19 16:19:36 +01:00
RiotRobot
183cf150e8 Upgrade matrix-js-sdk to 12.1.0 2021-07-19 16:19:11 +01:00
David Baker
13efb396a9 Update eslint-plugin-matrix-org 2021-07-19 15:34:47 +01:00
Weblate
7619e35638 Merge branch 'origin/develop' into Weblate. 2021-07-19 11:53:42 +00:00
Michael Telatynski
7f735a6c6e Merge pull request #18053 from vector-im/t3chguy/fix/18032 2021-07-19 12:53:37 +01:00
Michael Telatynski
331678b913 fix edge case around event permalinks 2021-07-19 09:48:50 +01:00
Michael Telatynski
b23aad28ca Fix browser history getting stuck looping back to the same room
E.g if you click a link to room/#foo:bar?via=baz we'll redirect to room/#foo:bar and now hitting back takes you back to the ?via=baz and means you have to hit back twice without this change
2021-07-19 09:40:08 +01:00
Weblate
ebc1d01f30 Merge branch 'origin/develop' into Weblate. 2021-07-16 18:57:32 +00:00
Michael Telatynski
ae2e3e8502 Merge pull request #13138 from vector-im/t3chguy/querystring 2021-07-16 19:57:27 +01:00
Michael Telatynski
c7a935777d Fix the jitsi qs parsing, as the ? after # here is optional, unlike in EW 2021-07-16 19:37:48 +01:00
Michael Telatynski
26fef6f294 actually run the new test and remove unrelated tweak 2021-07-16 13:45:10 +01:00
Weblate
827be982b7 Merge branch 'origin/develop' into Weblate. 2021-07-16 12:26:53 +00:00
justin-cv
c3382199bf Translated using Weblate (Indonesian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/id/
2021-07-16 12:26:53 +00:00
Michael Telatynski
75e4d16462 use js-sdk decodeParams utility 2021-07-16 13:10:58 +01:00
Michael Telatynski
b03b4582c0 Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/querystring
 Conflicts:
	package.json
	src/@types/global.d.ts
	src/vector/app.tsx
	src/vector/jitsi/index.ts
	src/vector/platform/WebPlatform.ts
	yarn.lock
2021-07-16 12:45:37 +01:00
David Baker
1aa04fa83c Merge pull request #18003 from vector-im/dbkr/new_changelogs
Update PR template for new changelog generation
2021-07-15 14:12:36 +01:00
Michael Telatynski
2635fc95f4 Merge pull request #17780 from SimonBrandner/fix/space-shortcut-local/17776
Fix space shortcuts on layouts with non-English keys in the places of numbers
2021-07-15 13:59:13 +01:00
Michael Telatynski
43695fbc58 Merge branch 'develop' into fix/space-shortcut-local/17776 2021-07-15 13:53:06 +01:00
Michael Telatynski
8289d6937f Merge pull request #18006 from vector-im/t3chguy/spacesperf 2021-07-15 10:18:18 +01:00
Michael Telatynski
2877ef8fcf Fix skinning 2021-07-15 08:29:18 +01:00
Michael Telatynski
f65231268d Cache value of feature_spaces* flags as they cause page refresh so are immutable 2021-07-15 08:26:50 +01:00
Germain
bd4c6b8c6c Merge pull request #17980 from psrpinto/fix/naming
Standardise casing of identity server
2021-07-15 08:07:10 +01:00
David Baker
a0f55c9e8f Update PR template for new changelog stuff 2021-07-14 23:30:18 +01:00
David Baker
fcf1f06b31 Merge pull request #18002 from vector-im/dbkr/contributing_md
Convert CONTRIBUTING to markdown
2021-07-14 23:06:11 +01:00
David Baker
a79a05cd52 Convert CONTRIBUTING to markdown 2021-07-14 22:41:07 +01:00
Michael Telatynski
ca8cbacad7 Merge pull request #17999 from vector-im/t3chguy/ts/c4 2021-07-14 20:14:02 +01:00
Michael Telatynski
2194e4cc10 fix path to worker mock 2021-07-14 19:05:57 +01:00
Michael Telatynski
43afa4c1e0 Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/ts/c4 2021-07-14 18:57:50 +01:00
Michael Telatynski
322c957f7f ignore workers for jest tests because it disagrees with worker-loader 2021-07-14 18:56:35 +01:00
Michael Telatynski
6c476bdc0d Merge pull request #17963 from vector-im/t3chguy/ts/c3 2021-07-14 18:25:28 +01:00
Michael Telatynski
7aca548f65 Add missing stylelint dependencies and run i18n 2021-07-14 18:13:00 +01:00
Michael Telatynski
80bc659b11 Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/ts/c3
 Conflicts:
	src/vector/indexeddb-worker.ts
2021-07-14 17:50:40 +01:00
Michael Telatynski
5646f3aff8 Merge pull request #17962 from vector-im/t3chguy/ts/c2 2021-07-14 17:44:37 +01:00
RiotRobot
d58c4deebb v1.7.33-rc.1 2021-07-14 17:25:04 +01:00
RiotRobot
280e6528f1 Prepare changelog for v1.7.33-rc.1 2021-07-14 17:25:04 +01:00
RiotRobot
d4638f8825 Bump to RC versions of js-sdk and react-sdk 2021-07-14 17:20:15 +01:00
Michael Telatynski
22a25f0e95 Merge pull request #17931 from vector-im/t3chguy/ts/c1
Improve and consolidate typing
2021-07-14 17:19:10 +01:00
David Baker
b79868c57d Merge pull request #17991 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-07-14 11:51:53 +01:00
Weblate
55ca8d14bb Merge branch 'origin/develop' into Weblate. 2021-07-14 10:44:15 +00:00
Michael Telatynski
c6a8675526 Merge pull request #17990 from vector-im/revert-17927-patch-1 2021-07-14 09:41:08 +01:00
Michael Telatynski
12b93c1696 Revert "Don't run nginx as root in docker" 2021-07-14 09:40:46 +01:00
Michael Telatynski
503995270c Merge pull request #17927 from JuniorJPDJ/patch-1 2021-07-14 09:08:09 +01:00
Michael Telatynski
6155c5bea0 Merge pull request #17982 from SimonBrandner/ignore-vscode 2021-07-13 19:19:33 +01:00
Šimon Brandner
6a89d15807 Ignore vscode
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-13 20:11:56 +02:00
Paulo Pinto
0b6789c290 Standardise casing of identity server
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-13 16:19:56 +01:00
Michael Telatynski
202f3de54b Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/ts/c4 2021-07-13 15:46:28 +01:00
J. Ryan Stinnett
20e5e86f1a Merge pull request #17973 from vector-im/jryans/rm-canvas-docker-deps
Remove canvas native dependencies from Dockerfile
2021-07-13 10:17:09 +01:00
J. Ryan Stinnett
3c10bc54ba Remove canvas native dependencies from Dockerfile
As of https://github.com/vector-im/element-web/pull/17967, `canvas` is no longer
used, so we don't need install these native deps for building it on arm64.
2021-07-13 09:59:02 +01:00
Michael Telatynski
c695ae05a8 Merge pull request #17967 from vector-im/t3chguy/node-canvas 2021-07-12 21:08:43 +01:00
Michael Telatynski
609674cc17 Remove node-canvas devDependency 2021-07-12 20:51:22 +01:00
Michael Telatynski
54ebd0cca1 Fix types to match Typescripted IndexedDB store 2021-07-12 18:47:40 +01:00
Michael Telatynski
66ada58101 Use webpack worker-loader to load the IndexedDB worker instead of homegrown hack 2021-07-12 18:43:21 +01:00
J. Ryan Stinnett
e3a301054e Merge pull request #17926 from barrowsys/issue16555
Update README.md
2021-07-12 12:55:19 +01:00
Erkin Alp Güney
ad07728dfb Translated using Weblate (Turkish)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tr/
2021-07-11 17:25:03 +00:00
Percy
2f59819817 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hans/
2021-07-11 17:25:03 +00:00
Michael Telatynski
2983215dee Improve and consolidate typing 2021-07-10 15:43:48 +01:00
JuniorJPDJ
09d8ac1622 Don't run nginx as root in docker
Signed-off-by: Jacek Pruciak <git@juniorjpdj.pl>
2021-07-10 06:12:59 +02:00
Ezra Barrow
c7809ca751 Update README.md 2021-07-09 17:12:19 -04:00
HelaBasa
b6937419fb Translated using Weblate (Sinhala)
Currently translated at 45.7% (16 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/si/
2021-07-09 14:25:03 +00:00
XoseM
111021987c Translated using Weblate (Galician)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/gl/
2021-07-09 14:25:03 +00:00
Onno Ekker
ab1bea376e Translated using Weblate (Dutch)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/
2021-07-09 14:25:03 +00:00
libexus
fac72921b6 Translated using Weblate (German)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
2021-07-09 14:25:03 +00:00
Michael Telatynski
1e83c35ece Merge pull request #17921 from vector-im/t3chguy/update-modernizr
Update Modernizr and stop it from polluting classes on the html tag
2021-07-09 13:59:25 +01:00
Michael Telatynski
629630a086 Update Modernizr and stop it from polluting classes on the html tag 2021-07-09 11:49:07 +01:00
Germain
8f92a28b12 Merge pull request #17895 from SimonBrandner/ts/few-files
Convert a few files to TS
2021-07-07 15:43:41 +01:00
Germain
f6f41dc1eb Merge pull request #17902 from vector-im/gsouquet/ci-pure-lockfile
Do not generate a lockfile when running in CI
2021-07-07 15:23:29 +01:00
Germain Souquet
6e15d0f5e8 Do not generate a lockfile when running in CI 2021-07-07 16:10:40 +02:00
iaiz
ede6a33f9d Translated using Weblate (Spanish)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/es/
2021-07-07 08:34:49 +00:00
Šimon Brandner
2760a36f47 Convert a few files to TS
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-06 21:41:02 +02:00
Germain
0ed325c628 Merge pull request #17888 from vector-im/gsouquet/fix-lockfile
Fix lockfile to match listed dependencies
2021-07-06 13:43:40 +01:00
Germain Souquet
4d4e2c6230 Fix lockfile to match listed dependencies 2021-07-06 14:16:55 +02:00
a5r0n
e30e3722ae Translated using Weblate (Hebrew)
Currently translated at 94.2% (33 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/he/
2021-07-06 05:34:49 +00:00
RiotRobot
4c28a7f485 back to develop dependencies 2021-07-05 16:41:50 +01:00
RiotRobot
0b5e7da2d9 Merge branch 'master' into develop 2021-07-05 16:39:17 +01:00
RiotRobot
6d46ed8082 v1.7.32 2021-07-05 16:33:39 +01:00
RiotRobot
682247241f Prepare changelog for v1.7.32 2021-07-05 16:33:38 +01:00
RiotRobot
538837decf Upgrade matrix-react-sdk to 3.25.0 2021-07-05 16:30:38 +01:00
RiotRobot
56fbfc1648 Upgrade matrix-js-sdk to 12.0.1 2021-07-05 16:30:20 +01:00
LinAGKar
0b74d351c5 Translated using Weblate (Swedish)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sv/
2021-07-03 19:34:48 +00:00
Priit Jõerüüt
7a04b2f0c0 Translated using Weblate (Estonian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/et/
2021-07-02 17:39:53 +00:00
Besnik Bleta
949cf98c77 Translated using Weblate (Albanian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sq/
2021-07-02 17:39:53 +00:00
waclaw66
9cb8e8957c Translated using Weblate (Czech)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/cs/
2021-07-02 17:39:53 +00:00
random
2d4446fb65 Translated using Weblate (Italian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/it/
2021-07-02 17:39:52 +00:00
Jeff Huang
cae8ffb5e4 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hant/
2021-07-02 17:39:52 +00:00
Ihor Hordiichuk
f3a8930174 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/uk/
2021-07-02 17:39:52 +00:00
lvre
2dcc260afb Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/pt_BR/
2021-07-02 17:39:52 +00:00
jelv
35dd6d7521 Translated using Weblate (Dutch)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/
2021-07-02 17:39:52 +00:00
Szimszon
796d00da3e Translated using Weblate (Hungarian)
Currently translated at 100.0% (35 of 35 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/hu/
2021-07-02 17:39:52 +00:00
Germain
5e415fc949 Merge pull request #17856 from vector-im/gsouquet/message-bubbles-4635
Remove PostCSS calc() processing
2021-07-01 17:25:38 +01:00
J. Ryan Stinnett
acee86f97c Merge pull request #17691 from SimonBrandner/fix/consistent-issues
Make issue template styling more consistent and improve PR template
2021-07-01 17:20:43 +01:00
Michael Telatynski
7703108edb Merge pull request #17170 from dirkmueller/develop 2021-06-30 17:33:40 +01:00
Germain Souquet
72d762ea0d Deprecate postcss calc() 2021-06-30 17:17:27 +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
Germain Souquet
33d05678b4 Enhance security by disallowing CSP object-src rule 2021-06-28 16:47:33 +01:00
Šimon Brandner
f8da8254ce Better handling space shortcuts
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-28 15:17:26 +02:00
Šimon Brandner
76d9f26a16 Fix space shortcuts on non-English layouts
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-25 16:04:12 +02:00
Šimon Brandner
19a785ce18 And update PR template
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-18 17:26:32 +02:00
Šimon Brandner
1408bcd0e1 Make issue template styling more consistent
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-18 17:19:57 +02:00
Michael Telatynski
d5ac6d8c7e Remove spurious overflow: auto on #matrixchat element 2021-06-14 22:07:41 +01: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
Michael Telatynski
078d6a0d98 remove dependency on url
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-13 21:36:49 +01:00
Michael Telatynski
d914b13c1b remove dependency on qs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-13 21:28:23 +01:00
Michael Telatynski
6764c7e779 move urlSearchParamsToObject and global.d.ts to react-sdk
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-13 21:23:40 +01:00
Michael Telatynski
c044e1a00c fix typescript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-12 01:54:48 +01:00
Michael Telatynski
8fdb41412f Use URLSearchParams instead of transitive dependency querystring
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-12 01:45:58 +01:00
62 changed files with 2550 additions and 2860 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

@@ -12,11 +12,11 @@ that aren't relevant to your particular case.
Text between <!-- and --> marks will be invisible in the report.
-->
### Description
#### Description
Describe here the problem that you are experiencing, or the feature you are requesting.
### Steps to reproduce
#### Steps to reproduce
- For bugs, list the steps
- that reproduce the bug
@@ -30,7 +30,7 @@ file a bug here too! -->
<!-- Include screenshots if possible: you can drag and drop images below. -->
### Version information
#### Version information
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->

View File

@@ -21,11 +21,11 @@ that aren't relevant to your particular case.
Text between <!-- and --> marks will be invisible in the report.
-->
### Description
#### Description
Describe here the problem that you are experiencing, or the feature you are requesting.
### Steps to reproduce
#### Steps to reproduce
- For bugs, list the steps
- that reproduce the bug
@@ -40,7 +40,7 @@ Logs being sent: yes/no
<!-- Include screenshots if possible: you can drag and drop images below. -->
### Version information
#### Version information
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->

View File

@@ -1,3 +1,11 @@
<!-- Please read CONTRIBUTING.md before submitting your pull request -->
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md before submitting your pull request -->
<!-- Include a Sign-Off at the end of your Pull Request (as described in CONTRIBUTING.md), or on every commit -->
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md#sign-off -->
<!-- To specify text for the changelog entry (otherwise the PR title will be used):
Notes:
Changelog entries will also appear in element-desktop. For PRs that *only* affect the desktop version:
Notes: none
element-desktop notes: <notes>
-->

2
.gitignore vendored
View File

@@ -19,3 +19,5 @@ electron/pub
/src/component-index.js
/.tmp
/webpack-stats.json
.vscode
.vscode/

View File

@@ -1,9 +1,6 @@
{
"minify": true,
"classPrefix": "modernizr_",
"options": [
"setClasses"
],
"enableClasses": false,
"feature-detects": [
"test/css/animations",
"test/css/displaytable",

View File

@@ -1,3 +1,180 @@
Changes in [1.7.34](https://github.com/vector-im/element-desktop/releases/tag/v1.7.34) (2021-07-02)
===================================================================================================
## 🔒 SECURITY FIXES
* Sanitize untrusted variables from message previews before translation
Fixes vector-im/element-web#18314
## ✨ Features
* Fix editing of `<sub>` & `<sup`> & `<u>`
[\#6469](https://github.com/matrix-org/matrix-react-sdk/pull/6469)
Fixes #18211
* Zoom images in lightbox to where the cursor points
[\#6418](https://github.com/matrix-org/matrix-react-sdk/pull/6418)
Fixes #17870
* Avoid hitting the settings store from TextForEvent
[\#6205](https://github.com/matrix-org/matrix-react-sdk/pull/6205)
Fixes #17650
* Initial MSC3083 + MSC3244 support
[\#6212](https://github.com/matrix-org/matrix-react-sdk/pull/6212)
Fixes #17686 and #17661
* Navigate to the first room with notifications when clicked on space notification dot
[\#5974](https://github.com/matrix-org/matrix-react-sdk/pull/5974)
* Add matrix: to the list of permitted URL schemes
[\#6388](https://github.com/matrix-org/matrix-react-sdk/pull/6388)
* Add "Copy Link" to room context menu
[\#6374](https://github.com/matrix-org/matrix-react-sdk/pull/6374)
* 💭 Message bubble layout
[\#6291](https://github.com/matrix-org/matrix-react-sdk/pull/6291)
Fixes #4635, #17773 #16220 and #7687
* Play only one audio file at a time
[\#6417](https://github.com/matrix-org/matrix-react-sdk/pull/6417)
Fixes #17439
* Move download button for media to the action bar
[\#6386](https://github.com/matrix-org/matrix-react-sdk/pull/6386)
Fixes #17943
* Improved display of one-to-one call history with summary boxes for each call
[\#6121](https://github.com/matrix-org/matrix-react-sdk/pull/6121)
Fixes #16409
* Notification settings UI refresh
[\#6352](https://github.com/matrix-org/matrix-react-sdk/pull/6352)
Fixes #17782
* Fix EventIndex double handling events and erroring
[\#6385](https://github.com/matrix-org/matrix-react-sdk/pull/6385)
Fixes #18008
* Improve reply rendering
[\#3553](https://github.com/matrix-org/matrix-react-sdk/pull/3553)
Fixes vector-im/riot-web#9217, vector-im/riot-web#7633, vector-im/riot-web#7530, vector-im/riot-web#7169, vector-im/riot-web#7151, vector-im/riot-web#6692 vector-im/riot-web#6579 and #17440
* Improve performance of room name calculation
[\#1801](https://github.com/matrix-org/matrix-js-sdk/pull/1801)
## 🐛 Bug Fixes
* Fix browser history getting stuck looping back to the same room
[\#18053](https://github.com/vector-im/element-web/pull/18053)
* Fix space shortcuts on layouts with non-English keys in the places of numbers
[\#17780](https://github.com/vector-im/element-web/pull/17780)
Fixes #17776
* Fix CreateRoomDialog exploding when making public room outside of a space
[\#6493](https://github.com/matrix-org/matrix-react-sdk/pull/6493)
* Fix regression where registration would soft-crash on captcha
[\#6505](https://github.com/matrix-org/matrix-react-sdk/pull/6505)
Fixes #18284
* only send join rule event if we have a join rule to put in it
[\#6517](https://github.com/matrix-org/matrix-react-sdk/pull/6517)
* Improve the new download button's discoverability and interactions.
[\#6510](https://github.com/matrix-org/matrix-react-sdk/pull/6510)
* Fix voice recording UI looking broken while microphone permissions are being requested.
[\#6479](https://github.com/matrix-org/matrix-react-sdk/pull/6479)
Fixes #18223
* Match colors of room and user avatars in DMs
[\#6393](https://github.com/matrix-org/matrix-react-sdk/pull/6393)
Fixes #2449
* Fix onPaste handler to work with copying files from Finder
[\#5389](https://github.com/matrix-org/matrix-react-sdk/pull/5389)
Fixes #15536 and #16255
* Fix infinite pagination loop when offline
[\#6478](https://github.com/matrix-org/matrix-react-sdk/pull/6478)
Fixes #18242
* Fix blurhash rounded corners missing regression
[\#6467](https://github.com/matrix-org/matrix-react-sdk/pull/6467)
Fixes #18110
* Fix position of the space hierarchy spinner
[\#6462](https://github.com/matrix-org/matrix-react-sdk/pull/6462)
Fixes #18182
* Fix display of image messages that lack thumbnails
[\#6456](https://github.com/matrix-org/matrix-react-sdk/pull/6456)
Fixes #18175
* Fix crash with large audio files.
[\#6436](https://github.com/matrix-org/matrix-react-sdk/pull/6436)
Fixes #18149
* Make diff colors in codeblocks more pleasant
[\#6355](https://github.com/matrix-org/matrix-react-sdk/pull/6355)
Fixes #17939
* Show the correct audio file duration while loading the file.
[\#6435](https://github.com/matrix-org/matrix-react-sdk/pull/6435)
Fixes #18160
* Fix various timeline settings not applying immediately.
[\#6261](https://github.com/matrix-org/matrix-react-sdk/pull/6261)
Fixes #17748
* Fix issues with room list duplication
[\#6391](https://github.com/matrix-org/matrix-react-sdk/pull/6391)
Fixes #14508
* Fix grecaptcha throwing useless error sometimes
[\#6401](https://github.com/matrix-org/matrix-react-sdk/pull/6401)
Fixes #15142
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
[\#6347](https://github.com/matrix-org/matrix-react-sdk/pull/6347)
Fixes #13857 and #13334
* Respect compound emojis in default avatar initial generation
[\#6397](https://github.com/matrix-org/matrix-react-sdk/pull/6397)
Fixes #18040
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
[\#6394](https://github.com/matrix-org/matrix-react-sdk/pull/6394)
Fixes #18031
* Standardise spelling and casing of homeserver, identity server, and integration manager
[\#6365](https://github.com/matrix-org/matrix-react-sdk/pull/6365)
* Fix widgets not receiving decrypted events when they have permission.
[\#6371](https://github.com/matrix-org/matrix-react-sdk/pull/6371)
Fixes #17615
* Prevent client hangs when calculating blurhashes
[\#6366](https://github.com/matrix-org/matrix-react-sdk/pull/6366)
Fixes #17945
* Exclude state events from widgets reading room events
[\#6378](https://github.com/matrix-org/matrix-react-sdk/pull/6378)
* Cache feature_spaces\* flags to improve performance
[\#6381](https://github.com/matrix-org/matrix-react-sdk/pull/6381)
Changes in [1.7.33](https://github.com/vector-im/element-web/releases/tag/v1.7.33) (2021-07-19)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.33-rc.1...v1.7.33)
* No changes from rc.1
Changes in [1.7.33-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.33-rc.1) (2021-07-14)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.32...v1.7.33-rc.1)
* Translations update from Weblate
[\#17991](https://github.com/vector-im/element-web/pull/17991)
* Revert "Don't run nginx as root in docker"
[\#17990](https://github.com/vector-im/element-web/pull/17990)
* Don't run nginx as root in docker
[\#17927](https://github.com/vector-im/element-web/pull/17927)
* Add VS Code to gitignore
[\#17982](https://github.com/vector-im/element-web/pull/17982)
* Remove canvas native dependencies from Dockerfile
[\#17973](https://github.com/vector-im/element-web/pull/17973)
* Remove node-canvas devDependency
[\#17967](https://github.com/vector-im/element-web/pull/17967)
* Add `reskindex` to development steps
[\#17926](https://github.com/vector-im/element-web/pull/17926)
* Update Modernizr and stop it from polluting classes on the html tag
[\#17921](https://github.com/vector-im/element-web/pull/17921)
* Convert a few files to TS
[\#17895](https://github.com/vector-im/element-web/pull/17895)
* Do not generate a lockfile when running in CI
[\#17902](https://github.com/vector-im/element-web/pull/17902)
* Fix lockfile to match listed dependencies
[\#17888](https://github.com/vector-im/element-web/pull/17888)
* Remove PostCSS calc() processing
[\#17856](https://github.com/vector-im/element-web/pull/17856)
* Make issue template styling more consistent and improve PR template
[\#17691](https://github.com/vector-im/element-web/pull/17691)
* Update jsrsasign to ^10.2.0 (Includes fix for CVE-2021-30246)
[\#17170](https://github.com/vector-im/element-web/pull/17170)
* Migrate to `eslint-plugin-matrix-org`
[\#17847](https://github.com/vector-im/element-web/pull/17847)
* Remove spurious overflow: auto on #matrixchat element
[\#17647](https://github.com/vector-im/element-web/pull/17647)
* Enhance security by disallowing CSP object-src rule
[\#17818](https://github.com/vector-im/element-web/pull/17818)
Changes in [1.7.32](https://github.com/vector-im/element-web/releases/tag/v1.7.32) (2021-07-05)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.32-rc.1...v1.7.32)
* No changes from rc.1
Changes in [1.7.32-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.32-rc.1) (2021-06-29)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.31...v1.7.32-rc.1)

View File

@@ -9,10 +9,7 @@ ARG REACT_SDK_BRANCH="master"
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
ARG JS_SDK_BRANCH="master"
RUN apt-get update && apt-get install -y git dos2unix \
# These packages are required for building Canvas on architectures like Arm
# See https://www.npmjs.com/package/canvas#compiling
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
RUN apt-get update && apt-get install -y git dos2unix
WORKDIR /src

View File

@@ -298,6 +298,7 @@ cd element-web
yarn link matrix-js-sdk
yarn link matrix-react-sdk
yarn install
yarn reskindex
yarn start
```

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

@@ -125,14 +125,6 @@ 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`)
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`)
Enables UI for turning on "do not disturb" mode for the current device. When DND mode is engaged, popups

View File

@@ -8,8 +8,9 @@
## Step 0: Join #element-translations:matrix.org
1. Come and join https://matrix.to/#/#element-translations:matrix.org
2. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
1. Come and join https://matrix.to/#/#element-translations:matrix.org for general discussion
2. Join https://matrix.to/#/#element-translators:matrix.org for language-specific rooms
3. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
## Step 1: Preparing your Weblate Profile

View File

@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.7.32-rc.1",
"version": "1.7.34",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -48,7 +48,8 @@
"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 --disable-host-check",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint src",
"lint:js": "eslint --max-warnings 0 src",
"lint:js-fix": "eslint --fix src",
"lint:types": "tsc --noEmit --jsx react",
"lint:style": "stylelint 'res/css/**/*.scss'",
"test": "jest"
@@ -58,10 +59,10 @@
"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": "12.0.1-rc.1",
"matrix-react-sdk": "3.25.0-rc.1",
"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": "^17.0.2",
@@ -71,6 +72,8 @@
},
"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",
@@ -79,10 +82,8 @@
"@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",
@@ -94,19 +95,18 @@
"@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",
"chokidar": "^3.5.1",
"concurrently": "^5.3.0",
"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",
@@ -124,10 +124,9 @@
"mini-css-extract-plugin": "^0.12.0",
"minimist": "^1.2.5",
"mkdirp": "^1.0.4",
"modernizr": "^3.11.4",
"modernizr": "^3.11.7",
"node-fetch": "^2.6.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-calc": "^7.0.5",
"postcss-easings": "^2.0.0",
"postcss-extend": "^1.0.5",
"postcss-hexrgba": "^2.0.1",
@@ -143,16 +142,19 @@
"shell-escape": "^0.2.0",
"simple-proxy-agent": "^1.1.0",
"stylelint": "^13.9.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.18.0",
"terser-webpack-plugin": "^2.3.8",
"typescript": "^4.1.3",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
"webpack-dev-server": "^3.11.2",
"worker-loader": "^2.0.0"
},
"jest": {
"testEnvironment": "jest-environment-jsdom-sixteen",
"testMatch": [
"<rootDir>/test/**/*-test.js"
"<rootDir>/test/**/*-test.[tj]s"
],
"setupFilesAfterEnv": [
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
@@ -169,7 +171,9 @@
"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"
"context-filter-polyfill": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js",
"workers/(.+)\\.worker\\.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/workerMock.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!matrix-js-sdk).+$",

View File

@@ -76,7 +76,7 @@ dodep matrix-org matrix-js-sdk
pushd matrix-js-sdk
yarn link
yarn install
yarn install --pure-lockfile
popd
yarn link matrix-js-sdk
@@ -90,7 +90,7 @@ dodep matrix-org matrix-react-sdk
pushd matrix-react-sdk
yarn link
yarn link matrix-js-sdk
yarn install
yarn install --pure-lockfile
yarn reskindex
popd

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;
}
@@ -102,11 +102,11 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
'or <safariLink>Safari</safariLink> for the best experience.',
{},
{
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
'firefoxLink': (sub) => <a href="https://firefox.com">{sub}</a>,
'safariLink': (sub) => <a href="https://apple.com/safari">{sub}</a>,
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{ sub }</a>,
'firefoxLink': (sub) => <a href="https://firefox.com">{ sub }</a>,
'safariLink': (sub) => <a href="https://apple.com/safari">{ sub }</a>,
},
)}
) }
</p>
<p>
{ _t(
@@ -124,9 +124,9 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
<div className="mx_HomePage_col">
<div className="mx_HomePage_row">
<div>
{mobileHeader}
{ios}
{android}
{ mobileHeader }
{ ios }
{ android }
</div>
</div>
</div>

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">
@@ -40,9 +40,9 @@ const ErrorView: React.FC<IProps> = ({title, messages}) => {
<div className="mx_HomePage_row">
<div>
<h2 id="step1_heading">{ title }</h2>
{messages && messages.map(msg => <p key={msg}>
{ messages && messages.map(msg => <p key={msg}>
{ msg }
</p>)}
</p>) }
</div>
</div>
</div>

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) {
@@ -35,14 +35,14 @@ const VectorAuthFooter = () => {
for (const linkEntry of links) {
authFooterLinks.push(
<a href={linkEntry.url} key={linkEntry.text} target="_blank" rel="noreferrer noopener">
{linkEntry.text}
{ linkEntry.text }
</a>,
);
}
return (
<div className="mx_AuthFooter">
{authFooterLinks}
{ authFooterLinks }
<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">{ _t('Powered by Matrix') }</a>
</div>
);

View File

@@ -19,7 +19,7 @@ import React from 'react';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
export default class VectorAuthHeaderLogo extends React.PureComponent {
static replaces = 'AuthHeaderLogo'
static replaces = 'AuthHeaderLogo';
render() {
const brandingConfig = SdkConfig.get().branding;

View File

@@ -19,7 +19,7 @@ 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;

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,7 @@
"I understand the risks and wish to continue": "Entenc els riscos i vull continuar",
"Go to element.io": "Vés a element.io",
"Failed to start": "Ha fallat l'inici",
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!"
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!",
"Use %(brand)s on mobile": "Utilitza %(brand)s al mòbil",
"Switch to space by number": "Canvia d'espai per número"
}

View File

@@ -33,5 +33,6 @@
"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!",
"Use %(brand)s on mobile": "Používání %(brand)s v mobilních zařízeních"
"Use %(brand)s on mobile": "Používání %(brand)s v mobilních zařízeních",
"Switch to space by number": "Přepnout na prostor podle čísla"
}

View File

@@ -33,5 +33,6 @@
"%(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",
"Use %(brand)s on mobile": "Verwende %(brand)s am Handy"
"Use %(brand)s on mobile": "Verwende %(brand)s am Handy",
"Switch to space by number": "Zum n-ten Space wechseln"
}

View File

@@ -1,5 +1,4 @@
{
"Missing indexeddb worker script!": "Missing indexeddb worker script!",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
"Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.",
"Your Element is misconfigured": "Your Element is misconfigured",

View File

@@ -33,5 +33,6 @@
"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",
"Use %(brand)s on mobile": "Usar %(brand)s en modo móvil"
"Use %(brand)s on mobile": "Usar %(brand)s en modo móvil",
"Switch to space by number": "Cambiar a espacio por número"
}

View File

@@ -33,5 +33,6 @@
"Your browser can't run %(brand)s": "%(brand)s ei toimi sinu brauseris",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s kasutab mitmeid uusi brauseri-põhiseid tehnoloogiaid, mis ei ole veel sinu veebibrauseris toetatud.",
"Powered by Matrix": "Põhineb Matrix'il",
"Use %(brand)s on mobile": "Kasuta %(brand)s rakendust nutiseadmes"
"Use %(brand)s on mobile": "Kasuta %(brand)s rakendust nutiseadmes",
"Switch to space by number": "Vaata kogukonnakeskust tema numbri alusel"
}

View File

@@ -33,5 +33,6 @@
"Go to element.io": "برو به element.io",
"Failed to start": "مشکل در آغاز",
"Powered by Matrix": "قدرت‌گرفته از ماتریکس",
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی"
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی",
"Switch to space by number": "تغییر به فضا با شماره"
}

View File

@@ -33,5 +33,6 @@
"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",
"Use %(brand)s on mobile": "Utiliza %(brand)s no móbil"
"Use %(brand)s on mobile": "Utiliza %(brand)s no móbil",
"Switch to space by number": "Cambiar a espazo polo número"
}

View File

@@ -4,20 +4,20 @@
"Unknown device": "מכשיר לא ידוע",
"You need to be using HTTPS to place a screen-sharing call.": "עליך להשתמש ב HTTPS בכדי לבצע שיחת ווידאו משותפת.",
"Welcome to Element": "ברוכים הבאים ל Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "צ'ט מוצפן &amp; ושת\"פ נעשה ע\"י ה [matrix]",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": א'ט וכלי שיתוף פעולה מבוזר ומוצפן &amp; מופעל באמצעות [matrix]",
"Invalid JSON": "JSON לא חוקי",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "תצורה שגויה: ניתן לציין רק אחד מהבאים, default_server_config, default_server_name, או default_hs_url.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "תצורה שגויה: ניתן לציין רק אחד מהערכים הבאים, default_server_config, default_server_name, או default_hs_url.",
"Invalid configuration: no default server specified.": "תצורה שגויה: לא צוין שרת ברירת מחדל.",
"Open user settings": "פתח הגדרות משתמש",
"Go to your browser to complete Sign In": "עבור לדפדפן להמשך ההתחברות",
"Explore rooms": "שיטוט בחדרים",
"Explore rooms": "גלה חדרים",
"Create Account": "יצירת חשבון",
"Sign In": "כניסה",
"Previous/next recently visited room or community": "הבא\\קודם חדרים וקהילות שביקרתם לאחרונה",
"Open": "פתח",
"Download Completed": "ההורדה הושלמה",
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך הכנת האפליקציה. ראו קונסול לפרטים נוספים.",
"Unable to load config file: please refresh the page to try again.": "לא יכול לקרוא את קובץ ההגדרות: אנא אתחלו את הדף לנסות שנית.",
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך טעינת האפליקציה. ראו קונסול לפרטים נוספים.",
"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": "האלמנט מוגדר באופן שגוי",
"Go to element.io": "חזור לאתר הראשי: element.io",
@@ -31,6 +31,7 @@
"Powered by Matrix": "מופעל על ידי מטריקס",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s שולחן עבודה %(platformName)s",
"The message from the parser is: %(message)s": "ההודעה מהניתוח היא: %(message)s",
"Missing indexeddb worker script!": "סקריפט indexeddb worker חסר!"
"The message from the parser is: %(message)s": "ההודעה מהמנתח היא: %(message)s",
"Missing indexeddb worker script!": "סקריפט indexeddb worker חסר!",
"Switch to space by number": "עבור אל 'Space' על פי מספרו"
}

View File

@@ -33,5 +33,6 @@
"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",
"Use %(brand)s on mobile": "Mobilon használd ezt: %(brand)s"
"Use %(brand)s on mobile": "Mobilon használd ezt: %(brand)s",
"Switch to space by number": "Tér váltás számmal"
}

View File

@@ -7,5 +7,32 @@
"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!"
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!",
"Explore rooms": "Jelajahi ruang",
"Create Account": "Buat Akun",
"Switch to space by number": "Beralih ke ruang dengan nomor",
"Go to your browser to complete Sign In": "Buka browser Anda untuk menyelesaikan Masuk",
"Sign In": "Masuk",
"Failed to start": "Gagal untuk memulai",
"Go to element.io": "Buka element.io",
"I understand the risks and wish to continue": "Saya memahami risikonya dan ingin melanjutkan",
"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.": "Anda dapat lanjut menggunakan browser Anda saat ini, tetapi beberapa atau semua fitur mungkin tidak berfungsi dan tampilan serta nuansa aplikasi mungkin salah.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Mohon instal <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, atau <safariLink>Safari</safariLink> untuk pengalaman terbaik.",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s menggunakan fitur browser lanjutan yang tidak didukung oleh browser Anda saat ini.",
"Your browser can't run %(brand)s": "Browser Anda tidak bisa menjalankan %(brand)s",
"Unsupported browser": "Browser tidak didukung",
"Use %(brand)s on mobile": "Gunakan %(brand)s di ponsel",
"Powered by Matrix": "Didukung oleh Matrix",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
"Previous/next recently visited room or community": "Ruangan atau komunitas yang baru saja dikunjungi sebelum/berikutnya",
"Open user settings": "Buka pengaturan pengguna",
"Open": "Buka",
"Download Completed": "Unduh Selesai",
"Unexpected error preparing the app. See console for details.": "Kesalahan tak terduga saat menyiapkan aplikasi. Lihat konsol untuk detail.",
"Unable to load config file: please refresh the page to try again.": "Tidak bisa muat file konfigurasi: mohon segarkan halaman untuk mencoba lagi.",
"Invalid JSON": "JSON tidak valid",
"The message from the parser is: %(message)s": "Pesan dari pengurai adalah: %(message)s",
"Your Element is misconfigured": "Element Anda salah dikonfigurasi",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Konfigurasi tidak valid: hanya bisa menentukan satu dari default_server_config, default_server_name, atau default_hs_url."
}

View File

@@ -33,5 +33,6 @@
"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",
"Use %(brand)s on mobile": "Usa %(brand)s su mobile"
"Use %(brand)s on mobile": "Usa %(brand)s su mobile",
"Switch to space by number": "Passa allo spazio per numero"
}

View File

@@ -6,7 +6,7 @@
"Welcome to Element": "Welkom bij Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Gedecentraliseerd en versleuteld chatten &amp; samenwerken dankzij [matrix]",
"Sign In": "Inloggen",
"Create Account": "Registeren",
"Create Account": "Registreren",
"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.",
@@ -33,5 +33,6 @@
"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"
"Use %(brand)s on mobile": "Gebruik %(brand)s op uw mobiel",
"Switch to space by number": "Wissel naar space per nummer"
}

View File

@@ -33,5 +33,6 @@
"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"
"Use %(brand)s on mobile": "Usar %(brand)s em celular",
"Switch to space by number": "Trocar para espaço por número"
}

View File

@@ -33,5 +33,6 @@
"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."
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat.",
"Switch to space by number": "Comută spațiul folosind un număr"
}

View File

@@ -4,5 +4,15 @@
"Welcome to Element": "ඉලමන්ට් වෙත සාදරයෙන් පිළිගනිමු",
"Open": "විවෘත කරන්න",
"Powered by Matrix": "මැට්‍රික්ස් මඟින් බලගන්වා ඇත",
"Sign In": "පිවිසෙන්න"
"Sign In": "පිවිසෙන්න",
"Dismiss": "ඉවතලන්න",
"Explore rooms": "කාමර බලන්න",
"Create Account": "ගිණුමක් සාදන්න",
"Failed to start": "ඇරඹීමට අපොහොසත් විය",
"Go to element.io": "element.io වෙත යන්න",
"Your browser can't run %(brand)s": "ඔබගේ අතිරික්සුවට %(brand)s ධාවනය කළ නොහැකිය",
"Unsupported browser": "සහය නොදක්වන අතිරික්සුව කි",
"Go to your browser to complete Sign In": "පිවිසීම සම්පූර්ණ කිරීමට ඔබගේ අතිරික්සුව වෙත යන්න",
"Download Completed": "බාගැනීම සම්පූර්ණයි",
"Open user settings": "පරිශීලක සැකසුම් විවෘත කරන්න"
}

View File

@@ -33,5 +33,6 @@
"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",
"Use %(brand)s on mobile": "Përdor %(brand)s në celular"
"Use %(brand)s on mobile": "Përdor %(brand)s në celular",
"Switch to space by number": "Kalo te hapësira me numrin"
}

View File

@@ -33,5 +33,6 @@
"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.",
"Use %(brand)s on mobile": "Använd %(brand)s på mobilen"
"Use %(brand)s on mobile": "Använd %(brand)s på mobilen",
"Switch to space by number": "Byt till utrymme med nummer"
}

View File

@@ -33,5 +33,6 @@
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Masaüstü (%(platformName)s)",
"Open": "Aç",
"Missing indexeddb worker script!": "Indexeddb worker kodu eksik!",
"Use %(brand)s on mobile": "Mobilde %(brand)s kullan"
"Use %(brand)s on mobile": "Mobilde %(brand)s kullan",
"Switch to space by number": "Sayı ile belirtilen alana geç"
}

View File

@@ -33,5 +33,6 @@
"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 використовує передові властивості, які ваш браузер не підтримує.",
"Use %(brand)s on mobile": "Користуйтеся %(brand)s на мобільному"
"Use %(brand)s on mobile": "Користуйтеся %(brand)s на мобільному",
"Switch to space by number": "Перейдіть до простору за номером"
}

View File

@@ -33,5 +33,6 @@
"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 驱动",
"Use %(brand)s on mobile": "在移动设备上使用 %(brand)s"
"Use %(brand)s on mobile": "在移动设备上使用 %(brand)s",
"Switch to space by number": "按数字切换空间"
}

View File

@@ -30,8 +30,9 @@
"Open": "開啟",
"Your Element is misconfigured": "Element 配置錯誤",
"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使用的高級特性。",
"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 提供",
"Use %(brand)s on mobile": "在行動裝置上使用 %(brand)s"
"Use %(brand)s on mobile": "在行動裝置上使用 %(brand)s",
"Switch to space by number": "依數字切換至空間"
}

View File

@@ -25,17 +25,16 @@ 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 { _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 SdkConfig from "matrix-react-sdk/src/SdkConfig";
import {parseQs, parseQsFromFragment} from './url_utils';
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;
@@ -74,6 +73,14 @@ function onNewScreen(screen: string, replaceLast = false) {
const hash = '#/' + screen;
lastLocationHashSet = hash;
// if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history
if (screen.startsWith("room/") &&
window.location.hash.includes("/$") === hash.includes("/$") && // only if both did or didn't contain event link
window.location.hash.startsWith(hash)
) {
replaceLast = true;
}
if (replaceLast) {
window.location.replace(hash);
} else {
@@ -129,18 +136,6 @@ function onTokenLoginCompleted() {
}
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
const vectorIndexeddbWorkerScript = document.body.dataset.vectorIndexeddbWorkerScript;
if (!vectorIndexeddbWorkerScript) {
// If this is missing, something has probably gone wrong with
// the bundling. The js-sdk will just fall back to accessing
// indexeddb directly with no worker script, but we want to
// make sure the indexeddb script is present, so fail hard.
throw newTranslatableError(_td("Missing indexeddb worker script!"));
}
MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript);
window.addEventListener('hashchange', onHashChange);
const platform = PlatformPeg.get();
@@ -257,12 +252,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 +272,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();
}

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

@@ -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++) {
@@ -61,11 +60,10 @@
</head>
<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")) %>"
>
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<section id="matrixchat" style="height: 100%; overflow: auto;" class="notranslate"></section>
<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 -->

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>>) {

View File

@@ -14,8 +14,8 @@ 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';
const remoteWorker = new IndexedDBStoreWorker(postMessage);
const remoteWorker = new IndexedDBStoreWorker(postMessage as InstanceType<typeof Worker>["postMessage"]);
global.onmessage = remoteWorker.onMessage;

View File

@@ -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

@@ -17,8 +17,7 @@ limitations under the License.
// We have to trick webpack into loading our CSS for us.
require("./index.scss");
import * as qs from 'querystring';
import {KJUR} from 'jsrsasign';
import { KJUR } from 'jsrsasign';
import {
IOpenIDCredentials,
IWidgetApiRequest,
@@ -52,15 +51,16 @@ let meetApi: any; // JitsiMeetExternalAPI
(async function() {
try {
// The widget's options are encoded into the fragment to avoid leaking info to the server. The widget
// spec on the other hand requires the widgetId and parentUrl to show up in the regular query string.
const widgetQuery = qs.parse(window.location.hash.substring(1));
const query = Object.assign({}, qs.parse(window.location.search.substring(1)), widgetQuery);
// The widget's options are encoded into the fragment to avoid leaking info to the server.
const widgetQuery = new URLSearchParams(window.location.hash.substring(1));
// The widget spec on the other hand requires the widgetId and parentUrl to show up in the regular query string.
const realQuery = new URLSearchParams(window.location.search.substring(1));
const qsParam = (name: string, optional = false): string => {
if (!optional && (!query[name] || typeof (query[name]) !== 'string')) {
const vals = widgetQuery.has(name) ? widgetQuery.getAll(name) : realQuery.getAll(name);
if (!optional && vals.length !== 1) {
throw new Error(`Expected singular ${name} in query string`);
}
return <string>query[name];
return <string>vals[0];
};
// If we have these params, expect a widget API to be available (ie. to be in an iframe
@@ -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

@@ -326,7 +326,7 @@ body {
<a class="mx_Button" id="configure_element_button" href="#">Configure</a>
<p class="mx_Subtext mx_SubtextTop">Tap the button above, or manually enable <em>Use custom server</em> and enter:</p>
<p class="mx_Subtext">Homeserver: <em id="hs_url"></em></p>
<p class="mx_Subtext" id="custom_is">Identity Server: <em id="is_url"></em></p>
<p class="mx_Subtext" id="custom_is">Identity server: <em id="is_url"></em></p>
</div>
</div>
</div>

View File

@@ -1,19 +1,21 @@
import {getVectorConfig} from '../getconfig';
import { getVectorConfig } from '../getconfig';
function onBackToElementClick() {
function onBackToElementClick(): void {
// Cookie should expire in 4 hours
document.cookie = 'element_mobile_redirect_to_guide=false;path=/;max-age=14400';
window.location.href = '../';
}
// NEVER pass user-controlled content to this function! Hardcoded strings only please.
function renderConfigError(message) {
function renderConfigError(message: string): void {
const contactMsg = "If this is unexpected, please contact your system administrator " +
"or technical support representative.";
message = `<h2>Error loading Element</h2><p>${message}</p><p>${contactMsg}</p>`;
const toHide = document.getElementsByClassName("mx_HomePage_container");
const errorContainers = document.getElementsByClassName("mx_HomePage_errorContainer");
const errorContainers = document.getElementsByClassName(
"mx_HomePage_errorContainer",
) as HTMLCollectionOf<HTMLDialogElement>;
for (const e of toHide) {
// We have to clear the content because .style.display='none'; doesn't work
@@ -26,7 +28,7 @@ function renderConfigError(message) {
}
}
async function initPage() {
async function initPage(): Promise<void> {
document.getElementById('back_to_element_button').onclick = onBackToElementClick;
const config = await getVectorConfig('..');
@@ -92,7 +94,7 @@ async function initPage() {
if (isUrl && !isUrl.endsWith('/')) isUrl += '/';
if (hsUrl !== 'https://matrix.org/') {
document.getElementById('configure_element_button').href =
(document.getElementById('configure_element_button') as HTMLAnchorElement).href =
"https://mobile.element.io?hs_url=" + encodeURIComponent(hsUrl) +
"&is_url=" + encodeURIComponent(isUrl);
document.getElementById('step1_heading').innerHTML= '1: Install the app';

File diff suppressed because one or more lines are too long

View File

@@ -22,10 +22,7 @@ import BaseEventIndexManager, {
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';
@@ -48,12 +45,13 @@ 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 { SwitchSpacePayload} from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
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 { IMatrixProfile, IEventWithRoomId as IMatrixEvent, IResultRoomEvents } from "matrix-js-sdk/src/@types/search";
import VectorBasePlatform from './VectorBasePlatform';
@@ -112,19 +110,19 @@ class SeshatIndexManager extends BaseEventIndexManager {
constructor() {
super();
electron.on('seshatReply', this._onIpcReply);
electron.on('seshatReply', this.onIpcReply);
}
async _ipcCall(name: string, ...args: any[]): Promise<any> {
private async ipcCall(name: string, ...args: any[]): Promise<any> {
// 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 });
});
}
_onIpcReply = (ev: {}, payload: IPCPayload) => {
private onIpcReply = (ev: {}, payload: IPCPayload) => {
if (payload.id === undefined) {
console.warn("Ignoring IPC reply with no ID");
return;
@@ -145,35 +143,35 @@ class SeshatIndexManager extends BaseEventIndexManager {
};
async supportsEventIndexing(): Promise<boolean> {
return this._ipcCall('supportsEventIndexing');
return this.ipcCall('supportsEventIndexing');
}
async initEventIndex(userId: string, deviceId: string): Promise<void> {
return this._ipcCall('initEventIndex', userId, deviceId);
return this.ipcCall('initEventIndex', userId, deviceId);
}
async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
return this._ipcCall('addEventToIndex', ev, profile);
return this.ipcCall('addEventToIndex', ev, profile);
}
async deleteEvent(eventId: string): Promise<boolean> {
return this._ipcCall('deleteEvent', eventId);
return this.ipcCall('deleteEvent', eventId);
}
async isEventIndexEmpty(): Promise<boolean> {
return this._ipcCall('isEventIndexEmpty');
return this.ipcCall('isEventIndexEmpty');
}
async isRoomIndexed(roomId: string): Promise<boolean> {
return this._ipcCall('isRoomIndexed', roomId);
return this.ipcCall('isRoomIndexed', roomId);
}
async commitLiveEvents(): Promise<void> {
return this._ipcCall('commitLiveEvents');
return this.ipcCall('commitLiveEvents');
}
async searchEventIndex(searchConfig: ISearchArgs): Promise<ISearchResult> {
return this._ipcCall('searchEventIndex', searchConfig);
async searchEventIndex(searchConfig: ISearchArgs): Promise<IResultRoomEvents> {
return this.ipcCall('searchEventIndex', searchConfig);
}
async addHistoricEvents(
@@ -181,43 +179,43 @@ class SeshatIndexManager extends BaseEventIndexManager {
checkpoint: ICrawlerCheckpoint | null,
oldCheckpoint: ICrawlerCheckpoint | null,
): Promise<boolean> {
return this._ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
return this.ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
}
async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
return this._ipcCall('addCrawlerCheckpoint', checkpoint);
return this.ipcCall('addCrawlerCheckpoint', checkpoint);
}
async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
return this.ipcCall('removeCrawlerCheckpoint', checkpoint);
}
async loadFileEvents(args): Promise<IEventAndProfile[]> {
return this._ipcCall('loadFileEvents', args);
return this.ipcCall('loadFileEvents', args);
}
async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
return this._ipcCall('loadCheckpoints');
return this.ipcCall('loadCheckpoints');
}
async closeEventIndex(): Promise<void> {
return this._ipcCall('closeEventIndex');
return this.ipcCall('closeEventIndex');
}
async getStats(): Promise<IIndexStats> {
return this._ipcCall('getStats');
return this.ipcCall('getStats');
}
async getUserVersion(): Promise<number> {
return this._ipcCall('getUserVersion');
return this.ipcCall('getUserVersion');
}
async setUserVersion(version: number): Promise<void> {
return this._ipcCall('setUserVersion', version);
return this.ipcCall('setUserVersion', version);
}
async deleteEventIndex(): Promise<void> {
return this._ipcCall('deleteEventIndex');
return this.ipcCall('deleteEventIndex');
}
}
@@ -251,20 +249,23 @@ export default class ElectronPlatform extends VectorBasePlatform {
rageshake.flush();
});
electron.on('ipcReply', this._onIpcReply);
electron.on('ipcReply', this.onIpcReply);
electron.on('update-downloaded', this.onUpdateDownloaded);
electron.on('preferences', () => {
dis.fire(Action.ViewUserSettings);
});
electron.on('userDownloadCompleted', (ev, {path, name}) => {
electron.on('userDownloadCompleted', (ev, { path, name }) => {
const key = `DOWNLOAD_TOAST_${path}`;
const onAccept = () => {
electron.send('userDownloadOpen', {path});
electron.send('userDownloadOpen', { path });
ToastStore.sharedInstance().dismissToast(key);
};
ToastStore.sharedInstance().addOrReplaceToast({
key: `DOWNLOAD_TOAST_${path}`,
key,
title: _t("Download Completed"),
props: {
description: name,
@@ -319,14 +320,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
}
this._ipcCall("startSSOFlow", this.ssoID);
this.ipcCall("startSSOFlow", this.ssoID);
}
async getConfig(): Promise<{}> {
return this._ipcCall('getConfig');
return this.ipcCall('getConfig');
}
onUpdateDownloaded = async (ev, {releaseNotes, releaseName}) => {
onUpdateDownloaded = async (ev, { releaseNotes, releaseName }) => {
dis.dispatch<CheckUpdatesPayload>({
action: Action.CheckUpdates,
status: UpdateCheckStatus.Ready,
@@ -390,7 +391,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
room_id: room.roomId,
});
window.focus();
this._ipcCall('focusWindow');
this.ipcCall('focusWindow');
};
return notification;
@@ -401,7 +402,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async getAppVersion(): Promise<string> {
return this._ipcCall('getAppVersion');
return this.ipcCall('getAppVersion');
}
supportsAutoLaunch(): boolean {
@@ -409,11 +410,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async getAutoLaunchEnabled(): Promise<boolean> {
return this._ipcCall('getAutoLaunchEnabled');
return this.ipcCall('getAutoLaunchEnabled');
}
async setAutoLaunchEnabled(enabled: boolean): Promise<void> {
return this._ipcCall('setAutoLaunchEnabled', enabled);
return this.ipcCall('setAutoLaunchEnabled', enabled);
}
supportsWarnBeforeExit(): boolean {
@@ -421,11 +422,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async shouldWarnBeforeExit(): Promise<boolean> {
return this._ipcCall('shouldWarnBeforeExit');
return this.ipcCall('shouldWarnBeforeExit');
}
async setWarnBeforeExit(enabled: boolean): Promise<void> {
return this._ipcCall('setWarnBeforeExit', enabled);
return this.ipcCall('setWarnBeforeExit', enabled);
}
supportsAutoHideMenuBar(): boolean {
@@ -434,11 +435,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async getAutoHideMenuBarEnabled(): Promise<boolean> {
return this._ipcCall('getAutoHideMenuBarEnabled');
return this.ipcCall('getAutoHideMenuBarEnabled');
}
async setAutoHideMenuBarEnabled(enabled: boolean): Promise<void> {
return this._ipcCall('setAutoHideMenuBarEnabled', enabled);
return this.ipcCall('setAutoHideMenuBarEnabled', enabled);
}
supportsMinimizeToTray(): boolean {
@@ -447,15 +448,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async getMinimizeToTrayEnabled(): Promise<boolean> {
return this._ipcCall('getMinimizeToTrayEnabled');
return this.ipcCall('getMinimizeToTrayEnabled');
}
async setMinimizeToTrayEnabled(enabled: boolean): Promise<void> {
return this._ipcCall('setMinimizeToTrayEnabled', enabled);
return this.ipcCall('setMinimizeToTrayEnabled', enabled);
}
async canSelfUpdate(): Promise<boolean> {
const feedUrl = await this._ipcCall('getUpdateFeedUrl');
const feedUrl = await this.ipcCall('getUpdateFeedUrl');
return Boolean(feedUrl);
}
@@ -494,16 +495,16 @@ export default class ElectronPlatform extends VectorBasePlatform {
window.location.reload(false);
}
async _ipcCall(name: string, ...args: any[]): Promise<any> {
private 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.
});
}
_onIpcReply = (ev, payload) => {
private onIpcReply = (ev, payload) => {
if (payload.id === undefined) {
console.warn("Ignoring IPC reply with no ID");
return;
@@ -528,22 +529,22 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
async setLanguage(preferredLangs: string[]) {
return this._ipcCall('setLanguage', preferredLangs);
return this.ipcCall('setLanguage', preferredLangs);
}
setSpellCheckLanguages(preferredLangs: string[]) {
this._ipcCall('setSpellCheckLanguages', preferredLangs).catch(error => {
this.ipcCall('setSpellCheckLanguages', preferredLangs).catch(error => {
console.log("Failed to send setSpellCheckLanguages IPC to Electron");
console.error(error);
});
}
async getSpellCheckLanguages(): Promise<string[]> {
return this._ipcCall('getSpellCheckLanguages');
return this.ipcCall('getSpellCheckLanguages');
}
async getAvailableSpellCheckLanguages(): Promise<string[]> {
return this._ipcCall('getAvailableSpellCheckLanguages');
return this.ipcCall('getAvailableSpellCheckLanguages');
}
getSSOCallbackUrl(fragmentAfterLogin: string): URL {
@@ -563,7 +564,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
private navigateForwardBack(back: boolean) {
this._ipcCall(back ? "navigateBack" : "navigateForward");
this.ipcCall(back ? "navigateBack" : "navigateForward");
}
private navigateToSpace(num: number) {
dis.dispatch<SwitchSpacePayload>({
@@ -591,22 +592,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
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;
if (!handled &&
// ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
// breaks skinning as the platform is instantiated prior to the skin being loaded
SettingsStore.getValue("feature_spaces") &&
ev.code.startsWith("Digit") &&
isOnlyCtrlOrCmdKeyEvent(ev)
) {
const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit"
this.navigateToSpace(parseInt(spaceNumber, 10));
handled = true;
}
return handled;
@@ -614,7 +611,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
async getPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this._ipcCall('getPickleKey', userId, deviceId);
return await this.ipcCall('getPickleKey', userId, deviceId);
} catch (e) {
// if we can't connect to the password storage, assume there's no
// pickle key
@@ -624,7 +621,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
async createPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this._ipcCall('createPickleKey', userId, deviceId);
return await this.ipcCall('createPickleKey', userId, deviceId);
} catch (e) {
// if we can't connect to the password storage, assume there's no
// pickle key
@@ -634,7 +631,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
async destroyPickleKey(userId: string, deviceId: string): Promise<void> {
try {
await this._ipcCall('destroyPickleKey', userId, deviceId);
await this.ipcCall('destroyPickleKey', userId, deviceId);
} catch (e) {}
}
}

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";
@@ -49,7 +49,7 @@ export default abstract class VectorBasePlatform extends BasePlatform {
return this._favicon = new Favicon();
}
_updateFavicon() {
private updateFavicon() {
let bgColor = "#d00";
let notif: string | number = this.notificationCount;
@@ -64,13 +64,13 @@ export default abstract class VectorBasePlatform extends BasePlatform {
setNotificationCount(count: number) {
if (this.notificationCount === count) return;
super.setNotificationCount(count);
this._updateFavicon();
this.updateFavicon();
}
setErrorStatus(errorDidOccur: boolean) {
if (this.errorDidOccur === errorDidOccur) return;
super.setErrorStatus(errorDidOccur);
this._updateFavicon();
this.updateFavicon();
}
/**

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';
@@ -100,7 +100,7 @@ export default class WebPlatform extends VectorBasePlatform {
return notification;
}
_getVersion(): Promise<string> {
private getVersion(): Promise<string> {
// We add a cachebuster to the request to make sure that we know about
// the most recent version on the origin server. That might not
// actually be the version we'd get on a reload (particularly in the
@@ -132,7 +132,7 @@ export default class WebPlatform extends VectorBasePlatform {
if (this.runningVersion !== null) {
return Promise.resolve(this.runningVersion);
}
return this._getVersion();
return this.getVersion();
}
startUpdater() {
@@ -145,7 +145,7 @@ export default class WebPlatform extends VectorBasePlatform {
}
pollForUpdate = () => {
return this._getVersion().then((ver) => {
return this.getVersion().then((ver) => {
if (this.runningVersion === null) {
this.runningVersion = ver;
} else if (this.runningVersion !== ver) {

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import * as qs from 'querystring';
import { QueryDict, decodeParams } from "matrix-js-sdk/src/utils";
// We want to support some name / value pairs in the fragment
// so we're re-using query string like format
@@ -32,15 +32,15 @@ export function parseQsFromFragment(location: Location) {
const result = {
location: decodeURIComponent(hashparts[0]),
params: <qs.ParsedUrlQuery>{},
params: <QueryDict>{},
};
if (hashparts.length > 1) {
result.params = qs.parse(hashparts[1]);
result.params = decodeParams(hashparts[1]);
}
return result;
}
export function parseQs(location: Location) {
return qs.parse(location.search.substring(1));
export function parseQs(location: Location): QueryDict {
return decodeParams(location.search.substring(1));
}

View File

@@ -0,0 +1,50 @@
/*
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.
*/
import { parseQsFromFragment, parseQs } from "../../src/vector/url_utils";
describe("url_utils.ts", function() {
// @ts-ignore
const location: Location = {
hash: "",
search: "",
};
it("parseQsFromFragment", function() {
location.hash = "/home?foo=bar";
expect(parseQsFromFragment(location)).toEqual({
location: "home",
params: {
"foo": "bar",
},
});
});
describe("parseQs", function() {
location.search = "?foo=bar";
expect(parseQs(location)).toEqual({
"foo": "bar",
});
});
describe("parseQs with arrays", function() {
location.search = "?via=s1&via=s2&via=s2&foo=bar";
expect(parseQs(location)).toEqual({
"via": ["s1", "s2", "s2"],
"foo": "bar",
});
});
});

View File

@@ -21,7 +21,12 @@
"es2019",
"dom",
"dom.iterable"
]
],
"paths": {
"posthog-js": [
"../matrix-react-sdk/src/@types/posthog.d.ts"
]
}
},
"include": [
"./src/**/*.ts",

View File

@@ -55,11 +55,10 @@ module.exports = (env, argv) => {
entry: {
"bundle": "./src/vector/index.ts",
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
"mobileguide": "./src/vector/mobile_guide/index.js",
"mobileguide": "./src/vector/mobile_guide/index.ts",
"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",
"recorder-worklet": "./node_modules/matrix-react-sdk/src/audio/RecorderWorklet.ts",
// CSS themes
"theme-legacy": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss",
@@ -151,6 +150,10 @@ module.exports = (env, argv) => {
/olm[\\/](javascript[\\/])?olm\.js$/,
],
rules: [
{
test: /\.worker\.ts$/,
loader: "worker-loader",
},
{
test: /\.(ts|js)x?$/,
include: (f) => {
@@ -251,7 +254,6 @@ module.exports = (env, argv) => {
require("postcss-easings")(),
require("postcss-strip-inline-comments")(),
require("postcss-hexrgba")(),
require("postcss-calc")(),
// It's important that this plugin is last otherwise we end
// up with broken CSS.

4596
yarn.lock

File diff suppressed because it is too large Load Diff