Compare commits

..

271 Commits

Author SHA1 Message Date
fkwp
7784510804 Merge pull request #2218 from element-hq/renovate/docker-setup-buildx-action-digest
Update docker/setup-buildx-action digest to 0d103c3
2024-02-23 17:04:55 +01:00
renovate[bot]
20f305d50b Update docker/setup-buildx-action digest to 0d103c3 2024-02-23 15:52:38 +00:00
fkwp
eb57d6acb3 Merge pull request #2216 from element-hq/renovate/docker-setup-buildx-action-digest
Update docker/setup-buildx-action digest to 5243153
2024-02-23 11:54:21 +01:00
fkwp
041b23a49a Merge pull request #2212 from element-hq/renovate/docker-login-action-digest
Update docker/login-action digest to 5139682
2024-02-23 11:50:00 +01:00
fkwp
2c2f7e78dd Merge pull request #2213 from element-hq/renovate/docker-metadata-action-digest
Update docker/metadata-action digest to 232fc64
2024-02-23 11:49:19 +01:00
renovate[bot]
e72edc6854 Update docker/setup-buildx-action digest to 5243153 2024-02-23 10:49:09 +00:00
fkwp
10db12bb4a Merge pull request #2214 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to b3eddbb
2024-02-23 11:49:03 +01:00
fkwp
42eb4ea808 Merge pull request #2215 from element-hq/renovate/docker-setup-buildx-action-digest
Update docker/setup-buildx-action digest to 65afe61
2024-02-23 11:48:46 +01:00
renovate[bot]
b3f9d316f0 Update docker/setup-buildx-action digest to 65afe61 2024-02-23 09:12:15 +00:00
renovate[bot]
06f238b719 Update docker/metadata-action digest to 232fc64 2024-02-23 09:12:11 +00:00
renovate[bot]
a2f59bd3e1 Update docker/login-action digest to 5139682 2024-02-23 09:12:07 +00:00
renovate[bot]
23d98459e0 Update docker/build-push-action digest to b3eddbb 2024-02-23 09:12:03 +00:00
fkwp
f95b3228cc Merge pull request #2211 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to 62d8db0
2024-02-23 09:19:53 +01:00
renovate[bot]
02eb55be13 Update docker/build-push-action digest to 62d8db0 2024-02-23 01:32:59 +00:00
renovate[bot]
247cbe26d8 Update sentry-javascript monorepo to v7.102.1 (#2209)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 18:07:59 +01:00
Timo
893132470e Allow Element Call theme configuration via url. (#2203)
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-02-22 16:15:46 +01:00
Robin
78fc9bc488 Merge pull request #2207 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.108.2
2024-02-22 08:57:35 -05:00
Timo
b85a3c5f89 Update js-sdk to support SPA individual sender keys (#2206)
The js-sdk contains a fix so that encrypted messages can be received.

Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-22 14:52:52 +01:00
renovate[bot]
3652c82f73 Update dependency posthog-js to v1.108.2 2024-02-22 13:48:34 +00:00
Robin
5f5eb4ad50 Merge pull request #2204 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.108.1
2024-02-22 08:47:46 -05:00
renovate[bot]
a05abe3230 Update dependency i18next to v23.10.0 (#2205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 14:29:56 +01:00
renovate[bot]
fddbe32b07 Update dependency posthog-js to v1.108.1 2024-02-22 12:25:47 +00:00
Timo
cfb0aa5793 Add customHomeserver url Param (#2190)
* Add customHomeserver url to urlParams.

Signed-off-by: Timo K <toger5@hotmail.de>

* rename to homeserver

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-21 21:52:31 +01:00
Timo K
30b3ba302e Revert "Add theme URL param and adjust cpd theme based on it."
This reverts commit f613b17824.
2024-02-21 21:45:11 +01:00
Timo K
f613b17824 Add theme URL param and adjust cpd theme based on it.
Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-21 21:41:40 +01:00
fkwp
11457da794 Merge pull request #2202 from element-hq/renovate/livekit-client-2.x-lockfile
Update dependency livekit-client to v2.0.3
2024-02-21 21:16:50 +01:00
renovate[bot]
b811c34805 Update dependency livekit-client to v2.0.3 2024-02-21 20:12:42 +00:00
Robin
e4b012440b Merge pull request #2201 from robintown/ignore-dialog-types
Tell Renovate to ignore @react-types/dialog
2024-02-21 15:12:21 -05:00
Timo
6539c15177 Dont send register request in widget mode (#2100)
* dont register in widget mode

Signed-off-by: Timo K <toger5@hotmail.de>

* not call registerPasswordlessUser where its called in a widget.

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-21 21:07:44 +01:00
Robin
e7b93680af Tell Renovate to ignore @react-types/dialog
It's part of React Spectrum, which we're trying to avoid updating at this time because we're phasing out usage of the libraries and upgrading them is painful.
2024-02-21 15:03:38 -05:00
Robin
87df439020 Merge pull request #2197 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.102.0
2024-02-21 15:03:20 -05:00
Robin
d8385c2f6e Merge pull request #2194 from element-hq/renovate/postcss-preset-env-9.x-lockfile
Update dependency postcss-preset-env to v9.4.0
2024-02-21 15:03:01 -05:00
Robin
a0c40d250b Merge pull request #2193 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.0.2
2024-02-21 15:02:19 -05:00
Robin
ebdda59b86 Merge pull request #2184 from element-hq/renovate/sass-1.x-lockfile
Update dependency sass to v1.71.1
2024-02-21 15:01:59 -05:00
Robin
68b4714516 Merge pull request #2186 from element-hq/renovate/vitest-monorepo
Update dependency vitest to v1.3.1
2024-02-21 14:58:05 -05:00
renovate[bot]
8cec85bafb Update sentry-javascript monorepo to v7.102.0 2024-02-21 19:57:44 +00:00
renovate[bot]
a88357a0ae Update dependency postcss-preset-env to v9.4.0 2024-02-21 19:57:26 +00:00
Robin
cace73bad7 Merge pull request #2199 from element-hq/renovate/i18next-http-backend-2.x-lockfile
Update dependency i18next-http-backend to v2.5.0
2024-02-21 14:56:24 -05:00
Robin
f8ff5d83cd Merge pull request #2200 from element-hq/renovate/sentry-vite-plugin-2.x-lockfile
Update dependency @sentry/vite-plugin to v2.14.2
2024-02-21 14:56:08 -05:00
Robin
cdfa1c2bcb Merge pull request #2198 from element-hq/renovate/vector-im-compound-design-tokens-1.x-lockfile
Update dependency @vector-im/compound-design-tokens to v1.1.1
2024-02-21 14:55:40 -05:00
renovate[bot]
b8325611a0 Update dependency @sentry/vite-plugin to v2.14.2 2024-02-21 18:57:59 +00:00
renovate[bot]
f0af7e4c52 Update dependency i18next-http-backend to v2.5.0 2024-02-21 16:14:21 +00:00
renovate[bot]
30151435ea Update dependency @vector-im/compound-design-tokens to v1.1.1 2024-02-21 16:14:02 +00:00
renovate[bot]
439fdaad74 fix(deps): update dependency i18next to v23.9.0 (#2187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 15:44:25 +01:00
renovate[bot]
9d27f07414 chore(deps): update dependency vite to v5.1.4 (#2195)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 15:43:29 +01:00
Timo
21e3c606bf Improve focus switch logging (#2153)
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-02-21 15:42:52 +01:00
Timo
c4075f736f Federated room joins (#2188) 2024-02-21 15:41:59 +01:00
renovate[bot]
1dfe378700 fix(deps): update dependency @vector-im/compound-web to v3.1.2 (#2185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 15:35:46 +01:00
Robin
457941edac Merge pull request #2196 from robintown/no-semantic-commits
Tell Renovate that we don't use semantic commits
2024-02-21 09:17:36 -05:00
Timo
541830f11f rename to fit to frame (#2189)
Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-21 15:17:08 +01:00
Robin
7c9be03a7d Merge pull request #2145 from element-hq/renovate/livekit-client-2.x
Update dependency livekit-client to v2
2024-02-21 09:06:33 -05:00
Robin
160063e29a Upgrade LiveKit client 2024-02-21 09:05:05 -05:00
Robin
ddc4def65f Upgrade LiveKit Components SDK 2024-02-21 08:56:04 -05:00
Robin
f56d2cfbf4 Merge branch 'livekit' into renovate/livekit-client-2.x 2024-02-21 08:50:01 -05:00
Robin
d801360f28 Tell Renovate that we don't use semantic commits
Because the author of the vitest PR used the semantic commit naming convention, Renovate now thinks our entire repo uses semantic commits and has renamed all of its PRs.
2024-02-21 08:46:42 -05:00
renovate[bot]
0f244c12de fix(deps): update dependency posthog-js to v1.108.0 (#2192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 14:21:22 +01:00
renovate[bot]
38ceb381d4 chore(deps): update dependency sass to v1.71.1 2024-02-21 03:46:05 +00:00
renovate[bot]
997284b89a chore(deps): update dependency vitest to v1.3.1 2024-02-20 15:16:27 +00:00
Robin
353b243686 Merge pull request #2083 from robintown/gappy-sync
Remove the gappy sync hack
2024-02-20 10:15:32 -05:00
renovate[bot]
11948449d1 chore(deps): update typescript-eslint monorepo to v7.0.2 2024-02-19 18:22:32 +00:00
David Baker
5aa719565f Merge pull request #2144 from hereje/refactor/replace-jest-with-vitest
refactor: replace jest with vitest
2024-02-16 10:34:00 +00:00
Robin
c97b967b48 Fix types 2024-02-15 23:22:15 -05:00
Robin
458f7cdfb1 Format code 2024-02-15 22:34:59 -05:00
Robin
cd0d73d19e Regenerate lock file 2024-02-15 22:34:34 -05:00
Robin
f967bd1f4e Remove unused mocks 2024-02-15 22:33:17 -05:00
Angel Mendez Cano
d266432427 Merge remote-tracking branch 'upstream/livekit' into refactor/replace-jest-with-vitest 2024-02-15 18:14:23 -06:00
Angel Mendez Cano
429dad6695 chore: remove alias on vitest config file
- alias is no needed
2024-02-15 17:41:49 -06:00
Angel Mendez
964577ad3b chore: update test script
keep test script and remove
test:watch is no longer needed

Co-authored-by: Robin <robin@robin.town>
2024-02-15 17:39:37 -06:00
Angel Mendez
3bd69e26ad chore: specify test type on git workflow
specify job run unit tests

Co-authored-by: Robin <robin@robin.town>
2024-02-15 17:37:50 -06:00
Robin
3460a9cdc6 Merge pull request #2182 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to ef09cda
2024-02-15 14:20:12 -05:00
Robin
24b4e3c921 Merge pull request #2181 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.101.1
2024-02-15 14:19:59 -05:00
Robin
702d7ef905 Merge pull request #2180 from element-hq/renovate/sentry-vite-plugin-2.x-lockfile
Update dependency @sentry/vite-plugin to v2.14.1
2024-02-15 14:19:44 -05:00
Robin
556370b73a Merge pull request #2179 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.19
2024-02-15 14:18:43 -05:00
Robin
5864090101 Merge pull request #2178 from element-hq/renovate/docker-login-action-digest
Update docker/login-action digest to 83a00bc
2024-02-15 14:18:29 -05:00
Robin
a8e5a9ed99 Merge pull request #2177 from element-hq/renovate/vite-5.x-lockfile
Update dependency vite to v5.1.3
2024-02-15 14:18:15 -05:00
Robin
4e146c169e Merge pull request #2176 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.106.0
2024-02-15 14:17:57 -05:00
renovate[bot]
e218430eb0 Update dependency posthog-js to v1.106.0 2024-02-15 19:08:35 +00:00
renovate[bot]
0bf2f1afa8 Update dependency @types/node to v20.11.19 2024-02-15 19:08:17 +00:00
renovate[bot]
958c743052 Update actions/upload-artifact digest to ef09cda 2024-02-15 19:07:48 +00:00
renovate[bot]
c5507776a7 Update sentry-javascript monorepo to v7.101.1 2024-02-15 15:52:22 +00:00
renovate[bot]
024dcff426 Update dependency vite to v5.1.3 2024-02-15 15:52:10 +00:00
renovate[bot]
e241d92179 Update dependency @sentry/vite-plugin to v2.14.1 2024-02-15 15:51:50 +00:00
renovate[bot]
68829b1c2c Update docker/login-action digest to 83a00bc 2024-02-15 12:41:03 +00:00
Robin
6de6fd52b9 Merge pull request #2174 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.105.8
2024-02-13 12:22:16 -05:00
Robin
f07b10ae12 Merge pull request #2175 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.101.0
2024-02-13 12:21:37 -05:00
Robin
388d7aa63d Merge pull request #2172 from element-hq/renovate/major-typescript-eslint-monorepo
Update typescript-eslint monorepo to v7 (major)
2024-02-13 12:21:12 -05:00
renovate[bot]
4c164c131a Update sentry-javascript monorepo to v7.101.0 2024-02-13 15:37:06 +00:00
Timo
bb570b953b Fix: When clicking the "join call now" button twice two guests are registered. (#2173)
Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-13 16:36:09 +01:00
renovate[bot]
3ecddef1ca Update dependency posthog-js to v1.105.8 2024-02-13 12:34:02 +00:00
renovate[bot]
668b2d577b Update typescript-eslint monorepo to v7 2024-02-12 21:17:54 +00:00
Timo
bcd8890f0a Add crop to fit toggle to context menu. (#2107)
Signed-off-by: Timo K <toger5@hotmail.de>
2024-02-12 16:49:32 +01:00
Robin
242d2dc2bc Merge pull request #2170 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.105.7
2024-02-11 11:28:05 -05:00
renovate[bot]
ba4c5d08ce Update dependency posthog-js to v1.105.7 2024-02-11 13:58:34 +00:00
Angel Mendez Cano
bd9fbc9422 Merge remote-tracking branch 'upstream/livekit' into refactor/replace-jest-with-vitest 2024-02-09 16:22:34 -06:00
Angel Mendez Cano
b8b64c2bf8 chore: update yarn.lock file 2024-02-09 16:11:24 -06:00
Angel Mendez Cano
0aacac3def chore: replace jest job with vitest
- update job id and name
2024-02-09 11:07:43 -06:00
Angel Mendez Cano
307e91e49c chore: test script should not run on watch mode
- update test script
2024-02-09 11:03:56 -06:00
Robin
5502f588eb Fix errors 2024-02-09 11:22:36 -05:00
Robin
f9f99bf016 Merge pull request #2147 from element-hq/renovate/prettier-3.x-lockfile
Update dependency prettier to v3.2.5
2024-02-09 11:05:36 -05:00
Robin
028861cb7b Format code 2024-02-09 11:04:01 -05:00
renovate[bot]
7345665589 Update dependency livekit-client to v2 2024-02-09 16:02:50 +00:00
Robin
adcfbe111a Merge pull request #2167 from element-hq/renovate/vite-5.x-lockfile
Update dependency vite to v5.1.1
2024-02-09 11:02:22 -05:00
Robin
5c4c3b987f Merge pull request #2168 from element-hq/renovate/livekit-client-1.x
Update dependency livekit-client to v1.15.12
2024-02-09 11:02:01 -05:00
renovate[bot]
741f0cc5f7 Update dependency livekit-client to v1.15.12 2024-02-09 15:54:03 +00:00
renovate[bot]
92e0258363 Update dependency vite to v5.1.1 2024-02-09 12:26:37 +00:00
Robin
382e050933 Merge pull request #2163 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.105.6
2024-02-09 01:40:39 -05:00
Robin
b163a949f4 Merge pull request #2166 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.17
2024-02-09 01:40:22 -05:00
Robin
b726247720 Merge pull request #2164 from element-hq/renovate/vite-5.x-lockfile
Update dependency vite to v5.1.0
2024-02-09 01:40:05 -05:00
Robin
1a21e27c4f Merge pull request #2165 from element-hq/renovate/vector-im-compound-design-tokens-1.x-lockfile
Update dependency @vector-im/compound-design-tokens to v1.1.0
2024-02-09 01:39:35 -05:00
renovate[bot]
cb2a0b5886 Update dependency @types/node to v20.11.17 2024-02-08 21:09:52 +00:00
renovate[bot]
e203ac7d66 Update dependency posthog-js to v1.105.6 2024-02-08 18:56:26 +00:00
Angel Mendez
9b308f0107 Merge branch 'livekit' into refactor/replace-jest-with-vitest 2024-02-08 09:35:05 -06:00
renovate[bot]
dd4c5f3b48 Update dependency @vector-im/compound-design-tokens to v1.1.0 2024-02-08 15:13:14 +00:00
renovate[bot]
e9017c0a4d Update dependency vite to v5.1.0 2024-02-08 13:58:30 +00:00
Robin
33d6b6f387 Merge pull request #2155 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.100.1
2024-02-07 13:48:37 -05:00
Robin
a84bf7985a Merge pull request #2161 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.105.4
2024-02-07 13:48:10 -05:00
Robin
58868528ab Merge pull request #2158 from element-hq/renovate/react-i18next-14.x-lockfile
Update dependency react-i18next to v14.0.5
2024-02-07 11:40:10 -05:00
Robin
82a64de0cb Merge pull request #2159 from element-hq/renovate/vector-im-compound-web-3.x-lockfile
Update dependency @vector-im/compound-web to v3.1.1
2024-02-07 11:39:49 -05:00
renovate[bot]
70921d77a1 Update dependency @vector-im/compound-web to v3.1.1 2024-02-07 16:08:37 +00:00
renovate[bot]
bb5d8ad5be Update dependency posthog-js to v1.105.4 2024-02-07 16:08:23 +00:00
Angel Mendez
b44bf3b8c2 Merge branch 'livekit' into refactor/replace-jest-with-vitest 2024-02-07 09:34:42 -06:00
Angel Mendez Cano
f6ded35a8c refactor: update yarn.lock file 2024-02-07 09:24:27 -06:00
Angel Mendez
309d28432f Merge branch 'livekit' into refactor/replace-jest-with-vitest 2024-02-07 09:21:14 -06:00
fkwp
2f65f8311c Merge pull request #2151 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to 4c0ff1c
2024-02-07 14:49:17 +01:00
renovate[bot]
99f5a22a63 Update sentry-javascript monorepo to v7.100.1 2024-02-07 10:48:06 +00:00
Robin
30fae3d6ba Merge pull request #2157 from element-hq/renovate/eslint-plugin-unicorn-51.x-lockfile
Update dependency eslint-plugin-unicorn to v51.0.1
2024-02-06 17:27:22 -05:00
renovate[bot]
1084fb0751 Update dependency react-i18next to v14.0.5 2024-02-06 22:24:40 +00:00
renovate[bot]
33786f637c Update dependency eslint-plugin-unicorn to v51.0.1 2024-02-06 22:24:26 +00:00
Robin
bfc215a8ed Merge pull request #2143 from element-hq/renovate/sentry-vite-plugin-2.x-lockfile
Update dependency @sentry/vite-plugin to v2.14.0
2024-02-06 13:09:25 -05:00
Robin
661356eac0 Merge pull request #2154 from element-hq/renovate/react-i18next-14.x-lockfile
Update dependency react-i18next to v14.0.4
2024-02-06 13:08:59 -05:00
renovate[bot]
7ef97ca059 Update dependency react-i18next to v14.0.4 2024-02-06 16:43:37 +00:00
renovate[bot]
26806bcc80 Update dependency eslint-plugin-unicorn to v51 (#2152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:02:50 +01:00
renovate[bot]
e6cf761b5b Update dependency posthog-js to v1.105.0 (#2116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:02:34 +01:00
renovate[bot]
17e565fe02 Update typescript-eslint monorepo to v6.21.0 (#2150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:01:41 +01:00
renovate[bot]
6ded931e27 Update dependency @testing-library/jest-dom to v6.4.2 (#2149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:01:14 +01:00
renovate[bot]
be59c5de25 Update dependency react-i18next to v14.0.3 (#2148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:00:32 +01:00
renovate[bot]
6164eb9be4 Update actions/upload-artifact digest to 4c0ff1c 2024-02-05 22:52:07 +00:00
renovate[bot]
6f2a247011 Update dependency @sentry/vite-plugin to v2.14.0 2024-02-05 19:15:33 +00:00
fkwp
b24c7a68d3 Merge pull request #2146 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to 4976231
2024-02-05 08:41:37 +01:00
renovate[bot]
5cb3125a2e Update dependency prettier to v3.2.5 2024-02-04 08:00:56 +00:00
renovate[bot]
cd64b8fff3 Update docker/build-push-action digest to 4976231 2024-02-03 15:16:56 +00:00
Angel Mendez Cano
d79a9d9fd7 Merge remote-tracking branch 'upstream/livekit' into refactor/replace-jest-with-vitest 2024-02-02 19:27:31 -06:00
Angel Mendez Cano
9a5afb11f6 feat: update tests using vitest
- replace jest references with vitest
2024-02-02 19:00:38 -06:00
Angel Mendez Cano
2a9f6663c1 feat: add vitest configuration file
- add vitest configuration
- update tsconfig.json so that test files does not throw error
with global definitions such as expect, test
2024-02-02 18:54:50 -06:00
Angel Mendez Cano
cc148fc4e2 refactor: add vitest to project
- add vitest and related dependencies to project
2024-02-02 18:52:09 -06:00
Robin
7f3f13390b Merge pull request #2142 from element-hq/renovate/vaul-0.x
Update dependency vaul to ^0.9.0
2024-02-02 11:11:14 -05:00
Robin
b0768ca33b Merge pull request #2141 from element-hq/renovate/sentry-vite-plugin-2.x-lockfile
Update dependency @sentry/vite-plugin to v2.11.0
2024-02-02 11:09:54 -05:00
Robin
39265a3521 Merge pull request #2140 from element-hq/renovate/testing-library-react-14.x-lockfile
Update dependency @testing-library/react to v14.2.1
2024-02-02 11:09:15 -05:00
Robin
2891ce0857 Merge pull request #2138 from robintown/disable-pip
Remove the disablePictureInPicture Firefox hack
2024-02-02 09:40:03 -05:00
renovate[bot]
0e7522522e Update dependency vaul to ^0.9.0 2024-02-02 00:32:24 +00:00
renovate[bot]
287c7e4ef8 Update dependency @sentry/vite-plugin to v2.11.0 2024-02-02 00:32:16 +00:00
Angel Mendez Cano
56001b8cd2 refactor: remove jest dependencies from project
- remove jest and related dependencies from project
2024-02-01 17:07:36 -06:00
renovate[bot]
c9e04241dc Update dependency @testing-library/react to v14.2.1 2024-02-01 21:56:55 +00:00
Robin
f0faa8a2af Merge pull request #2098 from element-hq/renovate/vector-im-compound-web-3.x
Update dependency @vector-im/compound-web to v3
2024-02-01 14:25:47 -05:00
Robin
d8013582ae Merge pull request #2139 from element-hq/renovate/jest-monorepo
Update dependency @types/jest to v29.5.12
2024-02-01 14:25:19 -05:00
renovate[bot]
9cd719bafc Update dependency @types/jest to v29.5.12 2024-02-01 19:23:54 +00:00
Robin
506abcec72 Merge pull request #2133 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.16
2024-02-01 14:22:53 -05:00
Robin
71106b5067 Merge pull request #2132 from element-hq/renovate/i18next-http-backend-2.x-lockfile
Update dependency i18next-http-backend to v2.4.3
2024-02-01 14:22:36 -05:00
Robin
92351d5019 Merge pull request #2131 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.8.2
2024-02-01 14:22:21 -05:00
renovate[bot]
a2c0a5ce5d Update dependency @vector-im/compound-web to v3 2024-02-01 19:22:02 +00:00
Robin
50fac66a0c Merge pull request #2135 from element-hq/renovate/codecov-codecov-action-4.x
Update codecov/codecov-action action to v4
2024-02-01 14:21:35 -05:00
renovate[bot]
9b38a71f96 Update dependency @types/node to v20.11.16 2024-02-01 19:21:25 +00:00
Robin
8cced483e7 Merge pull request #2137 from element-hq/renovate/vector-im-compound-design-tokens-1.x
Update dependency @vector-im/compound-design-tokens to v1
2024-02-01 14:20:57 -05:00
Robin
2df15a3464 Merge pull request #2136 from element-hq/renovate/peter-evans-create-pull-request-6.x
Update peter-evans/create-pull-request action to v6
2024-02-01 14:20:45 -05:00
Robin
9669b71440 Update icon imports 2024-02-01 14:19:35 -05:00
Robin
0824963811 Remove the disablePictureInPicture Firefox hack
https://bugzilla.mozilla.org/show_bug.cgi?id=1865748 is fixed in Firefox 122.0, so we can now use the attribute the normal way.
2024-02-01 14:06:53 -05:00
renovate[bot]
c0c15a9a85 Update dependency @vector-im/compound-design-tokens to v1 2024-02-01 15:14:30 +00:00
fkwp
536797820d Merge pull request #2130 from element-hq/renovate/docker-metadata-action-digest
Update docker/metadata-action digest to 8e5442c
2024-02-01 11:59:45 +01:00
renovate[bot]
ad49de5a8c Update peter-evans/create-pull-request action to v6 2024-02-01 10:59:32 +00:00
renovate[bot]
1233c6fc7b Update codecov/codecov-action action to v4 2024-02-01 10:59:26 +00:00
fkwp
f87d1277a0 Merge pull request #2129 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to 3a80482
2024-02-01 11:59:24 +01:00
fkwp
b27881ea86 Merge pull request #2134 from element-hq/renovate/livekit-client-1.x
Update dependency livekit-client to v1.15.11
2024-02-01 11:58:56 +01:00
renovate[bot]
ad5f7638dc Update dependency livekit-client to v1.15.11 2024-02-01 09:23:37 +00:00
renovate[bot]
130a3ba4a2 Update dependency i18next-http-backend to v2.4.3 2024-02-01 07:08:02 +00:00
renovate[bot]
68f069c814 Update dependency i18next to v23.8.2 2024-02-01 07:07:45 +00:00
Robin
0dde48f3d0 Merge pull request #2118 from element-hq/renovate/opentelemetry-instrumentation-user-interaction-0.x
Update dependency @opentelemetry/instrumentation-user-interaction to ^0.35.0
2024-01-31 23:29:29 -05:00
Robin
93902b601b Merge pull request #2125 from element-hq/renovate/testing-library-jest-dom-6.x-lockfile
Update dependency @testing-library/jest-dom to v6.4.1
2024-01-31 23:27:33 -05:00
renovate[bot]
9562a4ab8a Update dependency @opentelemetry/instrumentation-user-interaction to ^0.35.0 2024-02-01 04:27:24 +00:00
Robin
8688b21aa9 Merge pull request #2117 from element-hq/renovate/opentelemetry-instrumentation-document-load-0.x
Update dependency @opentelemetry/instrumentation-document-load to ^0.35.0
2024-01-31 23:26:57 -05:00
Robin
dbfb0a9f79 Merge pull request #2124 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v6.20.0
2024-01-31 23:26:35 -05:00
renovate[bot]
9d4875d44f Update docker/metadata-action digest to 8e5442c 2024-02-01 04:26:22 +00:00
Robin
1662a7806a Merge pull request #2115 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.14
2024-01-31 23:26:11 -05:00
Robin
17a0e92342 Merge pull request #2127 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.99.0
2024-01-31 23:25:51 -05:00
renovate[bot]
f27a21f708 Update dependency @testing-library/jest-dom to v6.4.1 2024-02-01 04:25:42 +00:00
renovate[bot]
b7b76262c3 Update actions/upload-artifact digest to 3a80482 2024-02-01 04:25:23 +00:00
Robin
0f0f77a1db Merge pull request #2128 from element-hq/renovate/testing-library-react-14.x-lockfile
Update dependency @testing-library/react to v14.2.0
2024-01-31 23:25:02 -05:00
renovate[bot]
e2957a376c Update dependency @types/node to v20.11.14 2024-01-31 19:55:58 +00:00
renovate[bot]
53039a1121 Update dependency @testing-library/react to v14.2.0 2024-01-30 22:45:30 +00:00
renovate[bot]
d14524052e Update sentry-javascript monorepo to v7.99.0 2024-01-30 19:34:40 +00:00
renovate[bot]
1cc5331cef Update dependency livekit-client to v1.15.10 (#2120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-30 13:35:50 +01:00
renovate[bot]
bafe3f621a Update typescript-eslint monorepo to v6.20.0 2024-01-29 18:15:18 +00:00
fkwp
6c41bc6b34 Merge pull request #2121 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to d00351b
2024-01-29 19:14:14 +01:00
Robin
ce03a10e17 Merge pull request #2114 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.8.1
2024-01-29 11:17:18 -05:00
Robin
74acf521f7 Merge pull request #2122 from element-hq/renovate/sdp-transform-2.x-lockfile
Update dependency sdp-transform to v2.14.2
2024-01-29 11:16:30 -05:00
Timo
01d6873658 Bump js-sdk to make EC compatible with created-ts (#2123)
Signed-off-by: Timo K <toger5@hotmail.de>
2024-01-29 17:00:33 +01:00
renovate[bot]
3e5115062f Update dependency sdp-transform to v2.14.2 2024-01-29 15:50:42 +00:00
renovate[bot]
4e5e17c99e Update actions/upload-artifact digest to d00351b 2024-01-29 15:50:25 +00:00
Timo
79c4219dd8 lock lk client version to 1.15.2 (#2119)
Signed-off-by: Timo K <toger5@hotmail.de>
2024-01-29 14:53:34 +01:00
renovate[bot]
acd7d89697 Update dependency i18next to v23.8.1 2024-01-29 11:29:30 +00:00
renovate[bot]
17218236c2 Update dependency @opentelemetry/instrumentation-document-load to ^0.35.0 2024-01-29 11:28:58 +00:00
Robin
e882b4e922 Merge pull request #2113 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.9
2024-01-28 09:56:39 -05:00
renovate[bot]
315d8b6a94 Update dependency @types/node to v20.11.9 2024-01-28 10:21:53 +00:00
Robin
f529ae141e Merge pull request #2112 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.103.0
2024-01-26 11:19:20 -05:00
Robin
10c4ae3cf9 Merge pull request #2105 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.23.9
2024-01-26 11:19:09 -05:00
renovate[bot]
8fdb706766 Update dependency posthog-js to v1.103.0 2024-01-26 16:17:54 +00:00
renovate[bot]
e90aa18d55 Update babel monorepo to v7.23.9 2024-01-26 16:17:42 +00:00
Robin
27e48d3bbb Merge pull request #2106 from element-hq/renovate/uuid-9.x-lockfile
Update dependency @types/uuid to v9.0.8
2024-01-26 11:17:38 -05:00
Robin
1cf86faa12 Merge pull request #2110 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to 94d76d3
2024-01-26 11:17:24 -05:00
Robin
ef1fdf4bf1 Merge pull request #2111 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.7.20
2024-01-26 11:17:11 -05:00
renovate[bot]
dacc83e76e Update dependency i18next to v23.7.20 2024-01-26 14:40:02 +00:00
renovate[bot]
642e3cdd77 Update docker/build-push-action digest to 94d76d3 2024-01-26 14:39:46 +00:00
Timo
35a79364a9 Widget return to lobby (#2099)
* Return to lobby after call ended in widget mode

* Wait for making the widget sticky until connected

Signed-off-by: Timo K <toger5@hotmail.de>
2024-01-26 10:03:08 +01:00
renovate[bot]
3bcb9fb327 Update opentelemetry-js monorepo (#2109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 09:20:11 +01:00
renovate[bot]
97f9e8ccd6 Update dependency @types/node to v20.11.7 (#2108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 09:19:50 +01:00
renovate[bot]
3522ad8610 Update dependency @types/uuid to v9.0.8 2024-01-25 23:46:28 +00:00
Robin
92c64a1a63 Merge pull request #2104 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.98.0
2024-01-25 10:50:47 -05:00
Robin
bfdfb316c5 Merge pull request #2103 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.102.1
2024-01-25 10:50:18 -05:00
renovate[bot]
27c6a62d66 Update sentry-javascript monorepo to v7.98.0 2024-01-25 13:15:30 +00:00
renovate[bot]
1c67ba28b3 Update dependency posthog-js to v1.102.1 2024-01-25 13:15:09 +00:00
Robin
cf91b49b0b Merge pull request #2095 from element-hq/renovate/sentry-javascript-monorepo
Update sentry-javascript monorepo to v7.95.0
2024-01-25 00:09:53 -05:00
Robin
4a829c8f76 Merge pull request #2097 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.102.0
2024-01-25 00:09:27 -05:00
Robin
57797645bc Merge pull request #2096 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.6
2024-01-25 00:09:12 -05:00
Robin
11b567fa86 Merge pull request #2092 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v6.19.1
2024-01-25 00:08:52 -05:00
Robin
0a14d190fe Merge pull request #2091 from element-hq/renovate/testing-library-jest-dom-6.x-lockfile
Update dependency @testing-library/jest-dom to v6.3.0
2024-01-25 00:08:28 -05:00
Robin
1a6e455aee Merge pull request #2102 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.7.19
2024-01-25 00:07:57 -05:00
renovate[bot]
fccae980e5 Update dependency i18next to v23.7.19 2024-01-24 23:03:10 +00:00
renovate[bot]
782eef8957 Update dependency posthog-js to v1.102.0 2024-01-24 16:36:00 +00:00
renovate[bot]
03634cc9b4 Update dependency @testing-library/jest-dom to v6.3.0 2024-01-24 12:47:01 +00:00
renovate[bot]
f358364a51 Update dependency @types/node to v20.11.6 2024-01-24 08:10:50 +00:00
fkwp
10bbadd1e5 Merge pull request #2094 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to 26f96df
2024-01-23 22:22:18 +01:00
renovate[bot]
8b26c4d45a Update sentry-javascript monorepo to v7.95.0 2024-01-23 20:17:18 +00:00
renovate[bot]
49225cb5ec Update actions/upload-artifact digest to 26f96df 2024-01-23 20:17:01 +00:00
fkwp
bffeef86f3 Merge pull request #2093 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to 52899c8
2024-01-23 09:18:55 +01:00
renovate[bot]
230a9e7784 Update actions/upload-artifact digest to 52899c8 2024-01-22 22:23:28 +00:00
renovate[bot]
7c8b33f632 Update typescript-eslint monorepo to v6.19.1 2024-01-22 20:15:26 +00:00
Robin
531ed984dc Merge pull request #2090 from element-hq/renovate/posthog-js-1.x-lockfile
Update dependency posthog-js to v1.101.0
2024-01-22 11:14:11 -05:00
Robin
6afaf983e1 Merge pull request #2088 from element-hq/renovate/sentry-vite-plugin-2.x-lockfile
Update dependency @sentry/vite-plugin to v2.10.3
2024-01-22 11:10:35 -05:00
Robin
8c5d754067 Merge pull request #2089 from element-hq/renovate/vaul-0.x-lockfile
Update dependency vaul to v0.8.9
2024-01-22 11:10:10 -05:00
renovate[bot]
94c97723d9 Update dependency posthog-js to v1.101.0 2024-01-22 13:38:50 +00:00
renovate[bot]
62bf2e3d99 Update dependency vaul to v0.8.9 2024-01-22 10:54:35 +00:00
renovate[bot]
e495c2be41 Update dependency @sentry/vite-plugin to v2.10.3 2024-01-22 10:54:18 +00:00
Robin
6e7124d265 Merge pull request #2087 from element-hq/renovate/vaul-0.x-lockfile
Update dependency vaul to v0.8.8
2024-01-21 22:21:05 -05:00
renovate[bot]
721cfd75b5 Update dependency vaul to v0.8.8 2024-01-21 21:56:24 +00:00
Robin
b8beb540a8 Merge pull request #2085 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.7.18
2024-01-20 20:15:57 -05:00
renovate[bot]
fe8708a16f Update dependency i18next to v23.7.18 2024-01-21 01:14:00 +00:00
Robin
1bd76e0f1e Merge pull request #2084 from robintown/fork-builds
Fix builds on PRs from forks
2024-01-20 20:13:10 -05:00
Robin
ae1e43b779 Fix builds on PRs from forks 2024-01-20 16:44:17 -05:00
Robin
398a164a6e Merge pull request #2078 from element-hq/renovate/npm-vite-vulnerability
Update dependency vite to v5.0.12 [SECURITY]
2024-01-20 16:05:49 -05:00
Robin
ce596ca645 Merge pull request #2079 from element-hq/renovate/i18next-23.x-lockfile
Update dependency i18next to v23.7.17
2024-01-20 16:04:58 -05:00
Robin
62197121e2 Merge pull request #2080 from element-hq/renovate/react-i18next-14.x-lockfile
Update dependency react-i18next to v14.0.1
2024-01-20 16:04:37 -05:00
Robin
9a0144e918 Merge pull request #2081 from element-hq/renovate/vaul-0.x-lockfile
Update dependency vaul to v0.8.7
2024-01-20 16:04:19 -05:00
Robin
87edaca088 Merge pull request #2082 from element-hq/renovate/livekit-client-1.x-lockfile
Update dependency livekit-client to v1.15.10
2024-01-20 16:02:27 -05:00
Robin
7f571b695e Remove the gappy sync hack
This hack was added in the early days of Element Call, back when we were doing call signaling using non-state room events, and missing part of a room's history could cause calls to fall apart. Nowadays we use state events for signaling, and all this hack is doing is making sync times unnecessarily long, so we can remove it.
2024-01-20 15:55:45 -05:00
renovate[bot]
db825329d6 Update dependency livekit-client to v1.15.10 2024-01-20 19:54:06 +00:00
renovate[bot]
e3b671e902 Update dependency vaul to v0.8.7 2024-01-20 15:39:54 +00:00
renovate[bot]
b3d20964fe Update dependency react-i18next to v14.0.1 2024-01-20 13:03:44 +00:00
renovate[bot]
280e53f4a3 Update dependency i18next to v23.7.17 2024-01-20 13:03:35 +00:00
renovate[bot]
5a737a4cc6 Update dependency vite to v5.0.12 [SECURITY] 2024-01-20 02:02:26 +00:00
renovate[bot]
c204c1a53f Update sentry-javascript monorepo to v7.94.1 (#2076)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-19 14:33:36 +01:00
Robin
e78d5a6742 Merge pull request #2075 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to 694cdab
2024-01-18 17:55:10 -05:00
renovate[bot]
c1147348f4 Update actions/upload-artifact digest to 694cdab 2024-01-18 22:52:02 +00:00
Robin
e4c8470c2b Merge pull request #2071 from element-hq/renovate/prettier-3.x-lockfile
Update dependency prettier to v3.2.4
2024-01-18 15:00:20 -05:00
Robin
fe4bd32fcd Format code 2024-01-18 14:58:45 -05:00
Robin
bcace65706 Merge pull request #2070 from element-hq/renovate/node-20.x-lockfile
Update dependency @types/node to v20.11.5
2024-01-18 14:57:28 -05:00
Robin
886c77273b Merge pull request #2073 from element-hq/renovate/sass-1.x-lockfile
Update dependency sass to v1.70.0
2024-01-18 14:57:10 -05:00
Robin
63012b3e01 Merge pull request #2072 from element-hq/renovate/livekit-components-react-1.x-lockfile
Update dependency @livekit/components-react to v1.5.3
2024-01-18 14:56:50 -05:00
renovate[bot]
aa08b200e9 Update dependency livekit-client to v1.15.9 (#2074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 17:54:07 +01:00
renovate[bot]
e1714f7599 Update dependency sass to v1.70.0 2024-01-18 04:58:46 +00:00
renovate[bot]
930af289b3 Update dependency @livekit/components-react to v1.5.3 2024-01-17 20:41:42 +00:00
renovate[bot]
9b936cf9ce Update dependency prettier to v3.2.4 2024-01-17 12:15:52 +00:00
renovate[bot]
5fb30a8bff Update dependency @types/node to v20.11.5 2024-01-17 08:26:07 +00:00
42 changed files with 2158 additions and 2903 deletions

View File

@@ -47,9 +47,7 @@ jobs:
run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects
- name: Add config file - name: Add config file
env: run: curl -s "https://raw.githubusercontent.com/${{ github.event.workflow_run.head_repository.full_name }}/${{ github.event.workflow_run.head_branch }}/config/element_io_preview.json" > webapp/config.json
HEADBRACH: ${{ github.event.workflow_run.head_branch }}
run: curl -s "https://raw.githubusercontent.com/element-hq/element-call/${HEADBRACH}/config/element_io_preview.json" > webapp/config.json
- name: ☁️ Deploy to Netlify - name: ☁️ Deploy to Netlify
id: netlify id: netlify

View File

@@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Log in to container registry - name: Log in to container registry
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb uses: docker/login-action@5139682d94efc37792e6b54386b5b470a68a4737
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -54,7 +54,7 @@ jobs:
tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist
- name: Upload - name: Upload
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
with: with:
@@ -62,7 +62,7 @@ jobs:
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c uses: docker/metadata-action@232fc64e3a4e54539e087c5976439ea54be0959d
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | tags: |
@@ -72,10 +72,10 @@ jobs:
type=raw,value=latest-ci_${{steps.current-time.outputs.unix_time}},enable={{is_default_branch}} type=raw,value=latest-ci_${{steps.current-time.outputs.unix_time}},enable={{is_default_branch}}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@edfb0fe6204400c56fbfd3feba3fe9ad1adfa345 uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@9f6f8c940b91232557f8699b21341a08624a8dce uses: docker/build-push-action@b3eddbb94c4146a0988a620b01720afe50639271
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64

View File

@@ -1,11 +1,11 @@
name: Run jest tests name: Run unit tests
on: on:
pull_request: {} pull_request: {}
push: push:
branches: [livekit, full-mesh] branches: [livekit, full-mesh]
jobs: jobs:
jest: vitest:
name: Run jest tests name: Run vitest tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@@ -16,9 +16,9 @@ jobs:
cache: "yarn" cache: "yarn"
- name: Install dependencies - name: Install dependencies
run: "yarn install" run: "yarn install"
- name: Jest - name: Vitest
run: "yarn run test" run: "yarn run test"
- name: Upload to codecov - name: Upload to codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v4
with: with:
flags: unittests flags: unittests

View File

@@ -38,7 +38,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v5.0.2 uses: peter-evans/create-pull-request@v6.0.0
with: with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/localazy-download branch: actions/localazy-download

View File

@@ -1,57 +1,76 @@
## Url Format and parameters # Url Format and parameters
There are two formats for Element Call urls. There are two formats for Element Call urls.
- **Current Format** - **Current Format**
```
```text
https://element_call.domain/room/# https://element_call.domain/room/#
/<room_name_alias>?roomId=!id:domain&password=1234&<other params see below> /<room_name_alias>?roomId=!id:domain&password=1234&<other params see below>
``` ```
The url is split into two sections. The `https://element_call.domain/room/#` contains the app and the intend that the link brings you into a specific room (`https://call.element.io/#` would be the homepage). The fragment is used for query parameters to make sure they never get sent to the element_call.domain server. Here we have the actual matrix roomId and the password which are used to connect all participants with e2ee. This allows that `<room_name_alias>` does not need to be unique. Multiple meetings with the label weekly-sync can be created without collisions.
The url is split into two sections. The `https://element_call.domain/room/#`
contains the app and the intend that the link brings you into a specific room
(`https://call.element.io/#` would be the homepage). The fragment is used for
query parameters to make sure they never get sent to the element_call.domain
server. Here we have the actual matrix roomId and the password which are used
to connect all participants with e2ee. This allows that `<room_name_alias>` does
not need to be unique. Multiple meetings with the label weekly-sync can be created
without collisions.
- **deprecated** - **deprecated**
```
```text
https://element_call.domain/<room_name> https://element_call.domain/<room_name>
``` ```
With this format the livekit alias that will be used is the `<room_name>`. All ppl connecting to this url will end up in the same unencrypted room. This does not scale, is super unsecure (ppl could end up in the same room by accident) and it also is not really possible to support encryption.
With this format the livekit alias that will be used is the `<room_name>`.
All ppl connecting to this url will end up in the same unencrypted room.
This does not scale, is super unsecure
(ppl could end up in the same room by accident) and it also is not really
possible to support encryption.
The url parameters are spit into two categories: **general** and **widget related**. The url parameters are spit into two categories: **general** and **widget related**.
### Widget related params ## Widget related params
**widgetId** **widgetId**
The id used by the widget. The presence of this parameter inplis that elemetn call will not connect to a homeserver directly and instead tries to establish postMessage communication via the `parentUrl` The id used by the widget. The presence of this parameter implies that element
call will not connect to a homeserver directly and instead tries to establish
postMessage communication via the `parentUrl`.
``` ```ts
widgetId: string | null; widgetId: string | null;
``` ```
**parentUrl** **parentUrl**
The url used to send widget action postMessages. This should be the domain of the client The url used to send widget action postMessages. This should be the domain of
or the webview the widget is hosted in. (in case the widget is not in an Iframe but in a the client or the webview the widget is hosted in. (in case the widget is not
dedicated webview we send the postMessages same webview the widget lives in. Filtering is in an Iframe but in a dedicated webview we send the postMessages same webview
done in the widget so it ignores the messages it receives from itself) the widget lives in. Filtering is done in the widget so it ignores the messages
it receives from itself)
``` ```ts
parentUrl: string | null; parentUrl: string | null;
``` ```
**userId** **userId**
The user's ID (only used in matryoshka mode). The user's ID (only used in matryoshka mode).
``` ```ts
userId: string | null; userId: string | null;
``` ```
**deviceId** **deviceId**
The device's ID (only used in matryoshka mode). The device's ID (only used in matryoshka mode).
``` ```ts
deviceId: string | null; deviceId: string | null;
``` ```
**baseUrl** **baseUrl**
The base URL of the homeserver to use for media lookups in matryoshka mode. The base URL of the homeserver to use for media lookups in matryoshka mode.
``` ```ts
baseUrl: string | null; baseUrl: string | null;
``` ```
@@ -64,14 +83,14 @@ roomId is an exception as we need the room ID in embedded (matroyska) mode, and
the room alias (or even the via params because we are not trying to join it). This the room alias (or even the via params because we are not trying to join it). This
is also not validated, where it is in useRoomIdentifier(). is also not validated, where it is in useRoomIdentifier().
``` ```ts
roomId: string | null; roomId: string | null;
``` ```
**confineToRoom** **confineToRoom**
Whether the app should keep the user confined to the current call/room. Whether the app should keep the user confined to the current call/room.
``` ```ts
confineToRoom: boolean; (default: false) confineToRoom: boolean; (default: false)
``` ```
@@ -79,7 +98,7 @@ confineToRoom: boolean; (default: false)
Whether upon entering a room, the user should be prompted to launch the Whether upon entering a room, the user should be prompted to launch the
native mobile app. (Affects only Android and iOS.) native mobile app. (Affects only Android and iOS.)
``` ```ts
appPrompt: boolean; (default: true) appPrompt: boolean; (default: true)
``` ```
@@ -87,28 +106,29 @@ appPrompt: boolean; (default: true)
Whether the app should pause before joining the call until it sees an Whether the app should pause before joining the call until it sees an
io.element.join widget action, allowing it to be preloaded. io.element.join widget action, allowing it to be preloaded.
``` ```ts
preload: boolean; (default: false) preload: boolean; (default: false)
``` ```
**hideHeader** **hideHeader**
Whether to hide the room header when in a call. Whether to hide the room header when in a call.
``` ```ts
hideHeader: boolean; (default: false) hideHeader: boolean; (default: false)
``` ```
**showControls** **showControls**
Whether to show the buttons to mute, screen-share, invite, hangup are shown when in a call. Whether to show the buttons to mute, screen-share, invite, hangup are shown
when in a call.
``` ```ts
showControls: boolean; (default: true) showControls: boolean; (default: true)
``` ```
**hideScreensharing** **hideScreensharing**
Whether to hide the screen-sharing button. Whether to hide the screen-sharing button.
``` ```ts
hideScreensharing: boolean; (default: false) hideScreensharing: boolean; (default: false)
``` ```
@@ -116,7 +136,7 @@ hideScreensharing: boolean; (default: false)
Whether to use end-to-end encryption. This is a legacy flag for the full mesh branch. Whether to use end-to-end encryption. This is a legacy flag for the full mesh branch.
It is not used on the livekit branch and has no impact there! It is not used on the livekit branch and has no impact there!
``` ```ts
enableE2EE: boolean; (default: true) enableE2EE: boolean; (default: true)
``` ```
@@ -124,28 +144,29 @@ enableE2EE: boolean; (default: true)
Whether to use per participant encryption. Whether to use per participant encryption.
Keys will be exchanged over encrypted matrix room messages. Keys will be exchanged over encrypted matrix room messages.
``` ```ts
perParticipantE2EE: boolean; (default: false) perParticipantE2EE: boolean; (default: false)
``` ```
**password** **password**
E2EE password when using a shared secret. (For individual sender keys in embedded mode this is not required.) E2EE password when using a shared secret.
(For individual sender keys in embedded mode this is not required.)
``` ```ts
password: string | null; password: string | null;
``` ```
**displayName** **displayName**
The display name to use for auto-registration. The display name to use for auto-registration.
``` ```ts
displayName: string | null; displayName: string | null;
``` ```
**lang** **lang**
The BCP 47 code of the language the app should use. The BCP 47 code of the language the app should use.
``` ```ts
lang: string | null; lang: string | null;
``` ```
@@ -153,7 +174,7 @@ lang: string | null;
The font/fonts which the interface should use. The font/fonts which the interface should use.
There can be multiple font url parameters: `?font=font-one&font=font-two...` There can be multiple font url parameters: `?font=font-one&font=font-two...`
``` ```ts
font: string; font: string;
font: string; font: string;
... ...
@@ -162,14 +183,15 @@ font: string;
**fontScale** **fontScale**
The factor by which to scale the interface's font size. The factor by which to scale the interface's font size.
``` ```ts
fontScale: number | null; fontScale: number | null;
``` ```
**analyticsID** **analyticsID**
The Posthog analytics ID. It is only available if the user has given consent for sharing telemetry in element web. The Posthog analytics ID. It is only available if the user has given consent for
sharing telemetry in element web.
``` ```ts
analyticsID: string | null; analyticsID: string | null;
``` ```
@@ -177,7 +199,7 @@ analyticsID: string | null;
Whether the app is allowed to use fallback STUN servers for ICE in case the Whether the app is allowed to use fallback STUN servers for ICE in case the
user's homeserver doesn't provide any. user's homeserver doesn't provide any.
``` ```ts
allowIceFallback: boolean; (default: false) allowIceFallback: boolean; (default: false)
``` ```
@@ -186,6 +208,45 @@ Setting this flag skips the lobby and brings you in the call directly.
In the widget this can be combined with preload to pass the device settings In the widget this can be combined with preload to pass the device settings
with the join widget action. with the join widget action.
``` ```ts
skipLobby: boolean; (default: false) skipLobby: boolean; (default: false)
``` ```
**returnToLobby**
Setting this flag makes element call show the lobby in widget mode after leaving
a call.
This is useful for video rooms.
If set to false, the widget will show a blank page after leaving the call.
```ts
returnToLobby: boolean; (default: false)
```
**theme**
The theme to use for element call.
can be "light", "dark", "light-high-contrast" or "dark-high-contrast".
If not set element call will use the dark theme.
```ts
theme: string | null;
```
**viaServers**
This defines the homeserver that is going to be used when joining a room.
It has to be set to a non default value for links to rooms
that are not on the default homeserver,
that is in use for the current user.
```ts
viaServers: string; (default: undefined)
```
**homeserver**
This defines the homeserver that is going to be used when registering
a new (guest) user.
This can be user to configure a non default guest user server when
creating a spa link.
```ts
homeserver: string; (default: undefined)
```

View File

@@ -13,20 +13,21 @@
"lint:types": "tsc", "lint:types": "tsc",
"i18n": "node_modules/i18next-parser/bin/cli.js", "i18n": "node_modules/i18next-parser/bin/cli.js",
"i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update", "i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update",
"test": "jest", "test": "vitest",
"test:coverage": "vitest run --coverage",
"backend": "docker-compose -f backend-docker-compose.yml up" "backend": "docker-compose -f backend-docker-compose.yml up"
}, },
"dependencies": { "dependencies": {
"@juggle/resize-observer": "^3.3.1", "@juggle/resize-observer": "^3.3.1",
"@livekit/components-core": "^0.8.0", "@livekit/components-core": "^0.9.0",
"@livekit/components-react": "^1.1.0", "@livekit/components-react": "^2.0.0",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz", "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
"@opentelemetry/api": "^1.4.0", "@opentelemetry/api": "^1.4.0",
"@opentelemetry/context-zone": "^1.9.1", "@opentelemetry/context-zone": "^1.9.1",
"@opentelemetry/exporter-jaeger": "^1.9.1", "@opentelemetry/exporter-jaeger": "^1.9.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.47.0", "@opentelemetry/exporter-trace-otlp-http": "^0.48.0",
"@opentelemetry/instrumentation-document-load": "^0.34.0", "@opentelemetry/instrumentation-document-load": "^0.35.0",
"@opentelemetry/instrumentation-user-interaction": "^0.34.0", "@opentelemetry/instrumentation-user-interaction": "^0.35.0",
"@opentelemetry/sdk-trace-web": "^1.9.1", "@opentelemetry/sdk-trace-web": "^1.9.1",
"@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-slider": "^1.1.2", "@radix-ui/react-slider": "^1.1.2",
@@ -49,8 +50,8 @@
"@sentry/tracing": "^7.0.0", "@sentry/tracing": "^7.0.0",
"@types/lodash": "^4.14.199", "@types/lodash": "^4.14.199",
"@use-gesture/react": "^10.2.11", "@use-gesture/react": "^10.2.11",
"@vector-im/compound-design-tokens": "^0.1.0", "@vector-im/compound-design-tokens": "^1.0.0",
"@vector-im/compound-web": "^2.0.0", "@vector-im/compound-web": "^3.0.0",
"@vitejs/plugin-basic-ssl": "^1.0.1", "@vitejs/plugin-basic-ssl": "^1.0.1",
"@vitejs/plugin-react": "^4.0.1", "@vitejs/plugin-react": "^4.0.1",
"buffer": "^6.0.3", "buffer": "^6.0.3",
@@ -59,9 +60,9 @@
"i18next": "^23.0.0", "i18next": "^23.0.0",
"i18next-browser-languagedetector": "^7.0.0", "i18next-browser-languagedetector": "^7.0.0",
"i18next-http-backend": "^2.0.0", "i18next-http-backend": "^2.0.0",
"livekit-client": "^1.12.3", "livekit-client": "^2.0.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#2cd63ca4b90eb2e4d22b45ae281a81c4514e757a", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#8123e9a3f1142a7619758c0a238172b007e3a06a",
"matrix-widget-api": "^1.3.1", "matrix-widget-api": "^1.3.1",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"pako": "^2.0.4", "pako": "^2.0.4",
@@ -78,7 +79,7 @@
"tinyqueue": "^2.0.3", "tinyqueue": "^2.0.3",
"unique-names-generator": "^4.6.0", "unique-names-generator": "^4.6.0",
"uuid": "9", "uuid": "9",
"vaul": "^0.8.0" "vaul": "^0.9.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.16.5", "@babel/core": "^7.16.5",
@@ -88,21 +89,19 @@
"@react-spring/rafz": "^9.7.3", "@react-spring/rafz": "^9.7.3",
"@react-types/dialog": "^3.5.5", "@react-types/dialog": "^3.5.5",
"@sentry/vite-plugin": "^2.0.0", "@sentry/vite-plugin": "^2.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.1", "@testing-library/user-event": "^14.5.1",
"@types/content-type": "^1.1.5", "@types/content-type": "^1.1.5",
"@types/dom-screen-wake-lock": "^1.0.1", "@types/dom-screen-wake-lock": "^1.0.1",
"@types/dompurify": "^3.0.2", "@types/dompurify": "^3.0.2",
"@types/grecaptcha": "^3.0.4", "@types/grecaptcha": "^3.0.4",
"@types/jest": "^29.5.5",
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/request": "^2.48.8", "@types/request": "^2.48.8",
"@types/sdp-transform": "^2.4.5", "@types/sdp-transform": "^2.4.5",
"@types/uuid": "9", "@types/uuid": "9",
"@typescript-eslint/eslint-plugin": "^6.1.0", "@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.1.0", "@typescript-eslint/parser": "^7.0.0",
"babel-loader": "^9.0.0", "babel-loader": "^9.0.0",
"babel-plugin-transform-vite-meta-env": "^1.0.3", "babel-plugin-transform-vite-meta-env": "^1.0.3",
"eslint": "^8.14.0", "eslint": "^8.14.0",
@@ -114,39 +113,16 @@
"eslint-plugin-matrix-org": "^1.2.1", "eslint-plugin-matrix-org": "^1.2.1",
"eslint-plugin-react": "^7.29.4", "eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-unicorn": "^50.0.0", "eslint-plugin-unicorn": "^51.0.0",
"i18next-parser": "^8.0.0", "i18next-parser": "^8.0.0",
"identity-obj-proxy": "^3.0.0", "jsdom": "^24.0.0",
"jest": "^29.2.2",
"jest-environment-jsdom": "^29.3.1",
"jest-mock": "^29.5.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"sass": "^1.42.1", "sass": "^1.42.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"typescript-eslint-language-service": "^5.0.5", "typescript-eslint-language-service": "^5.0.5",
"vite": "^5.0.0", "vite": "^5.0.0",
"vite-plugin-html-template": "^1.1.0", "vite-plugin-html-template": "^1.1.0",
"vite-plugin-svgr": "^4.0.0" "vite-plugin-svgr": "^4.0.0",
}, "vitest": "^1.2.2"
"jest": {
"testEnvironment": "./test/environment.ts",
"testMatch": [
"<rootDir>/test/**/*-test.[jt]s?(x)"
],
"transformIgnorePatterns": [
"/node_modules/(?!d3)+$",
"/node_modules/(?!internmap)+$"
],
"moduleNameMapper": {
"\\.css$": "identity-obj-proxy",
"\\.svg\\?react$": "<rootDir>/test/mocks/svgr.ts",
"^\\./IndexedDBWorker\\?worker$": "<rootDir>/test/mocks/workerMock.ts",
"^\\./olm$": "<rootDir>/test/mocks/olmMock.ts"
},
"collectCoverage": true,
"coverageReporters": [
"text",
"cobertura"
]
} }
} }

View File

@@ -143,6 +143,7 @@
"unmute_microphone_button_label": "Unmute microphone", "unmute_microphone_button_label": "Unmute microphone",
"version": "Version: {{version}}", "version": "Version: {{version}}",
"video_tile": { "video_tile": {
"change_fit_contain": "Fit to frame",
"exit_full_screen": "Exit full screen", "exit_full_screen": "Exit full screen",
"full_screen": "Full screen", "full_screen": "Full screen",
"mute_for_me": "Mute for me", "mute_for_me": "Mute for me",

View File

@@ -8,6 +8,7 @@
"enabled": false "enabled": false
} }
], ],
"semanticCommits": "disabled",
"ignoreDeps": [ "ignoreDeps": [
"@react-aria/button", "@react-aria/button",
"@react-aria/focus", "@react-aria/focus",
@@ -20,6 +21,7 @@
"@react-stately/collections", "@react-stately/collections",
"@react-stately/select", "@react-stately/select",
"@react-stately/tooltip", "@react-stately/tooltip",
"@react-stately/tree" "@react-stately/tree",
"@react-types/dialog"
] ]
} }

View File

@@ -35,19 +35,21 @@ import { CrashView, LoadingView } from "./FullScreenView";
import { DisconnectedBanner } from "./DisconnectedBanner"; import { DisconnectedBanner } from "./DisconnectedBanner";
import { Initializer } from "./initializer"; import { Initializer } from "./initializer";
import { MediaDevicesProvider } from "./livekit/MediaDevicesContext"; import { MediaDevicesProvider } from "./livekit/MediaDevicesContext";
import { widget } from "./widget";
import { useTheme } from "./useTheme";
const SentryRoute = Sentry.withSentryRouting(Route); const SentryRoute = Sentry.withSentryRouting(Route);
interface BackgroundProviderProps { interface SimpleProviderProps {
children: JSX.Element; children: JSX.Element;
} }
const BackgroundProvider: FC<BackgroundProviderProps> = ({ children }) => { const BackgroundProvider: FC<SimpleProviderProps> = ({ children }) => {
const { pathname } = useLocation(); const { pathname } = useLocation();
useEffect(() => { useEffect(() => {
let backgroundImage = ""; let backgroundImage = "";
if (!["/login", "/register"].includes(pathname)) { if (!["/login", "/register"].includes(pathname) && !widget) {
backgroundImage = "var(--background-gradient)"; backgroundImage = "var(--background-gradient)";
} }
@@ -57,6 +59,10 @@ const BackgroundProvider: FC<BackgroundProviderProps> = ({ children }) => {
return <>{children}</>; return <>{children}</>;
}; };
const ThemeProvider: FC<SimpleProviderProps> = ({ children }) => {
useTheme();
return children;
};
interface AppProps { interface AppProps {
history: History; history: History;
@@ -64,7 +70,6 @@ interface AppProps {
export const App: FC<AppProps> = ({ history }) => { export const App: FC<AppProps> = ({ history }) => {
const [loaded, setLoaded] = useState(false); const [loaded, setLoaded] = useState(false);
useEffect(() => { useEffect(() => {
Initializer.init()?.then(() => { Initializer.init()?.then(() => {
setLoaded(true); setLoaded(true);
@@ -78,37 +83,39 @@ export const App: FC<AppProps> = ({ history }) => {
// @ts-ignore // @ts-ignore
<Router history={history}> <Router history={history}>
<BackgroundProvider> <BackgroundProvider>
<TooltipProvider> <ThemeProvider>
{loaded ? ( <TooltipProvider>
<Suspense fallback={null}> {loaded ? (
<ClientProvider> <Suspense fallback={null}>
<MediaDevicesProvider> <ClientProvider>
<Sentry.ErrorBoundary fallback={errorPage}> <MediaDevicesProvider>
<OverlayProvider> <Sentry.ErrorBoundary fallback={errorPage}>
<DisconnectedBanner /> <OverlayProvider>
<Switch> <DisconnectedBanner />
<SentryRoute exact path="/"> <Switch>
<HomePage /> <SentryRoute exact path="/">
</SentryRoute> <HomePage />
<SentryRoute exact path="/login"> </SentryRoute>
<LoginPage /> <SentryRoute exact path="/login">
</SentryRoute> <LoginPage />
<SentryRoute exact path="/register"> </SentryRoute>
<RegisterPage /> <SentryRoute exact path="/register">
</SentryRoute> <RegisterPage />
<SentryRoute path="*"> </SentryRoute>
<RoomPage /> <SentryRoute path="*">
</SentryRoute> <RoomPage />
</Switch> </SentryRoute>
</OverlayProvider> </Switch>
</Sentry.ErrorBoundary> </OverlayProvider>
</MediaDevicesProvider> </Sentry.ErrorBoundary>
</ClientProvider> </MediaDevicesProvider>
</Suspense> </ClientProvider>
) : ( </Suspense>
<LoadingView /> ) : (
)} <LoadingView />
</TooltipProvider> )}
</TooltipProvider>
</ThemeProvider>
</BackgroundProvider> </BackgroundProvider>
</Router> </Router>
); );

View File

@@ -33,6 +33,7 @@ limitations under the License.
} }
.headerLogo { .headerLogo {
color: var(--cpd-color-text-primary);
display: none; display: none;
align-items: center; align-items: center;
text-decoration: none; text-decoration: none;

View File

@@ -125,6 +125,29 @@ export interface UrlParams {
* with the join widget action. * with the join widget action.
*/ */
skipLobby: boolean; skipLobby: boolean;
/**
* Setting this flag makes element call show the lobby after leaving a call.
* This is useful for video rooms.
*/
returnToLobby: boolean;
/**
* The theme to use for element call.
* can be "light", "dark", "light-high-contrast" or "dark-high-contrast".
*/
theme: string | null;
/** This defines the homeserver that is going to be used when joining a room.
* It has to be set to a non default value for links to rooms
* that are not on the default homeserver,
* that is in use for the current user.
*/
viaServers: string | null;
/**
* This defines the homeserver that is going to be used when registering
* a new (guest) user.
* This can be user to configure a non default guest user server when
* creating a spa link.
*/
homeserver: string | null;
} }
// This is here as a stopgap, but what would be far nicer is a function that // This is here as a stopgap, but what would be far nicer is a function that
@@ -223,6 +246,10 @@ export const getUrlParams = (
allowIceFallback: parser.getFlagParam("allowIceFallback"), allowIceFallback: parser.getFlagParam("allowIceFallback"),
perParticipantE2EE: parser.getFlagParam("perParticipantE2EE"), perParticipantE2EE: parser.getFlagParam("perParticipantE2EE"),
skipLobby: parser.getFlagParam("skipLobby"), skipLobby: parser.getFlagParam("skipLobby"),
returnToLobby: parser.getFlagParam("returnToLobby"),
theme: parser.getParam("theme"),
viaServers: parser.getParam("viaServers"),
homeserver: parser.getParam("homeserver"),
}; };
}; };

View File

@@ -21,6 +21,7 @@ import { useClient } from "../ClientContext";
import { useInteractiveRegistration } from "../auth/useInteractiveRegistration"; import { useInteractiveRegistration } from "../auth/useInteractiveRegistration";
import { generateRandomName } from "../auth/generateRandomName"; import { generateRandomName } from "../auth/generateRandomName";
import { useRecaptcha } from "../auth/useRecaptcha"; import { useRecaptcha } from "../auth/useRecaptcha";
import { widget } from "../widget";
interface UseRegisterPasswordlessUserType { interface UseRegisterPasswordlessUserType {
privacyPolicyUrl?: string; privacyPolicyUrl?: string;
@@ -39,6 +40,11 @@ export function useRegisterPasswordlessUser(): UseRegisterPasswordlessUserType {
if (!setClient) { if (!setClient) {
throw new Error("No client context"); throw new Error("No client context");
} }
if (widget) {
throw new Error(
"Registration was skipped: We should never try to register password-less user in embedded mode.",
);
}
try { try {
const recaptchaResponse = await execute(); const recaptchaResponse = await execute();

View File

@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { getUrlParams } from "../UrlParams";
import { import {
DEFAULT_CONFIG, DEFAULT_CONFIG,
ConfigOptions, ConfigOptions,
@@ -45,10 +46,18 @@ export class Config {
// Convenience accessors // Convenience accessors
public static defaultHomeserverUrl(): string | undefined { public static defaultHomeserverUrl(): string | undefined {
return Config.get().default_server_config?.["m.homeserver"].base_url; return (
getUrlParams().homeserver ??
Config.get().default_server_config?.["m.homeserver"].base_url
);
} }
public static defaultServerName(): string | undefined { public static defaultServerName(): string | undefined {
const homeserver = getUrlParams().homeserver;
if (homeserver) {
const url = new URL(homeserver);
return url.hostname;
}
return Config.get().default_server_config?.["m.homeserver"].server_name; return Config.get().default_server_config?.["m.homeserver"].server_name;
} }

View File

@@ -2,17 +2,17 @@
<desc>Element Call (Beta)</desc> <desc>Element Call (Beta)</desc>
<circle cx="15" cy="15" r="13" fill="white"/> <circle cx="15" cy="15" r="13" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15C0 23.2843 6.71573 30 15 30ZM12.2579 6.98923C12.2579 6.38376 12.7497 5.89292 13.3565 5.89292C17.4687 5.89292 20.8024 9.21967 20.8024 13.3234C20.8024 13.9289 20.3106 14.4197 19.7038 14.4197C19.0971 14.4197 18.6052 13.9289 18.6052 13.3234C18.6052 10.4306 16.2553 8.08554 13.3565 8.08554C12.7497 8.08554 12.2579 7.59471 12.2579 6.98923ZM24.1066 13.3235C24.1066 12.7181 23.6148 12.2272 23.008 12.2272C22.4013 12.2272 21.9094 12.7181 21.9094 13.3235C21.9094 16.2163 19.5595 18.5614 16.6607 18.5614C16.0539 18.5614 15.5621 19.0523 15.5621 19.6577C15.5621 20.2632 16.0539 20.754 16.6607 20.754C20.7729 20.754 24.1066 17.4273 24.1066 13.3235ZM17.7601 23.011C17.7601 23.6164 17.2682 24.1073 16.6615 24.1073C12.5492 24.1073 9.21553 20.7805 9.21553 16.6768C9.21553 16.0713 9.70739 15.5805 10.3141 15.5805C10.9209 15.5805 11.4127 16.0713 11.4127 16.6768C11.4127 19.5696 13.7627 21.9146 16.6615 21.9146C17.2682 21.9146 17.7601 22.4055 17.7601 23.011ZM5.89281 16.6769C5.89281 17.2824 6.38466 17.7732 6.9914 17.7732C7.59813 17.7732 8.08999 17.2824 8.08999 16.6769C8.08999 13.7841 10.4399 11.439 13.3388 11.439C13.9455 11.439 14.4373 10.9482 14.4373 10.3427C14.4373 9.73722 13.9455 9.24639 13.3388 9.24639C9.22647 9.24639 5.89281 12.5731 5.89281 16.6769Z" fill="#0DBD8B"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15C0 23.2843 6.71573 30 15 30ZM12.2579 6.98923C12.2579 6.38376 12.7497 5.89292 13.3565 5.89292C17.4687 5.89292 20.8024 9.21967 20.8024 13.3234C20.8024 13.9289 20.3106 14.4197 19.7038 14.4197C19.0971 14.4197 18.6052 13.9289 18.6052 13.3234C18.6052 10.4306 16.2553 8.08554 13.3565 8.08554C12.7497 8.08554 12.2579 7.59471 12.2579 6.98923ZM24.1066 13.3235C24.1066 12.7181 23.6148 12.2272 23.008 12.2272C22.4013 12.2272 21.9094 12.7181 21.9094 13.3235C21.9094 16.2163 19.5595 18.5614 16.6607 18.5614C16.0539 18.5614 15.5621 19.0523 15.5621 19.6577C15.5621 20.2632 16.0539 20.754 16.6607 20.754C20.7729 20.754 24.1066 17.4273 24.1066 13.3235ZM17.7601 23.011C17.7601 23.6164 17.2682 24.1073 16.6615 24.1073C12.5492 24.1073 9.21553 20.7805 9.21553 16.6768C9.21553 16.0713 9.70739 15.5805 10.3141 15.5805C10.9209 15.5805 11.4127 16.0713 11.4127 16.6768C11.4127 19.5696 13.7627 21.9146 16.6615 21.9146C17.2682 21.9146 17.7601 22.4055 17.7601 23.011ZM5.89281 16.6769C5.89281 17.2824 6.38466 17.7732 6.9914 17.7732C7.59813 17.7732 8.08999 17.2824 8.08999 16.6769C8.08999 13.7841 10.4399 11.439 13.3388 11.439C13.9455 11.439 14.4373 10.9482 14.4373 10.3427C14.4373 9.73722 13.9455 9.24639 13.3388 9.24639C9.22647 9.24639 5.89281 12.5731 5.89281 16.6769Z" fill="#0DBD8B"/>
<path d="M53.5406 17.258H42.8052C42.932 18.3814 43.3397 19.2782 44.0282 19.9486C44.7167 20.6009 45.6227 20.927 46.746 20.927C47.4889 20.927 48.1593 20.7459 48.7572 20.3835C49.3551 20.0211 49.7809 19.5319 50.0346 18.9159H53.296C52.8611 20.3472 52.0458 21.5068 50.8499 22.3947C49.6722 23.2644 48.2771 23.6992 46.6645 23.6992C44.5627 23.6992 42.8596 23.0016 41.555 21.6065C40.2686 20.2114 39.6254 18.4448 39.6254 16.3068C39.6254 14.2231 40.2776 12.4747 41.5822 11.0614C42.8867 9.64814 44.5718 8.94151 46.6373 8.94151C48.7029 8.94151 50.3698 9.63908 51.6381 11.0342C52.9245 12.4112 53.5677 14.1506 53.5677 16.2524L53.5406 17.258ZM46.6373 11.5778C45.6227 11.5778 44.7801 11.8767 44.1098 12.4747C43.4394 13.0726 43.0226 13.8698 42.8596 14.8663H50.3607C50.2158 13.8698 49.8172 13.0726 49.1649 12.4747C48.5126 11.8767 47.6701 11.5778 46.6373 11.5778Z" fill="white"/> <path d="M53.5406 17.258H42.8052C42.932 18.3814 43.3397 19.2782 44.0282 19.9486C44.7167 20.6009 45.6227 20.927 46.746 20.927C47.4889 20.927 48.1593 20.7459 48.7572 20.3835C49.3551 20.0211 49.7809 19.5319 50.0346 18.9159H53.296C52.8611 20.3472 52.0458 21.5068 50.8499 22.3947C49.6722 23.2644 48.2771 23.6992 46.6645 23.6992C44.5627 23.6992 42.8596 23.0016 41.555 21.6065C40.2686 20.2114 39.6254 18.4448 39.6254 16.3068C39.6254 14.2231 40.2776 12.4747 41.5822 11.0614C42.8867 9.64814 44.5718 8.94151 46.6373 8.94151C48.7029 8.94151 50.3698 9.63908 51.6381 11.0342C52.9245 12.4112 53.5677 14.1506 53.5677 16.2524L53.5406 17.258ZM46.6373 11.5778C45.6227 11.5778 44.7801 11.8767 44.1098 12.4747C43.4394 13.0726 43.0226 13.8698 42.8596 14.8663H50.3607C50.2158 13.8698 49.8172 13.0726 49.1649 12.4747C48.5126 11.8767 47.6701 11.5778 46.6373 11.5778Z" fill="currentColor"/>
<path d="M55.7934 19.1605V2.9895H59.0276V19.2148C59.0276 19.9396 59.4262 20.302 60.2234 20.302L60.7941 20.2748V23.3459C60.4861 23.4003 60.16 23.4274 59.8157 23.4274C58.4206 23.4274 57.3969 23.0741 56.7446 22.3675C56.1104 21.6609 55.7934 20.5919 55.7934 19.1605Z" fill="white"/> <path d="M55.7934 19.1605V2.9895H59.0276V19.2148C59.0276 19.9396 59.4262 20.302 60.2234 20.302L60.7941 20.2748V23.3459C60.4861 23.4003 60.16 23.4274 59.8157 23.4274C58.4206 23.4274 57.3969 23.0741 56.7446 22.3675C56.1104 21.6609 55.7934 20.5919 55.7934 19.1605Z" fill="currentColor"/>
<path d="M75.8563 17.258H65.121C65.2478 18.3814 65.6555 19.2782 66.344 19.9486C67.0325 20.6009 67.9384 20.927 69.0618 20.927C69.8047 20.927 70.4751 20.7459 71.073 20.3835C71.6709 20.0211 72.0967 19.5319 72.3503 18.9159H75.6117C75.1769 20.3472 74.3615 21.5068 73.1657 22.3947C71.988 23.2644 70.5928 23.6992 68.9803 23.6992C66.8785 23.6992 65.1753 23.0016 63.8708 21.6065C62.5843 20.2114 61.9411 18.4448 61.9411 16.3068C61.9411 14.2231 62.5934 12.4747 63.898 11.0614C65.2025 9.64814 66.8875 8.94151 68.9531 8.94151C71.0186 8.94151 72.6855 9.63908 73.9539 11.0342C75.2403 12.4112 75.8835 14.1506 75.8835 16.2524L75.8563 17.258ZM68.9531 11.5778C67.9384 11.5778 67.0959 11.8767 66.4255 12.4747C65.7551 13.0726 65.3384 13.8698 65.1753 14.8663H72.6765C72.5315 13.8698 72.1329 13.0726 71.4806 12.4747C70.8284 11.8767 69.9859 11.5778 68.9531 11.5778Z" fill="white"/> <path d="M75.8563 17.258H65.121C65.2478 18.3814 65.6555 19.2782 66.344 19.9486C67.0325 20.6009 67.9384 20.927 69.0618 20.927C69.8047 20.927 70.4751 20.7459 71.073 20.3835C71.6709 20.0211 72.0967 19.5319 72.3503 18.9159H75.6117C75.1769 20.3472 74.3615 21.5068 73.1657 22.3947C71.988 23.2644 70.5928 23.6992 68.9803 23.6992C66.8785 23.6992 65.1753 23.0016 63.8708 21.6065C62.5843 20.2114 61.9411 18.4448 61.9411 16.3068C61.9411 14.2231 62.5934 12.4747 63.898 11.0614C65.2025 9.64814 66.8875 8.94151 68.9531 8.94151C71.0186 8.94151 72.6855 9.63908 73.9539 11.0342C75.2403 12.4112 75.8835 14.1506 75.8835 16.2524L75.8563 17.258ZM68.9531 11.5778C67.9384 11.5778 67.0959 11.8767 66.4255 12.4747C65.7551 13.0726 65.3384 13.8698 65.1753 14.8663H72.6765C72.5315 13.8698 72.1329 13.0726 71.4806 12.4747C70.8284 11.8767 69.9859 11.5778 68.9531 11.5778Z" fill="currentColor"/>
<path d="M90.448 15.274V23.3731H87.2138V14.9207C87.2138 12.7827 86.326 11.7137 84.5503 11.7137C83.59 11.7137 82.82 12.0217 82.2402 12.6377C81.6785 13.2538 81.3977 14.0963 81.3977 15.1653V23.3731H78.1635V9.26764H81.1531V11.1429C81.4973 10.5088 82.0228 9.98333 82.7294 9.5666C83.436 9.14987 84.3148 8.94151 85.3657 8.94151C87.3225 8.94151 88.7358 9.68438 89.6055 11.1701C90.8013 9.68438 92.3958 8.94151 94.3888 8.94151C96.0376 8.94151 97.3059 9.45789 98.1937 10.4907C99.0816 11.5053 99.5255 12.8461 99.5255 14.513V23.3731H96.2913V14.9207C96.2913 12.7827 95.4035 11.7137 93.6278 11.7137C92.6494 11.7137 91.8703 12.0308 91.2905 12.6649C90.7288 13.2809 90.448 14.1506 90.448 15.274Z" fill="white"/> <path d="M90.448 15.274V23.3731H87.2138V14.9207C87.2138 12.7827 86.326 11.7137 84.5503 11.7137C83.59 11.7137 82.82 12.0217 82.2402 12.6377C81.6785 13.2538 81.3977 14.0963 81.3977 15.1653V23.3731H78.1635V9.26764H81.1531V11.1429C81.4973 10.5088 82.0228 9.98333 82.7294 9.5666C83.436 9.14987 84.3148 8.94151 85.3657 8.94151C87.3225 8.94151 88.7358 9.68438 89.6055 11.1701C90.8013 9.68438 92.3958 8.94151 94.3888 8.94151C96.0376 8.94151 97.3059 9.45789 98.1937 10.4907C99.0816 11.5053 99.5255 12.8461 99.5255 14.513V23.3731H96.2913V14.9207C96.2913 12.7827 95.4035 11.7137 93.6278 11.7137C92.6494 11.7137 91.8703 12.0308 91.2905 12.6649C90.7288 13.2809 90.448 14.1506 90.448 15.274Z" fill="currentColor"/>
<path d="M115.61 17.258H104.874C105.001 18.3814 105.409 19.2782 106.097 19.9486C106.786 20.6009 107.692 20.927 108.815 20.927C109.558 20.927 110.228 20.7459 110.826 20.3835C111.424 20.0211 111.85 19.5319 112.104 18.9159H115.365C114.93 20.3472 114.115 21.5068 112.919 22.3947C111.741 23.2644 110.346 23.6992 108.734 23.6992C106.632 23.6992 104.929 23.0016 103.624 21.6065C102.338 20.2114 101.694 18.4448 101.694 16.3068C101.694 14.2231 102.347 12.4747 103.651 11.0614C104.956 9.64814 106.641 8.94151 108.706 8.94151C110.772 8.94151 112.439 9.63908 113.707 11.0342C114.994 12.4112 115.637 14.1506 115.637 16.2524L115.61 17.258ZM108.706 11.5778C107.692 11.5778 106.849 11.8767 106.179 12.4747C105.508 13.0726 105.092 13.8698 104.929 14.8663H112.43C112.285 13.8698 111.886 13.0726 111.234 12.4747C110.582 11.8767 109.739 11.5778 108.706 11.5778Z" fill="white"/> <path d="M115.61 17.258H104.874C105.001 18.3814 105.409 19.2782 106.097 19.9486C106.786 20.6009 107.692 20.927 108.815 20.927C109.558 20.927 110.228 20.7459 110.826 20.3835C111.424 20.0211 111.85 19.5319 112.104 18.9159H115.365C114.93 20.3472 114.115 21.5068 112.919 22.3947C111.741 23.2644 110.346 23.6992 108.734 23.6992C106.632 23.6992 104.929 23.0016 103.624 21.6065C102.338 20.2114 101.694 18.4448 101.694 16.3068C101.694 14.2231 102.347 12.4747 103.651 11.0614C104.956 9.64814 106.641 8.94151 108.706 8.94151C110.772 8.94151 112.439 9.63908 113.707 11.0342C114.994 12.4112 115.637 14.1506 115.637 16.2524L115.61 17.258ZM108.706 11.5778C107.692 11.5778 106.849 11.8767 106.179 12.4747C105.508 13.0726 105.092 13.8698 104.929 14.8663H112.43C112.285 13.8698 111.886 13.0726 111.234 12.4747C110.582 11.8767 109.739 11.5778 108.706 11.5778Z" fill="currentColor"/>
<path d="M120.906 9.26764V11.1429C121.232 10.5269 121.767 10.0105 122.51 9.59378C123.271 9.15893 124.186 8.94151 125.255 8.94151C126.922 8.94151 128.208 9.44883 129.114 10.4635C130.038 11.4781 130.5 12.828 130.5 14.513V23.3731H127.266V14.9207C127.266 13.9242 127.03 13.1451 126.559 12.5834C126.106 12.0036 125.409 11.7137 124.467 11.7137C123.434 11.7137 122.619 12.0217 122.021 12.6377C121.441 13.2538 121.151 14.1053 121.151 15.1925V23.3731H117.917V9.26764H120.906Z" fill="white"/> <path d="M120.906 9.26764V11.1429C121.232 10.5269 121.767 10.0105 122.51 9.59378C123.271 9.15893 124.186 8.94151 125.255 8.94151C126.922 8.94151 128.208 9.44883 129.114 10.4635C130.038 11.4781 130.5 12.828 130.5 14.513V23.3731H127.266V14.9207C127.266 13.9242 127.03 13.1451 126.559 12.5834C126.106 12.0036 125.409 11.7137 124.467 11.7137C123.434 11.7137 122.619 12.0217 122.021 12.6377C121.441 13.2538 121.151 14.1053 121.151 15.1925V23.3731H117.917V9.26764H120.906Z" fill="currentColor"/>
<path d="M139.946 20.4922V23.2915C139.547 23.4003 138.985 23.4546 138.261 23.4546C135.507 23.4546 134.13 22.0685 134.13 19.2964V11.8496H131.982V9.26764H134.13V5.5986H137.364V9.26764H140V11.8496H137.364V18.9702C137.364 20.0755 137.889 20.6281 138.94 20.6281L139.946 20.4922Z" fill="white"/> <path d="M139.946 20.4922V23.2915C139.547 23.4003 138.985 23.4546 138.261 23.4546C135.507 23.4546 134.13 22.0685 134.13 19.2964V11.8496H131.982V9.26764H134.13V5.5986H137.364V9.26764H140V11.8496H137.364V18.9702C137.364 20.0755 137.889 20.6281 138.94 20.6281L139.946 20.4922Z" fill="currentColor"/>
<path d="M148.304 20.864C146.768 19.184 146 17.056 146 14.48C146 11.904 146.768 9.784 148.304 8.12C149.856 6.44 151.896 5.6 154.424 5.6C156.504 5.6 158.264 6.176 159.704 7.328C161.144 8.48 162.064 10.024 162.464 11.96H160.616C160.28 10.52 159.552 9.376 158.432 8.528C157.312 7.68 155.976 7.256 154.424 7.256C152.44 7.256 150.84 7.92 149.624 9.248C148.424 10.576 147.824 12.32 147.824 14.48C147.824 16.64 148.424 18.384 149.624 19.712C150.84 21.04 152.44 21.704 154.424 21.704C155.976 21.704 157.312 21.28 158.432 20.432C159.552 19.584 160.28 18.44 160.616 17H162.464C162.064 18.936 161.144 20.48 159.704 21.632C158.264 22.784 156.504 23.36 154.424 23.36C151.896 23.36 149.856 22.528 148.304 20.864Z" fill="white"/> <path d="M148.304 20.864C146.768 19.184 146 17.056 146 14.48C146 11.904 146.768 9.784 148.304 8.12C149.856 6.44 151.896 5.6 154.424 5.6C156.504 5.6 158.264 6.176 159.704 7.328C161.144 8.48 162.064 10.024 162.464 11.96H160.616C160.28 10.52 159.552 9.376 158.432 8.528C157.312 7.68 155.976 7.256 154.424 7.256C152.44 7.256 150.84 7.92 149.624 9.248C148.424 10.576 147.824 12.32 147.824 14.48C147.824 16.64 148.424 18.384 149.624 19.712C150.84 21.04 152.44 21.704 154.424 21.704C155.976 21.704 157.312 21.28 158.432 20.432C159.552 19.584 160.28 18.44 160.616 17H162.464C162.064 18.936 161.144 20.48 159.704 21.632C158.264 22.784 156.504 23.36 154.424 23.36C151.896 23.36 149.856 22.528 148.304 20.864Z" fill="currentColor"/>
<path d="M173.63 17.192C171.438 17.192 169.942 17.24 169.142 17.336C168.358 17.416 167.782 17.552 167.414 17.744C166.758 18.112 166.43 18.704 166.43 19.52C166.43 21.088 167.358 21.872 169.214 21.872C170.638 21.872 171.726 21.552 172.478 20.912C173.246 20.272 173.63 19.416 173.63 18.344V17.192ZM169.022 23.288C167.63 23.288 166.566 22.952 165.83 22.28C165.11 21.592 164.75 20.688 164.75 19.568C164.75 18.832 164.942 18.176 165.326 17.6C165.726 17.024 166.27 16.6 166.958 16.328C167.534 16.104 168.278 15.96 169.19 15.896C170.102 15.816 171.582 15.776 173.63 15.776V14.984C173.63 12.968 172.478 11.96 170.174 11.96C168.19 11.96 167.038 12.768 166.718 14.384H165.062C165.238 13.2 165.742 12.256 166.574 11.552C167.422 10.848 168.646 10.496 170.246 10.496C171.958 10.496 173.23 10.896 174.062 11.696C174.91 12.496 175.334 13.6 175.334 15.008V23H173.702V21.224C172.854 22.6 171.294 23.288 169.022 23.288Z" fill="white"/> <path d="M173.63 17.192C171.438 17.192 169.942 17.24 169.142 17.336C168.358 17.416 167.782 17.552 167.414 17.744C166.758 18.112 166.43 18.704 166.43 19.52C166.43 21.088 167.358 21.872 169.214 21.872C170.638 21.872 171.726 21.552 172.478 20.912C173.246 20.272 173.63 19.416 173.63 18.344V17.192ZM169.022 23.288C167.63 23.288 166.566 22.952 165.83 22.28C165.11 21.592 164.75 20.688 164.75 19.568C164.75 18.832 164.942 18.176 165.326 17.6C165.726 17.024 166.27 16.6 166.958 16.328C167.534 16.104 168.278 15.96 169.19 15.896C170.102 15.816 171.582 15.776 173.63 15.776V14.984C173.63 12.968 172.478 11.96 170.174 11.96C168.19 11.96 167.038 12.768 166.718 14.384H165.062C165.238 13.2 165.742 12.256 166.574 11.552C167.422 10.848 168.646 10.496 170.246 10.496C171.958 10.496 173.23 10.896 174.062 11.696C174.91 12.496 175.334 13.6 175.334 15.008V23H173.702V21.224C172.854 22.6 171.294 23.288 169.022 23.288Z" fill="currentColor"/>
<path d="M179.418 20.312V5H181.122V20.12C181.122 20.616 181.202 20.96 181.362 21.152C181.538 21.344 181.85 21.44 182.298 21.44L182.778 21.392V22.952C182.506 23 182.21 23.024 181.89 23.024C180.242 23.024 179.418 22.12 179.418 20.312Z" fill="white"/> <path d="M179.418 20.312V5H181.122V20.12C181.122 20.616 181.202 20.96 181.362 21.152C181.538 21.344 181.85 21.44 182.298 21.44L182.778 21.392V22.952C182.506 23 182.21 23.024 181.89 23.024C180.242 23.024 179.418 22.12 179.418 20.312Z" fill="currentColor"/>
<path d="M185.582 20.312V5H187.286V20.12C187.286 20.616 187.366 20.96 187.526 21.152C187.702 21.344 188.014 21.44 188.462 21.44L188.942 21.392V22.952C188.67 23 188.374 23.024 188.054 23.024C186.406 23.024 185.582 22.12 185.582 20.312Z" fill="white"/> <path d="M185.582 20.312V5H187.286V20.12C187.286 20.616 187.366 20.96 187.526 21.152C187.702 21.344 188.014 21.44 188.462 21.44L188.942 21.392V22.952C188.67 23 188.374 23.024 188.054 23.024C186.406 23.024 185.582 22.12 185.582 20.312Z" fill="currentColor"/>
<path d="M201 10C201 5.58172 204.582 2 209 2H252C256.418 2 260 5.58172 260 10V20C260 24.4183 256.418 28 252 28H209C204.582 28 201 24.4183 201 20V10Z" fill="#368BD6"/> <path d="M201 10C201 5.58172 204.582 2 209 2H252C256.418 2 260 5.58172 260 10V20C260 24.4183 256.418 28 252 28H209C204.582 28 201 24.4183 201 20V10Z" fill="#368BD6"/>
<path d="M212.076 20H216.492C218.99 20 220.215 18.7269 220.215 17.0277C220.215 15.3764 219.043 14.407 217.882 14.3484V14.2418C218.947 13.9915 219.789 13.2457 219.789 11.9194C219.789 10.2947 218.617 9.09091 216.252 9.09091H212.076V20ZM214.052 18.3487V15.1527H216.231C217.451 15.1527 218.207 15.8984 218.207 16.8732C218.207 17.7415 217.61 18.3487 216.178 18.3487H214.052ZM214.052 13.7305V10.7209H216.05C217.211 10.7209 217.813 11.3335 217.813 12.1751C217.813 13.1339 217.035 13.7305 216.007 13.7305H214.052ZM221.934 20H229.072V18.3434H223.911V15.3658H228.662V13.7092H223.911V10.7475H229.03V9.09091H221.934V20ZM230.566 10.7475H233.938V20H235.898V10.7475H239.27V9.09091H230.566V10.7475ZM241.031 20L241.931 17.31H246.032L246.938 20H249.047L245.201 9.09091H242.762L238.921 20H241.031ZM242.464 15.7227L243.939 11.3281H244.024L245.5 15.7227H242.464Z" fill="white"/> <path d="M212.076 20H216.492C218.99 20 220.215 18.7269 220.215 17.0277C220.215 15.3764 219.043 14.407 217.882 14.3484V14.2418C218.947 13.9915 219.789 13.2457 219.789 11.9194C219.789 10.2947 218.617 9.09091 216.252 9.09091H212.076V20ZM214.052 18.3487V15.1527H216.231C217.451 15.1527 218.207 15.8984 218.207 16.8732C218.207 17.7415 217.61 18.3487 216.178 18.3487H214.052ZM214.052 13.7305V10.7209H216.05C217.211 10.7209 217.813 11.3335 217.813 12.1751C217.813 13.1339 217.035 13.7305 216.007 13.7305H214.052ZM221.934 20H229.072V18.3434H223.911V15.3658H228.662V13.7092H223.911V10.7475H229.03V9.09091H221.934V20ZM230.566 10.7475H233.938V20H235.898V10.7475H239.27V9.09091H230.566V10.7475ZM241.031 20L241.931 17.31H246.032L246.938 20H249.047L245.201 9.09091H242.762L238.921 20H241.031ZM242.464 15.7227L243.939 11.3281H244.024L245.5 15.7227H242.464Z" fill="white"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -56,10 +56,6 @@ limitations under the License.
--cpd-color-border-accent: var(--cpd-color-green-1100); --cpd-color-border-accent: var(--cpd-color-green-1100);
--stopgap-color-on-solid-accent: var(--cpd-color-text-primary); --stopgap-color-on-solid-accent: var(--cpd-color-text-primary);
--stopgap-background-85: rgba(16, 19, 23, 0.85); --stopgap-background-85: rgba(16, 19, 23, 0.85);
background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh));
background-repeat: no-repeat;
background-position: center;
} }
@font-face { @font-face {
@@ -152,6 +148,9 @@ limitations under the License.
body { body {
background-color: var(--cpd-color-bg-canvas-default); background-color: var(--cpd-color-bg-canvas-default);
background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh));
background-repeat: no-repeat;
background-position: center;
color: var(--cpd-color-text-primary); color: var(--cpd-color-text-primary);
color-scheme: dark; color-scheme: dark;
margin: 0; margin: 0;

View File

@@ -59,5 +59,4 @@ export const defaultLiveKitOptions: RoomOptions = {
stopLocalTrackOnUnpublish: true, stopLocalTrackOnUnpublish: true,
reconnectPolicy: new DefaultReconnectPolicy(), reconnectPolicy: new DefaultReconnectPolicy(),
disconnectOnPageLeave: true, disconnectOnPageLeave: true,
expWebAudioMix: false,
}; };

View File

@@ -61,7 +61,9 @@ async function doConnect(
// doesn't publish it until you unmute. We want to publish it from the start so we're // doesn't publish it until you unmute. We want to publish it from the start so we're
// always capturing audio: it helps keep bluetooth headsets in the right mode and // always capturing audio: it helps keep bluetooth headsets in the right mode and
// mobile browsers to know we're doing a call. // mobile browsers to know we're doing a call.
if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { if (
livekitRoom!.localParticipant.getTrackPublication(Track.Source.Microphone)
) {
logger.warn( logger.warn(
"Pre-creating audio track but participant already appears to have an microphone track: this shouldn't happen!", "Pre-creating audio track but participant already appears to have an microphone track: this shouldn't happen!",
); );
@@ -90,7 +92,9 @@ async function doConnect(
if (!audioEnabled) await preCreatedAudioTrack?.mute(); if (!audioEnabled) await preCreatedAudioTrack?.mute();
// check again having awaited for the track to create // check again having awaited for the track to create
if (livekitRoom!.localParticipant.getTrack(Track.Source.Microphone)) { if (
livekitRoom!.localParticipant.getTrackPublication(Track.Source.Microphone)
) {
logger.warn( logger.warn(
"Pre-created audio track but participant already appears to have an microphone track: this shouldn't happen!", "Pre-created audio track but participant already appears to have an microphone track: this shouldn't happen!",
); );
@@ -174,7 +178,7 @@ export function useECConnectionState(
const doFocusSwitch = useCallback(async (): Promise<void> => { const doFocusSwitch = useCallback(async (): Promise<void> => {
const screenshareTracks: MediaStreamTrack[] = []; const screenshareTracks: MediaStreamTrack[] = [];
for (const t of livekitRoom!.localParticipant.videoTracks.values()) { for (const t of livekitRoom!.localParticipant.videoTrackPublications.values()) {
if (t.track && t.source == Track.Source.ScreenShare) { if (t.track && t.source == Track.Source.ScreenShare) {
const newTrack = t.track.mediaStreamTrack.clone(); const newTrack = t.track.mediaStreamTrack.clone();
newTrack.enabled = true; newTrack.enabled = true;

View File

@@ -291,7 +291,7 @@ export function useLiveKit(
room.options.audioCaptureDefaults?.deviceId === "default" room.options.audioCaptureDefaults?.deviceId === "default"
) { ) {
const activeMicTrack = Array.from( const activeMicTrack = Array.from(
room.localParticipant.audioTracks.values(), room.localParticipant.audioTrackPublications.values(),
).find((d) => d.source === Track.Source.Microphone)?.track; ).find((d) => d.source === Track.Source.Microphone)?.track;
const defaultDevice = device.available.find( const defaultDevice = device.available.find(
@@ -313,7 +313,7 @@ export function useLiveKit(
// Note that room.switchActiveDevice() won't work: Livekit will ignore it because // Note that room.switchActiveDevice() won't work: Livekit will ignore it because
// the deviceId hasn't changed (was & still is default). // the deviceId hasn't changed (was & still is default).
room.localParticipant room.localParticipant
.getTrack(Track.Source.Microphone) .getTrackPublication(Track.Source.Microphone)
?.audioTrack?.restartTrack(); ?.audioTrack?.restartTrack();
} }
} else { } else {

View File

@@ -188,16 +188,9 @@ export async function initClient(
await client.store.startup(); await client.store.startup();
} }
if (client.initCrypto) { await client.initCrypto();
await client.initCrypto(); client.setGlobalErrorOnUnknownDevices(false);
} await client.startClient();
await client.startClient({
// dirty hack to reduce chance of gappy syncs
// should be fixed by spotting gaps and backpaginating
initialSyncLimit: 50,
});
await waitForSync(client); await waitForSync(client);
return client; return client;

View File

@@ -17,7 +17,7 @@ limitations under the License.
import { FC } from "react"; import { FC } from "react";
import { Tooltip } from "@vector-im/compound-web"; import { Tooltip } from "@vector-im/compound-web";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import LockIcon from "@vector-im/compound-design-tokens/icons/lock.svg?react"; import LockSolidIcon from "@vector-im/compound-design-tokens/icons/lock-solid.svg?react";
import LockOffIcon from "@vector-im/compound-design-tokens/icons/lock-off.svg?react"; import LockOffIcon from "@vector-im/compound-design-tokens/icons/lock-off.svg?react";
import styles from "./EncryptionLock.module.css"; import styles from "./EncryptionLock.module.css";
@@ -28,7 +28,7 @@ interface Props {
export const EncryptionLock: FC<Props> = ({ encrypted }) => { export const EncryptionLock: FC<Props> = ({ encrypted }) => {
const { t } = useTranslation(); const { t } = useTranslation();
const Icon = encrypted ? LockIcon : LockOffIcon; const Icon = encrypted ? LockSolidIcon : LockOffIcon;
const label = encrypted ? t("common.encrypted") : t("common.unencrypted"); const label = encrypted ? t("common.encrypted") : t("common.unencrypted");
return ( return (

View File

@@ -87,7 +87,7 @@ export const GroupCallView: FC<Props> = ({
const roomName = useRoomName(rtcSession.room); const roomName = useRoomName(rtcSession.room);
const roomAvatar = useRoomAvatar(rtcSession.room); const roomAvatar = useRoomAvatar(rtcSession.room);
const e2eeSharedKey = useRoomSharedKey(rtcSession.room.roomId); const e2eeSharedKey = useRoomSharedKey(rtcSession.room.roomId);
const { perParticipantE2EE } = useUrlParams(); const { perParticipantE2EE, returnToLobby } = useUrlParams();
const roomEncrypted = const roomEncrypted =
useIsRoomE2EE(rtcSession.room.roomId) || perParticipantE2EE; useIsRoomE2EE(rtcSession.room.roomId) || perParticipantE2EE;
@@ -137,9 +137,6 @@ export const GroupCallView: FC<Props> = ({
}, [perParticipantE2EE, e2eeSharedKey]); }, [perParticipantE2EE, e2eeSharedKey]);
useEffect(() => { useEffect(() => {
// this effect is only if we don't want to show the lobby (skipLobby = true)
if (!skipLobby) return;
const defaultDeviceSetup = async ( const defaultDeviceSetup = async (
requestedDeviceData: JoinCallData, requestedDeviceData: JoinCallData,
): Promise<void> => { ): Promise<void> => {
@@ -189,24 +186,22 @@ export const GroupCallView: FC<Props> = ({
} }
} }
}; };
if (widget && preload) {
// In preload mode, wait for a join action before entering if (widget && preload && skipLobby) {
// In preload mode without lobby we wait for a join action before entering
const onJoin = async ( const onJoin = async (
ev: CustomEvent<IWidgetApiRequest>, ev: CustomEvent<IWidgetApiRequest>,
): Promise<void> => { ): Promise<void> => {
defaultDeviceSetup(ev.detail.data as unknown as JoinCallData); defaultDeviceSetup(ev.detail.data as unknown as JoinCallData);
enterRTCSession(rtcSession, perParticipantE2EE); enterRTCSession(rtcSession, perParticipantE2EE);
await Promise.all([ await widget!.api.transport.reply(ev.detail, {});
widget!.api.setAlwaysOnScreen(true),
widget!.api.transport.reply(ev.detail, {}),
]);
}; };
widget.lazyActions.on(ElementWidgetActions.JoinCall, onJoin); widget.lazyActions.on(ElementWidgetActions.JoinCall, onJoin);
return () => { return () => {
widget!.lazyActions.off(ElementWidgetActions.JoinCall, onJoin); widget!.lazyActions.off(ElementWidgetActions.JoinCall, onJoin);
}; };
} else { } else if (widget && !preload && skipLobby) {
// if we don't use preload and only skipLobby we enter the rtc session right away // No lobby and no preload: we enter the rtc session right away
defaultDeviceSetup({ audioInput: null, videoInput: null }); defaultDeviceSetup({ audioInput: null, videoInput: null });
enterRTCSession(rtcSession, perParticipantE2EE); enterRTCSession(rtcSession, perParticipantE2EE);
} }
@@ -246,6 +241,9 @@ export const GroupCallView: FC<Props> = ({
useEffect(() => { useEffect(() => {
if (widget && isJoined) { if (widget && isJoined) {
// set widget to sticky once joined.
widget!.api.setAlwaysOnScreen(true);
const onHangup = async ( const onHangup = async (
ev: CustomEvent<IWidgetApiRequest>, ev: CustomEvent<IWidgetApiRequest>,
): Promise<void> => { ): Promise<void> => {
@@ -319,6 +317,21 @@ export const GroupCallView: FC<Props> = ({
onDismiss={onDismissInviteModal} onDismiss={onDismissInviteModal}
/> />
); );
const lobbyView = (
<>
{shareModal}
<LobbyView
client={client}
matrixInfo={matrixInfo}
muteStates={muteStates}
onEnter={(): void => enterRTCSession(rtcSession, perParticipantE2EE)}
confineToRoom={confineToRoom}
hideHeader={hideHeader}
participantCount={participantCount}
onShareClick={onShareClick}
/>
</>
);
if (isJoined) { if (isJoined) {
return ( return (
@@ -338,7 +351,9 @@ export const GroupCallView: FC<Props> = ({
/> />
</> </>
); );
} else if (left) { } else if (left && widget === null) {
// Left in SPA mode:
// The call ended view is shown for two reasons: prompting guests to create // The call ended view is shown for two reasons: prompting guests to create
// an account, and prompting users that have opted into analytics to provide // an account, and prompting users that have opted into analytics to provide
// feedback. We don't show a feedback prompt to widget users however (at // feedback. We don't show a feedback prompt to widget users however (at
@@ -366,23 +381,14 @@ export const GroupCallView: FC<Props> = ({
// LobbyView again which would open capture devices again. // LobbyView again which would open capture devices again.
return null; return null;
} }
} else if (preload) { } else if (left && widget !== null) {
// Left in widget mode:
if (!returnToLobby) {
return null;
}
} else if (preload || skipLobby) {
return null; return null;
} else {
return (
<>
{shareModal}
<LobbyView
client={client}
matrixInfo={matrixInfo}
muteStates={muteStates}
onEnter={(): void => enterRTCSession(rtcSession, perParticipantE2EE)}
confineToRoom={confineToRoom}
hideHeader={hideHeader}
participantCount={participantCount}
onShareClick={onShareClick}
/>
</>
);
} }
return lobbyView;
}; };

View File

@@ -41,6 +41,8 @@ export const RoomAuthView: FC = () => {
// @ts-ignore // @ts-ignore
(e) => { (e) => {
e.preventDefault(); e.preventDefault();
setLoading(true);
const data = new FormData(e.target); const data = new FormData(e.target);
const dataForDisplayName = data.get("displayName"); const dataForDisplayName = data.get("displayName");
const displayName = const displayName =

View File

@@ -29,6 +29,7 @@ import { useOptInAnalytics } from "../settings/useSetting";
import { HomePage } from "../home/HomePage"; import { HomePage } from "../home/HomePage";
import { platform } from "../Platform"; import { platform } from "../Platform";
import { AppSelectionModal } from "./AppSelectionModal"; import { AppSelectionModal } from "./AppSelectionModal";
import { widget } from "../widget";
export const RoomPage: FC = () => { export const RoomPage: FC = () => {
const { const {
@@ -62,7 +63,7 @@ export const RoomPage: FC = () => {
useEffect(() => { useEffect(() => {
// If we've finished loading, are not already authed and we've been given a display name as // If we've finished loading, are not already authed and we've been given a display name as
// a URL param, automatically register a passwordless user // a URL param, automatically register a passwordless user
if (!loading && !authenticated && displayName) { if (!loading && !authenticated && displayName && !widget) {
setIsRegistering(true); setIsRegistering(true);
registerPasswordlessUser(displayName).finally(() => { registerPasswordlessUser(displayName).finally(() => {
setIsRegistering(false); setIsRegistering(false);

View File

@@ -114,14 +114,7 @@ export const VideoPreview: FC<Props> = ({
playsInline playsInline
// There's no reason for this to be focusable // There's no reason for this to be focusable
tabIndex={-1} tabIndex={-1}
// React supports the disablePictureInPicture attribute, but Firefox disablePictureInPicture
// only recognizes a value of "true", whereas React sets it to the empty
// string. So we need to bypass React and set it specifically to "true".
// https://bugzilla.mozilla.org/show_bug.cgi?id=1865748
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line react/no-unknown-property
disablepictureinpicture="true"
/> />
{!muteStates.video.enabled && ( {!muteStates.video.enabled && (
<div className={styles.avatarContainer}> <div className={styles.avatarContainer}>

View File

@@ -30,13 +30,6 @@ function getActiveFocus(
const oldestMembership = rtcSession.getOldestMembership(); const oldestMembership = rtcSession.getOldestMembership();
const focus = oldestMembership?.getActiveFoci()[0] as LivekitFocus; const focus = oldestMembership?.getActiveFoci()[0] as LivekitFocus;
if (focus) {
logger.info(
`Got active focus for call from ${oldestMembership?.sender}/${oldestMembership?.deviceId}`,
focus,
);
}
return focus; return focus;
} }
@@ -56,6 +49,11 @@ export function useActiveFocus(
const newActiveFocus = getActiveFocus(rtcSession); const newActiveFocus = getActiveFocus(rtcSession);
if (!deepCompare(activeFocus, newActiveFocus)) { if (!deepCompare(activeFocus, newActiveFocus)) {
const oldestMembership = rtcSession.getOldestMembership();
logger.warn(
`Got new active focus from membership: ${oldestMembership?.sender}/${oldestMembership?.deviceId}.
Updating focus (focus switch) from ${activeFocus} to ${newActiveFocus}`,
);
setActiveFocus(newActiveFocus); setActiveFocus(newActiveFocus);
} }
}, [activeFocus, rtcSession]); }, [activeFocus, rtcSession]);

View File

@@ -82,10 +82,7 @@ export const useLoadGroupCall = (
); );
} }
} else { } else {
// room IDs we just try to join by their ID, which will not work in the room = await client.joinRoom(roomIdOrAlias, { viaServers });
// general case without providing some servers to join via. We could provide
// our own server, but in practice that is implicit.
room = await client.joinRoom(roomIdOrAlias);
} }
logger.info( logger.info(

View File

@@ -56,7 +56,7 @@ function observeTrackReference(
observeParticipantMedia(participant).pipe( observeParticipantMedia(participant).pipe(
map(() => ({ map(() => ({
participant, participant,
publication: participant.getTrack(source), publication: participant.getTrackPublication(source),
source, source,
})), })),
distinctUntilKeyChanged("publication"), distinctUntilKeyChanged("publication"),
@@ -167,6 +167,12 @@ export class UserMediaTileViewModel extends BaseTileViewModel {
*/ */
public readonly videoEnabled: StateObservable<boolean>; public readonly videoEnabled: StateObservable<boolean>;
private readonly _cropVideo = new BehaviorSubject(true);
/**
* Whether the tile video should be contained inside the tile or be cropped to fit.
*/
public readonly cropVideo = state(this._cropVideo);
public constructor( public constructor(
id: string, id: string,
member: RoomMember | undefined, member: RoomMember | undefined,
@@ -205,6 +211,10 @@ export class UserMediaTileViewModel extends BaseTileViewModel {
this._locallyMuted.next(!this._locallyMuted.value); this._locallyMuted.next(!this._locallyMuted.value);
} }
public toggleFitContain(): void {
this._cropVideo.next(!this._cropVideo.value);
}
public setLocalVolume(value: number): void { public setLocalVolume(value: number): void {
this._localVolume.next(value); this._localVolume.next(value);
} }

41
src/useTheme.ts Normal file
View File

@@ -0,0 +1,41 @@
/*
Copyright 2024 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 { useLayoutEffect, useRef } from "react";
import { useUrlParams } from "./UrlParams";
export const useTheme = (): void => {
const { theme: themeName } = useUrlParams();
const previousTheme = useRef<string | null>(document.body.classList.item(0));
useLayoutEffect(() => {
// Don't update the current theme if the url does not contain a theme prop.
if (!themeName) return;
const theme = themeName.includes("light") ? "light" : "dark";
const themeHighContrast = themeName.includes("high-contrast") ? "-hc" : "";
const themeString = "cpd-theme-" + theme + themeHighContrast;
if (themeString !== previousTheme.current) {
document.body.classList.remove(
"cpd-theme-light",
"cpd-theme-dark",
"cpd-theme-light-hc",
"cpd-theme-dark-hc",
);
document.body.classList.add(themeString);
previousTheme.current = themeString;
}
}, [previousTheme, themeName]);
};

View File

@@ -73,7 +73,7 @@ borders don't support gradients */
.videoTile video { .videoTile video {
inline-size: 100%; inline-size: 100%;
block-size: 100%; block-size: 100%;
object-fit: cover; object-fit: contain;
background-color: var(--cpd-color-bg-subtle-primary); background-color: var(--cpd-color-bg-subtle-primary);
/* This transform is a no-op, but it forces Firefox to use a different /* This transform is a no-op, but it forces Firefox to use a different
rendering path, one that actually clips the corners of <video> elements into rendering path, one that actually clips the corners of <video> elements into
@@ -89,6 +89,10 @@ borders don't support gradients */
object-fit: contain; object-fit: contain;
} }
.videoTile.cropVideo video {
object-fit: cover;
}
.videoTile.videoMuted video { .videoTile.videoMuted video {
display: none; display: none;
} }

View File

@@ -37,7 +37,7 @@ import {
import MicOnSolidIcon from "@vector-im/compound-design-tokens/icons/mic-on-solid.svg?react"; import MicOnSolidIcon from "@vector-im/compound-design-tokens/icons/mic-on-solid.svg?react";
import MicOffSolidIcon from "@vector-im/compound-design-tokens/icons/mic-off-solid.svg?react"; import MicOffSolidIcon from "@vector-im/compound-design-tokens/icons/mic-off-solid.svg?react";
import ErrorIcon from "@vector-im/compound-design-tokens/icons/error.svg?react"; import ErrorIcon from "@vector-im/compound-design-tokens/icons/error.svg?react";
import MicOffOutlineIcon from "@vector-im/compound-design-tokens/icons/mic-off-outline.svg?react"; import MicOffIcon from "@vector-im/compound-design-tokens/icons/mic-off.svg?react";
import OverflowHorizontalIcon from "@vector-im/compound-design-tokens/icons/overflow-horizontal.svg?react"; import OverflowHorizontalIcon from "@vector-im/compound-design-tokens/icons/overflow-horizontal.svg?react";
import VolumeOnIcon from "@vector-im/compound-design-tokens/icons/volume-on.svg?react"; import VolumeOnIcon from "@vector-im/compound-design-tokens/icons/volume-on.svg?react";
import VolumeOffIcon from "@vector-im/compound-design-tokens/icons/volume-off.svg?react"; import VolumeOffIcon from "@vector-im/compound-design-tokens/icons/volume-off.svg?react";
@@ -134,14 +134,7 @@ const Tile = forwardRef<HTMLDivElement, TileProps>(
trackRef={video} trackRef={video}
// There's no reason for this to be focusable // There's no reason for this to be focusable
tabIndex={-1} tabIndex={-1}
// React supports the disablePictureInPicture attribute, but Firefox disablePictureInPicture
// only recognizes a value of "true", whereas React sets it to the empty
// string. So we need to bypass React and set it specifically to "true".
// https://bugzilla.mozilla.org/show_bug.cgi?id=1865748
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line react/no-unknown-property
disablepictureinpicture="true"
/> />
)} )}
</div> </div>
@@ -213,9 +206,16 @@ const UserMediaTile = subscribe<UserMediaTileProps, HTMLDivElement>(
const mirror = useStateObservable(vm.mirror); const mirror = useStateObservable(vm.mirror);
const speaking = useStateObservable(vm.speaking); const speaking = useStateObservable(vm.speaking);
const locallyMuted = useStateObservable(vm.locallyMuted); const locallyMuted = useStateObservable(vm.locallyMuted);
const cropVideo = useStateObservable(vm.cropVideo);
const localVolume = useStateObservable(vm.localVolume); const localVolume = useStateObservable(vm.localVolume);
const onChangeMute = useCallback(() => vm.toggleLocallyMuted(), [vm]); const onChangeMute = useCallback(() => vm.toggleLocallyMuted(), [vm]);
const onChangeFitContain = useCallback(() => vm.toggleFitContain(), [vm]);
const onSelectMute = useCallback((e: Event) => e.preventDefault(), []); const onSelectMute = useCallback((e: Event) => e.preventDefault(), []);
const onSelectFitContain = useCallback(
(e: Event) => e.preventDefault(),
[],
);
const onChangeLocalVolume = useCallback( const onChangeLocalVolume = useCallback(
(v: number) => vm.setLocalVolume(v), (v: number) => vm.setLocalVolume(v),
[vm], [vm],
@@ -232,16 +232,30 @@ const UserMediaTile = subscribe<UserMediaTileProps, HTMLDivElement>(
label={t("common.profile")} label={t("common.profile")}
onSelect={onOpenProfile} onSelect={onOpenProfile}
/> />
<ToggleMenuItem
Icon={ExpandIcon}
label={t("video_tile.change_fit_contain")}
checked={cropVideo}
onChange={onChangeFitContain}
onSelect={onSelectFitContain}
/>
</> </>
) : ( ) : (
<> <>
<ToggleMenuItem <ToggleMenuItem
Icon={MicOffOutlineIcon} Icon={MicOffIcon}
label={t("video_tile.mute_for_me")} label={t("video_tile.mute_for_me")}
checked={locallyMuted} checked={locallyMuted}
onChange={onChangeMute} onChange={onChangeMute}
onSelect={onSelectMute} onSelect={onSelectMute}
/> />
<ToggleMenuItem
Icon={ExpandIcon}
label={t("video_tile.change_fit_contain")}
checked={cropVideo}
onChange={onChangeFitContain}
onSelect={onSelectFitContain}
/>
{/* TODO: Figure out how to make this slider keyboard accessible */} {/* TODO: Figure out how to make this slider keyboard accessible */}
<MenuItem as="div" Icon={VolumeIcon} label={null} onSelect={null}> <MenuItem as="div" Icon={VolumeIcon} label={null} onSelect={null}>
<Slider <Slider
@@ -264,6 +278,7 @@ const UserMediaTile = subscribe<UserMediaTileProps, HTMLDivElement>(
className={classNames(className, { className={classNames(className, {
[styles.mirror]: mirror, [styles.mirror]: mirror,
[styles.speaking]: showSpeakingIndicator && speaking, [styles.speaking]: showSpeakingIndicator && speaking,
[styles.cropVideo]: cropVideo,
})} })}
style={style} style={style}
targetWidth={targetWidth} targetWidth={targetWidth}

View File

@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { vi } from "vitest";
import { screen, render } from "@testing-library/react"; import { screen, render } from "@testing-library/react";
import { Toast } from "../src/Toast"; import { Toast } from "../src/Toast";
import userEvent from "@testing-library/user-event"; import userEvent from "@testing-library/user-event";
@@ -35,7 +36,7 @@ test("Toast renders", () => {
}); });
test("Toast dismisses when clicked", async () => { test("Toast dismisses when clicked", async () => {
const onDismiss = jest.fn(); const onDismiss = vi.fn();
render( render(
<Toast open={true} onDismiss={onDismiss}> <Toast open={true} onDismiss={onDismiss}>
Hello world! Hello world!
@@ -47,13 +48,13 @@ test("Toast dismisses when clicked", async () => {
test("Toast dismisses itself after the specified timeout", async () => { test("Toast dismisses itself after the specified timeout", async () => {
withFakeTimers(() => { withFakeTimers(() => {
const onDismiss = jest.fn(); const onDismiss = vi.fn();
render( render(
<Toast open={true} onDismiss={onDismiss} autoDismiss={2000}> <Toast open={true} onDismiss={onDismiss} autoDismiss={2000}>
Hello world! Hello world!
</Toast>, </Toast>,
); );
jest.advanceTimersByTime(2000); vi.advanceTimersByTime(2000);
expect(onDismiss).toHaveBeenCalled(); expect(onDismiss).toHaveBeenCalled();
}); });
}); });

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { mocked } from "jest-mock"; import { vi } from "vitest";
import { getRoomIdentifierFromUrl } from "../src/UrlParams"; import { getRoomIdentifierFromUrl } from "../src/UrlParams";
import { Config } from "../src/config/Config"; import { Config } from "../src/config/Config";
@@ -24,11 +24,11 @@ const ROOM_ID = "!d45f138fsd";
const ORIGIN = "https://call.element.io"; const ORIGIN = "https://call.element.io";
const HOMESERVER = "call.ems.host"; const HOMESERVER = "call.ems.host";
jest.mock("../src/config/Config"); vi.mock("../src/config/Config");
describe("UrlParams", () => { describe("UrlParams", () => {
beforeAll(() => { beforeAll(() => {
mocked(Config.defaultServerName).mockReturnValue("call.ems.host"); vi.mocked(Config.defaultServerName).mockReturnValue("call.ems.host");
}); });
describe("handles URL with /room/", () => { describe("handles URL with /room/", () => {

View File

@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Toast renders 1`] = ` exports[`Toast renders 1`] = `
<button <button

View File

@@ -1,18 +0,0 @@
import { TextEncoder } from "util";
import JSDOMEnvironment_, {
TestEnvironment as TestEnvironment_,
} from "jest-environment-jsdom";
import { JestEnvironmentConfig, EnvironmentContext } from "@jest/environment";
// This is a patched version of jsdom that adds TextEncoder, as a workaround for
// https://github.com/jsdom/jsdom/issues/2524
// Once that issue is resolved, this custom environment file can be deleted
export default class JSDOMEnvironment extends JSDOMEnvironment_ {
constructor(config: JestEnvironmentConfig, context: EnvironmentContext) {
super(config, context);
this.global.TextEncoder ??= TextEncoder;
}
}
export const TestEnvironment =
TestEnvironment_ === JSDOMEnvironment_ ? JSDOMEnvironment : TestEnvironment_;

View File

@@ -1 +0,0 @@
module.exports = { loadOlm: jest.fn(async () => {}) };

View File

@@ -1,3 +0,0 @@
// Mock file for SVG imports
const ReactComponent = "svg";
export default ReactComponent;

View File

@@ -1 +0,0 @@
module.exports = jest.fn();

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { Mocked, mocked } from "jest-mock"; import { vi, Mocked } from "vitest";
import { RoomState } from "matrix-js-sdk/src/models/room-state"; import { RoomState } from "matrix-js-sdk/src/models/room-state";
import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics"; import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics";
import { checkForParallelCalls } from "../../src/room/checkForParallelCalls"; import { checkForParallelCalls } from "../../src/room/checkForParallelCalls";
@@ -23,10 +23,10 @@ import { withFakeTimers } from "../utils";
const withMockedPosthog = ( const withMockedPosthog = (
continuation: (posthog: Mocked<PosthogAnalytics>) => void, continuation: (posthog: Mocked<PosthogAnalytics>) => void,
) => { ) => {
const posthog = mocked({ const posthog = vi.mocked({
trackEvent: jest.fn(), trackEvent: vi.fn(),
} as unknown as PosthogAnalytics); } as unknown as PosthogAnalytics);
const instanceSpy = jest const instanceSpy = vi
.spyOn(PosthogAnalytics, "instance", "get") .spyOn(PosthogAnalytics, "instance", "get")
.mockReturnValue(posthog); .mockReturnValue(posthog);
try { try {

View File

@@ -13,12 +13,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { vi } from "vitest";
export function withFakeTimers(continuation: () => void): void { export function withFakeTimers(continuation: () => void): void {
jest.useFakeTimers(); vi.useFakeTimers();
try { try {
continuation(); continuation();
} finally { } finally {
jest.useRealTimers(); vi.useRealTimers();
} }
} }

View File

@@ -12,9 +12,23 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"esModuleInterop": true, "esModuleInterop": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"moduleResolution": "node", "moduleResolution": "bundler",
"declaration": true, "declaration": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"paths": {
// These imports within @livekit/components-core and
// @livekit/components-react are broken under the "bundler" module
// resolution mode, so we need to resolve them manually
"livekit-client/dist/src/room/Room": [
"./node_modules/livekit-client/dist/src/room/Room.d.ts"
],
"livekit-client/dist/src/room/participant/Participant": [
"./node_modules/livekit-client/dist/src/room/participant/Participant.d.ts"
],
"livekit-client/dist/src/proto/livekit_models_pb": [
"./node_modules/livekit-client/dist/src/proto/livekit_models_pb.d.ts"
]
},
// TODO: Enable the following options later. // TODO: Enable the following options later.
// "forceConsistentCasingInFileNames": true, // "forceConsistentCasingInFileNames": true,
@@ -29,6 +43,7 @@
}, },
"include": [ "include": [
"./node_modules/matrix-js-sdk/src/@types/*.d.ts", "./node_modules/matrix-js-sdk/src/@types/*.d.ts",
"./node_modules/vitest/globals.d.ts",
"./src/**/*.ts", "./src/**/*.ts",
"./src/**/*.tsx", "./src/**/*.tsx",
"./test/**/*.ts", "./test/**/*.ts",

24
vitest.config.js Normal file
View File

@@ -0,0 +1,24 @@
import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config";
export default defineConfig((configEnv) =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
test: {
globals: true,
environment: "jsdom",
css: {
modules: {
classNameStrategy: "non-scoped",
},
},
include: ["test/**/*-test.[jt]s?(x)"],
coverage: {
reporter: ["text", "html"],
exclude: ["node_modules/"],
},
},
}),
),
);

4371
yarn.lock

File diff suppressed because it is too large Load Diff