Compare commits
1091 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f8081bebb | ||
|
|
12237c469f | ||
|
|
7ee3fbd832 | ||
|
|
040288790c | ||
|
|
cba5eb5c07 | ||
|
|
6ae0c0988d | ||
|
|
088d4d93a0 | ||
|
|
ead5f63a02 | ||
|
|
8655b41c05 | ||
|
|
5b09a5ebd8 | ||
|
|
354382d498 | ||
|
|
fa6b8b3f0b | ||
|
|
3e57a7692c | ||
|
|
e9fc5dadd9 | ||
|
|
86bacd2b47 | ||
|
|
cb28fa715a | ||
|
|
172af1dce3 | ||
|
|
270540f125 | ||
|
|
0974488c4e | ||
|
|
a2dd538237 | ||
|
|
b79a405ed6 | ||
|
|
159ae603aa | ||
|
|
559fc4851c | ||
|
|
0db51d9dfd | ||
|
|
7bca541cb6 | ||
|
|
51ae4c0a88 | ||
|
|
6521c8055c | ||
|
|
7e3e17a3e8 | ||
|
|
5eaabcf74d | ||
|
|
3a754479dc | ||
|
|
0e3113edcd | ||
|
|
6432dca518 | ||
|
|
995b4c8847 | ||
|
|
b8774ad682 | ||
|
|
30a54f3795 | ||
|
|
66b79f57bb | ||
|
|
a6f6db9226 | ||
|
|
61a24262de | ||
|
|
0955d7bcc3 | ||
|
|
36ce21d7ac | ||
|
|
eddc590235 | ||
|
|
61bc4dcc14 | ||
|
|
e2c4eae67b | ||
|
|
1da3fe0731 | ||
|
|
f562cc1e7f | ||
|
|
69b762b9ed | ||
|
|
ff55b1d189 | ||
|
|
d796ebe3fa | ||
|
|
b4bc41ba02 | ||
|
|
a072dfae9c | ||
|
|
0eba3ef75f | ||
|
|
2b9bf1fbe6 | ||
|
|
8769f8966d | ||
|
|
4e7b29e142 | ||
|
|
977ba92dba | ||
|
|
64e7047b12 | ||
|
|
ed99af0be6 | ||
|
|
52058716f6 | ||
|
|
29df87d22c | ||
|
|
6443e911dc | ||
|
|
aa6b7056ae | ||
|
|
c20737ba4c | ||
|
|
6f03653532 | ||
|
|
2ec0aaa0de | ||
|
|
9b4ad24f10 | ||
|
|
5069b008e2 | ||
|
|
6d8e45aea8 | ||
|
|
f0f9b929a1 | ||
|
|
9b5072cc57 | ||
|
|
b13fa85465 | ||
|
|
bf5128cfee | ||
|
|
f928e63c7b | ||
|
|
eef92249f7 | ||
|
|
04ad44f900 | ||
|
|
90072aa2bb | ||
|
|
ab42fe97cb | ||
|
|
f4cf3d8c62 | ||
|
|
1782a0eaf3 | ||
|
|
5bf46eb8f8 | ||
|
|
b4973bbc6b | ||
|
|
eaf3fb13c1 | ||
|
|
b503056673 | ||
|
|
86e3c346a4 | ||
|
|
7449e1f6e4 | ||
|
|
aadf6c05ac | ||
|
|
39ee8d838e | ||
|
|
1f10245adc | ||
|
|
c1de41106f | ||
|
|
e12bad952a | ||
|
|
7abb56e406 | ||
|
|
00d8100dfe | ||
|
|
eb051ab318 | ||
|
|
942e28f3c2 | ||
|
|
0bfec65405 | ||
|
|
f89342713a | ||
|
|
5a0b81b57f | ||
|
|
f9323d8b2c | ||
|
|
c68d536d80 | ||
|
|
fde7dbedaa | ||
|
|
7e240e96b7 | ||
|
|
f84800363f | ||
|
|
f9e12c8ff3 | ||
|
|
6abd1fbca1 | ||
|
|
599a4708cb | ||
|
|
f53ea75c94 | ||
|
|
2b67a9cfbe | ||
|
|
d582a7cc29 | ||
|
|
8757f07982 | ||
|
|
5b8910d265 | ||
|
|
a03ab6c9fa | ||
|
|
a3ce333352 | ||
|
|
d5faa5ea90 | ||
|
|
5becd2e175 | ||
|
|
3b38a5322c | ||
|
|
d062871f41 | ||
|
|
6b64bdfdb5 | ||
|
|
2de4705fa7 | ||
|
|
12e233970c | ||
|
|
10b915c707 | ||
|
|
5544695f21 | ||
|
|
72de8e066c | ||
|
|
63afda05bc | ||
|
|
b05c4234b7 | ||
|
|
80ddb7495d | ||
|
|
380f49fccc | ||
|
|
447bac3280 | ||
|
|
c74cebcc4b | ||
|
|
cd0aa0ced6 | ||
|
|
9cbd146e24 | ||
|
|
509bb4f1b0 | ||
|
|
3be3a32f3d | ||
|
|
17adfc5777 | ||
|
|
4eb1be678d | ||
|
|
b34e7d00e9 | ||
|
|
78f4c2a650 | ||
|
|
a3773c0a9a | ||
|
|
2b92ce8af2 | ||
|
|
5564e2fde6 | ||
|
|
35e2d2c432 | ||
|
|
ea2d98179c | ||
|
|
d83a104dda | ||
|
|
58f274eabf | ||
|
|
632ad07304 | ||
|
|
4173fd113b | ||
|
|
56b5f2845d | ||
|
|
afee9eaa26 | ||
|
|
364b78abda | ||
|
|
507b1fc52d | ||
|
|
6812c35a40 | ||
|
|
377b7ff5de | ||
|
|
4955535374 | ||
|
|
0664f978e3 | ||
|
|
bcc06d86ff | ||
|
|
7526826b0c | ||
|
|
b4e0df75c0 | ||
|
|
d561a41666 | ||
|
|
d53ad9a8f3 | ||
|
|
e04affe93e | ||
|
|
24870deead | ||
|
|
7fcd7125c1 | ||
|
|
1efa594430 | ||
|
|
caea4b250e | ||
|
|
0a8c6c1454 | ||
|
|
d4a2617f7b | ||
|
|
e05c6f1bdf | ||
|
|
2bc56dbff2 | ||
|
|
a59875dab5 | ||
|
|
8c21e8f277 | ||
|
|
d8634eed3d | ||
|
|
be4b70c1e1 | ||
|
|
e79cded57f | ||
|
|
2440037639 | ||
|
|
a16f235277 | ||
|
|
45c89a2298 | ||
|
|
7979493371 | ||
|
|
e0b10d89b5 | ||
|
|
183d2d9050 | ||
|
|
12b719da95 | ||
|
|
dfda7539d6 | ||
|
|
7f40ce8dde | ||
|
|
ec1b020d4e | ||
|
|
54c22f4ab2 | ||
|
|
ffbbc74a96 | ||
|
|
34c45cb5e2 | ||
|
|
af0bd795b5 | ||
|
|
0d485ef97f | ||
|
|
5647619b36 | ||
|
|
8a414012a0 | ||
|
|
e33fbd77d1 | ||
|
|
fdc6d4a1b6 | ||
|
|
a534356dd9 | ||
|
|
f847692953 | ||
|
|
486430d1f0 | ||
|
|
599d6fd007 | ||
|
|
14fc1481f3 | ||
|
|
e6ddf40b1b | ||
|
|
9f521a79f7 | ||
|
|
83784a717a | ||
|
|
0729deee79 | ||
|
|
77c3114cf8 | ||
|
|
82a56c8204 | ||
|
|
b39896d8c6 | ||
|
|
79b3fdb645 | ||
|
|
0f877cd021 | ||
|
|
db2acc75b2 | ||
|
|
a5dbfbf2c1 | ||
|
|
34c7d02de2 | ||
|
|
ca45067158 | ||
|
|
5a6eb7c573 | ||
|
|
41083c0f9e | ||
|
|
20602c122b | ||
|
|
5ad2a27a92 | ||
|
|
68daaa45f9 | ||
|
|
c40ea35937 | ||
|
|
d27f433175 | ||
|
|
8a6101cd14 | ||
|
|
4db7c2bc68 | ||
|
|
18740fc686 | ||
|
|
0c39398493 | ||
|
|
949145f04b | ||
|
|
8578dcadf2 | ||
|
|
959db44eca | ||
|
|
a031c0e128 | ||
|
|
591833505f | ||
|
|
f7ad5074d8 | ||
|
|
e0aef74bf5 | ||
|
|
b2378bf899 | ||
|
|
255f6b1814 | ||
|
|
4c491b5363 | ||
|
|
61c808d4cf | ||
|
|
13ef3183e2 | ||
|
|
afd4fdcea2 | ||
|
|
982181ccd4 | ||
|
|
30629ebba2 | ||
|
|
7f6a32d21a | ||
|
|
320ade0a50 | ||
|
|
8c6fee3150 | ||
|
|
5c6acaf915 | ||
|
|
c46549b2b6 | ||
|
|
97a58f6db7 | ||
|
|
b6288579c9 | ||
|
|
44bf987cdc | ||
|
|
a7d55824bb | ||
|
|
8fa038c61f | ||
|
|
869d9b43cb | ||
|
|
974a2fe49b | ||
|
|
022497c8e5 | ||
|
|
207a5f047c | ||
|
|
d3c63f9314 | ||
|
|
f9ef037cea | ||
|
|
8666ffec81 | ||
|
|
4b85879891 | ||
|
|
f376291f50 | ||
|
|
f0f56bf101 | ||
|
|
ba647780e8 | ||
|
|
812ae2ce89 | ||
|
|
09ca3b4dc0 | ||
|
|
86afde8612 | ||
|
|
469f0b5983 | ||
|
|
69d1beaf28 | ||
|
|
7f22f442b1 | ||
|
|
ab0f8fa2e3 | ||
|
|
f5abbb1e5e | ||
|
|
a80c96d187 | ||
|
|
fb0c8fb92b | ||
|
|
438a6c2a42 | ||
|
|
0c8cd0842a | ||
|
|
b39d35d5d1 | ||
|
|
6f00a961c9 | ||
|
|
0ed7853958 | ||
|
|
4acf279f32 | ||
|
|
a7c065f300 | ||
|
|
a0d248065d | ||
|
|
c18008e039 | ||
|
|
0bab898c25 | ||
|
|
53d1f717c9 | ||
|
|
0a69664186 | ||
|
|
d1307e61b9 | ||
|
|
a267eca78d | ||
|
|
51a8d2b718 | ||
|
|
2d76a3780d | ||
|
|
e70818b2da | ||
|
|
03144783ac | ||
|
|
b9ab2fdf1b | ||
|
|
183a1845bb | ||
|
|
e423fc0ace | ||
|
|
40cbe5408e | ||
|
|
2c3e95f401 | ||
|
|
1fdff9bbd4 | ||
|
|
bd7209cd40 | ||
|
|
70fdc68b13 | ||
|
|
f9bed2c2a9 | ||
|
|
33437d9743 | ||
|
|
1f4139ae0a | ||
|
|
b8ad8baf9d | ||
|
|
694048dd7f | ||
|
|
a5088d4ae9 | ||
|
|
d2bdaf7049 | ||
|
|
0aeb68b445 | ||
|
|
f40740edd3 | ||
|
|
cd47b63d29 | ||
|
|
07ce272e9f | ||
|
|
a3c4e3e2a5 | ||
|
|
6b6ad16306 | ||
|
|
0f38445fdd | ||
|
|
b9b53ec251 | ||
|
|
b1a5c8c120 | ||
|
|
b44680149d | ||
|
|
cd0cec32b5 | ||
|
|
2faa9c9d50 | ||
|
|
caab45ee7f | ||
|
|
d3687298e0 | ||
|
|
42612476b8 | ||
|
|
7021ea6a5c | ||
|
|
ff09631546 | ||
|
|
28a3dfef23 | ||
|
|
2b5561a88c | ||
|
|
9dc740c2de | ||
|
|
0b93374e86 | ||
|
|
d36af0cae6 | ||
|
|
7fae106da2 | ||
|
|
a84b692f20 | ||
|
|
86a5c24750 | ||
|
|
ed6f02ac56 | ||
|
|
f701886aa9 | ||
|
|
d298e3438c | ||
|
|
c405b61c66 | ||
|
|
6be67aa145 | ||
|
|
603c658949 | ||
|
|
ebc33e003d | ||
|
|
023ab9fc47 | ||
|
|
417faf795d | ||
|
|
c8fe393fcf | ||
|
|
e6a9555a91 | ||
|
|
fd65baed58 | ||
|
|
d079bee5e0 | ||
|
|
1918478069 | ||
|
|
c6d8d5e137 | ||
|
|
7a4583dcb0 | ||
|
|
929175d826 | ||
|
|
49ce642c2d | ||
|
|
ce14c0f6fe | ||
|
|
1a10b67248 | ||
|
|
eda5f14a19 | ||
|
|
e6683569f8 | ||
|
|
90273c1924 | ||
|
|
10f49d0d84 | ||
|
|
418ee89e0f | ||
|
|
a4a57e5307 | ||
|
|
477eb0034a | ||
|
|
5ec57f04c6 | ||
|
|
69cb17adc8 | ||
|
|
8718a7139b | ||
|
|
94f267b93e | ||
|
|
2151696374 | ||
|
|
2679948dbe | ||
|
|
86e84028e1 | ||
|
|
dea6f05b51 | ||
|
|
ac450443a0 | ||
|
|
2a0375d93f | ||
|
|
56312b2753 | ||
|
|
137867b096 | ||
|
|
0ae62b121e | ||
|
|
70682a7490 | ||
|
|
7fc0f96ca6 | ||
|
|
f50b00e00f | ||
|
|
e9c98a02f0 | ||
|
|
dcb4d10afb | ||
|
|
705f9daf5f | ||
|
|
c5e60744a2 | ||
|
|
3670c36fac | ||
|
|
b5d25f1f2d | ||
|
|
51926cad3d | ||
|
|
2ab909fab1 | ||
|
|
cfe0b4d8e4 | ||
|
|
83795ae4bf | ||
|
|
8a4d4d3144 | ||
|
|
0e7fd791b5 | ||
|
|
96e6ca0c0e | ||
|
|
2e0ad5ca69 | ||
|
|
43f7f9b76c | ||
|
|
224cd53481 | ||
|
|
a5f7921a32 | ||
|
|
b8c8e36449 | ||
|
|
f07a491bd9 | ||
|
|
7fb0eb150d | ||
|
|
6e0a20a213 | ||
|
|
af99d2a60b | ||
|
|
b32d066a76 | ||
|
|
a0f9c55194 | ||
|
|
bb9cbe26b3 | ||
|
|
5284479ece | ||
|
|
be25d77e8b | ||
|
|
46732cf86b | ||
|
|
42d697068d | ||
|
|
96a1c4bf7a | ||
|
|
85c140bc32 | ||
|
|
affac2da40 | ||
|
|
bfb26ca500 | ||
|
|
257211e8f9 | ||
|
|
d352fefcaa | ||
|
|
8234211f03 | ||
|
|
6d0de07f07 | ||
|
|
1ed1b7c60c | ||
|
|
e8810882ef | ||
|
|
244387dc04 | ||
|
|
bfd3a61aef | ||
|
|
c5793b9e7c | ||
|
|
4283716dcc | ||
|
|
4288037f51 | ||
|
|
c52d5dc573 | ||
|
|
379050ff80 | ||
|
|
df4da4e4ec | ||
|
|
99d6ced566 | ||
|
|
46cfa65bc2 | ||
|
|
067c13ebf7 | ||
|
|
9f4a107865 | ||
|
|
5e2b652690 | ||
|
|
fc4ced7bb3 | ||
|
|
1381640cdb | ||
|
|
d56dcaf0eb | ||
|
|
1d43bd26ed | ||
|
|
51cc406af7 | ||
|
|
03d2818c1f | ||
|
|
e1c71327c5 | ||
|
|
1baed1184a | ||
|
|
c6fc0bb798 | ||
|
|
d5ccfa2ac5 | ||
|
|
7793805f1b | ||
|
|
c67040afe7 | ||
|
|
444297f3d9 | ||
|
|
afb43d049d | ||
|
|
93c2ae768e | ||
|
|
2bbd882425 | ||
|
|
e781dfa164 | ||
|
|
fc65c799d8 | ||
|
|
d9d218cb1f | ||
|
|
9946888d63 | ||
|
|
202388bd79 | ||
|
|
1df5ee05c9 | ||
|
|
ee2214c14d | ||
|
|
a2066f300b | ||
|
|
a0938bad13 | ||
|
|
9675df8434 | ||
|
|
b9a6ee70a8 | ||
|
|
5c399fbfb2 | ||
|
|
a5231983e8 | ||
|
|
76d3117a1c | ||
|
|
6bcfe61a79 | ||
|
|
9fe7f62a63 | ||
|
|
7455104aaf | ||
|
|
96bf809e8a | ||
|
|
b5a7c55d70 | ||
|
|
c578bcaf91 | ||
|
|
908ca2325a | ||
|
|
a1659c1fe2 | ||
|
|
3d7ef061cd | ||
|
|
a04500f102 | ||
|
|
b8aaa6b079 | ||
|
|
89911c1747 | ||
|
|
f7e63bd2f5 | ||
|
|
76bb72d3ea | ||
|
|
fd8ee1542b | ||
|
|
ef395efaf8 | ||
|
|
8da2f5c1c7 | ||
|
|
0bfe12bcbc | ||
|
|
63023f542b | ||
|
|
74ddcee2af | ||
|
|
9cce4bc0ad | ||
|
|
be44aa0157 | ||
|
|
e74095be54 | ||
|
|
3458ff9716 | ||
|
|
dcc04bb10f | ||
|
|
36d754f27f | ||
|
|
1daca7a0d9 | ||
|
|
884491d60e | ||
|
|
9c00d74924 | ||
|
|
f32934d7e4 | ||
|
|
4b1505abb7 | ||
|
|
21b4d46f83 | ||
|
|
cb113cbfe4 | ||
|
|
fd6032b44f | ||
|
|
229e5f3ce7 | ||
|
|
4271685c66 | ||
|
|
c59610a5c1 | ||
|
|
94ef74b8bf | ||
|
|
ea014e1b0c | ||
|
|
922bb00722 | ||
|
|
c412e2550d | ||
|
|
5bad53c63e | ||
|
|
4cc077a72a | ||
|
|
708cb18332 | ||
|
|
3c3150a6b6 | ||
|
|
fc525a6e45 | ||
|
|
545034d26f | ||
|
|
5f7410c809 | ||
|
|
db24e544bd | ||
|
|
71e3fefc00 | ||
|
|
1aaa161522 | ||
|
|
0b2c78d563 | ||
|
|
876c904eb0 | ||
|
|
ffd0832b31 | ||
|
|
907e7bdf52 | ||
|
|
0d997254d0 | ||
|
|
e40efd57c8 | ||
|
|
096ddce173 | ||
|
|
cc279d849f | ||
|
|
dd81ff68dd | ||
|
|
750e35015e | ||
|
|
97693639dd | ||
|
|
a88458aebf | ||
|
|
beb408aa04 | ||
|
|
a15ded502f | ||
|
|
5963bdae6e | ||
|
|
6c5e73513c | ||
|
|
d35a070844 | ||
|
|
c2ff3dc8b7 | ||
|
|
63e3a98c02 | ||
|
|
a7053ac595 | ||
|
|
75d529e66c | ||
|
|
fe7bb76f01 | ||
|
|
d78b894a6b | ||
|
|
5121b956ca | ||
|
|
255b3218a5 | ||
|
|
1614b2e8bd | ||
|
|
3f5c7257b3 | ||
|
|
ccea9fc961 | ||
|
|
5ebaad014c | ||
|
|
aa14051755 | ||
|
|
e9e79f8ec3 | ||
|
|
88471f1462 | ||
|
|
9b8088fb43 | ||
|
|
8e950e7c0a | ||
|
|
8de238dfc6 | ||
|
|
2f37787ea3 | ||
|
|
7cf50101b3 | ||
|
|
518f8c8783 | ||
|
|
f6094378fe | ||
|
|
44a8dffd08 | ||
|
|
9d2711a736 | ||
|
|
1a7048f2b8 | ||
|
|
16bc438ee3 | ||
|
|
5d670d4bfb | ||
|
|
ca761b9176 | ||
|
|
d5de8cac2d | ||
|
|
1c47a83c04 | ||
|
|
318702ad13 | ||
|
|
bf8a2bba45 | ||
|
|
592386daae | ||
|
|
e2bd381f65 | ||
|
|
28fcdaf6cb | ||
|
|
88a67b8fc8 | ||
|
|
09eb666daf | ||
|
|
c8ebd129ed | ||
|
|
1aede1e24e | ||
|
|
c932dd8c9b | ||
|
|
4a9a58475f | ||
|
|
b503260caa | ||
|
|
7883db3434 | ||
|
|
3310484859 | ||
|
|
e6aa60edd0 | ||
|
|
5a3d625333 | ||
|
|
163586a80e | ||
|
|
6d5887b33e | ||
|
|
8f2371757e | ||
|
|
478745a38d | ||
|
|
d79359ae66 | ||
|
|
f2b5ba24de | ||
|
|
33ec5b1451 | ||
|
|
0c87fd3b75 | ||
|
|
b1586e07a3 | ||
|
|
b254b38427 | ||
|
|
c3ed8bf139 | ||
|
|
661e11a2a4 | ||
|
|
134a356ba2 | ||
|
|
be3b1c40d0 | ||
|
|
c09d1ecbff | ||
|
|
186be88c24 | ||
|
|
f8fa8e3722 | ||
|
|
58b97d8c04 | ||
|
|
419bf22f2a | ||
|
|
322bbe38f8 | ||
|
|
5bd1832770 | ||
|
|
13fa572f26 | ||
|
|
bddf6fb856 | ||
|
|
ecc7f01933 | ||
|
|
48aef98440 | ||
|
|
46a12c7476 | ||
|
|
f7681a60ab | ||
|
|
19f56f27a7 | ||
|
|
1d128bcfe0 | ||
|
|
57548b5d43 | ||
|
|
9b83cebcad | ||
|
|
7784510804 | ||
|
|
20f305d50b | ||
|
|
eb57d6acb3 | ||
|
|
041b23a49a | ||
|
|
2c2f7e78dd | ||
|
|
e72edc6854 | ||
|
|
10db12bb4a | ||
|
|
42eb4ea808 | ||
|
|
b3f9d316f0 | ||
|
|
06f238b719 | ||
|
|
a2f59bd3e1 | ||
|
|
23d98459e0 | ||
|
|
f95b3228cc | ||
|
|
02eb55be13 | ||
|
|
d543c1a9c0 | ||
|
|
247cbe26d8 | ||
|
|
893132470e | ||
|
|
78fc9bc488 | ||
|
|
b85a3c5f89 | ||
|
|
3652c82f73 | ||
|
|
5f5eb4ad50 | ||
|
|
a05abe3230 | ||
|
|
fddbe32b07 | ||
|
|
cfb0aa5793 | ||
|
|
30b3ba302e | ||
|
|
f613b17824 | ||
|
|
11457da794 | ||
|
|
b811c34805 | ||
|
|
e4b012440b | ||
|
|
6539c15177 | ||
|
|
e7b93680af | ||
|
|
87df439020 | ||
|
|
d8385c2f6e | ||
|
|
a0c40d250b | ||
|
|
ebdda59b86 | ||
|
|
68b4714516 | ||
|
|
8cec85bafb | ||
|
|
a88357a0ae | ||
|
|
cace73bad7 | ||
|
|
f8ff5d83cd | ||
|
|
cdfa1c2bcb | ||
|
|
b8325611a0 | ||
|
|
f0af7e4c52 | ||
|
|
30151435ea | ||
|
|
439fdaad74 | ||
|
|
9d27f07414 | ||
|
|
21e3c606bf | ||
|
|
c4075f736f | ||
|
|
1dfe378700 | ||
|
|
457941edac | ||
|
|
541830f11f | ||
|
|
7c9be03a7d | ||
|
|
160063e29a | ||
|
|
ddc4def65f | ||
|
|
f56d2cfbf4 | ||
|
|
d801360f28 | ||
|
|
0f244c12de | ||
|
|
38ceb381d4 | ||
|
|
6cfc2066c9 | ||
|
|
997284b89a | ||
|
|
353b243686 | ||
|
|
11948449d1 | ||
|
|
5aa719565f | ||
|
|
c97b967b48 | ||
|
|
458f7cdfb1 | ||
|
|
cd0d73d19e | ||
|
|
f967bd1f4e | ||
|
|
d266432427 | ||
|
|
429dad6695 | ||
|
|
964577ad3b | ||
|
|
3bd69e26ad | ||
|
|
3460a9cdc6 | ||
|
|
24b4e3c921 | ||
|
|
702d7ef905 | ||
|
|
556370b73a | ||
|
|
5864090101 | ||
|
|
a8e5a9ed99 | ||
|
|
4e146c169e | ||
|
|
e218430eb0 | ||
|
|
0bf2f1afa8 | ||
|
|
958c743052 | ||
|
|
c5507776a7 | ||
|
|
024dcff426 | ||
|
|
e241d92179 | ||
|
|
68829b1c2c | ||
|
|
6de6fd52b9 | ||
|
|
f07b10ae12 | ||
|
|
388d7aa63d | ||
|
|
4c164c131a | ||
|
|
bb570b953b | ||
|
|
3ecddef1ca | ||
|
|
668b2d577b | ||
|
|
bcd8890f0a | ||
|
|
242d2dc2bc | ||
|
|
ba4c5d08ce | ||
|
|
bd9fbc9422 | ||
|
|
b8b64c2bf8 | ||
|
|
0aacac3def | ||
|
|
307e91e49c | ||
|
|
5502f588eb | ||
|
|
f9f99bf016 | ||
|
|
028861cb7b | ||
|
|
7345665589 | ||
|
|
adcfbe111a | ||
|
|
5c4c3b987f | ||
|
|
741f0cc5f7 | ||
|
|
92e0258363 | ||
|
|
382e050933 | ||
|
|
b163a949f4 | ||
|
|
b726247720 | ||
|
|
1a21e27c4f | ||
|
|
cb2a0b5886 | ||
|
|
e203ac7d66 | ||
|
|
9b308f0107 | ||
|
|
dd4c5f3b48 | ||
|
|
e9017c0a4d | ||
|
|
33d6b6f387 | ||
|
|
a84bf7985a | ||
|
|
58868528ab | ||
|
|
82a64de0cb | ||
|
|
70921d77a1 | ||
|
|
bb5d8ad5be | ||
|
|
b44bf3b8c2 | ||
|
|
f6ded35a8c | ||
|
|
309d28432f | ||
|
|
2f65f8311c | ||
|
|
99f5a22a63 | ||
|
|
30fae3d6ba | ||
|
|
1084fb0751 | ||
|
|
33786f637c | ||
|
|
bfc215a8ed | ||
|
|
661356eac0 | ||
|
|
7ef97ca059 | ||
|
|
26806bcc80 | ||
|
|
e6cf761b5b | ||
|
|
17e565fe02 | ||
|
|
6ded931e27 | ||
|
|
be59c5de25 | ||
|
|
6164eb9be4 | ||
|
|
6f2a247011 | ||
|
|
b24c7a68d3 | ||
|
|
5cb3125a2e | ||
|
|
cd64b8fff3 | ||
|
|
d79a9d9fd7 | ||
|
|
9a5afb11f6 | ||
|
|
2a9f6663c1 | ||
|
|
cc148fc4e2 | ||
|
|
7f3f13390b | ||
|
|
b0768ca33b | ||
|
|
39265a3521 | ||
|
|
2891ce0857 | ||
|
|
0e7522522e | ||
|
|
287c7e4ef8 | ||
|
|
56001b8cd2 | ||
|
|
c9e04241dc | ||
|
|
f0faa8a2af | ||
|
|
d8013582ae | ||
|
|
9cd719bafc | ||
|
|
506abcec72 | ||
|
|
71106b5067 | ||
|
|
92351d5019 | ||
|
|
a2c0a5ce5d | ||
|
|
50fac66a0c | ||
|
|
9b38a71f96 | ||
|
|
8cced483e7 | ||
|
|
2df15a3464 | ||
|
|
9669b71440 | ||
|
|
0824963811 | ||
|
|
c0c15a9a85 | ||
|
|
536797820d | ||
|
|
ad49de5a8c | ||
|
|
1233c6fc7b | ||
|
|
f87d1277a0 | ||
|
|
b27881ea86 | ||
|
|
ad5f7638dc | ||
|
|
130a3ba4a2 | ||
|
|
68f069c814 | ||
|
|
0dde48f3d0 | ||
|
|
93902b601b | ||
|
|
9562a4ab8a | ||
|
|
8688b21aa9 | ||
|
|
dbfb0a9f79 | ||
|
|
9d4875d44f | ||
|
|
1662a7806a | ||
|
|
17a0e92342 | ||
|
|
f27a21f708 | ||
|
|
b7b76262c3 | ||
|
|
0f0f77a1db | ||
|
|
e2957a376c | ||
|
|
53039a1121 | ||
|
|
d14524052e | ||
|
|
1cc5331cef | ||
|
|
bafe3f621a | ||
|
|
6c41bc6b34 | ||
|
|
ce03a10e17 | ||
|
|
74acf521f7 | ||
|
|
01d6873658 | ||
|
|
3e5115062f | ||
|
|
4e5e17c99e | ||
|
|
79c4219dd8 | ||
|
|
acd7d89697 | ||
|
|
17218236c2 | ||
|
|
e882b4e922 | ||
|
|
315d8b6a94 | ||
|
|
f529ae141e | ||
|
|
10c4ae3cf9 | ||
|
|
8fdb706766 | ||
|
|
e90aa18d55 | ||
|
|
27e48d3bbb | ||
|
|
1cf86faa12 | ||
|
|
ef1fdf4bf1 | ||
|
|
dacc83e76e | ||
|
|
642e3cdd77 | ||
|
|
35a79364a9 | ||
|
|
3bcb9fb327 | ||
|
|
97f9e8ccd6 | ||
|
|
3522ad8610 | ||
|
|
92c64a1a63 | ||
|
|
bfdfb316c5 | ||
|
|
27c6a62d66 | ||
|
|
1c67ba28b3 | ||
|
|
cf91b49b0b | ||
|
|
4a829c8f76 | ||
|
|
57797645bc | ||
|
|
11b567fa86 | ||
|
|
0a14d190fe | ||
|
|
1a6e455aee | ||
|
|
fccae980e5 | ||
|
|
782eef8957 | ||
|
|
03634cc9b4 | ||
|
|
f358364a51 | ||
|
|
10bbadd1e5 | ||
|
|
8b26c4d45a | ||
|
|
49225cb5ec | ||
|
|
bffeef86f3 | ||
|
|
230a9e7784 | ||
|
|
7c8b33f632 | ||
|
|
531ed984dc | ||
|
|
6afaf983e1 | ||
|
|
8c5d754067 | ||
|
|
94c97723d9 | ||
|
|
62bf2e3d99 | ||
|
|
e495c2be41 | ||
|
|
6e7124d265 | ||
|
|
721cfd75b5 | ||
|
|
b8beb540a8 | ||
|
|
fe8708a16f | ||
|
|
1bd76e0f1e | ||
|
|
ae1e43b779 | ||
|
|
398a164a6e | ||
|
|
ce596ca645 | ||
|
|
62197121e2 | ||
|
|
9a0144e918 | ||
|
|
87edaca088 | ||
|
|
7f571b695e | ||
|
|
db825329d6 | ||
|
|
e3b671e902 | ||
|
|
b3d20964fe | ||
|
|
280e53f4a3 | ||
|
|
5a737a4cc6 | ||
|
|
c204c1a53f | ||
|
|
e78d5a6742 | ||
|
|
c1147348f4 | ||
|
|
e4c8470c2b | ||
|
|
fe4bd32fcd | ||
|
|
bcace65706 | ||
|
|
886c77273b | ||
|
|
63012b3e01 | ||
|
|
aa08b200e9 | ||
|
|
e1714f7599 | ||
|
|
930af289b3 | ||
|
|
9b936cf9ce | ||
|
|
5fb30a8bff | ||
|
|
e196f049de | ||
|
|
3c7130f2bb | ||
|
|
4040ac2251 | ||
|
|
e0e99331be | ||
|
|
108e64328c | ||
|
|
54c364919b | ||
|
|
047fce8661 | ||
|
|
f9257379f1 | ||
|
|
c9c3ed6c8b | ||
|
|
2989d1467c | ||
|
|
db522c75f5 | ||
|
|
56cb8a5ee0 | ||
|
|
e531ff4f79 | ||
|
|
6e67a0cfc5 | ||
|
|
0688b0e9b5 | ||
|
|
0a57ea6bec | ||
|
|
00cafa9006 | ||
|
|
b950fd44d4 | ||
|
|
2382ce7ffb | ||
|
|
61e0dda100 | ||
|
|
793736c9d7 | ||
|
|
bf7b9c2b19 | ||
|
|
fb21920126 | ||
|
|
a2a5a3f71c | ||
|
|
7e13eeb288 | ||
|
|
f80c36eb7f | ||
|
|
2865a6c77e | ||
|
|
bb081f4241 | ||
|
|
477d0e4c81 | ||
|
|
98f78d3196 | ||
|
|
d4780b2d63 | ||
|
|
d3825648f2 | ||
|
|
1240a6d012 | ||
|
|
c954582a03 | ||
|
|
34d5cc3959 | ||
|
|
8e867f8fd3 | ||
|
|
02016bb950 | ||
|
|
e7a79932b9 | ||
|
|
e8c13043eb | ||
|
|
b29a576890 | ||
|
|
a2243e9984 | ||
|
|
1bf9070e6e | ||
|
|
170e2d1c02 | ||
|
|
b9544def44 | ||
|
|
ca325a2f06 | ||
|
|
33006d2321 | ||
|
|
e202785458 | ||
|
|
bf843adeac | ||
|
|
16ad91e48c | ||
|
|
2f474f4ae4 | ||
|
|
069dd4a47e | ||
|
|
e1b6b9291f | ||
|
|
722c4c72ba | ||
|
|
dea17db6f9 | ||
|
|
efea2198af | ||
|
|
fef02ab6de | ||
|
|
175f3ee638 | ||
|
|
d9fc616da6 | ||
|
|
a03126c989 | ||
|
|
7089d12681 | ||
|
|
f5b63ef0c6 | ||
|
|
76d94f4563 | ||
|
|
d13f2484b7 | ||
|
|
1dee3f4a5a | ||
|
|
ff8cf1b5a9 | ||
|
|
1cf72c3008 | ||
|
|
c2e70f6b7e | ||
|
|
a7c5558718 | ||
|
|
65895bb37b | ||
|
|
76c3125900 | ||
|
|
d4dcf18bfb | ||
|
|
1865ccbaf6 | ||
|
|
35acd83df8 | ||
|
|
11db5d2217 | ||
|
|
ced0d14a54 | ||
|
|
3d9b6283ef | ||
|
|
6e73807ca9 | ||
|
|
64486934ea | ||
|
|
90c2daf7dd | ||
|
|
3dfc6ba29e | ||
|
|
353e69449f | ||
|
|
996c13ff10 | ||
|
|
cd5cd380d3 | ||
|
|
21b91c503e | ||
|
|
ec06c84fea | ||
|
|
765d434b16 | ||
|
|
14e7bafd93 | ||
|
|
c6604f2d37 | ||
|
|
a8a5035457 | ||
|
|
2f5d024e14 | ||
|
|
918bd2fb82 | ||
|
|
feae7ba558 | ||
|
|
50c2545c7e | ||
|
|
c3a09e0b49 | ||
|
|
b0e22573b1 | ||
|
|
83142a85bc | ||
|
|
54dad9430a | ||
|
|
76d3658061 | ||
|
|
f25f5776a0 | ||
|
|
bc4166e742 | ||
|
|
3455dd7418 | ||
|
|
d95336a7a0 | ||
|
|
9853de3852 | ||
|
|
b2bc8edcc1 | ||
|
|
1f71f2c910 | ||
|
|
c450bcebf5 | ||
|
|
0ab3e0e090 | ||
|
|
980b0fe1c5 | ||
|
|
8013c95e3b | ||
|
|
9be2eef9fb | ||
|
|
4e30758e6c | ||
|
|
1c874ef4bb | ||
|
|
d8d37923a2 | ||
|
|
726845d690 | ||
|
|
74cc970a0e | ||
|
|
5e75eddfe2 | ||
|
|
75b71c38db | ||
|
|
863937d0db | ||
|
|
07289380c5 | ||
|
|
634ee2baa9 | ||
|
|
bf5e9457c5 | ||
|
|
2ea62d6590 | ||
|
|
eae1b2926d | ||
|
|
e7cb51a20b | ||
|
|
b0dc53c2ad | ||
|
|
d532b3193a | ||
|
|
5961e44a11 | ||
|
|
3b2b1ed094 | ||
|
|
73d699393a | ||
|
|
76c8181d22 | ||
|
|
e27959911d | ||
|
|
62dea32d0d | ||
|
|
6c1663a6c6 | ||
|
|
8406193da4 | ||
|
|
699cdceafe | ||
|
|
22ecb65d5f | ||
|
|
3e11f63ce5 | ||
|
|
b2f7f5ac41 | ||
|
|
4ab7e572da | ||
|
|
e8c9444c9c | ||
|
|
89aed0bdd7 | ||
|
|
e964dce740 | ||
|
|
8f0e7a4585 | ||
|
|
145f79690a | ||
|
|
f387916a52 | ||
|
|
4db5e42bf2 | ||
|
|
a46c043b3f | ||
|
|
c25d54ef75 | ||
|
|
46999cf22b | ||
|
|
132e0be753 | ||
|
|
6dafa274b8 | ||
|
|
94f3e64182 | ||
|
|
d7b353032c | ||
|
|
a1df36368f | ||
|
|
0683387ed6 | ||
|
|
169ccd9de5 | ||
|
|
445c7c4e0c | ||
|
|
b9f946a71a | ||
|
|
74a8495750 | ||
|
|
be56ade561 | ||
|
|
607c44ba5e | ||
|
|
dec92a479d | ||
|
|
195ef859ee | ||
|
|
63d905ed63 | ||
|
|
9226b87c88 | ||
|
|
f3daeeffc2 | ||
|
|
c7d582983f | ||
|
|
c661c916ed | ||
|
|
14d9802db8 | ||
|
|
80a7f81760 | ||
|
|
a2e932b73f | ||
|
|
48c4df9cd6 | ||
|
|
1d6eaa0e53 | ||
|
|
d77ad87c45 | ||
|
|
ddcec5497d | ||
|
|
74ea1c88bb | ||
|
|
5c3deeb063 | ||
|
|
9c89f85634 | ||
|
|
27cb39d3c5 | ||
|
|
7b4e3ddbc0 | ||
|
|
8c8430c67d | ||
|
|
97488a4787 | ||
|
|
b05b57e744 | ||
|
|
e813df8dcd | ||
|
|
2795bc3a94 | ||
|
|
c433069f90 | ||
|
|
ab07d657c6 | ||
|
|
87a215102a | ||
|
|
1324ff5a69 | ||
|
|
64f2bd3315 | ||
|
|
cfdb9b4638 | ||
|
|
7730b9aebc | ||
|
|
eb45149f16 | ||
|
|
a6373c23f3 | ||
|
|
3083fff480 | ||
|
|
53732b99bf | ||
|
|
3a2dba7a13 | ||
|
|
d7dbc3d096 | ||
|
|
0ce408899c | ||
|
|
36056b17e1 | ||
|
|
7697a14a65 | ||
|
|
1f4c599a36 | ||
|
|
d232eece5a | ||
|
|
72a23c5d1a | ||
|
|
2db2aa9947 | ||
|
|
54302ca6c6 | ||
|
|
b16aeb31be | ||
|
|
37ee555e0a | ||
|
|
1790818f3a | ||
|
|
c821cadac2 | ||
|
|
d0ec052641 | ||
|
|
bbe1043289 | ||
|
|
22ac156085 | ||
|
|
544c50743e | ||
|
|
8ab623b9e2 | ||
|
|
468dffcf98 | ||
|
|
bd5b547483 | ||
|
|
3b2e0acb99 | ||
|
|
a631f83a7f | ||
|
|
57ed732ba8 | ||
|
|
50d792c6c9 | ||
|
|
a0cdafcd7c | ||
|
|
2d8aaf0a3b | ||
|
|
9746764f81 | ||
|
|
0a2ea8315b |
@@ -38,6 +38,7 @@ module.exports = {
|
|||||||
"jsx-a11y/media-has-caption": "off",
|
"jsx-a11y/media-has-caption": "off",
|
||||||
// We should use the js-sdk logger, never console directly.
|
// We should use the js-sdk logger, never console directly.
|
||||||
"no-console": ["error"],
|
"no-console": ["error"],
|
||||||
|
"react/display-name": "error",
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
|
|||||||
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1 +1 @@
|
|||||||
* @vector-im/element-call-reviewers
|
* @element-hq/element-call-reviewers
|
||||||
|
|||||||
49
.github/workflows/build.yaml
vendored
49
.github/workflows/build.yaml
vendored
@@ -1,34 +1,25 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
pull_request: {}
|
pull_request:
|
||||||
|
types:
|
||||||
|
- synchronize
|
||||||
|
- opened
|
||||||
|
- labeled
|
||||||
|
paths-ignore:
|
||||||
|
- ".github/**"
|
||||||
|
- "docs/**"
|
||||||
push:
|
push:
|
||||||
branches: [livekit, full-mesh]
|
branches: [livekit, full-mesh]
|
||||||
|
paths-ignore:
|
||||||
|
- ".github/**"
|
||||||
|
- "docs/**"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build_element_call:
|
||||||
name: Build
|
uses: ./.github/workflows/element-call.yaml
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
steps:
|
vite_app_version: ${{ github.event.release.tag_name || github.sha }}
|
||||||
- name: Checkout code
|
secrets:
|
||||||
uses: actions/checkout@v4
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
- name: Yarn cache
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||||
uses: actions/setup-node@v4
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||||
with:
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
cache: "yarn"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: "yarn install"
|
|
||||||
- name: Build
|
|
||||||
run: "yarn run build"
|
|
||||||
env:
|
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
||||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
||||||
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
||||||
VITE_APP_VERSION: ${{ github.sha }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: build
|
|
||||||
path: dist
|
|
||||||
# We'll only use this in a triggered job, then we're done with it
|
|
||||||
retention-days: 1
|
|
||||||
|
|||||||
60
.github/workflows/docker.yaml
vendored
Normal file
60
.github/workflows/docker.yaml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
name: Docker - Deploy
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
docker_tags:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
artifact_run_id:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ${{ github.run_id }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_deploy:
|
||||||
|
name: Build & publish docker
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # required to upload release asset
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Check it out
|
||||||
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
|
||||||
|
- name: 📥 Download artifact
|
||||||
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run-id: ${{ inputs.artifact_run_id }}
|
||||||
|
name: build-output
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
- name: Log in to container registry
|
||||||
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: ${{ inputs.docker_tags}}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
4
.github/workflows/e2e.yml
vendored
4
.github/workflows/e2e.yml
vendored
@@ -12,9 +12,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out test private repo
|
- name: Check out test private repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
with:
|
with:
|
||||||
repository: vector-im/static-call-participant
|
repository: element-hq/static-call-participant
|
||||||
ref: refs/heads/main
|
ref: refs/heads/main
|
||||||
path: static-call-participant
|
path: static-call-participant
|
||||||
token: ${{ secrets.GH_E2E_TEST_TOKEN }}
|
token: ${{ secrets.GH_E2E_TEST_TOKEN }}
|
||||||
|
|||||||
47
.github/workflows/element-call.yaml
vendored
Normal file
47
.github/workflows/element-call.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: Element Call - Build
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
vite_app_version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
SENTRY_ORG:
|
||||||
|
required: true
|
||||||
|
SENTRY_PROJECT:
|
||||||
|
required: true
|
||||||
|
SENTRY_URL:
|
||||||
|
required: true
|
||||||
|
SENTRY_AUTH_TOKEN:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Element Call
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
- name: Yarn cache
|
||||||
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
|
node-version: "lts/*"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: "yarn install"
|
||||||
|
- name: Build
|
||||||
|
run: "yarn run build"
|
||||||
|
env:
|
||||||
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||||
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||||
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
VITE_APP_VERSION: ${{ inputs.vite_app_version }}
|
||||||
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
|
||||||
|
with:
|
||||||
|
name: build-output
|
||||||
|
path: dist
|
||||||
|
# We'll only use this in a triggered job, then we're done with it
|
||||||
|
retention-days: 1
|
||||||
7
.github/workflows/lint.yaml
vendored
7
.github/workflows/lint.yaml
vendored
@@ -7,11 +7,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
- name: Yarn cache
|
- name: Yarn cache
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||||
with:
|
with:
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
node-version: "lts/*"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: "yarn install"
|
run: "yarn install"
|
||||||
- name: Prettier
|
- name: Prettier
|
||||||
@@ -22,3 +23,5 @@ jobs:
|
|||||||
run: "yarn run lint:eslint"
|
run: "yarn run lint:eslint"
|
||||||
- name: Type check
|
- name: Type check
|
||||||
run: "yarn run lint:types"
|
run: "yarn run lint:types"
|
||||||
|
- name: Dead code analysis
|
||||||
|
run: "yarn run lint:knip"
|
||||||
|
|||||||
@@ -1,73 +1,79 @@
|
|||||||
name: Netlify PR Preview
|
name: Netlify - Deploy
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_call:
|
||||||
workflows: ["Build"]
|
inputs:
|
||||||
types:
|
pr_number:
|
||||||
- completed
|
required: true
|
||||||
branches-ignore:
|
type: string
|
||||||
- "main"
|
pr_head_full_name:
|
||||||
- "livekit"
|
required: true
|
||||||
|
type: string
|
||||||
|
pr_head_ref:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
deployment_ref:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
artifact_run_id:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ${{ github.run_id }}
|
||||||
|
secrets:
|
||||||
|
ELEMENT_BOT_TOKEN:
|
||||||
|
required: true
|
||||||
|
NETLIFY_AUTH_TOKEN:
|
||||||
|
required: true
|
||||||
|
NETLIFY_SITE_ID:
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
deployments: write
|
deployments: write
|
||||||
environment: Netlify
|
environment: Netlify
|
||||||
steps:
|
steps:
|
||||||
- name: 📝 Create Deployment
|
- name: 📝 Create Deployment
|
||||||
uses: bobheadxi/deployments@v1
|
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
step: start
|
step: start
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
env: Netlify
|
env: Netlify
|
||||||
ref: ${{ github.event.workflow_run.head_sha }}
|
ref: ${{ inputs.deployment_ref }}
|
||||||
desc: |
|
desc: |
|
||||||
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
|
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
|
||||||
Exercise caution. Use test accounts.
|
Exercise caution. Use test accounts.
|
||||||
|
|
||||||
- id: prdetails
|
|
||||||
uses: matrix-org/pr-details-action@v1.3
|
|
||||||
with:
|
|
||||||
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
||||||
branch: ${{ github.event.workflow_run.head_branch }}
|
|
||||||
|
|
||||||
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
|
|
||||||
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
|
|
||||||
- name: 📥 Download artifact
|
- name: 📥 Download artifact
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
|
||||||
with:
|
with:
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
name: build
|
run-id: ${{ inputs.artifact_run_id }}
|
||||||
|
name: build-output
|
||||||
path: webapp
|
path: webapp
|
||||||
|
|
||||||
- name: Add redirects file
|
- name: Add redirects file
|
||||||
# We fetch from github directly as we don't bother checking out the repo
|
# We fetch from github directly as we don't bother checking out the repo
|
||||||
run: curl -s https://raw.githubusercontent.com/vector-im/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/${{ inputs.pr_head_full_name }}/${{ inputs.pr_head_ref }}/config/config_netlify_preview.json" > webapp/config.json
|
||||||
HEADBRACH: ${{ github.event.workflow_run.head_branch }}
|
|
||||||
run: curl -s "https://raw.githubusercontent.com/vector-im/element-call/${HEADBRACH}/config/element_io_preview.json" > webapp/config.json
|
|
||||||
|
|
||||||
- name: ☁️ Deploy to Netlify
|
- name: ☁️ Deploy to Netlify
|
||||||
id: netlify
|
id: netlify
|
||||||
uses: nwtgck/actions-netlify@v2.1
|
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0
|
||||||
with:
|
with:
|
||||||
publish-dir: webapp
|
publish-dir: webapp
|
||||||
deploy-message: "Deploy from GitHub Actions"
|
deploy-message: "Deploy from GitHub Actions"
|
||||||
# These don't work because we're in workflow_run
|
alias: pr${{ inputs.pr_number }}
|
||||||
enable-pull-request-comment: false
|
|
||||||
enable-commit-comment: false
|
|
||||||
alias: pr${{ steps.prdetails.outputs.pr_id }}
|
|
||||||
env:
|
env:
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
|
|
||||||
- name: 🚦 Update deployment status
|
- name: 🚦 Update deployment status
|
||||||
uses: bobheadxi/deployments@v1
|
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
step: finish
|
step: finish
|
||||||
50
.github/workflows/pr-deploy.yaml
vendored
Normal file
50
.github/workflows/pr-deploy.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: PR Preview Deployments
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Build"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prdetails:
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
pr_number: ${{ steps.prdetails.outputs.pr_id }}
|
||||||
|
pr_data_json: ${{ steps.prdetails.outputs.data }}
|
||||||
|
steps:
|
||||||
|
- id: prdetails
|
||||||
|
uses: matrix-org/pr-details-action@15bde5285d7850ba276cc3bd8a03733e3f24622a # v1.3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
||||||
|
branch: ${{ github.event.workflow_run.head_branch }}
|
||||||
|
|
||||||
|
netlify:
|
||||||
|
needs: prdetails
|
||||||
|
permissions:
|
||||||
|
deployments: write
|
||||||
|
uses: ./.github/workflows/netlify.yaml
|
||||||
|
with:
|
||||||
|
artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }}
|
||||||
|
pr_number: ${{ needs.prdetails.outputs.pr_number }}
|
||||||
|
pr_head_full_name: ${{ github.event.workflow_run.head_repository.full_name }}
|
||||||
|
pr_head_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.ref }}
|
||||||
|
deployment_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.sha || github.ref || github.head_ref }}
|
||||||
|
secrets:
|
||||||
|
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
|
||||||
|
docker:
|
||||||
|
if: ${{ needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'docker build') }}
|
||||||
|
needs: prdetails
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
uses: ./.github/workflows/docker.yaml
|
||||||
|
with:
|
||||||
|
artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }}
|
||||||
|
docker_tags: |
|
||||||
|
type=sha,format=short,event=branch
|
||||||
|
type=raw,value=pr_${{ needs.prdetails.outputs.pr_number }}
|
||||||
94
.github/workflows/publish.yaml
vendored
94
.github/workflows/publish.yaml
vendored
@@ -3,17 +3,34 @@ name: Build & publish images to the package registry for tags
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
push:
|
workflow_run:
|
||||||
|
workflows: ["Build"]
|
||||||
branches: [livekit]
|
branches: [livekit]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build_element_call:
|
||||||
name: Build & publish
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
uses: ./.github/workflows/element-call.yaml
|
||||||
|
with:
|
||||||
|
vite_app_version: ${{ github.event.release.tag_name || github.sha }}
|
||||||
|
secrets:
|
||||||
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||||
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||||
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
publish_tarball:
|
||||||
|
needs: build_element_call
|
||||||
|
if: always()
|
||||||
|
name: Publish tarball
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
unix_time: ${{steps.current-time.outputs.unix_time}}
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # required to upload release asset
|
contents: write # required to upload release asset
|
||||||
packages: write
|
packages: write
|
||||||
@@ -21,64 +38,35 @@ jobs:
|
|||||||
- name: Get current time
|
- name: Get current time
|
||||||
id: current-time
|
id: current-time
|
||||||
run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT
|
run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT
|
||||||
|
- name: 📥 Download artifact
|
||||||
- name: Check it out
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Log in to container registry
|
|
||||||
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
username: ${{ github.actor }}
|
run-id: ${{ github.event.workflow_run.id || github.run_id }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
name: build-output
|
||||||
|
path: dist
|
||||||
- name: Yarn cache
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
cache: "yarn"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: "yarn install"
|
|
||||||
- name: Build
|
|
||||||
run: "yarn run build"
|
|
||||||
env:
|
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
||||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
||||||
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
||||||
VITE_APP_VERSION: ${{ github.event.release.tag_name || github.sha }}
|
|
||||||
|
|
||||||
- name: Create Tarball
|
- name: Create Tarball
|
||||||
env:
|
env:
|
||||||
TARBALL_VERSION: ${{ github.event.release.tag_name || github.sha }}
|
TARBALL_VERSION: ${{ github.event.release.tag_name || github.sha }}
|
||||||
run: |
|
run: |
|
||||||
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
with:
|
with:
|
||||||
path: "./element-call-*.tar.gz"
|
path: "./element-call-*.tar.gz"
|
||||||
|
publish_docker:
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
needs: publish_tarball
|
||||||
id: meta
|
if: always()
|
||||||
uses: docker/metadata-action@2a4836ac76fe8f5d0ee3a0d89aa12a80cc552ad3
|
permissions:
|
||||||
with:
|
contents: write
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
packages: write
|
||||||
tags: |
|
uses: ./.github/workflows/docker.yaml
|
||||||
type=sha,format=short,event=branch
|
with:
|
||||||
type=semver,pattern=v{{version}}
|
artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }}
|
||||||
type=raw,value=latest-ci,enable={{is_default_branch}}
|
docker_tags: |
|
||||||
type=raw,value=latest-ci_${{steps.current-time.outputs.unix_time}},enable={{is_default_branch}}
|
type=sha,format=short,event=branch
|
||||||
|
type=semver,pattern=v{{version}}
|
||||||
- name: Set up Docker Buildx
|
type=raw,value=latest-ci,enable={{is_default_branch}}
|
||||||
uses: docker/setup-buildx-action@6d5347c4025fdf2bb05167a2519cac535a14a408
|
type=raw,value=latest-ci_${{needs.publish_tarball.outputs.unix_time}},enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
|
|||||||
20
.github/workflows/test.yaml
vendored
20
.github/workflows/test.yaml
vendored
@@ -1,24 +1,28 @@
|
|||||||
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
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
- name: Yarn cache
|
- name: Yarn cache
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||||
with:
|
with:
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
node-version: "lts/*"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: "yarn install"
|
run: "yarn install"
|
||||||
- name: Jest
|
- name: Vitest
|
||||||
run: "yarn run test"
|
run: "yarn run test:coverage"
|
||||||
- name: Upload to codecov
|
- name: Upload to codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
with:
|
with:
|
||||||
flags: unittests
|
flags: unittests
|
||||||
|
fail_ci_if_error: true
|
||||||
|
|||||||
9
.github/workflows/translations-download.yaml
vendored
9
.github/workflows/translations-download.yaml
vendored
@@ -13,11 +13,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||||
with:
|
with:
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
node-version: "lts/*"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
run: "yarn install --frozen-lockfile"
|
run: "yarn install --frozen-lockfile"
|
||||||
@@ -26,7 +27,7 @@ jobs:
|
|||||||
run: "rm -R public/locales"
|
run: "rm -R public/locales"
|
||||||
|
|
||||||
- name: Download translation files
|
- name: Download translation files
|
||||||
uses: localazy/download@v1.1.0
|
uses: localazy/download@0a79880fb66150601e3b43606fab69c88123c087 # v1.1.0
|
||||||
with:
|
with:
|
||||||
groups: "-p includeSourceLang:true"
|
groups: "-p includeSourceLang:true"
|
||||||
|
|
||||||
@@ -38,7 +39,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@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
branch: actions/localazy-download
|
branch: actions/localazy-download
|
||||||
|
|||||||
6
.github/workflows/translations-upload.yaml
vendored
6
.github/workflows/translations-upload.yaml
vendored
@@ -3,6 +3,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- livekit
|
- livekit
|
||||||
|
paths-ignore:
|
||||||
|
- ".github/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
@@ -12,9 +14,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: localazy/upload@v1
|
uses: localazy/upload@27e6b5c0fddf4551596b42226b1c24124335d24a # v1
|
||||||
with:
|
with:
|
||||||
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
|
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
const svgrPlugin = require("vite-plugin-svgr");
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
||||||
framework: "@storybook/react",
|
|
||||||
core: {
|
|
||||||
builder: "storybook-builder-vite",
|
|
||||||
},
|
|
||||||
async viteFinal(config) {
|
|
||||||
config.plugins = config.plugins.filter(
|
|
||||||
(item) =>
|
|
||||||
!(
|
|
||||||
Array.isArray(item) &&
|
|
||||||
item.length > 0 &&
|
|
||||||
item[0].name === "vite-plugin-mdx"
|
|
||||||
),
|
|
||||||
);
|
|
||||||
config.plugins.push(svgrPlugin());
|
|
||||||
config.resolve = config.resolve || {};
|
|
||||||
config.resolve.dedupe = config.resolve.dedupe || [];
|
|
||||||
config.resolve.dedupe.push("react", "react-dom", "matrix-js-sdk");
|
|
||||||
return config;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import { addDecorator } from "@storybook/react";
|
|
||||||
import { MemoryRouter } from "react-router-dom";
|
|
||||||
import { usePageFocusStyle } from "../src/usePageFocusStyle";
|
|
||||||
import { OverlayProvider } from "@react-aria/overlays";
|
|
||||||
import "../src/index.css";
|
|
||||||
|
|
||||||
export const parameters = {
|
|
||||||
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
||||||
controls: {
|
|
||||||
matchers: {
|
|
||||||
color: /(background|color)$/i,
|
|
||||||
date: /Date$/,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
addDecorator((story) => {
|
|
||||||
usePageFocusStyle();
|
|
||||||
return (
|
|
||||||
<MemoryRouter initialEntries={["/"]}>
|
|
||||||
<OverlayProvider>{story()}</OverlayProvider>
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
76
README.md
76
README.md
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Group calls with WebRTC that leverage [Matrix](https://matrix.org) and an open-source WebRTC toolkit from [LiveKit](https://livekit.io/).
|
Group calls with WebRTC that leverage [Matrix](https://matrix.org) and an open-source WebRTC toolkit from [LiveKit](https://livekit.io/).
|
||||||
|
|
||||||
For prior version of the Element Call that relied solely on full-mesh logic, check [`full-mesh`](https://github.com/vector-im/element-call/tree/full-mesh) branch.
|
For prior version of the Element Call that relied solely on full-mesh logic, check [`full-mesh`](https://github.com/element-hq/element-call/tree/full-mesh) branch.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -16,13 +16,13 @@ To try it out, visit our hosted version at [call.element.io](https://call.elemen
|
|||||||
Until prebuilt tarballs are available, you'll need to build Element Call from source. First, clone and install the package:
|
Until prebuilt tarballs are available, you'll need to build Element Call from source. First, clone and install the package:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/vector-im/element-call.git
|
git clone https://github.com/element-hq/element-call.git
|
||||||
cd element-call
|
cd element-call
|
||||||
yarn
|
yarn
|
||||||
yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
If all went well, you can now find the build output under `dist` as a series of static files. These can be hosted using any web server of your choice.
|
If all went well, you can now find the build output under `dist` as a series of static files. These can be hosted using any web server that can be configured with custom routes (see below).
|
||||||
|
|
||||||
You may also wish to add a configuration file (Element Call uses the domain it's hosted on as a Homeserver URL by default,
|
You may also wish to add a configuration file (Element Call uses the domain it's hosted on as a Homeserver URL by default,
|
||||||
but you can change this in the config file). This goes in `public/config.json` - you can use the sample as a starting point:
|
but you can change this in the config file). This goes in `public/config.json` - you can use the sample as a starting point:
|
||||||
@@ -54,6 +54,38 @@ Therefore, to use a self-hosted homeserver, this is recommended to be a new serv
|
|||||||
|
|
||||||
There are currently two different config files. `.env` holds variables that are used at build time, while `public/config.json` holds variables that are used at runtime. Documentation and default values for `public/config.json` can be found in [ConfigOptions.ts](src/config/ConfigOptions.ts).
|
There are currently two different config files. `.env` holds variables that are used at build time, while `public/config.json` holds variables that are used at runtime. Documentation and default values for `public/config.json` can be found in [ConfigOptions.ts](src/config/ConfigOptions.ts).
|
||||||
|
|
||||||
|
If you're using [Synapse](https://github.com/element-hq/synapse/), you'll need to additionally add the following to `homeserver.yaml` or Element Call won't work:
|
||||||
|
|
||||||
|
```
|
||||||
|
experimental_features:
|
||||||
|
msc3266_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
MSC3266 allows to request a room summary of rooms you are not joined.
|
||||||
|
The summary contains the room join rules. We need that to decide if the user gets prompted with the option to knock ("ask to join"), a cannot join error or the join view.
|
||||||
|
|
||||||
|
Element Call requires a Livekit SFU behind a Livekit jwt service to work. The url to the Livekit jwt service can either be configured in the config of Element Call (fallback/legacy configuration) or be configured by your homeserver via the `.well-known`.
|
||||||
|
This is the recommended method.
|
||||||
|
|
||||||
|
The configuration is a list of Foci configs:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"org.matrix.msc4143.rtc_foci": [
|
||||||
|
{
|
||||||
|
"type": "livekit",
|
||||||
|
"livekit_service_url": "https://someurl.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "livekit",
|
||||||
|
"livekit_service_url": "https://livekit2.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "another_foci",
|
||||||
|
"props_for_another_foci": "val"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Translation
|
## Translation
|
||||||
|
|
||||||
If you'd like to help translate Element Call, head over to [Localazy](https://localazy.com/p/element-call). You're also encouraged to join the [Element Translators](https://matrix.to/#/#translators:element.io) space to discuss and coordinate translation efforts.
|
If you'd like to help translate Element Call, head over to [Localazy](https://localazy.com/p/element-call). You're also encouraged to join the [Element Translators](https://matrix.to/#/#translators:element.io) space to discuss and coordinate translation efforts.
|
||||||
@@ -74,7 +106,7 @@ yarn link
|
|||||||
Next, we can set up this project:
|
Next, we can set up this project:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/vector-im/element-call.git
|
git clone https://github.com/element-hq/element-call.git
|
||||||
cd element-call
|
cd element-call
|
||||||
yarn
|
yarn
|
||||||
yarn link matrix-js-sdk
|
yarn link matrix-js-sdk
|
||||||
@@ -93,12 +125,14 @@ service for development. These use a test 'secret' published in this
|
|||||||
repository, so this must be used only for local development and
|
repository, so this must be used only for local development and
|
||||||
**_never be exposed to the public Internet._**
|
**_never be exposed to the public Internet._**
|
||||||
|
|
||||||
To use it, add SFU parameter in your local config `./public/config.yml`:
|
To use it, add a SFU parameter in your local config `./public/config.json`:
|
||||||
|
(Be aware, that this is only the fallback Livekit SFU. If the homeserver
|
||||||
|
advertises one in the client well-known, this will not be used.)
|
||||||
|
|
||||||
```yaml
|
```json
|
||||||
"livekit": {
|
"livekit": {
|
||||||
"jwt_service_url": "http://localhost:8881"
|
"livekit_service_url": "http://localhost:7881"
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
Run backend components:
|
Run backend components:
|
||||||
@@ -107,6 +141,32 @@ Run backend components:
|
|||||||
yarn backend
|
yarn backend
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Test Coverage
|
||||||
|
|
||||||
|
<img src="https://codecov.io/github/element-hq/element-call/graphs/tree.svg?token=O6CFVKK6I1"></img>
|
||||||
|
|
||||||
|
### Add a new translation key
|
||||||
|
|
||||||
|
To add a new translation key you can do these steps:
|
||||||
|
|
||||||
|
1. Add the new key entry to the code where the new key is used: `t("some_new_key")`
|
||||||
|
1. Run `yarn i18n` to extract the new key and update the translation files. This will add a skeleton entry to the `public/locales/en-GB/app.json` file:
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
...
|
||||||
|
"some_new_key": "",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
1. Update the skeleton entry in the `public/locales/en-GB/app.json` file with the English translation:
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
...
|
||||||
|
"some_new_key": "Some new key",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Usage and other technical details about the project can be found here:
|
Usage and other technical details about the project can be found here:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
auth-service:
|
auth-service:
|
||||||
image: ghcr.io/vector-im/lk-jwt-service:latest-ci
|
image: ghcr.io/element-hq/lk-jwt-service:latest-ci
|
||||||
hostname: auth-server
|
hostname: auth-server
|
||||||
ports:
|
ports:
|
||||||
- 8881:8080
|
- 8881:8080
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
port: 7880
|
port: 7880
|
||||||
environment: dev
|
|
||||||
bind_addresses:
|
bind_addresses:
|
||||||
- "0.0.0.0"
|
- "0.0.0.0"
|
||||||
rtc:
|
rtc:
|
||||||
@@ -22,5 +21,3 @@ turn:
|
|||||||
external_tls: true
|
external_tls: true
|
||||||
keys:
|
keys:
|
||||||
devkey: secret
|
devkey: secret
|
||||||
signal_relay:
|
|
||||||
enabled: true
|
|
||||||
|
|||||||
13
codecov.yaml
Normal file
13
codecov.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Don't post comments on PRs; they're noisy and the same information can be
|
||||||
|
# gotten through the checks section at the bottom of the PR anyways
|
||||||
|
comment: false
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
# Track the impact of changes on overall coverage without blocking PRs
|
||||||
|
informational: true
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
# Expect 80% coverage on all lines that a PR touches
|
||||||
|
target: 80%
|
||||||
@@ -5,5 +5,11 @@
|
|||||||
"server_name": "call.ems.host"
|
"server_name": "call.ems.host"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"livekit": {
|
||||||
|
"livekit_service_url": "http://localhost:7881"
|
||||||
|
},
|
||||||
|
"features": {
|
||||||
|
"feature_use_device_session_member_events": true
|
||||||
|
},
|
||||||
"eula": "https://static.element.io/legal/online-EULA.pdf"
|
"eula": "https://static.element.io/legal/online-EULA.pdf"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
"livekit": {
|
"livekit": {
|
||||||
"livekit_service_url": "https://livekit-jwt.call.element.dev"
|
"livekit_service_url": "https://livekit-jwt.call.element.dev"
|
||||||
},
|
},
|
||||||
|
"features": {
|
||||||
|
"feature_use_device_session_member_events": true
|
||||||
|
},
|
||||||
"posthog": {
|
"posthog": {
|
||||||
"api_key": "phc_rXGHx9vDmyEvyRxPziYtdVIv0ahEv8A9uLWFcCi1WcU",
|
"api_key": "phc_rXGHx9vDmyEvyRxPziYtdVIv0ahEv8A9uLWFcCi1WcU",
|
||||||
"api_host": "https://posthog-element-call.element.io"
|
"api_host": "https://posthog-element-call.element.io"
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"default_server_config": {
|
|
||||||
"m.homeserver": {
|
|
||||||
"base_url": "https://call.ems.host",
|
|
||||||
"server_name": "call.ems.host"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"posthog": {
|
|
||||||
"api_key": "phc_rXGHx9vDmyEvyRxPziYtdVIv0ahEv8A9uLWFcCi1WcU",
|
|
||||||
"api_host": "https://posthog-element-call.element.io"
|
|
||||||
},
|
|
||||||
"sentry": {
|
|
||||||
"environment": "main-branch-cd",
|
|
||||||
"DSN": "https://b1e328d49be3402ba96101338989fb35@sentry.matrix.org/41"
|
|
||||||
},
|
|
||||||
"rageshake": {
|
|
||||||
"submit_url": "https://element.io/bugreports/submit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
30
config/httpd.conf
Normal file
30
config/httpd.conf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<VirtualHost *:8080>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
DocumentRoot "/app"
|
||||||
|
|
||||||
|
<Location "/">
|
||||||
|
# disable cache entriely by default (apart from Etag which is accurate enough)
|
||||||
|
Header add Cache-Control "private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
|
||||||
|
CacheDisable on
|
||||||
|
ExpiresActive off
|
||||||
|
|
||||||
|
# also turn off last-modified since they are just the timestamps of the file in the docker image
|
||||||
|
# and may or may not bear any resemblance to when the resource changed
|
||||||
|
Header add Last-Modified ""
|
||||||
|
|
||||||
|
DirectoryIndex index.html
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# assets can be cached because they have hashed filenames
|
||||||
|
<Location "/assets">
|
||||||
|
ExpiresActive on
|
||||||
|
ExpiresDefault "access plus 1 week"
|
||||||
|
Header add Cache-Control "public, no-transform"
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
<Location "/apple-app-site-association">
|
||||||
|
ForceType application/json
|
||||||
|
</Location>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
@@ -2,5 +2,6 @@
|
|||||||
|
|
||||||
This folder contains documentation for Element Call setup and usage.
|
This folder contains documentation for Element Call setup and usage.
|
||||||
|
|
||||||
- [Url format and parameters](./url-params.md)
|
|
||||||
- [Embedded vs standalone mode](./embedded-standalone.md)
|
- [Embedded vs standalone mode](./embedded-standalone.md)
|
||||||
|
- [Url format and parameters](./url-params.md)
|
||||||
|
- [Global JS controls](./controls.md)
|
||||||
|
|||||||
7
docs/controls.md
Normal file
7
docs/controls.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Global JS controls
|
||||||
|
|
||||||
|
A few aspects of Element Call's interface can be controlled through a global API on the `window`:
|
||||||
|
|
||||||
|
- `controls.canEnterPip(): boolean` Determines whether it's possible to enter picture-in-picture mode.
|
||||||
|
- `controls.enablePip(): void` Puts the call interface into picture-in-picture mode. Throws if not in a call.
|
||||||
|
- `controls.disablePip(): void` Takes the call interface out of picture-in-picture mode, restoring it to its natural display mode. Throws if not in a call.
|
||||||
@@ -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)
|
||||||
|
```
|
||||||
|
|||||||
30
knip.ts
Normal file
30
knip.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import { KnipConfig } from "knip";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
entry: ["src/main.tsx", "i18next-parser.config.ts"],
|
||||||
|
ignoreBinaries: [
|
||||||
|
// This is deprecated, so Knip doesn't actually recognize it as a globally
|
||||||
|
// installed binary. TODO We should switch to Compose v2:
|
||||||
|
// https://docs.docker.com/compose/migrate/
|
||||||
|
"docker-compose",
|
||||||
|
],
|
||||||
|
ignoreDependencies: [
|
||||||
|
// Used in CSS
|
||||||
|
"normalize.css",
|
||||||
|
// Used for its global type declarations
|
||||||
|
"@types/grecaptcha",
|
||||||
|
// Because we use matrix-js-sdk as a Git dependency rather than consuming
|
||||||
|
// the proper release artifacts, and also import directly from src/, we're
|
||||||
|
// forced to re-install some of the types that it depends on even though
|
||||||
|
// these look unused to Knip
|
||||||
|
"@types/content-type",
|
||||||
|
"@types/sdp-transform",
|
||||||
|
"@types/uuid",
|
||||||
|
// We obviously use this, but if the package has been linked with yarn link,
|
||||||
|
// then Knip will flag it as a false positive
|
||||||
|
// https://github.com/webpro-nl/knip/issues/766
|
||||||
|
"@vector-im/compound-web",
|
||||||
|
"matrix-widget-api",
|
||||||
|
],
|
||||||
|
ignoreExportsUsedInFile: true,
|
||||||
|
} satisfies KnipConfig;
|
||||||
178
package.json
178
package.json
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"name": "element-call",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -7,100 +8,61 @@
|
|||||||
"serve": "vite preview",
|
"serve": "vite preview",
|
||||||
"prettier:check": "prettier -c .",
|
"prettier:check": "prettier -c .",
|
||||||
"prettier:format": "prettier -w .",
|
"prettier:format": "prettier -w .",
|
||||||
"lint": "yarn lint:types && yarn lint:eslint",
|
"lint": "yarn lint:types && yarn lint:eslint && yarn lint:knip",
|
||||||
"lint:eslint": "eslint --max-warnings 0 src",
|
"lint:eslint": "eslint --max-warnings 0 src",
|
||||||
"lint:eslint-fix": "eslint --max-warnings 0 src --fix",
|
"lint:eslint-fix": "eslint --max-warnings 0 src --fix",
|
||||||
|
"lint:knip": "knip",
|
||||||
"lint:types": "tsc",
|
"lint:types": "tsc",
|
||||||
"i18n": "node_modules/i18next-parser/bin/cli.js",
|
"i18n": "i18next",
|
||||||
"i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update",
|
"i18n:check": "i18next --fail-on-warnings --fail-on-update",
|
||||||
"test": "jest",
|
"test": "vitest",
|
||||||
|
"test:coverage": "vitest --coverage",
|
||||||
"backend": "docker-compose -f backend-docker-compose.yml up"
|
"backend": "docker-compose -f backend-docker-compose.yml up"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@juggle/resize-observer": "^3.3.1",
|
|
||||||
"@livekit/components-react": "^1.1.0",
|
|
||||||
"@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/context-zone": "^1.9.1",
|
|
||||||
"@opentelemetry/exporter-jaeger": "^1.9.1",
|
|
||||||
"@opentelemetry/exporter-trace-otlp-http": "^0.45.0",
|
|
||||||
"@opentelemetry/instrumentation-document-load": "^0.33.0",
|
|
||||||
"@opentelemetry/instrumentation-user-interaction": "^0.33.0",
|
|
||||||
"@opentelemetry/sdk-trace-web": "^1.9.1",
|
|
||||||
"@radix-ui/react-dialog": "^1.0.4",
|
|
||||||
"@radix-ui/react-visually-hidden": "^1.0.3",
|
|
||||||
"@react-aria/button": "^3.3.4",
|
|
||||||
"@react-aria/focus": "^3.5.0",
|
|
||||||
"@react-aria/menu": "^3.3.0",
|
|
||||||
"@react-aria/overlays": "^3.7.3",
|
|
||||||
"@react-aria/select": "^3.6.0",
|
|
||||||
"@react-aria/tabs": "^3.1.0",
|
|
||||||
"@react-aria/tooltip": "^3.1.3",
|
|
||||||
"@react-aria/utils": "^3.10.0",
|
|
||||||
"@react-spring/web": "^9.4.4",
|
|
||||||
"@react-stately/collections": "^3.3.4",
|
|
||||||
"@react-stately/select": "^3.1.3",
|
|
||||||
"@react-stately/tooltip": "^3.0.5",
|
|
||||||
"@react-stately/tree": "^3.2.0",
|
|
||||||
"@sentry/react": "^7.0.0",
|
|
||||||
"@sentry/tracing": "^7.0.0",
|
|
||||||
"@types/lodash": "^4.14.199",
|
|
||||||
"@use-gesture/react": "^10.2.11",
|
|
||||||
"@vector-im/compound-design-tokens": "^0.1.0",
|
|
||||||
"@vector-im/compound-web": "^0.6.0",
|
|
||||||
"@vitejs/plugin-basic-ssl": "^1.0.1",
|
|
||||||
"@vitejs/plugin-react": "^4.0.1",
|
|
||||||
"buffer": "^6.0.3",
|
|
||||||
"classnames": "^2.3.1",
|
|
||||||
"events": "^3.3.0",
|
|
||||||
"i18next": "^23.0.0",
|
|
||||||
"i18next-browser-languagedetector": "^7.0.0",
|
|
||||||
"i18next-http-backend": "^2.0.0",
|
|
||||||
"livekit-client": "^1.12.3",
|
|
||||||
"lodash": "^4.17.21",
|
|
||||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#eca651c0c2ff0600bdae0bb6aba43485e48b69d5",
|
|
||||||
"matrix-widget-api": "^1.3.1",
|
|
||||||
"normalize.css": "^8.0.1",
|
|
||||||
"pako": "^2.0.4",
|
|
||||||
"postcss-preset-env": "^9.0.0",
|
|
||||||
"posthog-js": "^1.29.0",
|
|
||||||
"react": "18",
|
|
||||||
"react-dom": "18",
|
|
||||||
"react-i18next": "^13.0.0",
|
|
||||||
"react-router-dom": "^5.2.0",
|
|
||||||
"react-use-clipboard": "^1.0.7",
|
|
||||||
"react-use-measure": "^2.1.1",
|
|
||||||
"sdp-transform": "^2.14.1",
|
|
||||||
"tinyqueue": "^2.0.3",
|
|
||||||
"unique-names-generator": "^4.6.0",
|
|
||||||
"uuid": "9",
|
|
||||||
"vaul": "^0.7.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.16.5",
|
"@babel/core": "^7.16.5",
|
||||||
"@babel/preset-env": "^7.22.20",
|
"@babel/preset-env": "^7.22.20",
|
||||||
"@babel/preset-react": "^7.22.15",
|
"@babel/preset-react": "^7.22.15",
|
||||||
"@babel/preset-typescript": "^7.23.0",
|
"@babel/preset-typescript": "^7.23.0",
|
||||||
"@react-spring/rafz": "^9.7.3",
|
"@juggle/resize-observer": "^3.3.1",
|
||||||
"@react-types/dialog": "^3.5.5",
|
"@livekit/components-core": "^0.11.0",
|
||||||
|
"@livekit/components-react": "^2.0.0",
|
||||||
|
"@opentelemetry/api": "^1.4.0",
|
||||||
|
"@opentelemetry/core": "^1.25.1",
|
||||||
|
"@opentelemetry/exporter-trace-otlp-http": "^0.53.0",
|
||||||
|
"@opentelemetry/resources": "^1.25.1",
|
||||||
|
"@opentelemetry/sdk-trace-base": "^1.25.1",
|
||||||
|
"@opentelemetry/sdk-trace-web": "^1.9.1",
|
||||||
|
"@opentelemetry/semantic-conventions": "^1.25.1",
|
||||||
|
"@radix-ui/react-dialog": "^1.0.4",
|
||||||
|
"@radix-ui/react-slider": "^1.1.2",
|
||||||
|
"@radix-ui/react-visually-hidden": "^1.0.3",
|
||||||
|
"@react-spring/web": "^9.4.4",
|
||||||
|
"@sentry/react": "^8.0.0",
|
||||||
"@sentry/vite-plugin": "^2.0.0",
|
"@sentry/vite-plugin": "^2.0.0",
|
||||||
"@testing-library/jest-dom": "^6.0.0",
|
"@testing-library/dom": "^10.1.0",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^16.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/grecaptcha": "^3.0.9",
|
||||||
"@types/dompurify": "^3.0.2",
|
"@types/jsdom": "^21.1.7",
|
||||||
"@types/grecaptcha": "^3.0.4",
|
"@types/lodash": "^4.14.199",
|
||||||
"@types/jest": "^29.5.5",
|
|
||||||
"@types/node": "^20.0.0",
|
"@types/node": "^20.0.0",
|
||||||
|
"@types/qrcode": "^1.5.5",
|
||||||
|
"@types/react-dom": "^18.3.0",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@types/request": "^2.48.8",
|
|
||||||
"@types/sdp-transform": "^2.4.5",
|
"@types/sdp-transform": "^2.4.5",
|
||||||
"@types/uuid": "9",
|
"@types/uuid": "10",
|
||||||
"@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",
|
"@use-gesture/react": "^10.2.11",
|
||||||
|
"@vector-im/compound-design-tokens": "^1.0.0",
|
||||||
|
"@vector-im/compound-web": "^6.0.0",
|
||||||
|
"@vitejs/plugin-basic-ssl": "^1.0.1",
|
||||||
|
"@vitejs/plugin-react": "^4.0.1",
|
||||||
|
"@vitest/coverage-v8": "^2.0.5",
|
||||||
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
||||||
|
"classnames": "^2.3.1",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
@@ -110,39 +72,43 @@
|
|||||||
"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": "^49.0.0",
|
"eslint-plugin-unicorn": "^55.0.0",
|
||||||
"i18next-parser": "^8.0.0",
|
"global-jsdom": "^24.0.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"history": "^4.0.0",
|
||||||
"jest": "^29.2.2",
|
"i18next": "^23.0.0",
|
||||||
"jest-environment-jsdom": "^29.3.1",
|
"i18next-browser-languagedetector": "^8.0.0",
|
||||||
"jest-mock": "^29.5.0",
|
"i18next-http-backend": "^2.0.0",
|
||||||
|
"i18next-parser": "^9.0.0",
|
||||||
|
"jsdom": "^25.0.0",
|
||||||
|
"knip": "^5.27.2",
|
||||||
|
"livekit-client": "^2.0.2",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"loglevel": "^1.9.1",
|
||||||
|
"matrix-js-sdk": "^v34.4.0",
|
||||||
|
"matrix-widget-api": "^1.8.2",
|
||||||
|
"normalize.css": "^8.0.1",
|
||||||
|
"observable-hooks": "^4.2.3",
|
||||||
|
"pako": "^2.0.4",
|
||||||
|
"postcss": "^8.4.41",
|
||||||
|
"postcss-preset-env": "^10.0.0",
|
||||||
|
"posthog-js": "^1.29.0",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.0",
|
||||||
|
"qrcode": "^1.5.4",
|
||||||
|
"react": "18",
|
||||||
|
"react-dom": "18",
|
||||||
|
"react-i18next": "^15.0.0",
|
||||||
|
"react-router-dom": "^5.2.0",
|
||||||
|
"react-use-clipboard": "^1.0.7",
|
||||||
|
"react-use-measure": "^2.1.1",
|
||||||
|
"rxjs": "^7.8.1",
|
||||||
"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": "^4.2.0",
|
"unique-names-generator": "^4.6.0",
|
||||||
|
"vaul": "^0.9.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": "^2.0.0"
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="cpd-theme-dark">
|
<!-- The default class is: .no-theme {display: none}. It will be overwritten once the app is loaded. -->
|
||||||
|
<body class="no-theme">
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -31,8 +31,6 @@
|
|||||||
"username": "Потребителско име",
|
"username": "Потребителско име",
|
||||||
"video": "Видео"
|
"video": "Видео"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Излез от цял екран",
|
|
||||||
"fullscreen_button_label": "Цял екран",
|
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Да, присъедини се",
|
"join_button": "Да, присъедини се",
|
||||||
"text": "Този разговор вече съществува, искате ли да се присъедините?",
|
"text": "Този разговор вече съществува, искате ли да се присъедините?",
|
||||||
@@ -42,7 +40,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Влез в разговора"
|
"join_button": "Влез в разговора"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Локална сила на звука",
|
|
||||||
"logging_in": "Влизане…",
|
"logging_in": "Влизане…",
|
||||||
"login_auth_links": "<0>Създайте акаунт</0> или <2>Влезте като гост</2>",
|
"login_auth_links": "<0>Създайте акаунт</0> или <2>Влезте като гост</2>",
|
||||||
"login_title": "Влез",
|
"login_title": "Влез",
|
||||||
|
|||||||
@@ -29,10 +29,8 @@
|
|||||||
"settings": "Nastavení",
|
"settings": "Nastavení",
|
||||||
"username": "Uživatelské jméno"
|
"username": "Uživatelské jméno"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Ukončit režim celé obrazovky",
|
|
||||||
"full_screen_view_description": "<0>Odeslání ladících záznamů nám pomůže diagnostikovat problém.</0>",
|
"full_screen_view_description": "<0>Odeslání ladících záznamů nám pomůže diagnostikovat problém.</0>",
|
||||||
"full_screen_view_h1": "<0>Oops, něco se pokazilo.</0>",
|
"full_screen_view_h1": "<0>Oops, něco se pokazilo.</0>",
|
||||||
"fullscreen_button_label": "Zvětšit na celou obrazovku",
|
|
||||||
"header_label": "Domov Element Call",
|
"header_label": "Domov Element Call",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Ano, připojit se",
|
"join_button": "Ano, připojit se",
|
||||||
@@ -43,7 +41,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Připojit se k hovoru"
|
"join_button": "Připojit se k hovoru"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Lokální hlasitost",
|
|
||||||
"logging_in": "Přihlašování se…",
|
"logging_in": "Přihlašování se…",
|
||||||
"login_auth_links": "<0>Vytvořit účet</0> Or <2>Jako host</2>",
|
"login_auth_links": "<0>Vytvořit účet</0> Or <2>Jako host</2>",
|
||||||
"login_title": "Přihlášení",
|
"login_title": "Přihlášení",
|
||||||
|
|||||||
@@ -56,10 +56,8 @@
|
|||||||
"video": "Video"
|
"video": "Video"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Die Verbindung zum Server wurde getrennt.",
|
"disconnected_banner": "Die Verbindung zum Server wurde getrennt.",
|
||||||
"exit_fullscreen_button_label": "Vollbildmodus verlassen",
|
|
||||||
"full_screen_view_description": "<0>Übermittelte Problemberichte helfen uns, Fehler zu beheben.</0>",
|
"full_screen_view_description": "<0>Übermittelte Problemberichte helfen uns, Fehler zu beheben.</0>",
|
||||||
"full_screen_view_h1": "<0>Hoppla, etwas ist schiefgelaufen.</0>",
|
"full_screen_view_h1": "<0>Hoppla, etwas ist schiefgelaufen.</0>",
|
||||||
"fullscreen_button_label": "Vollbild",
|
|
||||||
"group_call_loader_failed_heading": "Anruf nicht gefunden",
|
"group_call_loader_failed_heading": "Anruf nicht gefunden",
|
||||||
"group_call_loader_failed_text": "Anrufe sind nun Ende-zu-Ende-verschlüsselt und müssen auf der Startseite erstellt werden. Damit stellen wir sicher, dass alle denselben Schlüssel verwenden.",
|
"group_call_loader_failed_text": "Anrufe sind nun Ende-zu-Ende-verschlüsselt und müssen auf der Startseite erstellt werden. Damit stellen wir sicher, dass alle denselben Schlüssel verwenden.",
|
||||||
"hangup_button_label": "Anruf beenden",
|
"hangup_button_label": "Anruf beenden",
|
||||||
@@ -80,7 +78,6 @@
|
|||||||
"join_button": "Anruf beitreten",
|
"join_button": "Anruf beitreten",
|
||||||
"leave_button": "Zurück zu kürzlichen Anrufen"
|
"leave_button": "Zurück zu kürzlichen Anrufen"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Lokale Lautstärke",
|
|
||||||
"log_in": "Anmelden",
|
"log_in": "Anmelden",
|
||||||
"logging_in": "Anmelden …",
|
"logging_in": "Anmelden …",
|
||||||
"login_auth_links": "<0>Konto erstellen</0> Oder <2>Als Gast betreten</2>",
|
"login_auth_links": "<0>Konto erstellen</0> Oder <2>Als Gast betreten</2>",
|
||||||
@@ -141,7 +138,6 @@
|
|||||||
"unmute_microphone_button_label": "Mikrofon aktivieren",
|
"unmute_microphone_button_label": "Mikrofon aktivieren",
|
||||||
"version": "Version: {{version}}",
|
"version": "Version: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} präsentiert",
|
|
||||||
"sfu_participant_local": "Du"
|
"sfu_participant_local": "Du"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Warte auf weitere Teilnehmer …"
|
"waiting_for_participants": "Warte auf weitere Teilnehmer …"
|
||||||
|
|||||||
@@ -37,10 +37,8 @@
|
|||||||
"username": "Όνομα χρήστη",
|
"username": "Όνομα χρήστη",
|
||||||
"video": "Βίντεο"
|
"video": "Βίντεο"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Έξοδος από πλήρη οθόνη",
|
|
||||||
"full_screen_view_description": "<0>Η υποβολή αρχείων καταγραφής σφαλμάτων θα μας βοηθήσει να εντοπίσουμε το πρόβλημα.</0>",
|
"full_screen_view_description": "<0>Η υποβολή αρχείων καταγραφής σφαλμάτων θα μας βοηθήσει να εντοπίσουμε το πρόβλημα.</0>",
|
||||||
"full_screen_view_h1": "<0>Ωχ, κάτι πήγε στραβά.</0>",
|
"full_screen_view_h1": "<0>Ωχ, κάτι πήγε στραβά.</0>",
|
||||||
"fullscreen_button_label": "Πλήρη οθόνη",
|
|
||||||
"header_label": "Element Κεντρική Οθόνη Κλήσεων",
|
"header_label": "Element Κεντρική Οθόνη Κλήσεων",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Ναι, συμμετοχή στην κλήση",
|
"join_button": "Ναι, συμμετοχή στην κλήση",
|
||||||
@@ -50,7 +48,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Συμμετοχή στην κλήση"
|
"join_button": "Συμμετοχή στην κλήση"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Τοπική ένταση",
|
|
||||||
"logging_in": "Σύνδεση…",
|
"logging_in": "Σύνδεση…",
|
||||||
"login_auth_links": "<0>Δημιουργήστε λογαριασμό</0> Ή <2>Συμμετέχετε ως επισκέπτης</2>",
|
"login_auth_links": "<0>Δημιουργήστε λογαριασμό</0> Ή <2>Συμμετέχετε ως επισκέπτης</2>",
|
||||||
"login_title": "Σύνδεση",
|
"login_title": "Σύνδεση",
|
||||||
@@ -94,8 +91,5 @@
|
|||||||
"unauthenticated_view_body": "Δεν έχετε εγγραφεί ακόμα; <2>Δημιουργήστε λογαριασμό</2>",
|
"unauthenticated_view_body": "Δεν έχετε εγγραφεί ακόμα; <2>Δημιουργήστε λογαριασμό</2>",
|
||||||
"unauthenticated_view_login_button": "Συνδεθείτε στον λογαριασμό σας",
|
"unauthenticated_view_login_button": "Συνδεθείτε στον λογαριασμό σας",
|
||||||
"version": "Έκδοση: {{version}}",
|
"version": "Έκδοση: {{version}}",
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} παρουσιάζει"
|
|
||||||
},
|
|
||||||
"waiting_for_participants": "Αναμονή για άλλους συμμετέχοντες…"
|
"waiting_for_participants": "Αναμονή για άλλους συμμετέχοντες…"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"copy": "Copy",
|
|
||||||
"copy_link": "Copy link",
|
"copy_link": "Copy link",
|
||||||
|
"edit": "Edit",
|
||||||
"go": "Go",
|
"go": "Go",
|
||||||
"invite": "Invite",
|
"invite": "Invite",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
@@ -13,7 +13,8 @@
|
|||||||
"remove": "Remove",
|
"remove": "Remove",
|
||||||
"sign_in": "Sign in",
|
"sign_in": "Sign in",
|
||||||
"sign_out": "Sign out",
|
"sign_out": "Sign out",
|
||||||
"submit": "Submit"
|
"submit": "Submit",
|
||||||
|
"upload_file": "Upload file"
|
||||||
},
|
},
|
||||||
"analytics_notice": "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.",
|
"analytics_notice": "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.",
|
||||||
"app_selection_modal": {
|
"app_selection_modal": {
|
||||||
@@ -41,14 +42,16 @@
|
|||||||
"analytics": "Analytics",
|
"analytics": "Analytics",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
|
"back": "Back",
|
||||||
"camera": "Camera",
|
"camera": "Camera",
|
||||||
"copied": "Copied!",
|
|
||||||
"display_name": "Display name",
|
"display_name": "Display name",
|
||||||
"encrypted": "Encrypted",
|
"encrypted": "Encrypted",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"loading": "Loading…",
|
"loading": "Loading…",
|
||||||
"microphone": "Microphone",
|
"microphone": "Microphone",
|
||||||
|
"next": "Next",
|
||||||
|
"options": "Options",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"profile": "Profile",
|
"profile": "Profile",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
@@ -56,13 +59,22 @@
|
|||||||
"username": "Username",
|
"username": "Username",
|
||||||
"video": "Video"
|
"video": "Video"
|
||||||
},
|
},
|
||||||
|
"crypto_version": "Crypto version: {{version}}",
|
||||||
|
"device_id": "Device ID: {{id}}",
|
||||||
"disconnected_banner": "Connectivity to the server has been lost.",
|
"disconnected_banner": "Connectivity to the server has been lost.",
|
||||||
"exit_fullscreen_button_label": "Exit full screen",
|
|
||||||
"full_screen_view_description": "<0>Submitting debug logs will help us track down the problem.</0>",
|
"full_screen_view_description": "<0>Submitting debug logs will help us track down the problem.</0>",
|
||||||
"full_screen_view_h1": "<0>Oops, something's gone wrong.</0>",
|
"full_screen_view_h1": "<0>Oops, something's gone wrong.</0>",
|
||||||
"fullscreen_button_label": "Full screen",
|
"group_call_loader": {
|
||||||
"group_call_loader_failed_heading": "Call not found",
|
"banned_body": "You have been banned from the room.",
|
||||||
"group_call_loader_failed_text": "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key.",
|
"banned_heading": "Banned",
|
||||||
|
"call_ended_body": "You have been removed from the call.",
|
||||||
|
"call_ended_heading": "Call ended",
|
||||||
|
"failed_heading": "Failed to join",
|
||||||
|
"failed_text": "Call not found or is not accessible.",
|
||||||
|
"knock_reject_body": "The room members declined your request to join.",
|
||||||
|
"knock_reject_heading": "Not allowed to join",
|
||||||
|
"reason": "Reason"
|
||||||
|
},
|
||||||
"hangup_button_label": "End call",
|
"hangup_button_label": "End call",
|
||||||
"header_label": "Element Call Home",
|
"header_label": "Element Call Home",
|
||||||
"header_participants_label": "Participants",
|
"header_participants_label": "Participants",
|
||||||
@@ -78,21 +90,24 @@
|
|||||||
"layout_grid_label": "Grid",
|
"layout_grid_label": "Grid",
|
||||||
"layout_spotlight_label": "Spotlight",
|
"layout_spotlight_label": "Spotlight",
|
||||||
"lobby": {
|
"lobby": {
|
||||||
|
"ask_to_join": "Ask to join call",
|
||||||
"join_button": "Join call",
|
"join_button": "Join call",
|
||||||
"leave_button": "Back to recents"
|
"leave_button": "Back to recents",
|
||||||
|
"waiting_for_invite": "Request sent"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Local volume",
|
|
||||||
"log_in": "Log In",
|
"log_in": "Log In",
|
||||||
"logging_in": "Logging in…",
|
"logging_in": "Logging in…",
|
||||||
"login_auth_links": "<0>Create an account</0> Or <2>Access as a guest</2>",
|
"login_auth_links": "<0>Create an account</0> Or <2>Access as a guest</2>",
|
||||||
"login_auth_links_prompt": "Not registered yet?",
|
"login_auth_links_prompt": "Not registered yet?",
|
||||||
"login_subheading": "To continue to Element",
|
"login_subheading": "To continue to Element",
|
||||||
"login_title": "Login",
|
"login_title": "Login",
|
||||||
|
"matrix_id": "Matrix ID: {{id}}",
|
||||||
"microphone_off": "Microphone off",
|
"microphone_off": "Microphone off",
|
||||||
"microphone_on": "Microphone on",
|
"microphone_on": "Microphone on",
|
||||||
"mute_microphone_button_label": "Mute microphone",
|
"mute_microphone_button_label": "Mute microphone",
|
||||||
"participant_count_one": "{{count, number}}",
|
"participant_count_one": "{{count, number}}",
|
||||||
"participant_count_other": "{{count, number}}",
|
"participant_count_other": "{{count, number}}",
|
||||||
|
"qr_code": "QR Code",
|
||||||
"rageshake_button_error_caption": "Retry sending logs",
|
"rageshake_button_error_caption": "Retry sending logs",
|
||||||
"rageshake_request_modal": {
|
"rageshake_request_modal": {
|
||||||
"body": "Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.",
|
"body": "Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.",
|
||||||
@@ -116,11 +131,11 @@
|
|||||||
"room_auth_view_eula_caption": "By clicking \"Join call now\", you agree to our <2>End User Licensing Agreement (EULA)</2>",
|
"room_auth_view_eula_caption": "By clicking \"Join call now\", you agree to our <2>End User Licensing Agreement (EULA)</2>",
|
||||||
"room_auth_view_join_button": "Join call now",
|
"room_auth_view_join_button": "Join call now",
|
||||||
"screenshare_button_label": "Share screen",
|
"screenshare_button_label": "Share screen",
|
||||||
"select_input_unset_button": "Select an option",
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"developer_settings_label": "Developer Settings",
|
"developer_settings_label": "Developer Settings",
|
||||||
"developer_settings_label_description": "Expose developer settings in the settings window.",
|
"developer_settings_label_description": "Expose developer settings in the settings window.",
|
||||||
"developer_tab_title": "Developer",
|
"developer_tab_title": "Developer",
|
||||||
|
"duplicate_tiles_label": "Number of additional tile copies per participant",
|
||||||
"feedback_tab_body": "If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.",
|
"feedback_tab_body": "If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.",
|
||||||
"feedback_tab_description_label": "Your feedback",
|
"feedback_tab_description_label": "Your feedback",
|
||||||
"feedback_tab_h4": "Submit feedback",
|
"feedback_tab_h4": "Submit feedback",
|
||||||
@@ -129,7 +144,6 @@
|
|||||||
"feedback_tab_title": "Feedback",
|
"feedback_tab_title": "Feedback",
|
||||||
"more_tab_title": "More",
|
"more_tab_title": "More",
|
||||||
"opt_in_description": "<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.",
|
"opt_in_description": "<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.",
|
||||||
"show_connection_stats_label": "Show connection stats",
|
|
||||||
"speaker_device_selection_label": "Speaker"
|
"speaker_device_selection_label": "Speaker"
|
||||||
},
|
},
|
||||||
"star_rating_input_label_one": "{{count}} stars",
|
"star_rating_input_label_one": "{{count}} stars",
|
||||||
@@ -143,10 +157,13 @@
|
|||||||
"unauthenticated_view_eula_caption": "By clicking \"Go\", you agree to our <2>End User Licensing Agreement (EULA)</2>",
|
"unauthenticated_view_eula_caption": "By clicking \"Go\", you agree to our <2>End User Licensing Agreement (EULA)</2>",
|
||||||
"unauthenticated_view_login_button": "Login to your account",
|
"unauthenticated_view_login_button": "Login to your account",
|
||||||
"unmute_microphone_button_label": "Unmute microphone",
|
"unmute_microphone_button_label": "Unmute microphone",
|
||||||
"version": "Version: {{version}}",
|
"version": "{{productName}} version: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} is presenting",
|
"always_show": "Always show",
|
||||||
"sfu_participant_local": "You"
|
"change_fit_contain": "Fit to frame",
|
||||||
},
|
"exit_full_screen": "Exit full screen",
|
||||||
"waiting_for_participants": "Waiting for other participants…"
|
"full_screen": "Full screen",
|
||||||
|
"mute_for_me": "Mute for me",
|
||||||
|
"volume": "Volume"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,8 @@
|
|||||||
"settings": "Ajustes",
|
"settings": "Ajustes",
|
||||||
"username": "Nombre de usuario"
|
"username": "Nombre de usuario"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Salir de pantalla completa",
|
|
||||||
"full_screen_view_description": "<0>Subir los registros de depuración nos ayudará a encontrar el problema.</0>",
|
"full_screen_view_description": "<0>Subir los registros de depuración nos ayudará a encontrar el problema.</0>",
|
||||||
"full_screen_view_h1": "<0>Ups, algo ha salido mal.</0>",
|
"full_screen_view_h1": "<0>Ups, algo ha salido mal.</0>",
|
||||||
"fullscreen_button_label": "Pantalla completa",
|
|
||||||
"header_label": "Inicio de Element Call",
|
"header_label": "Inicio de Element Call",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Si, unirse a la llamada",
|
"join_button": "Si, unirse a la llamada",
|
||||||
@@ -48,7 +46,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Unirse a la llamada"
|
"join_button": "Unirse a la llamada"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Volumen local",
|
|
||||||
"logging_in": "Iniciando sesión…",
|
"logging_in": "Iniciando sesión…",
|
||||||
"login_auth_links": "<0>Crear una cuenta</0> o <2>Acceder como invitado</2>",
|
"login_auth_links": "<0>Crear una cuenta</0> o <2>Acceder como invitado</2>",
|
||||||
"login_title": "Iniciar sesión",
|
"login_title": "Iniciar sesión",
|
||||||
@@ -95,8 +92,5 @@
|
|||||||
"unauthenticated_view_eula_caption": "Al hacer clic en \"Comenzar\", aceptas nuestro <2>Contrato de Licencia de Usuario Final (CLUF)</2>",
|
"unauthenticated_view_eula_caption": "Al hacer clic en \"Comenzar\", aceptas nuestro <2>Contrato de Licencia de Usuario Final (CLUF)</2>",
|
||||||
"unauthenticated_view_login_button": "Iniciar sesión en tu cuenta",
|
"unauthenticated_view_login_button": "Iniciar sesión en tu cuenta",
|
||||||
"version": "Versión: {{version}}",
|
"version": "Versión: {{version}}",
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} está presentando"
|
|
||||||
},
|
|
||||||
"waiting_for_participants": "Esperando a los otros participantes…"
|
"waiting_for_participants": "Esperando a los otros participantes…"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,8 @@
|
|||||||
"username": "Kasutajanimi"
|
"username": "Kasutajanimi"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Võrguühendus serveriga on katkenud.",
|
"disconnected_banner": "Võrguühendus serveriga on katkenud.",
|
||||||
"exit_fullscreen_button_label": "Välju täisekraanivaatest",
|
|
||||||
"full_screen_view_description": "<0>Kui saadad meile vealogid, siis on lihtsam vea põhjust otsida.</0>",
|
"full_screen_view_description": "<0>Kui saadad meile vealogid, siis on lihtsam vea põhjust otsida.</0>",
|
||||||
"full_screen_view_h1": "<0>Ohoo, midagi on nüüd katki.</0>",
|
"full_screen_view_h1": "<0>Ohoo, midagi on nüüd katki.</0>",
|
||||||
"fullscreen_button_label": "Täisekraan",
|
|
||||||
"group_call_loader_failed_heading": "Kõnet ei leidu",
|
"group_call_loader_failed_heading": "Kõnet ei leidu",
|
||||||
"group_call_loader_failed_text": "Kõned on nüüd läbivalt krüptitud ning need pead looma kodulehelt. Sellega tagad, et kõik kasutavad samu krüptovõtmeid.",
|
"group_call_loader_failed_text": "Kõned on nüüd läbivalt krüptitud ning need pead looma kodulehelt. Sellega tagad, et kõik kasutavad samu krüptovõtmeid.",
|
||||||
"hangup_button_label": "Lõpeta kõne",
|
"hangup_button_label": "Lõpeta kõne",
|
||||||
@@ -75,7 +73,6 @@
|
|||||||
"join_button": "Kõnega liitumine",
|
"join_button": "Kõnega liitumine",
|
||||||
"leave_button": "Tagasi hiljutiste kõnede juurde"
|
"leave_button": "Tagasi hiljutiste kõnede juurde"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Kohalik helitugevus",
|
|
||||||
"logging_in": "Sisselogimine …",
|
"logging_in": "Sisselogimine …",
|
||||||
"login_auth_links": "<0>Loo konto</0> Või <2>Sisene külalisena</2>",
|
"login_auth_links": "<0>Loo konto</0> Või <2>Sisene külalisena</2>",
|
||||||
"login_title": "Sisselogimine",
|
"login_title": "Sisselogimine",
|
||||||
@@ -133,7 +130,6 @@
|
|||||||
"unmute_microphone_button_label": "Lülita mikrofon sisse",
|
"unmute_microphone_button_label": "Lülita mikrofon sisse",
|
||||||
"version": "Versioon: {{version}}",
|
"version": "Versioon: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} on esitlemas",
|
|
||||||
"sfu_participant_local": "Sina"
|
"sfu_participant_local": "Sina"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Ootame teiste osalejate lisandumist…"
|
"waiting_for_participants": "Ootame teiste osalejate lisandumist…"
|
||||||
|
|||||||
@@ -32,8 +32,6 @@
|
|||||||
"username": "نام کاربری",
|
"username": "نام کاربری",
|
||||||
"video": "ویدیو"
|
"video": "ویدیو"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "خروج از حالت تمام صفحه",
|
|
||||||
"fullscreen_button_label": "تمام صحفه",
|
|
||||||
"header_label": "خانهٔ تماس المنت",
|
"header_label": "خانهٔ تماس المنت",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "بله، به تماس بپیوندید",
|
"join_button": "بله، به تماس بپیوندید",
|
||||||
@@ -44,7 +42,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "پیوستن به تماس"
|
"join_button": "پیوستن به تماس"
|
||||||
},
|
},
|
||||||
"local_volume_label": "حجم داخلی",
|
|
||||||
"logging_in": "ورود…",
|
"logging_in": "ورود…",
|
||||||
"login_auth_links": "<0>ساخت حساب کاربری</0> Or <2>دسترسی به عنوان میهمان</2>",
|
"login_auth_links": "<0>ساخت حساب کاربری</0> Or <2>دسترسی به عنوان میهمان</2>",
|
||||||
"login_title": "ورود",
|
"login_title": "ورود",
|
||||||
|
|||||||
@@ -50,10 +50,8 @@
|
|||||||
"video": "Vidéo"
|
"video": "Vidéo"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "La connexion avec le serveur a été perdue.",
|
"disconnected_banner": "La connexion avec le serveur a été perdue.",
|
||||||
"exit_fullscreen_button_label": "Quitter le plein écran",
|
|
||||||
"full_screen_view_description": "<0>Soumettre les journaux de débogage nous aidera à déterminer le problème.</0>",
|
"full_screen_view_description": "<0>Soumettre les journaux de débogage nous aidera à déterminer le problème.</0>",
|
||||||
"full_screen_view_h1": "<0>Oups, quelque chose s’est mal passé.</0>",
|
"full_screen_view_h1": "<0>Oups, quelque chose s’est mal passé.</0>",
|
||||||
"fullscreen_button_label": "Plein écran",
|
|
||||||
"group_call_loader_failed_heading": "Appel non trouvé",
|
"group_call_loader_failed_heading": "Appel non trouvé",
|
||||||
"group_call_loader_failed_text": "Les appels sont maintenant chiffrés de bout-en-bout et doivent être créés depuis la page d’accueil. Cela permet d’être sûr que tout le monde utilise la même clé de chiffrement.",
|
"group_call_loader_failed_text": "Les appels sont maintenant chiffrés de bout-en-bout et doivent être créés depuis la page d’accueil. Cela permet d’être sûr que tout le monde utilise la même clé de chiffrement.",
|
||||||
"hangup_button_label": "Terminer l’appel",
|
"hangup_button_label": "Terminer l’appel",
|
||||||
@@ -73,7 +71,6 @@
|
|||||||
"join_button": "Rejoindre l’appel",
|
"join_button": "Rejoindre l’appel",
|
||||||
"leave_button": "Revenir à l’historique des appels"
|
"leave_button": "Revenir à l’historique des appels"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Volume local",
|
|
||||||
"logging_in": "Connexion…",
|
"logging_in": "Connexion…",
|
||||||
"login_auth_links": "<0>Créer un compte</0> Or <2>Accès invité</2>",
|
"login_auth_links": "<0>Créer un compte</0> Or <2>Accès invité</2>",
|
||||||
"login_title": "Connexion",
|
"login_title": "Connexion",
|
||||||
@@ -131,7 +128,6 @@
|
|||||||
"unmute_microphone_button_label": "Allumer le microphone",
|
"unmute_microphone_button_label": "Allumer le microphone",
|
||||||
"version": "Version : {{version}}",
|
"version": "Version : {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} est à l’écran",
|
|
||||||
"sfu_participant_local": "Vous"
|
"sfu_participant_local": "Vous"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "En attente d’autres participants…"
|
"waiting_for_participants": "En attente d’autres participants…"
|
||||||
|
|||||||
@@ -50,10 +50,8 @@
|
|||||||
"username": "Nama pengguna"
|
"username": "Nama pengguna"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Koneksi ke server telah hilang.",
|
"disconnected_banner": "Koneksi ke server telah hilang.",
|
||||||
"exit_fullscreen_button_label": "Keluar dari layar penuh",
|
|
||||||
"full_screen_view_description": "<0>Mengirim catatan pengawakutuan akan membantu kami melacak masalahnya.</0>",
|
"full_screen_view_description": "<0>Mengirim catatan pengawakutuan akan membantu kami melacak masalahnya.</0>",
|
||||||
"full_screen_view_h1": "<0>Aduh, ada yang salah.</0>",
|
"full_screen_view_h1": "<0>Aduh, ada yang salah.</0>",
|
||||||
"fullscreen_button_label": "Layar penuh",
|
|
||||||
"group_call_loader_failed_heading": "Panggilan tidak ditemukan",
|
"group_call_loader_failed_heading": "Panggilan tidak ditemukan",
|
||||||
"group_call_loader_failed_text": "Panggilan sekarang terenkripsi secara ujung ke ujung dan harus dibuat dari laman beranda. Ini memastikan bahwa semuanya menggunakan kunci enkripsi yang sama.",
|
"group_call_loader_failed_text": "Panggilan sekarang terenkripsi secara ujung ke ujung dan harus dibuat dari laman beranda. Ini memastikan bahwa semuanya menggunakan kunci enkripsi yang sama.",
|
||||||
"hangup_button_label": "Akhiri panggilan",
|
"hangup_button_label": "Akhiri panggilan",
|
||||||
@@ -74,7 +72,6 @@
|
|||||||
"join_button": "Bergabung ke panggilan",
|
"join_button": "Bergabung ke panggilan",
|
||||||
"leave_button": "Kembali ke terkini"
|
"leave_button": "Kembali ke terkini"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Volume lokal",
|
|
||||||
"logging_in": "Memasuki…",
|
"logging_in": "Memasuki…",
|
||||||
"login_auth_links": "<0>Buat akun</0> Atau <2>Akses sebagai tamu</2>",
|
"login_auth_links": "<0>Buat akun</0> Atau <2>Akses sebagai tamu</2>",
|
||||||
"login_title": "Masuk",
|
"login_title": "Masuk",
|
||||||
@@ -132,7 +129,6 @@
|
|||||||
"unmute_microphone_button_label": "Nyalakan mikrofon",
|
"unmute_microphone_button_label": "Nyalakan mikrofon",
|
||||||
"version": "Versi: {{version}}",
|
"version": "Versi: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} sedang menampilkan",
|
|
||||||
"sfu_participant_local": "Anda"
|
"sfu_participant_local": "Anda"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Menunggu peserta lain…"
|
"waiting_for_participants": "Menunggu peserta lain…"
|
||||||
|
|||||||
@@ -48,10 +48,8 @@
|
|||||||
"username": "Nome utente"
|
"username": "Nome utente"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "La connessione al server è stata persa.",
|
"disconnected_banner": "La connessione al server è stata persa.",
|
||||||
"exit_fullscreen_button_label": "Esci da schermo intero",
|
|
||||||
"full_screen_view_description": "<0>L'invio di registri di debug ci aiuterà ad individuare il problema.</0>",
|
"full_screen_view_description": "<0>L'invio di registri di debug ci aiuterà ad individuare il problema.</0>",
|
||||||
"full_screen_view_h1": "<0>Ops, qualcosa è andato storto.</0>",
|
"full_screen_view_h1": "<0>Ops, qualcosa è andato storto.</0>",
|
||||||
"fullscreen_button_label": "Schermo intero",
|
|
||||||
"group_call_loader_failed_heading": "Chiamata non trovata",
|
"group_call_loader_failed_heading": "Chiamata non trovata",
|
||||||
"group_call_loader_failed_text": "Le chiamate ora sono cifrate end-to-end e devono essere create dalla pagina principale. Ciò assicura che chiunque usi la stessa chiave di crittografia.",
|
"group_call_loader_failed_text": "Le chiamate ora sono cifrate end-to-end e devono essere create dalla pagina principale. Ciò assicura che chiunque usi la stessa chiave di crittografia.",
|
||||||
"hangup_button_label": "Termina chiamata",
|
"hangup_button_label": "Termina chiamata",
|
||||||
@@ -72,7 +70,6 @@
|
|||||||
"join_button": "Entra in chiamata",
|
"join_button": "Entra in chiamata",
|
||||||
"leave_button": "Torna ai recenti"
|
"leave_button": "Torna ai recenti"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Volume locale",
|
|
||||||
"logging_in": "Accesso…",
|
"logging_in": "Accesso…",
|
||||||
"login_auth_links": "<0>Crea un profilo</0> o <2>Accedi come ospite</2>",
|
"login_auth_links": "<0>Crea un profilo</0> o <2>Accedi come ospite</2>",
|
||||||
"login_title": "Accedi",
|
"login_title": "Accedi",
|
||||||
@@ -129,7 +126,6 @@
|
|||||||
"unmute_microphone_button_label": "Riaccendi il microfono",
|
"unmute_microphone_button_label": "Riaccendi il microfono",
|
||||||
"version": "Versione: {{version}}",
|
"version": "Versione: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} sta presentando",
|
|
||||||
"sfu_participant_local": "Tu"
|
"sfu_participant_local": "Tu"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "In attesa di altri partecipanti…"
|
"waiting_for_participants": "In attesa di altri partecipanti…"
|
||||||
|
|||||||
@@ -30,9 +30,7 @@
|
|||||||
"username": "ユーザー名",
|
"username": "ユーザー名",
|
||||||
"video": "ビデオ"
|
"video": "ビデオ"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "全画面表示を終了",
|
|
||||||
"full_screen_view_h1": "<0>何かがうまく行きませんでした。</0>",
|
"full_screen_view_h1": "<0>何かがうまく行きませんでした。</0>",
|
||||||
"fullscreen_button_label": "全画面表示",
|
|
||||||
"header_label": "Element Call ホーム",
|
"header_label": "Element Call ホーム",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "はい、通話に参加",
|
"join_button": "はい、通話に参加",
|
||||||
|
|||||||
@@ -40,10 +40,8 @@
|
|||||||
"username": "Lietotājvārds"
|
"username": "Lietotājvārds"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Ir zaudēts savienojums ar serveri.",
|
"disconnected_banner": "Ir zaudēts savienojums ar serveri.",
|
||||||
"exit_fullscreen_button_label": "Iziet no pilnekrāna",
|
|
||||||
"full_screen_view_description": "<0>Atkļūdošanas žurnāla ierakstu iesūtīšana palīdzēs mums atklāt nepilnību.</0>",
|
"full_screen_view_description": "<0>Atkļūdošanas žurnāla ierakstu iesūtīšana palīdzēs mums atklāt nepilnību.</0>",
|
||||||
"full_screen_view_h1": "<0>Ak vai, kaut kas nogāja greizi!</0>",
|
"full_screen_view_h1": "<0>Ak vai, kaut kas nogāja greizi!</0>",
|
||||||
"fullscreen_button_label": "Pilnekrāns",
|
|
||||||
"header_label": "Element Call sākums",
|
"header_label": "Element Call sākums",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Jā, pievienoties zvanam",
|
"join_button": "Jā, pievienoties zvanam",
|
||||||
@@ -54,7 +52,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Pievienoties zvanam"
|
"join_button": "Pievienoties zvanam"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Vietējais skaļums",
|
|
||||||
"logging_in": "Piesakās…",
|
"logging_in": "Piesakās…",
|
||||||
"login_auth_links": "<0>Izveidot kontu</0> vai <2>Piekļūt kā viesim</2>",
|
"login_auth_links": "<0>Izveidot kontu</0> vai <2>Piekļūt kā viesim</2>",
|
||||||
"login_title": "Pieteikties",
|
"login_title": "Pieteikties",
|
||||||
@@ -103,8 +100,5 @@
|
|||||||
"unauthenticated_view_eula_caption": "Klikšķināšana uz \"Aiziet\" apliecina piekrišanu mūsu <2>galalietotāja licencēšanas nolīgumam (GLLN)</2>",
|
"unauthenticated_view_eula_caption": "Klikšķināšana uz \"Aiziet\" apliecina piekrišanu mūsu <2>galalietotāja licencēšanas nolīgumam (GLLN)</2>",
|
||||||
"unauthenticated_view_login_button": "Pieteikties kontā",
|
"unauthenticated_view_login_button": "Pieteikties kontā",
|
||||||
"version": "Versija: {{version}}",
|
"version": "Versija: {{version}}",
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} uzstājas"
|
|
||||||
},
|
|
||||||
"waiting_for_participants": "Gaida citus dalībniekus…"
|
"waiting_for_participants": "Gaida citus dalībniekus…"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,10 +53,8 @@
|
|||||||
"video": "Wideo"
|
"video": "Wideo"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Utracono połączenie z serwerem.",
|
"disconnected_banner": "Utracono połączenie z serwerem.",
|
||||||
"exit_fullscreen_button_label": "Opuść pełny ekran",
|
|
||||||
"full_screen_view_description": "<0>Wysłanie dzienników debuggowania pomoże nam ustalić przyczynę problemu.</0>",
|
"full_screen_view_description": "<0>Wysłanie dzienników debuggowania pomoże nam ustalić przyczynę problemu.</0>",
|
||||||
"full_screen_view_h1": "<0>Ojej, coś poszło nie tak.</0>",
|
"full_screen_view_h1": "<0>Ojej, coś poszło nie tak.</0>",
|
||||||
"fullscreen_button_label": "Pełny ekran",
|
|
||||||
"group_call_loader_failed_heading": "Nie znaleziono połączenia",
|
"group_call_loader_failed_heading": "Nie znaleziono połączenia",
|
||||||
"group_call_loader_failed_text": "Połączenia są teraz szyfrowane end-to-end i muszą zostać utworzone ze strony głównej. Pomaga to upewnić się, że każdy korzysta z tego samego klucza szyfrującego.",
|
"group_call_loader_failed_text": "Połączenia są teraz szyfrowane end-to-end i muszą zostać utworzone ze strony głównej. Pomaga to upewnić się, że każdy korzysta z tego samego klucza szyfrującego.",
|
||||||
"hangup_button_label": "Zakończ połączenie",
|
"hangup_button_label": "Zakończ połączenie",
|
||||||
@@ -77,7 +75,6 @@
|
|||||||
"join_button": "Dołącz do połączenia",
|
"join_button": "Dołącz do połączenia",
|
||||||
"leave_button": "Wróć do ostatnie"
|
"leave_button": "Wróć do ostatnie"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Głośność lokalna",
|
|
||||||
"logging_in": "Logowanie…",
|
"logging_in": "Logowanie…",
|
||||||
"login_auth_links": "<0>Utwórz konto</0> lub <2>Dołącz jako gość</2>",
|
"login_auth_links": "<0>Utwórz konto</0> lub <2>Dołącz jako gość</2>",
|
||||||
"login_title": "Zaloguj się",
|
"login_title": "Zaloguj się",
|
||||||
@@ -135,7 +132,6 @@
|
|||||||
"unmute_microphone_button_label": "Odcisz mikrofon",
|
"unmute_microphone_button_label": "Odcisz mikrofon",
|
||||||
"version": "Wersja: {{version}}",
|
"version": "Wersja: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} prezentuje",
|
|
||||||
"sfu_participant_local": "Ty"
|
"sfu_participant_local": "Ty"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Oczekiwanie na pozostałych uczestników…"
|
"waiting_for_participants": "Oczekiwanie na pozostałych uczestników…"
|
||||||
|
|||||||
@@ -38,10 +38,8 @@
|
|||||||
"username": "Имя пользователя",
|
"username": "Имя пользователя",
|
||||||
"video": "Видео"
|
"video": "Видео"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Выйти из полноэкранного режима",
|
|
||||||
"full_screen_view_description": "<0>Отправка журналов поможет нам найти и устранить проблему.</0>",
|
"full_screen_view_description": "<0>Отправка журналов поможет нам найти и устранить проблему.</0>",
|
||||||
"full_screen_view_h1": "<0>Упс, что-то пошло не так.</0>",
|
"full_screen_view_h1": "<0>Упс, что-то пошло не так.</0>",
|
||||||
"fullscreen_button_label": "Полноэкранный режим",
|
|
||||||
"header_label": "Главная Element Call",
|
"header_label": "Главная Element Call",
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Да, присоединиться",
|
"join_button": "Да, присоединиться",
|
||||||
@@ -52,7 +50,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Присоединиться"
|
"join_button": "Присоединиться"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Местная громкость",
|
|
||||||
"logging_in": "Вход…",
|
"logging_in": "Вход…",
|
||||||
"login_auth_links": "<0>Создать аккаунт</0> или <2>Зайти как гость</2>",
|
"login_auth_links": "<0>Создать аккаунт</0> или <2>Зайти как гость</2>",
|
||||||
"login_title": "Вход",
|
"login_title": "Вход",
|
||||||
@@ -96,8 +93,5 @@
|
|||||||
"unauthenticated_view_body": "Ещё не зарегистрированы? <2>Создайте аккаунт</2>",
|
"unauthenticated_view_body": "Ещё не зарегистрированы? <2>Создайте аккаунт</2>",
|
||||||
"unauthenticated_view_login_button": "Войдите в свой аккаунт",
|
"unauthenticated_view_login_button": "Войдите в свой аккаунт",
|
||||||
"version": "Версия: {{version}}",
|
"version": "Версия: {{version}}",
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} представляет"
|
|
||||||
},
|
|
||||||
"waiting_for_participants": "Ожидание других участников…"
|
"waiting_for_participants": "Ожидание других участников…"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,10 +51,8 @@
|
|||||||
"username": "Meno používateľa"
|
"username": "Meno používateľa"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Spojenie so serverom sa stratilo.",
|
"disconnected_banner": "Spojenie so serverom sa stratilo.",
|
||||||
"exit_fullscreen_button_label": "Ukončiť zobrazenie na celú obrazovku",
|
|
||||||
"full_screen_view_description": "<0>Odoslanie záznamov ladenia nám pomôže nájsť problém.</0>",
|
"full_screen_view_description": "<0>Odoslanie záznamov ladenia nám pomôže nájsť problém.</0>",
|
||||||
"full_screen_view_h1": "<0>Hups, niečo sa pokazilo.</0>",
|
"full_screen_view_h1": "<0>Hups, niečo sa pokazilo.</0>",
|
||||||
"fullscreen_button_label": "Zobrazenie na celú obrazovku",
|
|
||||||
"group_call_loader_failed_heading": "Hovor nebol nájdený",
|
"group_call_loader_failed_heading": "Hovor nebol nájdený",
|
||||||
"group_call_loader_failed_text": "Hovory sú teraz end-to-end šifrované a je potrebné ich vytvoriť z domovskej stránky. To pomáha zabezpečiť, aby všetci používali rovnaký šifrovací kľúč.",
|
"group_call_loader_failed_text": "Hovory sú teraz end-to-end šifrované a je potrebné ich vytvoriť z domovskej stránky. To pomáha zabezpečiť, aby všetci používali rovnaký šifrovací kľúč.",
|
||||||
"hangup_button_label": "Ukončiť hovor",
|
"hangup_button_label": "Ukončiť hovor",
|
||||||
@@ -75,7 +73,6 @@
|
|||||||
"join_button": "Pripojiť sa k hovoru",
|
"join_button": "Pripojiť sa k hovoru",
|
||||||
"leave_button": "Späť k nedávnym"
|
"leave_button": "Späť k nedávnym"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Lokálna hlasitosť",
|
|
||||||
"logging_in": "Prihlasovanie…",
|
"logging_in": "Prihlasovanie…",
|
||||||
"login_auth_links": "<0>Vytvoriť konto</0> Alebo <2>Prihlásiť sa ako hosť</2>",
|
"login_auth_links": "<0>Vytvoriť konto</0> Alebo <2>Prihlásiť sa ako hosť</2>",
|
||||||
"login_title": "Prihlásiť sa",
|
"login_title": "Prihlásiť sa",
|
||||||
@@ -133,7 +130,6 @@
|
|||||||
"unmute_microphone_button_label": "Zrušiť stlmenie mikrofónu",
|
"unmute_microphone_button_label": "Zrušiť stlmenie mikrofónu",
|
||||||
"version": "Verzia: {{version}}",
|
"version": "Verzia: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} prezentuje",
|
|
||||||
"sfu_participant_local": "Vy"
|
"sfu_participant_local": "Vy"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Čaká sa na ďalších účastníkov…"
|
"waiting_for_participants": "Čaká sa na ďalších účastníkov…"
|
||||||
|
|||||||
@@ -3,8 +3,5 @@
|
|||||||
"headline": "{{displayName}}, ditt samtal har avslutats."
|
"headline": "{{displayName}}, ditt samtal har avslutats."
|
||||||
},
|
},
|
||||||
"star_rating_input_label_one": "{{count}} stjärna",
|
"star_rating_input_label_one": "{{count}} stjärna",
|
||||||
"star_rating_input_label_other": "{{count}} stjärnor",
|
"star_rating_input_label_other": "{{count}} stjärnor"
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} presenterar"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
"password": "Parola",
|
"password": "Parola",
|
||||||
"settings": "Ayarlar"
|
"settings": "Ayarlar"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Tam ekranı terk et",
|
|
||||||
"fullscreen_button_label": "Tam ekran",
|
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"text": "Bu arama zaten var, katılmak ister misiniz?",
|
"text": "Bu arama zaten var, katılmak ister misiniz?",
|
||||||
"title": "Mevcut aramaya katıl?"
|
"title": "Mevcut aramaya katıl?"
|
||||||
@@ -33,7 +31,6 @@
|
|||||||
"lobby": {
|
"lobby": {
|
||||||
"join_button": "Aramaya katıl"
|
"join_button": "Aramaya katıl"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Yerel ses seviyesi",
|
|
||||||
"logging_in": "Giriliyor…",
|
"logging_in": "Giriliyor…",
|
||||||
"login_auth_links": "<0>Hesap oluştur</0> yahut <2>Konuk olarak gir</2>",
|
"login_auth_links": "<0>Hesap oluştur</0> yahut <2>Konuk olarak gir</2>",
|
||||||
"login_title": "Gir",
|
"login_title": "Gir",
|
||||||
|
|||||||
@@ -53,10 +53,8 @@
|
|||||||
"video": "Відео"
|
"video": "Відео"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "Втрачено зв'язок з сервером.",
|
"disconnected_banner": "Втрачено зв'язок з сервером.",
|
||||||
"exit_fullscreen_button_label": "Вийти з повноекранного режиму",
|
|
||||||
"full_screen_view_description": "<0>Надсилання журналів налагодження допоможе нам виявити проблему.</0>",
|
"full_screen_view_description": "<0>Надсилання журналів налагодження допоможе нам виявити проблему.</0>",
|
||||||
"full_screen_view_h1": "<0>Йой, щось пішло не за планом.</0>",
|
"full_screen_view_h1": "<0>Йой, щось пішло не за планом.</0>",
|
||||||
"fullscreen_button_label": "Повноекранний режим",
|
|
||||||
"group_call_loader_failed_heading": "Виклик не знайдено",
|
"group_call_loader_failed_heading": "Виклик не знайдено",
|
||||||
"group_call_loader_failed_text": "Відтепер виклики захищено наскрізним шифруванням, і їх потрібно створювати з домашньої сторінки. Це допомагає переконатися, що всі користувачі використовують один і той самий ключ шифрування.",
|
"group_call_loader_failed_text": "Відтепер виклики захищено наскрізним шифруванням, і їх потрібно створювати з домашньої сторінки. Це допомагає переконатися, що всі користувачі використовують один і той самий ключ шифрування.",
|
||||||
"hangup_button_label": "Завершити виклик",
|
"hangup_button_label": "Завершити виклик",
|
||||||
@@ -77,7 +75,6 @@
|
|||||||
"join_button": "Приєднатися до виклику",
|
"join_button": "Приєднатися до виклику",
|
||||||
"leave_button": "Повернутися до недавніх"
|
"leave_button": "Повернутися до недавніх"
|
||||||
},
|
},
|
||||||
"local_volume_label": "Локальна гучність",
|
|
||||||
"logging_in": "Вхід…",
|
"logging_in": "Вхід…",
|
||||||
"login_auth_links": "<0>Створити обліковий запис</0> або <2>Отримати доступ як гість</2>",
|
"login_auth_links": "<0>Створити обліковий запис</0> або <2>Отримати доступ як гість</2>",
|
||||||
"login_title": "Увійти",
|
"login_title": "Увійти",
|
||||||
@@ -135,7 +132,6 @@
|
|||||||
"unmute_microphone_button_label": "Увімкнути мікрофон",
|
"unmute_microphone_button_label": "Увімкнути мікрофон",
|
||||||
"version": "Версія: {{version}}",
|
"version": "Версія: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} представляє",
|
|
||||||
"sfu_participant_local": "Ви"
|
"sfu_participant_local": "Ви"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "Очікування на інших учасників…"
|
"waiting_for_participants": "Очікування на інших учасників…"
|
||||||
|
|||||||
@@ -29,10 +29,8 @@
|
|||||||
"username": "Tên người dùng",
|
"username": "Tên người dùng",
|
||||||
"video": "Truyền hình"
|
"video": "Truyền hình"
|
||||||
},
|
},
|
||||||
"exit_fullscreen_button_label": "Rời chế độ toàn màn hình",
|
|
||||||
"full_screen_view_description": "<0>Gửi nhật ký gỡ lỗi sẽ giúp chúng tôi theo dõi vấn đề.</0>",
|
"full_screen_view_description": "<0>Gửi nhật ký gỡ lỗi sẽ giúp chúng tôi theo dõi vấn đề.</0>",
|
||||||
"full_screen_view_h1": "<0>Ối, có cái gì đó sai.</0>",
|
"full_screen_view_h1": "<0>Ối, có cái gì đó sai.</0>",
|
||||||
"fullscreen_button_label": "Toàn màn hình",
|
|
||||||
"join_existing_call_modal": {
|
"join_existing_call_modal": {
|
||||||
"join_button": "Vâng, tham gia cuộc gọi",
|
"join_button": "Vâng, tham gia cuộc gọi",
|
||||||
"text": "Cuộc gọi đã tồn tại, bạn có muốn tham gia không?",
|
"text": "Cuộc gọi đã tồn tại, bạn có muốn tham gia không?",
|
||||||
@@ -73,8 +71,5 @@
|
|||||||
"unauthenticated_view_body": "Chưa đăng ký? <2>Tạo tài khoản</2>",
|
"unauthenticated_view_body": "Chưa đăng ký? <2>Tạo tài khoản</2>",
|
||||||
"unauthenticated_view_login_button": "Đăng nhập vào tài khoản của bạn",
|
"unauthenticated_view_login_button": "Đăng nhập vào tài khoản của bạn",
|
||||||
"version": "Phiên bản: {{version}}",
|
"version": "Phiên bản: {{version}}",
|
||||||
"video_tile": {
|
|
||||||
"presenter_label": "{{displayName}} đang trình bày"
|
|
||||||
},
|
|
||||||
"waiting_for_participants": "Đang đợi những người khác…"
|
"waiting_for_participants": "Đang đợi những người khác…"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,10 +51,8 @@
|
|||||||
"video": "视频"
|
"video": "视频"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "与服务器的连接中断。",
|
"disconnected_banner": "与服务器的连接中断。",
|
||||||
"exit_fullscreen_button_label": "退出全屏",
|
|
||||||
"full_screen_view_description": "<0>提交日志以帮助我们修复问题。</0>",
|
"full_screen_view_description": "<0>提交日志以帮助我们修复问题。</0>",
|
||||||
"full_screen_view_h1": "<0>哎哟,出问题了。</0>",
|
"full_screen_view_h1": "<0>哎哟,出问题了。</0>",
|
||||||
"fullscreen_button_label": "全屏",
|
|
||||||
"group_call_loader_failed_heading": "未找到通话",
|
"group_call_loader_failed_heading": "未找到通话",
|
||||||
"group_call_loader_failed_text": "现在,通话是端对端加密的,需要从主页创建。这有助于确保每个人都使用相同的加密密钥。",
|
"group_call_loader_failed_text": "现在,通话是端对端加密的,需要从主页创建。这有助于确保每个人都使用相同的加密密钥。",
|
||||||
"hangup_button_label": "通话结束",
|
"hangup_button_label": "通话结束",
|
||||||
@@ -70,7 +68,6 @@
|
|||||||
"join_button": "加入通话",
|
"join_button": "加入通话",
|
||||||
"leave_button": "返回最近通话"
|
"leave_button": "返回最近通话"
|
||||||
},
|
},
|
||||||
"local_volume_label": "本地音量",
|
|
||||||
"logging_in": "登录中……",
|
"logging_in": "登录中……",
|
||||||
"login_auth_links": "<0>创建账户</0> Or <2>以访客身份继续</2>",
|
"login_auth_links": "<0>创建账户</0> Or <2>以访客身份继续</2>",
|
||||||
"login_title": "登录",
|
"login_title": "登录",
|
||||||
@@ -128,7 +125,6 @@
|
|||||||
"unmute_microphone_button_label": "取消麦克风静音",
|
"unmute_microphone_button_label": "取消麦克风静音",
|
||||||
"version": "版本:{{version}}",
|
"version": "版本:{{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}}正在展示",
|
|
||||||
"sfu_participant_local": "你"
|
"sfu_participant_local": "你"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "等待其他参与者……"
|
"waiting_for_participants": "等待其他参与者……"
|
||||||
|
|||||||
@@ -53,10 +53,8 @@
|
|||||||
"video": "視訊"
|
"video": "視訊"
|
||||||
},
|
},
|
||||||
"disconnected_banner": "到伺服器的連線已遺失。",
|
"disconnected_banner": "到伺服器的連線已遺失。",
|
||||||
"exit_fullscreen_button_label": "退出全螢幕",
|
|
||||||
"full_screen_view_description": "<0>送出除錯紀錄,可幫助我們修正問題。</0>",
|
"full_screen_view_description": "<0>送出除錯紀錄,可幫助我們修正問題。</0>",
|
||||||
"full_screen_view_h1": "<0>喔喔,有些地方怪怪的。</0>",
|
"full_screen_view_h1": "<0>喔喔,有些地方怪怪的。</0>",
|
||||||
"fullscreen_button_label": "全螢幕",
|
|
||||||
"group_call_loader_failed_heading": "找不到通話",
|
"group_call_loader_failed_heading": "找不到通話",
|
||||||
"group_call_loader_failed_text": "通話現在是端對端加密的,必須從首頁建立。這有助於確保每個人都使用相同的加密金鑰。",
|
"group_call_loader_failed_text": "通話現在是端對端加密的,必須從首頁建立。這有助於確保每個人都使用相同的加密金鑰。",
|
||||||
"hangup_button_label": "結束通話",
|
"hangup_button_label": "結束通話",
|
||||||
@@ -77,7 +75,6 @@
|
|||||||
"join_button": "加入通話",
|
"join_button": "加入通話",
|
||||||
"leave_button": "回到最近的通話"
|
"leave_button": "回到最近的通話"
|
||||||
},
|
},
|
||||||
"local_volume_label": "您的音量",
|
|
||||||
"logging_in": "登入中…",
|
"logging_in": "登入中…",
|
||||||
"login_auth_links": "<0>建立帳號</0> 或<2>以訪客身份登入</2>",
|
"login_auth_links": "<0>建立帳號</0> 或<2>以訪客身份登入</2>",
|
||||||
"login_title": "登入",
|
"login_title": "登入",
|
||||||
@@ -135,7 +132,6 @@
|
|||||||
"unmute_microphone_button_label": "將麥克風取消靜音",
|
"unmute_microphone_button_label": "將麥克風取消靜音",
|
||||||
"version": "版本: {{version}}",
|
"version": "版本: {{version}}",
|
||||||
"video_tile": {
|
"video_tile": {
|
||||||
"presenter_label": "{{displayName}} 正在展示",
|
|
||||||
"sfu_participant_local": "您"
|
"sfu_participant_local": "您"
|
||||||
},
|
},
|
||||||
"waiting_for_participants": "等待其他參加者…"
|
"waiting_for_participants": "等待其他參加者…"
|
||||||
|
|||||||
@@ -3,9 +3,46 @@
|
|||||||
"extends": ["config:base"],
|
"extends": ["config:base"],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
"description": "Disable renoavte for packages we want to monitor ourselves",
|
"groupName": "all non-major dependencies",
|
||||||
"matchPackagePatterns": ["matrix-js-sdk"],
|
"groupSlug": "all-minor-patch",
|
||||||
|
"matchUpdateTypes": ["minor", "patch"],
|
||||||
|
"extends": ["schedule:weekly"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "GitHub Actions",
|
||||||
|
"matchDepTypes": ["action"],
|
||||||
|
"pinDigests": true,
|
||||||
|
"extends": ["schedule:monthly"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Disable Renovate for packages we want to monitor ourselves",
|
||||||
|
"groupName": "manually updated packages",
|
||||||
|
"matchDepNames": ["matrix-js-sdk"],
|
||||||
"enabled": false
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "matrix-widget-api",
|
||||||
|
"matchDepNames": ["matrix-widget-api"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "Compound",
|
||||||
|
"matchPackagePrefixes": ["@vector-im/compound-"],
|
||||||
|
"schedule": "before 5am on Tuesday and Friday"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "LiveKit client",
|
||||||
|
"matchDepNames": ["livekit-client"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "LiveKit components",
|
||||||
|
"matchPackagePrefixes": ["@livekit/components-"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "Vaul",
|
||||||
|
"matchDepNames": ["vaul"],
|
||||||
|
"extends": ["schedule:monthly"],
|
||||||
|
"prHeader": "Please review modals on mobile for visual regressions."
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"semanticCommits": "disabled"
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/@types/global.d.ts
vendored
10
src/@types/global.d.ts
vendored
@@ -15,6 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import "matrix-js-sdk/src/@types/global";
|
import "matrix-js-sdk/src/@types/global";
|
||||||
|
import { Controls } from "../controls";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Document {
|
interface Document {
|
||||||
@@ -24,14 +25,7 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface Window {
|
interface Window {
|
||||||
// TODO: https://gitlab.matrix.org/matrix-org/olm/-/issues/10
|
controls: Controls;
|
||||||
OLM_OPTIONS: Record<string, string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TypeScript doesn't know about the experimental setSinkId method, so we
|
|
||||||
// declare it ourselves
|
|
||||||
interface MediaElement extends HTMLVideoElement {
|
|
||||||
setSinkId: (id: string) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HTMLElement {
|
interface HTMLElement {
|
||||||
|
|||||||
77
src/App.tsx
77
src/App.tsx
@@ -22,8 +22,8 @@ import {
|
|||||||
useLocation,
|
useLocation,
|
||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import { OverlayProvider } from "@react-aria/overlays";
|
|
||||||
import { History } from "history";
|
import { History } from "history";
|
||||||
|
import { TooltipProvider } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { HomePage } from "./home/HomePage";
|
import { HomePage } from "./home/HomePage";
|
||||||
import { LoginPage } from "./auth/LoginPage";
|
import { LoginPage } from "./auth/LoginPage";
|
||||||
@@ -34,19 +34,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)";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +58,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;
|
||||||
@@ -63,10 +69,11 @@ 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(() => {
|
||||||
|
if (loaded) return;
|
||||||
setLoaded(true);
|
setLoaded(true);
|
||||||
|
widget?.api.sendContentLoaded();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,35 +84,37 @@ export const App: FC<AppProps> = ({ history }) => {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Router history={history}>
|
<Router history={history}>
|
||||||
<BackgroundProvider>
|
<BackgroundProvider>
|
||||||
{loaded ? (
|
<ThemeProvider>
|
||||||
<Suspense fallback={null}>
|
<TooltipProvider>
|
||||||
<ClientProvider>
|
{loaded ? (
|
||||||
<MediaDevicesProvider>
|
<Suspense fallback={null}>
|
||||||
<Sentry.ErrorBoundary fallback={errorPage}>
|
<ClientProvider>
|
||||||
<OverlayProvider>
|
<MediaDevicesProvider>
|
||||||
<DisconnectedBanner />
|
<Sentry.ErrorBoundary fallback={errorPage}>
|
||||||
<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>
|
</Sentry.ErrorBoundary>
|
||||||
</MediaDevicesProvider>
|
</MediaDevicesProvider>
|
||||||
</ClientProvider>
|
</ClientProvider>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
) : (
|
) : (
|
||||||
<LoadingView />
|
<LoadingView />
|
||||||
)}
|
)}
|
||||||
|
</TooltipProvider>
|
||||||
|
</ThemeProvider>
|
||||||
</BackgroundProvider>
|
</BackgroundProvider>
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
import { useMemo, FC } from "react";
|
import { useMemo, FC } from "react";
|
||||||
import { Avatar as CompoundAvatar } from "@vector-im/compound-web";
|
import { Avatar as CompoundAvatar } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { getAvatarUrl } from "./matrix-utils";
|
import { getAvatarUrl } from "./utils/matrix";
|
||||||
import { useClient } from "./ClientContext";
|
import { useClient } from "./ClientContext";
|
||||||
|
|
||||||
export enum Size {
|
export enum Size {
|
||||||
|
|||||||
@@ -25,17 +25,18 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
|
import {
|
||||||
|
ClientEvent,
|
||||||
|
ICreateClientOpts,
|
||||||
|
MatrixClient,
|
||||||
|
} from "matrix-js-sdk/src/client";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
||||||
|
import { MatrixError } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { ErrorView } from "./FullScreenView";
|
import { ErrorView } from "./FullScreenView";
|
||||||
import {
|
import { fallbackICEServerAllowed, initClient } from "./utils/matrix";
|
||||||
CryptoStoreIntegrityError,
|
|
||||||
fallbackICEServerAllowed,
|
|
||||||
initClient,
|
|
||||||
} from "./matrix-utils";
|
|
||||||
import { widget } from "./widget";
|
import { widget } from "./widget";
|
||||||
import {
|
import {
|
||||||
PosthogAnalytics,
|
PosthogAnalytics,
|
||||||
@@ -317,7 +318,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
initClientState.client.on(ClientEvent.Sync, onSync);
|
initClientState.client.on(ClientEvent.Sync, onSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return (): void => {
|
||||||
if (initClientState.client) {
|
if (initClientState.client) {
|
||||||
initClientState.client.removeListener(ClientEvent.Sync, onSync);
|
initClientState.client.removeListener(ClientEvent.Sync, onSync);
|
||||||
}
|
}
|
||||||
@@ -360,13 +361,13 @@ async function loadClient(): Promise<InitResult | null> {
|
|||||||
|
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
const { user_id, device_id, access_token, passwordlessUser } = session;
|
const { user_id, device_id, access_token, passwordlessUser } = session;
|
||||||
const initClientParams = {
|
const initClientParams: ICreateClientOpts = {
|
||||||
baseUrl: Config.defaultHomeserverUrl()!,
|
baseUrl: Config.defaultHomeserverUrl()!,
|
||||||
accessToken: access_token,
|
accessToken: access_token,
|
||||||
userId: user_id,
|
userId: user_id,
|
||||||
deviceId: device_id,
|
deviceId: device_id,
|
||||||
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
livekitServiceURL: Config.get().livekit!.livekit_service_url,
|
livekitServiceURL: Config.get().livekit?.livekit_service_url,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -376,22 +377,17 @@ async function loadClient(): Promise<InitResult | null> {
|
|||||||
passwordlessUser,
|
passwordlessUser,
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof CryptoStoreIntegrityError) {
|
if (err instanceof MatrixError && err.errcode === "M_UNKNOWN_TOKEN") {
|
||||||
// We can't use this session anymore, so let's log it out
|
// We can't use this session anymore, so let's log it out
|
||||||
try {
|
logger.log(
|
||||||
const client = await initClient(initClientParams, false); // Don't need the crypto store just to log out)
|
"The session from local store is invalid; continuing without a client",
|
||||||
await client.logout(true);
|
);
|
||||||
} catch (err) {
|
clearSession();
|
||||||
logger.warn(
|
// returning null = "no client` pls register" (undefined = "loading" which is the current value when reaching this line)
|
||||||
"The previous session was lost, and we couldn't log it out, " +
|
return null;
|
||||||
err +
|
|
||||||
"either",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
/* eslint-enable camelcase */
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
clearSession();
|
clearSession();
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
@@ -20,13 +20,15 @@ import classNames from "classnames";
|
|||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
import { Button } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
|
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
|
||||||
import { LinkButton, Button } from "./button";
|
import { LinkButton } from "./button";
|
||||||
import styles from "./FullScreenView.module.css";
|
import styles from "./FullScreenView.module.css";
|
||||||
import { TranslatedError } from "./TranslatedError";
|
import { TranslatedError } from "./TranslatedError";
|
||||||
import { Config } from "./config/Config";
|
import { Config } from "./config/Config";
|
||||||
import { RageshakeButton } from "./settings/RageshakeButton";
|
import { RageshakeButton } from "./settings/RageshakeButton";
|
||||||
|
import { useUrlParams } from "./UrlParams";
|
||||||
|
|
||||||
interface FullScreenViewProps {
|
interface FullScreenViewProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
@@ -37,12 +39,11 @@ export const FullScreenView: FC<FullScreenViewProps> = ({
|
|||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
|
const { hideHeader } = useUrlParams();
|
||||||
return (
|
return (
|
||||||
<div className={classNames(styles.page, className)}>
|
<div className={classNames(styles.page, className)}>
|
||||||
<Header>
|
<Header>
|
||||||
<LeftNav>
|
<LeftNav>{!hideHeader && <HeaderLogo />}</LeftNav>
|
||||||
<HeaderLogo />
|
|
||||||
</LeftNav>
|
|
||||||
<RightNav />
|
<RightNav />
|
||||||
</Header>
|
</Header>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@@ -58,6 +59,7 @@ interface ErrorViewProps {
|
|||||||
|
|
||||||
export const ErrorView: FC<ErrorViewProps> = ({ error }) => {
|
export const ErrorView: FC<ErrorViewProps> = ({ error }) => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
const { confineToRoom } = useUrlParams();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -78,25 +80,16 @@ export const ErrorView: FC<ErrorViewProps> = ({ error }) => {
|
|||||||
: error.message}
|
: error.message}
|
||||||
</p>
|
</p>
|
||||||
<RageshakeButton description={`***Error View***: ${error.message}`} />
|
<RageshakeButton description={`***Error View***: ${error.message}`} />
|
||||||
{location.pathname === "/" ? (
|
{!confineToRoom &&
|
||||||
<Button
|
(location.pathname === "/" ? (
|
||||||
size="lg"
|
<Button className={styles.homeLink} onClick={onReload}>
|
||||||
variant="default"
|
{t("return_home_button")}
|
||||||
className={styles.homeLink}
|
</Button>
|
||||||
onPress={onReload}
|
) : (
|
||||||
>
|
<LinkButton className={styles.homeLink} to="/">
|
||||||
{t("return_home_button")}
|
{t("return_home_button")}
|
||||||
</Button>
|
</LinkButton>
|
||||||
) : (
|
))}
|
||||||
<LinkButton
|
|
||||||
size="lg"
|
|
||||||
variant="default"
|
|
||||||
className={styles.homeLink}
|
|
||||||
to="/"
|
|
||||||
>
|
|
||||||
{t("return_home_button")}
|
|
||||||
</LinkButton>
|
|
||||||
)}
|
|
||||||
</FullScreenView>
|
</FullScreenView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -120,12 +113,7 @@ export const CrashView: FC = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<RageshakeButton description="***Soft Crash***" />
|
<RageshakeButton description="***Soft Crash***" />
|
||||||
<Button
|
<Button className={styles.wideButton} onClick={onReload}>
|
||||||
size="lg"
|
|
||||||
variant="default"
|
|
||||||
className={styles.wideButton}
|
|
||||||
onPress={onReload}
|
|
||||||
>
|
|
||||||
{t("return_home_button")}
|
{t("return_home_button")}
|
||||||
</Button>
|
</Button>
|
||||||
</FullScreenView>
|
</FullScreenView>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022 New Vector Ltd
|
Copyright 2022-2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -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;
|
||||||
@@ -89,6 +90,7 @@ limitations under the License.
|
|||||||
.nameLine {
|
.nameLine {
|
||||||
grid-area: name;
|
grid-area: name;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
min-width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--cpd-space-1x);
|
gap: var(--cpd-space-1x);
|
||||||
@@ -96,8 +98,6 @@ limitations under the License.
|
|||||||
|
|
||||||
.nameLine > h1 {
|
.nameLine > h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
/* XXX I can't actually get this ellipsis overflow to trigger, because
|
|
||||||
constraint propagation in a nested flexbox layout is a massive pain */
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
@@ -108,6 +108,7 @@ limitations under the License.
|
|||||||
|
|
||||||
.participantsLine {
|
.participantsLine {
|
||||||
grid-area: participants;
|
grid-area: participants;
|
||||||
|
color: var(--cpd-color-text-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--cpd-space-1-5x);
|
gap: var(--cpd-space-1-5x);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022 New Vector Ltd
|
Copyright 2022-2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -15,11 +15,11 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { FC, HTMLAttributes, ReactNode } from "react";
|
import { FC, HTMLAttributes, ReactNode, forwardRef } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Heading, Text } from "@vector-im/compound-web";
|
import { Heading, Text } from "@vector-im/compound-web";
|
||||||
import UserProfileIcon from "@vector-im/compound-design-tokens/icons/user-profile.svg?react";
|
import { UserProfileIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||||
|
|
||||||
import styles from "./Header.module.css";
|
import styles from "./Header.module.css";
|
||||||
import Logo from "./icons/Logo.svg?react";
|
import Logo from "./icons/Logo.svg?react";
|
||||||
@@ -32,13 +32,21 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Header: FC<HeaderProps> = ({ children, className, ...rest }) => {
|
export const Header = forwardRef<HTMLElement, HeaderProps>(
|
||||||
return (
|
({ children, className, ...rest }, ref) => {
|
||||||
<header className={classNames(styles.header, className)} {...rest}>
|
return (
|
||||||
{children}
|
<header
|
||||||
</header>
|
ref={ref}
|
||||||
);
|
className={classNames(styles.header, className)}
|
||||||
};
|
{...rest}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</header>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
Header.displayName = "Header";
|
||||||
|
|
||||||
interface LeftNavProps extends HTMLAttributes<HTMLElement> {
|
interface LeftNavProps extends HTMLAttributes<HTMLElement> {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
@@ -117,7 +125,7 @@ interface RoomHeaderInfoProps {
|
|||||||
name: string;
|
name: string;
|
||||||
avatarUrl: string | null;
|
avatarUrl: string | null;
|
||||||
encrypted: boolean;
|
encrypted: boolean;
|
||||||
participantCount: number;
|
participantCount: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
||||||
@@ -150,7 +158,7 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
|||||||
</Heading>
|
</Heading>
|
||||||
<EncryptionLock encrypted={encrypted} />
|
<EncryptionLock encrypted={encrypted} />
|
||||||
</div>
|
</div>
|
||||||
{participantCount > 0 && (
|
{(participantCount ?? 0) > 0 && (
|
||||||
<div className={styles.participantsLine}>
|
<div className={styles.participantsLine}>
|
||||||
<UserProfileIcon
|
<UserProfileIcon
|
||||||
width={20}
|
width={20}
|
||||||
@@ -158,7 +166,7 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
|||||||
aria-label={t("header_participants_label")}
|
aria-label={t("header_participants_label")}
|
||||||
/>
|
/>
|
||||||
<Text as="span" size="sm" weight="medium">
|
<Text as="span" size="sm" weight="medium">
|
||||||
{t("participant_count", { count: participantCount })}
|
{t("participant_count", { count: participantCount ?? 0 })}
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.listBox {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
max-height: 150px;
|
|
||||||
overflow-y: auto;
|
|
||||||
list-style: none;
|
|
||||||
background-color: transparent;
|
|
||||||
border: 1px solid var(--cpd-color-border-interactive-secondary);
|
|
||||||
background-color: var(--cpd-color-bg-canvas-default);
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.option {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
background-color: transparent;
|
|
||||||
color: var(--cpd-color-text-primary);
|
|
||||||
padding: 8px 16px;
|
|
||||||
outline: none;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: var(--font-size-body);
|
|
||||||
min-height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.option.focused {
|
|
||||||
background-color: rgba(111, 120, 130, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.option.disabled {
|
|
||||||
color: var(--cpd-color-text-disabled);
|
|
||||||
background-color: var(--stopgap-bgColor3);
|
|
||||||
}
|
|
||||||
116
src/ListBox.tsx
116
src/ListBox.tsx
@@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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 {
|
|
||||||
MutableRefObject,
|
|
||||||
PointerEvent,
|
|
||||||
ReactNode,
|
|
||||||
useCallback,
|
|
||||||
useRef,
|
|
||||||
} from "react";
|
|
||||||
import { useListBox, useOption, AriaListBoxOptions } from "@react-aria/listbox";
|
|
||||||
import { ListState } from "@react-stately/list";
|
|
||||||
import { Node } from "@react-types/shared";
|
|
||||||
import classNames from "classnames";
|
|
||||||
|
|
||||||
import styles from "./ListBox.module.css";
|
|
||||||
|
|
||||||
interface ListBoxProps<T> extends AriaListBoxOptions<T> {
|
|
||||||
optionClassName: string;
|
|
||||||
state: ListState<T>;
|
|
||||||
className?: string;
|
|
||||||
listBoxRef?: MutableRefObject<HTMLUListElement>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ListBox<T>({
|
|
||||||
state,
|
|
||||||
optionClassName,
|
|
||||||
className,
|
|
||||||
listBoxRef,
|
|
||||||
...rest
|
|
||||||
}: ListBoxProps<T>): ReactNode {
|
|
||||||
const ref = useRef<HTMLUListElement>(null);
|
|
||||||
|
|
||||||
const listRef = listBoxRef ?? ref;
|
|
||||||
|
|
||||||
const { listBoxProps } = useListBox(rest, state, listRef);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ul
|
|
||||||
{...listBoxProps}
|
|
||||||
ref={listRef}
|
|
||||||
className={classNames(styles.listBox, className)}
|
|
||||||
>
|
|
||||||
{[...state.collection].map((item) => (
|
|
||||||
<Option
|
|
||||||
key={item.key}
|
|
||||||
item={item}
|
|
||||||
state={state}
|
|
||||||
className={optionClassName}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface OptionProps<T> {
|
|
||||||
className: string;
|
|
||||||
state: ListState<T>;
|
|
||||||
item: Node<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Option<T>({ item, state, className }: OptionProps<T>): ReactNode {
|
|
||||||
const ref = useRef(null);
|
|
||||||
const { optionProps, isSelected, isFocused, isDisabled } = useOption(
|
|
||||||
{ key: item.key },
|
|
||||||
state,
|
|
||||||
ref,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Hack: remove the onPointerUp event handler and re-wire it to
|
|
||||||
// onClick. Chrome Android triggers a click event after the onpointerup
|
|
||||||
// event which leaks through to elements underneath the z-indexed select
|
|
||||||
// popover. preventDefault / stopPropagation don't have any effect, even
|
|
||||||
// adding just a dummy onClick handler still doesn't work, but it's fine
|
|
||||||
// if we handle just onClick.
|
|
||||||
// https://github.com/vector-im/element-call/issues/762
|
|
||||||
const origPointerUp = optionProps.onPointerUp;
|
|
||||||
delete optionProps.onPointerUp;
|
|
||||||
optionProps.onClick = useCallback(
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
(e) => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
origPointerUp(e as unknown as PointerEvent<HTMLElement>);
|
|
||||||
},
|
|
||||||
[origPointerUp],
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
{...optionProps}
|
|
||||||
ref={ref}
|
|
||||||
className={classNames(styles.option, className, {
|
|
||||||
[styles.selected]: isSelected,
|
|
||||||
[styles.focused]: isFocused,
|
|
||||||
[styles.disables]: isDisabled,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{item.rendered}
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem {
|
|
||||||
cursor: pointer;
|
|
||||||
height: 48px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 12px;
|
|
||||||
color: var(--cpd-color-text-primary);
|
|
||||||
font-size: var(--font-size-body);
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem > * {
|
|
||||||
margin: 0 10px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem > :last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem.focused,
|
|
||||||
.menuItem:hover {
|
|
||||||
background-color: var(--cpd-color-bg-action-secondary-hovered);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem:active {
|
|
||||||
background-color: var(--cpd-color-bg-action-secondary-pressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem.focused:first-child,
|
|
||||||
.menuItem:hover:first-child {
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-top-right-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuItem.focused:last-child,
|
|
||||||
.menuItem:hover:last-child {
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
border-bottom-right-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkIcon {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkIcon * {
|
|
||||||
stroke: var(--cpd-color-text-primary);
|
|
||||||
}
|
|
||||||
102
src/Menu.tsx
102
src/Menu.tsx
@@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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 { Key, ReactNode, useRef, useState } from "react";
|
|
||||||
import { AriaMenuOptions, useMenu, useMenuItem } from "@react-aria/menu";
|
|
||||||
import { TreeState, useTreeState } from "@react-stately/tree";
|
|
||||||
import { mergeProps } from "@react-aria/utils";
|
|
||||||
import { useFocus } from "@react-aria/interactions";
|
|
||||||
import classNames from "classnames";
|
|
||||||
import { Node } from "@react-types/shared";
|
|
||||||
|
|
||||||
import styles from "./Menu.module.css";
|
|
||||||
|
|
||||||
interface MenuProps<T> extends AriaMenuOptions<T> {
|
|
||||||
className?: string;
|
|
||||||
onClose: () => void;
|
|
||||||
onAction: (value: Key) => void;
|
|
||||||
label?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Menu<T extends object>({
|
|
||||||
className,
|
|
||||||
onAction,
|
|
||||||
onClose,
|
|
||||||
label,
|
|
||||||
...rest
|
|
||||||
}: MenuProps<T>): ReactNode {
|
|
||||||
const state = useTreeState<T>({ ...rest, selectionMode: "none" });
|
|
||||||
const menuRef = useRef(null);
|
|
||||||
const { menuProps } = useMenu<T>(rest, state, menuRef);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ul
|
|
||||||
{...mergeProps(menuProps, rest)}
|
|
||||||
ref={menuRef}
|
|
||||||
className={classNames(styles.menu, className)}
|
|
||||||
>
|
|
||||||
{[...state.collection].map((item) => (
|
|
||||||
<MenuItem
|
|
||||||
key={item.key}
|
|
||||||
item={item}
|
|
||||||
state={state}
|
|
||||||
onAction={onAction}
|
|
||||||
onClose={onClose}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MenuItemProps<T> {
|
|
||||||
item: Node<T>;
|
|
||||||
state: TreeState<T>;
|
|
||||||
onAction: (value: Key) => void;
|
|
||||||
onClose: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
function MenuItem<T>({
|
|
||||||
item,
|
|
||||||
state,
|
|
||||||
onAction,
|
|
||||||
onClose,
|
|
||||||
}: MenuItemProps<T>): ReactNode {
|
|
||||||
const ref = useRef(null);
|
|
||||||
const { menuItemProps } = useMenuItem(
|
|
||||||
{
|
|
||||||
key: item.key,
|
|
||||||
onAction,
|
|
||||||
onClose,
|
|
||||||
},
|
|
||||||
state,
|
|
||||||
ref,
|
|
||||||
);
|
|
||||||
|
|
||||||
const [isFocused, setFocused] = useState(false);
|
|
||||||
const { focusProps } = useFocus({ onFocusChange: setFocused });
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
{...mergeProps(menuItemProps, focusProps)}
|
|
||||||
ref={ref}
|
|
||||||
className={classNames(styles.menuItem, {
|
|
||||||
[styles.focused]: isFocused,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{item.rendered}
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -134,6 +134,10 @@ body[data-platform="ios"] .drawer {
|
|||||||
padding-block: var(--cpd-space-9x) var(--cpd-space-10x);
|
padding-block: var(--cpd-space-9x) var(--cpd-space-10x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal.tabbed .body {
|
||||||
|
padding-block-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.handle {
|
.handle {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FC, ReactNode, useCallback } from "react";
|
import { FC, ReactNode, useCallback } from "react";
|
||||||
import { AriaDialogProps } from "@react-types/dialog";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
Root as DialogRoot,
|
Root as DialogRoot,
|
||||||
@@ -27,7 +26,7 @@ import {
|
|||||||
} from "@radix-ui/react-dialog";
|
} from "@radix-ui/react-dialog";
|
||||||
import { Drawer } from "vaul";
|
import { Drawer } from "vaul";
|
||||||
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
||||||
import CloseIcon from "@vector-im/compound-design-tokens/icons/close.svg?react";
|
import { CloseIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { Heading, Glass } from "@vector-im/compound-web";
|
import { Heading, Glass } from "@vector-im/compound-web";
|
||||||
|
|
||||||
@@ -35,8 +34,7 @@ import styles from "./Modal.module.css";
|
|||||||
import overlayStyles from "./Overlay.module.css";
|
import overlayStyles from "./Overlay.module.css";
|
||||||
import { useMediaQuery } from "./useMediaQuery";
|
import { useMediaQuery } from "./useMediaQuery";
|
||||||
|
|
||||||
// TODO: Support tabs
|
export interface Props {
|
||||||
export interface Props extends AriaDialogProps {
|
|
||||||
title: string;
|
title: string;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
@@ -52,6 +50,11 @@ export interface Props extends AriaDialogProps {
|
|||||||
* will be non-dismissable.
|
* will be non-dismissable.
|
||||||
*/
|
*/
|
||||||
onDismiss?: () => void;
|
onDismiss?: () => void;
|
||||||
|
/**
|
||||||
|
* Whether the modal content has tabs.
|
||||||
|
*/
|
||||||
|
// TODO: Better tabs support
|
||||||
|
tabbed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,6 +67,7 @@ export const Modal: FC<Props> = ({
|
|||||||
className,
|
className,
|
||||||
open,
|
open,
|
||||||
onDismiss,
|
onDismiss,
|
||||||
|
tabbed,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -92,6 +96,7 @@ export const Modal: FC<Props> = ({
|
|||||||
overlayStyles.overlay,
|
overlayStyles.overlay,
|
||||||
styles.modal,
|
styles.modal,
|
||||||
styles.drawer,
|
styles.drawer,
|
||||||
|
{ [styles.tabbed]: tabbed },
|
||||||
)}
|
)}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
@@ -123,6 +128,7 @@ export const Modal: FC<Props> = ({
|
|||||||
overlayStyles.animate,
|
overlayStyles.animate,
|
||||||
styles.modal,
|
styles.modal,
|
||||||
styles.dialog,
|
styles.dialog,
|
||||||
|
{ [styles.tabbed]: tabbed },
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
.bg {
|
.bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 100;
|
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: rgba(3, 12, 27, 0.528);
|
background: rgba(3, 12, 27, 0.528);
|
||||||
}
|
}
|
||||||
@@ -49,7 +48,6 @@ limitations under the License.
|
|||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 101;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay.animate {
|
.overlay.animate {
|
||||||
|
|||||||
@@ -36,3 +36,8 @@ if (/android/i.test(navigator.userAgent)) {
|
|||||||
} else {
|
} else {
|
||||||
platform = "desktop";
|
platform = "desktop";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const isFirefox = (): boolean => {
|
||||||
|
const { userAgent } = navigator;
|
||||||
|
return userAgent.includes("Firefox");
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2023 New Vector Ltd
|
Copyright 2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.banner {
|
.qrCode img {
|
||||||
flex: 1;
|
max-width: 100%;
|
||||||
border-radius: 8px;
|
image-rendering: pixelated;
|
||||||
padding: 16px;
|
border-radius: var(--cpd-space-4x);
|
||||||
background-color: var(--cpd-color-bg-subtle-primary);
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022 New Vector Ltd
|
Copyright 2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -14,16 +14,21 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Olm from "@matrix-org/olm";
|
import { describe, expect, test } from "vitest";
|
||||||
import olmWasmPath from "@matrix-org/olm/olm.wasm?url";
|
import { render, configure } from "@testing-library/react";
|
||||||
|
|
||||||
// https://gitlab.matrix.org/matrix-org/olm/-/issues/10
|
import { QrCode } from "./QrCode";
|
||||||
window.OLM_OPTIONS = {};
|
|
||||||
|
|
||||||
let olmLoaded: Promise<void> | null = null;
|
configure({
|
||||||
|
defaultHidden: true,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
describe("QrCode", () => {
|
||||||
* Loads Olm, if not already loaded.
|
test("renders", async () => {
|
||||||
*/
|
const { container, findByRole } = render(
|
||||||
export const loadOlm = (): Promise<void> =>
|
<QrCode data="foo" className="bar" />,
|
||||||
(olmLoaded ??= Olm.init({ locateFile: () => olmWasmPath }));
|
);
|
||||||
|
(await findByRole("img")) as HTMLImageElement;
|
||||||
|
expect(container.firstChild).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
});
|
||||||
57
src/QrCode.tsx
Normal file
57
src/QrCode.tsx
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
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 { FC, useEffect, useState } from "react";
|
||||||
|
import { toDataURL } from "qrcode";
|
||||||
|
import classNames from "classnames";
|
||||||
|
import { t } from "i18next";
|
||||||
|
|
||||||
|
import styles from "./QrCode.module.css";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: string;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const QrCode: FC<Props> = ({ data, className }) => {
|
||||||
|
const [url, setUrl] = useState<string | null>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let isCancelled = false;
|
||||||
|
|
||||||
|
toDataURL(data, { errorCorrectionLevel: "L" })
|
||||||
|
.then((url) => {
|
||||||
|
if (!isCancelled) {
|
||||||
|
setUrl(url);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((reason) => {
|
||||||
|
if (!isCancelled) {
|
||||||
|
setUrl(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return (): void => {
|
||||||
|
isCancelled = true;
|
||||||
|
};
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={classNames(styles.qrCode, className)}>
|
||||||
|
{url && <img src={url} alt={t("qr_code")} />}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
66
src/Slider.module.css
Normal file
66
src/Slider.module.css
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2023 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.track {
|
||||||
|
flex-grow: 1;
|
||||||
|
border-radius: var(--cpd-radius-pill-effect);
|
||||||
|
background: var(--cpd-color-bg-subtle-primary);
|
||||||
|
height: var(--cpd-space-2x);
|
||||||
|
outline: var(--cpd-border-width-1) solid
|
||||||
|
var(--cpd-color-border-interactive-primary);
|
||||||
|
outline-offset: calc(-1 * var(--cpd-border-width-1));
|
||||||
|
cursor: pointer;
|
||||||
|
transition: outline-color ease 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.track[data-disabled] {
|
||||||
|
cursor: initial;
|
||||||
|
outline-color: var(--cpd-color-border-disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
background: var(--cpd-color-bg-action-primary-rest);
|
||||||
|
position: absolute;
|
||||||
|
block-size: 100%;
|
||||||
|
border-radius: var(--cpd-radius-pill-effect);
|
||||||
|
transition: background-color ease 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight[data-disabled] {
|
||||||
|
background: var(--cpd-color-bg-action-primary-disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
.handle {
|
||||||
|
display: block;
|
||||||
|
block-size: var(--cpd-space-4x);
|
||||||
|
inline-size: var(--cpd-space-4x);
|
||||||
|
border-radius: var(--cpd-radius-pill-effect);
|
||||||
|
background: var(--cpd-color-bg-action-primary-rest);
|
||||||
|
box-shadow: 0 0 0 2px var(--cpd-color-bg-canvas-default);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color ease 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.handle[data-disabled] {
|
||||||
|
cursor: initial;
|
||||||
|
background: var(--cpd-color-bg-action-primary-disabled);
|
||||||
|
}
|
||||||
68
src/Slider.tsx
Normal file
68
src/Slider.tsx
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2023 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 { FC, useCallback } from "react";
|
||||||
|
import { Root, Track, Range, Thumb } from "@radix-ui/react-slider";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
import styles from "./Slider.module.css";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
className?: string;
|
||||||
|
label: string;
|
||||||
|
value: number;
|
||||||
|
onValueChange: (value: number) => void;
|
||||||
|
min: number;
|
||||||
|
max: number;
|
||||||
|
step: number;
|
||||||
|
disabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A slider control allowing a value to be selected from a range.
|
||||||
|
*/
|
||||||
|
export const Slider: FC<Props> = ({
|
||||||
|
className,
|
||||||
|
label,
|
||||||
|
value,
|
||||||
|
onValueChange: onValueChangeProp,
|
||||||
|
min,
|
||||||
|
max,
|
||||||
|
step,
|
||||||
|
disabled,
|
||||||
|
}) => {
|
||||||
|
const onValueChange = useCallback(
|
||||||
|
([v]: number[]) => onValueChangeProp(v),
|
||||||
|
[onValueChangeProp],
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Root
|
||||||
|
className={classNames(className, styles.slider)}
|
||||||
|
value={[value]}
|
||||||
|
onValueChange={onValueChange}
|
||||||
|
min={min}
|
||||||
|
max={max}
|
||||||
|
step={step}
|
||||||
|
disabled={disabled}
|
||||||
|
>
|
||||||
|
<Track className={styles.track}>
|
||||||
|
<Range className={styles.highlight} />
|
||||||
|
</Track>
|
||||||
|
<Thumb className={styles.handle} aria-label={label} />
|
||||||
|
</Root>
|
||||||
|
);
|
||||||
|
};
|
||||||
86
src/Toast.test.tsx
Normal file
86
src/Toast.test.tsx
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2023 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 { describe, expect, test, vi } from "vitest";
|
||||||
|
import { render, configure } from "@testing-library/react";
|
||||||
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
||||||
|
import { Toast } from "../src/Toast";
|
||||||
|
import { withFakeTimers } from "./utils/test";
|
||||||
|
|
||||||
|
configure({
|
||||||
|
defaultHidden: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Test Explanation:
|
||||||
|
// This test the toast. We need to use { document: window.document } because the toast listens
|
||||||
|
// for user input on `window`.
|
||||||
|
describe("Toast", () => {
|
||||||
|
test("renders", () => {
|
||||||
|
const { queryByRole } = render(
|
||||||
|
<Toast open={false} onDismiss={() => {}}>
|
||||||
|
Hello world!
|
||||||
|
</Toast>,
|
||||||
|
);
|
||||||
|
expect(queryByRole("dialog")).toBe(null);
|
||||||
|
const { getByRole } = render(
|
||||||
|
<Toast open={true} onDismiss={() => {}}>
|
||||||
|
Hello world!
|
||||||
|
</Toast>,
|
||||||
|
);
|
||||||
|
expect(getByRole("dialog")).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("dismisses when Esc is pressed", async () => {
|
||||||
|
const user = userEvent.setup({ document: window.document });
|
||||||
|
const onDismiss = vi.fn();
|
||||||
|
const { debug } = render(
|
||||||
|
<Toast open={true} onDismiss={onDismiss}>
|
||||||
|
Hello world!
|
||||||
|
</Toast>,
|
||||||
|
);
|
||||||
|
debug();
|
||||||
|
await user.keyboard("[Escape]");
|
||||||
|
expect(onDismiss).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("dismisses when background is clicked", async () => {
|
||||||
|
const user = userEvent.setup();
|
||||||
|
const onDismiss = vi.fn();
|
||||||
|
const { getByRole, unmount } = render(
|
||||||
|
<Toast open={true} onDismiss={onDismiss}>
|
||||||
|
Hello world!
|
||||||
|
</Toast>,
|
||||||
|
);
|
||||||
|
const background = getByRole("dialog").previousSibling! as Element;
|
||||||
|
await user.click(background);
|
||||||
|
expect(onDismiss).toHaveBeenCalled();
|
||||||
|
unmount();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("dismisses itself after the specified timeout", () => {
|
||||||
|
withFakeTimers(() => {
|
||||||
|
const onDismiss = vi.fn();
|
||||||
|
render(
|
||||||
|
<Toast open={true} onDismiss={onDismiss} autoDismiss={2000}>
|
||||||
|
Hello world!
|
||||||
|
</Toast>,
|
||||||
|
);
|
||||||
|
vi.advanceTimersByTime(2000);
|
||||||
|
expect(onDismiss).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -76,7 +76,7 @@ export const Toast: FC<Props> = ({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open && autoDismiss !== undefined) {
|
if (open && autoDismiss !== undefined) {
|
||||||
const timeout = setTimeout(onDismiss, autoDismiss);
|
const timeout = setTimeout(onDismiss, autoDismiss);
|
||||||
return () => clearTimeout(timeout);
|
return (): void => clearTimeout(timeout);
|
||||||
}
|
}
|
||||||
}, [open, autoDismiss, onDismiss]);
|
}, [open, autoDismiss, onDismiss]);
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export const Toast: FC<Props> = ({
|
|||||||
<DialogOverlay
|
<DialogOverlay
|
||||||
className={classNames(overlayStyles.bg, overlayStyles.animate)}
|
className={classNames(overlayStyles.bg, overlayStyles.animate)}
|
||||||
/>
|
/>
|
||||||
<DialogContent asChild>
|
<DialogContent aria-describedby={undefined} asChild>
|
||||||
<DialogClose
|
<DialogClose
|
||||||
className={classNames(
|
className={classNames(
|
||||||
overlayStyles.overlay,
|
overlayStyles.overlay,
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.tooltip {
|
|
||||||
background-color: var(--cpd-color-bg-subtle-secondary);
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px;
|
|
||||||
color: var(--cpd-color-text-primary);
|
|
||||||
border-radius: 8px;
|
|
||||||
max-width: 135px;
|
|
||||||
width: max-content;
|
|
||||||
font-size: var(--font-size-caption);
|
|
||||||
font-weight: 500;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
114
src/Tooltip.tsx
114
src/Tooltip.tsx
@@ -1,114 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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 {
|
|
||||||
ForwardedRef,
|
|
||||||
forwardRef,
|
|
||||||
ReactElement,
|
|
||||||
ReactNode,
|
|
||||||
useRef,
|
|
||||||
} from "react";
|
|
||||||
import {
|
|
||||||
TooltipTriggerState,
|
|
||||||
useTooltipTriggerState,
|
|
||||||
} from "@react-stately/tooltip";
|
|
||||||
import { FocusableProvider } from "@react-aria/focus";
|
|
||||||
import { useTooltipTrigger, useTooltip } from "@react-aria/tooltip";
|
|
||||||
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
||||||
import classNames from "classnames";
|
|
||||||
import { OverlayContainer, useOverlayPosition } from "@react-aria/overlays";
|
|
||||||
import { Placement } from "@react-types/overlays";
|
|
||||||
|
|
||||||
import styles from "./Tooltip.module.css";
|
|
||||||
|
|
||||||
interface TooltipProps {
|
|
||||||
className?: string;
|
|
||||||
state: TooltipTriggerState;
|
|
||||||
children: ReactNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
|
|
||||||
(
|
|
||||||
{ state, className, children, ...rest }: TooltipProps,
|
|
||||||
ref: ForwardedRef<HTMLDivElement>,
|
|
||||||
) => {
|
|
||||||
const { tooltipProps } = useTooltip(rest, state);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={classNames(styles.tooltip, className)}
|
|
||||||
{...mergeProps(rest, tooltipProps)}
|
|
||||||
ref={ref}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
interface TooltipTriggerProps {
|
|
||||||
children: ReactElement;
|
|
||||||
placement?: Placement;
|
|
||||||
delay?: number;
|
|
||||||
tooltip: () => string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const TooltipTrigger = forwardRef<HTMLElement, TooltipTriggerProps>(
|
|
||||||
(
|
|
||||||
{ children, placement, tooltip, ...rest }: TooltipTriggerProps,
|
|
||||||
ref: ForwardedRef<HTMLElement>,
|
|
||||||
) => {
|
|
||||||
const tooltipTriggerProps = { delay: 250, ...rest };
|
|
||||||
const tooltipState = useTooltipTriggerState(tooltipTriggerProps);
|
|
||||||
const triggerRef = useObjectRef<HTMLElement>(ref);
|
|
||||||
const overlayRef = useRef<HTMLDivElement>(null);
|
|
||||||
const { triggerProps, tooltipProps } = useTooltipTrigger(
|
|
||||||
tooltipTriggerProps,
|
|
||||||
tooltipState,
|
|
||||||
triggerRef,
|
|
||||||
);
|
|
||||||
|
|
||||||
const { overlayProps } = useOverlayPosition({
|
|
||||||
placement: placement || "top",
|
|
||||||
targetRef: triggerRef,
|
|
||||||
overlayRef,
|
|
||||||
isOpen: tooltipState.isOpen,
|
|
||||||
offset: 12,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<FocusableProvider ref={triggerRef} {...triggerProps}>
|
|
||||||
<children.type
|
|
||||||
{...mergeProps<typeof children.props | typeof rest>(
|
|
||||||
children.props,
|
|
||||||
rest,
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
{tooltipState.isOpen && (
|
|
||||||
<OverlayContainer>
|
|
||||||
<Tooltip
|
|
||||||
state={tooltipState}
|
|
||||||
ref={overlayRef}
|
|
||||||
{...mergeProps(tooltipProps, overlayProps)}
|
|
||||||
>
|
|
||||||
{tooltip()}
|
|
||||||
</Tooltip>
|
|
||||||
</OverlayContainer>
|
|
||||||
)}
|
|
||||||
</FocusableProvider>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
@@ -14,10 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import i18n from "i18next";
|
import type { DefaultNamespace, ParseKeys, TFunction, TOptions } from "i18next";
|
||||||
|
|
||||||
import type { ParseKeys, TFunction } from "i18next/typescript/t";
|
|
||||||
import type { DefaultNamespace, TOptions } from "i18next/typescript/options";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An error with messages in both English and the user's preferred language.
|
* An error with messages in both English and the user's preferred language.
|
||||||
@@ -45,5 +42,5 @@ class TranslatedErrorImpl extends TranslatedError {}
|
|||||||
// function instead
|
// function instead
|
||||||
export const translatedError = (
|
export const translatedError = (
|
||||||
messageKey: ParseKeys<DefaultNamespace, TOptions>,
|
messageKey: ParseKeys<DefaultNamespace, TOptions>,
|
||||||
t: typeof i18n.t,
|
t: TFunction<"app", undefined>,
|
||||||
): TranslatedError => new TranslatedErrorImpl(messageKey, t);
|
): TranslatedError => new TranslatedErrorImpl(messageKey, t);
|
||||||
|
|||||||
@@ -14,23 +14,16 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { mocked } from "jest-mock";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
import { getRoomIdentifierFromUrl } from "../src/UrlParams";
|
import { getRoomIdentifierFromUrl } from "../src/UrlParams";
|
||||||
import { Config } from "../src/config/Config";
|
|
||||||
|
|
||||||
const ROOM_NAME = "roomNameHere";
|
const ROOM_NAME = "roomNameHere";
|
||||||
const ROOM_ID = "!d45f138fsd";
|
const ROOM_ID = "!d45f138fsd";
|
||||||
const ORIGIN = "https://call.element.io";
|
const ORIGIN = "https://call.element.io";
|
||||||
const HOMESERVER = "call.ems.host";
|
const HOMESERVER = "localhost";
|
||||||
|
|
||||||
jest.mock("../src/config/Config");
|
|
||||||
|
|
||||||
describe("UrlParams", () => {
|
describe("UrlParams", () => {
|
||||||
beforeAll(() => {
|
|
||||||
mocked(Config.defaultServerName).mockReturnValue("call.ems.host");
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("handles URL with /room/", () => {
|
describe("handles URL with /room/", () => {
|
||||||
it("and nothing else", () => {
|
it("and nothing else", () => {
|
||||||
expect(
|
expect(
|
||||||
@@ -16,10 +16,11 @@ limitations under the License.
|
|||||||
|
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { Config } from "./config/Config";
|
import { Config } from "./config/Config";
|
||||||
|
import { EncryptionSystem } from "./e2ee/sharedKeyManagement";
|
||||||
export const PASSWORD_STRING = "password=";
|
import { E2eeType } from "./e2ee/e2eeType";
|
||||||
|
|
||||||
interface RoomIdentifier {
|
interface RoomIdentifier {
|
||||||
roomAlias: string | null;
|
roomAlias: string | null;
|
||||||
@@ -125,6 +126,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 +247,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"),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -301,3 +329,32 @@ export const useRoomIdentifier = (): RoomIdentifier => {
|
|||||||
[pathname, search, hash],
|
[pathname, search, hash],
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function generateUrlSearchParams(
|
||||||
|
roomId: string,
|
||||||
|
encryptionSystem: EncryptionSystem,
|
||||||
|
viaServers?: string[],
|
||||||
|
): URLSearchParams {
|
||||||
|
const params = new URLSearchParams();
|
||||||
|
// The password shouldn't need URL encoding here (we generate URL-safe ones) but encode
|
||||||
|
// it in case it came from another client that generated a non url-safe one
|
||||||
|
switch (encryptionSystem?.kind) {
|
||||||
|
case E2eeType.SHARED_KEY: {
|
||||||
|
const encodedPassword = encodeURIComponent(encryptionSystem.secret);
|
||||||
|
if (encodedPassword !== encryptionSystem.secret) {
|
||||||
|
logger.info(
|
||||||
|
"Encoded call password used non URL-safe chars: buggy client?",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
params.set("password", encodedPassword);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case E2eeType.PER_PARTICIPANT:
|
||||||
|
params.set("perParticipantE2EE", "true");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
params.set("roomId", roomId);
|
||||||
|
viaServers?.forEach((s) => params.set("viaServers", s));
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,6 +21,14 @@ limitations under the License.
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.userButton {
|
||||||
|
appearance: none;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.userButton svg * {
|
.userButton svg * {
|
||||||
fill: var(--cpd-color-icon-primary);
|
fill: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,21 +14,17 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FC, ReactNode, useCallback, useMemo } from "react";
|
import { FC, useMemo, useState } from "react";
|
||||||
import { Item } from "@react-stately/collections";
|
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Menu, MenuItem } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { Button, LinkButton } from "./button";
|
import { LinkButton } from "./button";
|
||||||
import { PopoverMenuTrigger } from "./popover/PopoverMenu";
|
|
||||||
import { Menu } from "./Menu";
|
|
||||||
import { TooltipTrigger } from "./Tooltip";
|
|
||||||
import { Avatar, Size } from "./Avatar";
|
import { Avatar, Size } from "./Avatar";
|
||||||
import UserIcon from "./icons/User.svg?react";
|
import UserIcon from "./icons/User.svg?react";
|
||||||
import SettingsIcon from "./icons/Settings.svg?react";
|
import SettingsIcon from "./icons/Settings.svg?react";
|
||||||
import LoginIcon from "./icons/Login.svg?react";
|
import LoginIcon from "./icons/Login.svg?react";
|
||||||
import LogoutIcon from "./icons/Logout.svg?react";
|
import LogoutIcon from "./icons/Logout.svg?react";
|
||||||
import { Body } from "./typography/Typography";
|
|
||||||
import styles from "./UserMenu.module.css";
|
import styles from "./UserMenu.module.css";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -66,7 +62,7 @@ export const UserMenu: FC<Props> = ({
|
|||||||
arr.push({
|
arr.push({
|
||||||
key: "settings",
|
key: "settings",
|
||||||
icon: SettingsIcon,
|
icon: SettingsIcon,
|
||||||
label: "common.settings",
|
label: t("common.settings"),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isPasswordlessUser && !preventNavigation) {
|
if (isPasswordlessUser && !preventNavigation) {
|
||||||
@@ -91,7 +87,7 @@ export const UserMenu: FC<Props> = ({
|
|||||||
return arr;
|
return arr;
|
||||||
}, [isAuthenticated, isPasswordlessUser, displayName, preventNavigation, t]);
|
}, [isAuthenticated, isPasswordlessUser, displayName, preventNavigation, t]);
|
||||||
|
|
||||||
const tooltip = useCallback(() => t("common.profile"), [t]);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
if (!isAuthenticated) {
|
if (!isAuthenticated) {
|
||||||
return (
|
return (
|
||||||
@@ -102,10 +98,15 @@ export const UserMenu: FC<Props> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PopoverMenuTrigger placement="bottom right">
|
<Menu
|
||||||
<TooltipTrigger tooltip={tooltip} placement="bottom left">
|
title={t("a11y.user_menu")}
|
||||||
<Button
|
showTitle={false}
|
||||||
variant="icon"
|
align="end"
|
||||||
|
open={open}
|
||||||
|
onOpenChange={setOpen}
|
||||||
|
trigger={
|
||||||
|
<button
|
||||||
|
aria-label={t("common.profile")}
|
||||||
className={styles.userButton}
|
className={styles.userButton}
|
||||||
data-testid="usermenu_open"
|
data-testid="usermenu_open"
|
||||||
>
|
>
|
||||||
@@ -119,26 +120,18 @@ export const UserMenu: FC<Props> = ({
|
|||||||
) : (
|
) : (
|
||||||
<UserIcon />
|
<UserIcon />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</button>
|
||||||
</TooltipTrigger>
|
|
||||||
{
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
(props: any): ReactNode => (
|
|
||||||
<Menu {...props} label={t("a11y.user_menu")} onAction={onAction}>
|
|
||||||
{items.map(({ key, icon: Icon, label, dataTestid }) => (
|
|
||||||
<Item key={key} textValue={label}>
|
|
||||||
<Icon
|
|
||||||
width={24}
|
|
||||||
height={24}
|
|
||||||
className={styles.menuIcon}
|
|
||||||
data-testid={dataTestid}
|
|
||||||
/>
|
|
||||||
<Body overflowEllipsis>{label}</Body>
|
|
||||||
</Item>
|
|
||||||
))}
|
|
||||||
</Menu>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
</PopoverMenuTrigger>
|
>
|
||||||
|
{items.map(({ key, icon: Icon, label, dataTestid }) => (
|
||||||
|
<MenuItem
|
||||||
|
key={key}
|
||||||
|
Icon={Icon}
|
||||||
|
label={label}
|
||||||
|
data-test-id={dataTestid}
|
||||||
|
onSelect={() => onAction(key)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Menu>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useHistory, useLocation } from "react-router-dom";
|
|||||||
|
|
||||||
import { useClientLegacy } from "./ClientContext";
|
import { useClientLegacy } from "./ClientContext";
|
||||||
import { useProfile } from "./profile/useProfile";
|
import { useProfile } from "./profile/useProfile";
|
||||||
import { SettingsModal } from "./settings/SettingsModal";
|
import { defaultSettingsTab, SettingsModal } from "./settings/SettingsModal";
|
||||||
import { UserMenu } from "./UserMenu";
|
import { UserMenu } from "./UserMenu";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -37,17 +37,17 @@ export const UserMenuContainer: FC<Props> = ({ preventNavigation = false }) => {
|
|||||||
[setSettingsModalOpen],
|
[setSettingsModalOpen],
|
||||||
);
|
);
|
||||||
|
|
||||||
const [defaultSettingsTab, setDefaultSettingsTab] = useState<string>();
|
const [settingsTab, setSettingsTab] = useState(defaultSettingsTab);
|
||||||
|
|
||||||
const onAction = useCallback(
|
const onAction = useCallback(
|
||||||
async (value: string) => {
|
async (value: string) => {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case "user":
|
case "user":
|
||||||
setDefaultSettingsTab("profile");
|
setSettingsTab("profile");
|
||||||
setSettingsModalOpen(true);
|
setSettingsModalOpen(true);
|
||||||
break;
|
break;
|
||||||
case "settings":
|
case "settings":
|
||||||
setDefaultSettingsTab("audio");
|
setSettingsTab("audio");
|
||||||
setSettingsModalOpen(true);
|
setSettingsModalOpen(true);
|
||||||
break;
|
break;
|
||||||
case "logout":
|
case "logout":
|
||||||
@@ -76,9 +76,10 @@ export const UserMenuContainer: FC<Props> = ({ preventNavigation = false }) => {
|
|||||||
{client && (
|
{client && (
|
||||||
<SettingsModal
|
<SettingsModal
|
||||||
client={client}
|
client={client}
|
||||||
defaultTab={defaultSettingsTab}
|
|
||||||
open={settingsModalOpen}
|
open={settingsModalOpen}
|
||||||
onDismiss={onDismissSettingsModal}
|
onDismiss={onDismissSettingsModal}
|
||||||
|
tab={settingsTab}
|
||||||
|
onTabChange={setSettingsTab}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
12
src/__snapshots__/QrCode.test.tsx.snap
Normal file
12
src/__snapshots__/QrCode.test.tsx.snap
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
|
exports[`QrCode > renders 1`] = `
|
||||||
|
<div
|
||||||
|
class="qrCode bar"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
alt="qr_code"
|
||||||
|
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAAB0CAYAAABUmhYnAAAAAklEQVR4AewaftIAAALBSURBVO3BQW7kQAwEwSxC//9yro88NSBI4/UQjIg/WGMUa5RijVKsUYo1SrFGKdYoxRqlWKMUa5RijVKsUYo1SrFGKdYoxRrl4qEk/CaVkyR0Kl0STlS6JPwmlSeKNUqxRinWKBcvU3lTEk6S8ITKHSpvSsKbijVKsUYp1igXH5aEO1Q+SaVLQqdyRxLuUPmkYo1SrFGKNcrFl1PpknCShE5lkmKNUqxRijXKxZdLQqdyotIloVP5ZsUapVijFGuUiw9T+UuS8CaVv6RYoxRrlGKNcvGyJPwlSehUuiTckYS/rFijFGuUYo0Sf/DFkvAmlW9WrFGKNUqxRrl4KAknKl0SOpWTJJyodEk4UbkjCXeodEk4UXlTsUYp1ijFGuXiIZUuCXck4USlS0KXhE7lk1TelIRO5YlijVKsUYo1ysXLVLok3KHSJaFT6ZLQJaFTOUnCicodSehUTpLwpmKNUqxRijXKxUNJ6FSeSEKn0iXhROUkCZ3Kb0pCp/KmYo1SrFGKNcrFh6mcJKFT6ZJwotIloVPpVLokdCpdEjqVLgmdyh1J6FSeKNYoxRqlWKPEH3yxJHQqJ0noVO5IwolKl4ROpUtCp/JEsUYp1ijFGuXioST8JpU7ktCpnCShUzlROVHpktCpvKlYoxRrlGKNcvEylTcl4USlS8JJEt6UhBOVTqVLQqfyRLFGKdYoxRrl4sOScIfKEyonSehUTpJwh0qXhN9UrFGKNUqxRrn4ckn4JJU7kvA/FWuUYo1SrFEuvpxKl4QTlS4JncodSehU7kjCm4o1SrFGKdYoFx+m8klJOFE5UemScKJyRxI6lU7lTcUapVijFGuUi5cl4X9SOUnCicoTSThJQqfypmKNUqxRijVK/MEao1ijFGuUYo1SrFGKNUqxRinWKMUapVijFGuUYo1SrFGKNUqxRinWKP8AKoQP/lIBoMIAAAAASUVORK5CYII="
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
// 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
|
||||||
aria-describedby="radix-:r5:"
|
|
||||||
aria-labelledby="radix-:r4:"
|
aria-labelledby="radix-:r4:"
|
||||||
class="overlay animate toast"
|
class="overlay animate toast"
|
||||||
data-state="open"
|
data-state="open"
|
||||||
@@ -13,7 +12,7 @@ exports[`Toast renders 1`] = `
|
|||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<h3
|
<h3
|
||||||
class="_font-body-sm-semibold_1jx6b_45"
|
class="_typography_yh5dq_162 _font-body-sm-semibold_yh5dq_45"
|
||||||
id="radix-:r4:"
|
id="radix-:r4:"
|
||||||
>
|
>
|
||||||
Hello world!
|
Hello world!
|
||||||
21
src/__snapshots__/Toast.test.tsx.snap
Normal file
21
src/__snapshots__/Toast.test.tsx.snap
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
|
exports[`Toast > renders 1`] = `
|
||||||
|
<button
|
||||||
|
aria-labelledby="radix-:r4:"
|
||||||
|
class="overlay animate toast"
|
||||||
|
data-state="open"
|
||||||
|
id="radix-:r3:"
|
||||||
|
role="dialog"
|
||||||
|
style="pointer-events: auto;"
|
||||||
|
tabindex="-1"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<h3
|
||||||
|
class="_typography_yh5dq_162 _font-body-sm-semibold_yh5dq_45"
|
||||||
|
id="radix-:r4:"
|
||||||
|
>
|
||||||
|
Hello world!
|
||||||
|
</h3>
|
||||||
|
</button>
|
||||||
|
`;
|
||||||
@@ -16,11 +16,10 @@ limitations under the License.
|
|||||||
|
|
||||||
import posthog, { CaptureOptions, PostHog, Properties } from "posthog-js";
|
import posthog, { CaptureOptions, PostHog, Properties } from "posthog-js";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { MatrixClient } from "matrix-js-sdk";
|
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { Buffer } from "buffer";
|
import { Buffer } from "buffer";
|
||||||
|
|
||||||
import { widget } from "../widget";
|
import { widget } from "../widget";
|
||||||
import { getSetting, setSetting, getSettingKey } from "../settings/useSetting";
|
|
||||||
import {
|
import {
|
||||||
CallEndedTracker,
|
CallEndedTracker,
|
||||||
CallStartedTracker,
|
CallStartedTracker,
|
||||||
@@ -31,10 +30,11 @@ import {
|
|||||||
UndecryptableToDeviceEventTracker,
|
UndecryptableToDeviceEventTracker,
|
||||||
QualitySurveyEventTracker,
|
QualitySurveyEventTracker,
|
||||||
CallDisconnectedEventTracker,
|
CallDisconnectedEventTracker,
|
||||||
|
CallConnectDurationTracker,
|
||||||
} from "./PosthogEvents";
|
} from "./PosthogEvents";
|
||||||
import { Config } from "../config/Config";
|
import { Config } from "../config/Config";
|
||||||
import { getUrlParams } from "../UrlParams";
|
import { getUrlParams } from "../UrlParams";
|
||||||
import { localStorageBus } from "../useLocalStorage";
|
import { optInAnalytics } from "../settings/settings";
|
||||||
|
|
||||||
/* Posthog analytics tracking.
|
/* Posthog analytics tracking.
|
||||||
*
|
*
|
||||||
@@ -130,7 +130,7 @@ export class PosthogAnalytics {
|
|||||||
const { analyticsID } = getUrlParams();
|
const { analyticsID } = getUrlParams();
|
||||||
// if the embedding platform (element web) already got approval to communicating with posthog
|
// if the embedding platform (element web) already got approval to communicating with posthog
|
||||||
// element call can also send events to posthog
|
// element call can also send events to posthog
|
||||||
setSetting("opt-in-analytics", Boolean(analyticsID));
|
optInAnalytics.setValue(Boolean(analyticsID));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.posthog.init(posthogConfig.project_api_key, {
|
this.posthog.init(posthogConfig.project_api_key, {
|
||||||
@@ -144,15 +144,13 @@ export class PosthogAnalytics {
|
|||||||
advanced_disable_decide: true,
|
advanced_disable_decide: true,
|
||||||
});
|
});
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
} else {
|
} else if (import.meta.env.MODE !== "test") {
|
||||||
logger.info(
|
logger.info(
|
||||||
"Posthog is not enabled because there is no api key or no host given in the config",
|
"Posthog is not enabled because there is no api key or no host given in the config",
|
||||||
);
|
);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
}
|
}
|
||||||
this.startListeningToSettingsChanges();
|
this.startListeningToSettingsChanges(); // Triggers maybeIdentifyUser
|
||||||
const optInAnalytics = getSetting("opt-in-analytics", false);
|
|
||||||
this.updateAnonymityAndIdentifyUser(optInAnalytics);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private sanitizeProperties = (
|
private sanitizeProperties = (
|
||||||
@@ -335,8 +333,7 @@ export class PosthogAnalytics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public onLoginStatusChanged(): void {
|
public onLoginStatusChanged(): void {
|
||||||
const optInAnalytics = getSetting("opt-in-analytics", false);
|
this.maybeIdentifyUser();
|
||||||
this.updateAnonymityAndIdentifyUser(optInAnalytics);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateSuperProperties(): void {
|
private updateSuperProperties(): void {
|
||||||
@@ -359,20 +356,12 @@ export class PosthogAnalytics {
|
|||||||
return this.eventSignup.getSignupEndTime() > new Date(0);
|
return this.eventSignup.getSignupEndTime() > new Date(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async updateAnonymityAndIdentifyUser(
|
private async maybeIdentifyUser(): Promise<void> {
|
||||||
pseudonymousOptIn: boolean,
|
|
||||||
): Promise<void> {
|
|
||||||
// Update this.anonymity based on the user's analytics opt-in settings
|
|
||||||
const anonymity = pseudonymousOptIn
|
|
||||||
? Anonymity.Pseudonymous
|
|
||||||
: Anonymity.Disabled;
|
|
||||||
this.setAnonymity(anonymity);
|
|
||||||
|
|
||||||
// We may not yet have a Matrix client at this point, if not, bail. This should get
|
// We may not yet have a Matrix client at this point, if not, bail. This should get
|
||||||
// triggered again by onLoginStatusChanged once we do have a client.
|
// triggered again by onLoginStatusChanged once we do have a client.
|
||||||
if (!window.matrixclient) return;
|
if (!window.matrixclient) return;
|
||||||
|
|
||||||
if (anonymity === Anonymity.Pseudonymous) {
|
if (this.anonymity === Anonymity.Pseudonymous) {
|
||||||
this.setRegistrationType(
|
this.setRegistrationType(
|
||||||
window.matrixclient.isGuest() || window.passwordlessUser
|
window.matrixclient.isGuest() || window.passwordlessUser
|
||||||
? RegistrationType.Guest
|
? RegistrationType.Guest
|
||||||
@@ -388,7 +377,7 @@ export class PosthogAnalytics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anonymity !== Anonymity.Disabled) {
|
if (this.anonymity !== Anonymity.Disabled) {
|
||||||
this.updateSuperProperties();
|
this.updateSuperProperties();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -418,8 +407,9 @@ export class PosthogAnalytics {
|
|||||||
// * When the user changes their preferences on this device
|
// * When the user changes their preferences on this device
|
||||||
// Note that for new accounts, pseudonymousAnalyticsOptIn won't be set, so updateAnonymityFromSettings
|
// Note that for new accounts, pseudonymousAnalyticsOptIn won't be set, so updateAnonymityFromSettings
|
||||||
// won't be called (i.e. this.anonymity will be left as the default, until the setting changes)
|
// won't be called (i.e. this.anonymity will be left as the default, until the setting changes)
|
||||||
localStorageBus.on(getSettingKey("opt-in-analytics"), (optInAnalytics) => {
|
optInAnalytics.value.subscribe((optIn) => {
|
||||||
this.updateAnonymityAndIdentifyUser(optInAnalytics);
|
this.setAnonymity(optIn ? Anonymity.Pseudonymous : Anonymity.Disabled);
|
||||||
|
this.maybeIdentifyUser();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,4 +434,5 @@ export class PosthogAnalytics {
|
|||||||
public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker();
|
public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker();
|
||||||
public eventQualitySurvey = new QualitySurveyEventTracker();
|
public eventQualitySurvey = new QualitySurveyEventTracker();
|
||||||
public eventCallDisconnected = new CallDisconnectedEventTracker();
|
public eventCallDisconnected = new CallDisconnectedEventTracker();
|
||||||
|
public eventCallConnectDuration = new CallConnectDurationTracker();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { DisconnectReason } from "livekit-client";
|
import { DisconnectReason } from "livekit-client";
|
||||||
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IPosthogEvent,
|
IPosthogEvent,
|
||||||
@@ -201,3 +202,38 @@ export class CallDisconnectedEventTracker {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface CallConnectDuration extends IPosthogEvent {
|
||||||
|
eventName: "CallConnectDuration";
|
||||||
|
totalDuration: number;
|
||||||
|
websocketDuration: number;
|
||||||
|
peerConnectionDuration: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CallConnectDurationTracker {
|
||||||
|
private connectStart = 0;
|
||||||
|
private websocketConnected = 0;
|
||||||
|
public cacheConnectStart(): void {
|
||||||
|
this.connectStart = Date.now();
|
||||||
|
}
|
||||||
|
public cacheWsConnect(): void {
|
||||||
|
this.websocketConnected = Date.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
public track(options = { log: false }): void {
|
||||||
|
const now = Date.now();
|
||||||
|
const totalDuration = now - this.connectStart;
|
||||||
|
const websocketDuration = this.websocketConnected - this.connectStart;
|
||||||
|
const peerConnectionDuration = now - this.websocketConnected;
|
||||||
|
PosthogAnalytics.instance.trackEvent<CallConnectDuration>({
|
||||||
|
eventName: "CallConnectDuration",
|
||||||
|
totalDuration,
|
||||||
|
websocketDuration,
|
||||||
|
peerConnectionDuration,
|
||||||
|
});
|
||||||
|
if (options.log)
|
||||||
|
logger.log(
|
||||||
|
`Time to connect:\ntotal: ${totalDuration}ms\npeerConnection: ${websocketDuration}ms\nwebsocket: ${peerConnectionDuration}ms`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2023 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the index of the last element in the array to satsify the given
|
|
||||||
* predicate.
|
|
||||||
*/
|
|
||||||
// TODO: remove this once TypeScript recognizes the existence of
|
|
||||||
// Array.prototype.findLastIndex
|
|
||||||
export function findLastIndex<T>(
|
|
||||||
array: T[],
|
|
||||||
predicate: (item: T, index: number) => boolean,
|
|
||||||
): number | null {
|
|
||||||
for (let i = array.length - 1; i >= 0; i--) {
|
|
||||||
if (predicate(array[i], i)) return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Counts the number of elements in an array that satsify the given predicate.
|
|
||||||
*/
|
|
||||||
export const count = <T>(
|
|
||||||
array: T[],
|
|
||||||
predicate: (item: T, index: number) => boolean,
|
|
||||||
): number =>
|
|
||||||
array.reduce(
|
|
||||||
(acc, item, index) => (predicate(item, index) ? acc + 1 : acc),
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
@@ -17,11 +17,11 @@ limitations under the License.
|
|||||||
import { FC, FormEvent, useCallback, useRef, useState } from "react";
|
import { FC, FormEvent, useCallback, useRef, useState } from "react";
|
||||||
import { useHistory, useLocation, Link } from "react-router-dom";
|
import { useHistory, useLocation, Link } from "react-router-dom";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
|
import { Button } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import Logo from "../icons/LogoLarge.svg?react";
|
import Logo from "../icons/LogoLarge.svg?react";
|
||||||
import { useClient } from "../ClientContext";
|
import { useClient } from "../ClientContext";
|
||||||
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
||||||
import { Button } from "../button";
|
|
||||||
import styles from "./LoginPage.module.css";
|
import styles from "./LoginPage.module.css";
|
||||||
import { useInteractiveLogin } from "./useInteractiveLogin";
|
import { useInteractiveLogin } from "./useInteractiveLogin";
|
||||||
import { usePageTitle } from "../usePageTitle";
|
import { usePageTitle } from "../usePageTitle";
|
||||||
@@ -32,8 +32,8 @@ export const LoginPage: FC = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
usePageTitle(t("login_title"));
|
usePageTitle(t("login_title"));
|
||||||
|
|
||||||
const { setClient } = useClient();
|
const { client, setClient } = useClient();
|
||||||
const login = useInteractiveLogin();
|
const login = useInteractiveLogin(client);
|
||||||
const homeserver = Config.defaultHomeserverUrl(); // TODO: Make this configurable
|
const homeserver = Config.defaultHomeserverUrl(); // TODO: Make this configurable
|
||||||
const usernameRef = useRef<HTMLInputElement>(null);
|
const usernameRef = useRef<HTMLInputElement>(null);
|
||||||
const passwordRef = useRef<HTMLInputElement>(null);
|
const passwordRef = useRef<HTMLInputElement>(null);
|
||||||
@@ -82,7 +82,12 @@ export const LoginPage: FC = () => {
|
|||||||
},
|
},
|
||||||
[login, location, history, homeserver, setClient],
|
[login, location, history, homeserver, setClient],
|
||||||
);
|
);
|
||||||
|
// we need to limit the length of the homserver name to not cover the whole loginview input with the string.
|
||||||
|
let shortendHomeserverName = Config.defaultServerName()?.slice(0, 25);
|
||||||
|
shortendHomeserverName =
|
||||||
|
shortendHomeserverName?.length !== Config.defaultServerName()?.length
|
||||||
|
? shortendHomeserverName + "..."
|
||||||
|
: shortendHomeserverName;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@@ -102,7 +107,7 @@ export const LoginPage: FC = () => {
|
|||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
prefix="@"
|
prefix="@"
|
||||||
suffix={`:${Config.defaultServerName()}`}
|
suffix={`:${shortendHomeserverName}`}
|
||||||
data-testid="login_username"
|
data-testid="login_username"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ import { captureException } from "@sentry/react";
|
|||||||
import { sleep } from "matrix-js-sdk/src/utils";
|
import { sleep } from "matrix-js-sdk/src/utils";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
import { Button } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
||||||
import { Button } from "../button";
|
|
||||||
import { useClientLegacy } from "../ClientContext";
|
import { useClientLegacy } from "../ClientContext";
|
||||||
import { useInteractiveRegistration } from "./useInteractiveRegistration";
|
import { useInteractiveRegistration } from "./useInteractiveRegistration";
|
||||||
import styles from "./LoginPage.module.css";
|
import styles from "./LoginPage.module.css";
|
||||||
|
|||||||
@@ -16,12 +16,23 @@ limitations under the License.
|
|||||||
|
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth";
|
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth";
|
||||||
import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
createClient,
|
||||||
|
LoginResponse,
|
||||||
|
MatrixClient,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { initClient } from "../matrix-utils";
|
import { initClient } from "../utils/matrix";
|
||||||
import { Session } from "../ClientContext";
|
import { Session } from "../ClientContext";
|
||||||
|
/**
|
||||||
export function useInteractiveLogin(): (
|
* This provides the login method to login using user credentials.
|
||||||
|
* @param oldClient If there is an already authenticated client it should be passed to this hook
|
||||||
|
* this allows the interactive login to sign out the client before logging in.
|
||||||
|
* @returns A async method that can be called/awaited to log in with the provided credentials.
|
||||||
|
*/
|
||||||
|
export function useInteractiveLogin(
|
||||||
|
oldClient?: MatrixClient,
|
||||||
|
): (
|
||||||
homeserver: string,
|
homeserver: string,
|
||||||
username: string,
|
username: string,
|
||||||
password: string,
|
password: string,
|
||||||
@@ -32,47 +43,52 @@ export function useInteractiveLogin(): (
|
|||||||
username: string,
|
username: string,
|
||||||
password: string,
|
password: string,
|
||||||
) => Promise<[MatrixClient, Session]>
|
) => Promise<[MatrixClient, Session]>
|
||||||
>(async (homeserver: string, username: string, password: string) => {
|
>(
|
||||||
const authClient = createClient({ baseUrl: homeserver });
|
async (homeserver: string, username: string, password: string) => {
|
||||||
|
const authClient = createClient({ baseUrl: homeserver });
|
||||||
|
|
||||||
const interactiveAuth = new InteractiveAuth({
|
const interactiveAuth = new InteractiveAuth({
|
||||||
matrixClient: authClient,
|
matrixClient: authClient,
|
||||||
doRequest: () =>
|
doRequest: (): Promise<LoginResponse> =>
|
||||||
authClient.login("m.login.password", {
|
authClient.login("m.login.password", {
|
||||||
identifier: {
|
identifier: {
|
||||||
type: "m.id.user",
|
type: "m.id.user",
|
||||||
user: username,
|
user: username,
|
||||||
},
|
},
|
||||||
password,
|
password,
|
||||||
}),
|
}),
|
||||||
stateUpdated: (): void => {},
|
stateUpdated: (): void => {},
|
||||||
requestEmailToken: (): Promise<{ sid: string }> => {
|
requestEmailToken: (): Promise<{ sid: string }> => {
|
||||||
return Promise.resolve({ sid: "" });
|
return Promise.resolve({ sid: "" });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// XXX: This claims to return an IAuthData which contains none of these
|
// XXX: This claims to return an IAuthData which contains none of these
|
||||||
// things - the js-sdk types may be wrong?
|
// things - the js-sdk types may be wrong?
|
||||||
/* eslint-disable camelcase,@typescript-eslint/no-explicit-any */
|
/* eslint-disable camelcase,@typescript-eslint/no-explicit-any */
|
||||||
const { user_id, access_token, device_id } =
|
const { user_id, access_token, device_id } =
|
||||||
(await interactiveAuth.attemptAuth()) as any;
|
(await interactiveAuth.attemptAuth()) as any;
|
||||||
const session = {
|
const session = {
|
||||||
user_id,
|
user_id,
|
||||||
access_token,
|
access_token,
|
||||||
device_id,
|
device_id,
|
||||||
passwordlessUser: false,
|
passwordlessUser: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const client = await initClient(
|
// To not confuse the rust crypto sessions we need to logout the old client before initializing the new one.
|
||||||
{
|
await oldClient?.logout(true);
|
||||||
baseUrl: homeserver,
|
const client = await initClient(
|
||||||
accessToken: access_token,
|
{
|
||||||
userId: user_id,
|
baseUrl: homeserver,
|
||||||
deviceId: device_id,
|
accessToken: access_token,
|
||||||
},
|
userId: user_id,
|
||||||
false,
|
deviceId: device_id,
|
||||||
);
|
},
|
||||||
/* eslint-enable camelcase */
|
false,
|
||||||
return [client, session];
|
);
|
||||||
}, []);
|
/* eslint-enable camelcase */
|
||||||
|
return [client, session];
|
||||||
|
},
|
||||||
|
[oldClient],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,16 @@ limitations under the License.
|
|||||||
|
|
||||||
import { useState, useEffect, useCallback, useRef } from "react";
|
import { useState, useEffect, useCallback, useRef } from "react";
|
||||||
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth";
|
import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth";
|
||||||
import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
createClient,
|
||||||
|
MatrixClient,
|
||||||
|
RegisterResponse,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { initClient } from "../matrix-utils";
|
import { initClient } from "../utils/matrix";
|
||||||
import { Session } from "../ClientContext";
|
import { Session } from "../ClientContext";
|
||||||
import { Config } from "../config/Config";
|
import { Config } from "../config/Config";
|
||||||
|
import { widget } from "../widget";
|
||||||
|
|
||||||
export const useInteractiveRegistration = (): {
|
export const useInteractiveRegistration = (): {
|
||||||
privacyPolicyUrl?: string;
|
privacyPolicyUrl?: string;
|
||||||
@@ -48,6 +53,8 @@ export const useInteractiveRegistration = (): {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (widget) return;
|
||||||
|
// An empty registerRequest is used to get the privacy policy and recaptcha key.
|
||||||
authClient.current!.registerRequest({}).catch((error) => {
|
authClient.current!.registerRequest({}).catch((error) => {
|
||||||
setPrivacyPolicyUrl(
|
setPrivacyPolicyUrl(
|
||||||
error.data?.params["m.login.terms"]?.policies?.privacy_policy?.en?.url,
|
error.data?.params["m.login.terms"]?.policies?.privacy_policy?.en?.url,
|
||||||
@@ -66,7 +73,7 @@ export const useInteractiveRegistration = (): {
|
|||||||
): Promise<[MatrixClient, Session]> => {
|
): Promise<[MatrixClient, Session]> => {
|
||||||
const interactiveAuth = new InteractiveAuth({
|
const interactiveAuth = new InteractiveAuth({
|
||||||
matrixClient: authClient.current!,
|
matrixClient: authClient.current!,
|
||||||
doRequest: (auth) =>
|
doRequest: (auth): Promise<RegisterResponse> =>
|
||||||
authClient.current!.registerRequest({
|
authClient.current!.registerRequest({
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { translatedError } from "../TranslatedError";
|
import { translatedError } from "../TranslatedError";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
mxOnRecaptchaLoaded: () => void;
|
mxOnRecaptchaLoaded: () => void;
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2021 New Vector Ltd
|
Copyright 2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -14,240 +14,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.button,
|
.endCall > svg {
|
||||||
.toolbarButton,
|
|
||||||
.toolbarButtonSecondary,
|
|
||||||
.iconButton,
|
|
||||||
.iconCopyButton,
|
|
||||||
.secondary,
|
|
||||||
.secondaryHangup,
|
|
||||||
.copyButton,
|
|
||||||
.dropdownButton {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
text-decoration: none;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondary,
|
|
||||||
.secondaryHangup,
|
|
||||||
.button,
|
|
||||||
.copyButton {
|
|
||||||
padding: 8px 20px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: var(--font-size-body);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
color: var(--stopgap-color-on-solid-accent);
|
|
||||||
background-color: var(--cpd-color-text-action-accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:focus-visible,
|
|
||||||
.toolbarButton:focus-visible,
|
|
||||||
.toolbarButtonSecondary:focus-visible,
|
|
||||||
.iconButton:focus-visible,
|
|
||||||
.iconCopyButton:focus-visible,
|
|
||||||
.secondary:focus-visible,
|
|
||||||
.secondaryHangup:focus-visible,
|
|
||||||
.copyButton:focus-visible {
|
|
||||||
outline: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton:disabled {
|
|
||||||
background-color: var(--cpd-color-bg-action-primary-disabled);
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton,
|
|
||||||
.toolbarButtonSecondary {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
border-radius: 50px;
|
|
||||||
background-color: var(--cpd-color-bg-canvas-default);
|
|
||||||
color: var(--cpd-color-icon-primary);
|
|
||||||
border: 1px solid var(--cpd-color-gray-400);
|
|
||||||
box-shadow: var(--subtle-drop-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton.on,
|
|
||||||
.toolbarButton.off {
|
|
||||||
background-color: var(--cpd-color-bg-action-primary-rest);
|
|
||||||
color: var(--cpd-color-icon-on-solid-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButtonSecondary.on {
|
|
||||||
background-color: var(--cpd-color-text-success-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton:active,
|
|
||||||
.toolbarButtonSecondary:active {
|
|
||||||
background-color: var(--cpd-color-bg-subtle-primary);
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton.on:active,
|
|
||||||
.toolbarButton.off:active {
|
|
||||||
background-color: var(--cpd-color-bg-action-primary-pressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconButton:not(.stroke) svg * {
|
|
||||||
fill: var(--cpd-color-bg-action-primary-rest);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconButton:not(.stroke):tertiary svg * {
|
|
||||||
fill: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconButton.on:not(.stroke) svg * {
|
|
||||||
fill: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconButton.on.stroke svg * {
|
|
||||||
stroke: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hangupButton {
|
|
||||||
background-color: var(--cpd-color-bg-critical-primary);
|
|
||||||
border-color: var(--cpd-color-border-critical-subtle);
|
|
||||||
color: var(--stopgap-color-on-solid-accent);
|
color: var(--stopgap-color-on-solid-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hangupButton:active {
|
|
||||||
background-color: var(--cpd-color-bg-critical-pressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondary,
|
|
||||||
.copyButton {
|
|
||||||
color: var(--cpd-color-text-action-accent);
|
|
||||||
border: 2px solid var(--cpd-color-text-action-accent);
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondaryHangup {
|
|
||||||
color: var(--cpd-color-text-critical-primary);
|
|
||||||
border: 2px solid var(--cpd-color-border-critical-primary);
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton.secondaryCopy {
|
|
||||||
color: var(--cpd-color-text-primary);
|
|
||||||
border-color: var(--cpd-color-border-interactive-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton {
|
|
||||||
width: 100%;
|
|
||||||
height: 40px;
|
|
||||||
transition:
|
|
||||||
border-color 250ms,
|
|
||||||
background-color 250ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton span {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: var(--font-size-body);
|
|
||||||
margin-right: 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton svg {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton:not(.on) svg * {
|
|
||||||
fill: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton.on {
|
|
||||||
border-color: transparent;
|
|
||||||
background-color: var(--cpd-color-text-action-accent);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton.on svg * {
|
|
||||||
stroke: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton.secondaryCopy:not(.on) svg * {
|
|
||||||
fill: var(--cpd-color-bg-action-primary-rest);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconCopyButton svg * {
|
|
||||||
fill: var(--cpd-color-icon-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconCopyButton.on svg *,
|
|
||||||
.iconCopyButton.on:hover svg * {
|
|
||||||
fill: transparent;
|
|
||||||
stroke: var(--cpd-color-text-action-accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdownButton {
|
|
||||||
color: var(--cpd-color-text-primary);
|
|
||||||
padding: 2px 8px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdownButton:active,
|
|
||||||
.dropdownButton.on {
|
|
||||||
background-color: var(--cpd-color-bg-action-secondary-pressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdownButton svg {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdownButton svg * {
|
|
||||||
fill: var(--cpd-color-icon-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lg {
|
|
||||||
height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.linkButton {
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
color: var(--cpd-color-text-action-accent);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (hover: hover) {
|
|
||||||
.toolbarButton:hover,
|
|
||||||
.toolbarButtonSecondary:hover {
|
|
||||||
background-color: var(--cpd-color-bg-subtle-primary);
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbarButton.on:hover,
|
|
||||||
.toolbarButton.off:hover {
|
|
||||||
background-color: var(--cpd-color-bg-action-primary-hovered);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconButton:not(.stroke):hover svg * {
|
|
||||||
fill: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hangupButton:hover {
|
|
||||||
background-color: var(--cpd-color-bg-critical-hovered);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconCopyButton:hover svg * {
|
|
||||||
fill: var(--cpd-color-icon-accent-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdownButton:hover {
|
|
||||||
background-color: var(--cpd-color-bg-action-secondary-hovered);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022 - 2023 New Vector Ltd
|
Copyright 2022-2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -13,133 +13,27 @@ 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 { FC, forwardRef } from "react";
|
import { ComponentPropsWithoutRef, FC } from "react";
|
||||||
import { PressEvent } from "@react-types/shared";
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useButton } from "@react-aria/button";
|
|
||||||
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Tooltip } from "@vector-im/compound-web";
|
import { Button as CpdButton, Tooltip } from "@vector-im/compound-web";
|
||||||
import MicOnSolidIcon from "@vector-im/compound-design-tokens/icons/mic-on-solid.svg?react";
|
import {
|
||||||
import MicOffSolidIcon from "@vector-im/compound-design-tokens/icons/mic-off-solid.svg?react";
|
MicOnSolidIcon,
|
||||||
import VideoCallSolidIcon from "@vector-im/compound-design-tokens/icons/video-call-solid.svg?react";
|
MicOffSolidIcon,
|
||||||
import VideoCallOffSolidIcon from "@vector-im/compound-design-tokens/icons/video-call-off-solid.svg?react";
|
VideoCallSolidIcon,
|
||||||
import EndCallIcon from "@vector-im/compound-design-tokens/icons/end-call.svg?react";
|
VideoCallOffSolidIcon,
|
||||||
import ShareScreenSolidIcon from "@vector-im/compound-design-tokens/icons/share-screen-solid.svg?react";
|
EndCallIcon,
|
||||||
import SettingsSolidIcon from "@vector-im/compound-design-tokens/icons/settings-solid.svg?react";
|
ShareScreenSolidIcon,
|
||||||
import ChevronDownIcon from "@vector-im/compound-design-tokens/icons/chevron-down.svg?react";
|
SettingsSolidIcon,
|
||||||
|
} from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||||
|
|
||||||
import styles from "./Button.module.css";
|
import styles from "./Button.module.css";
|
||||||
import Fullscreen from "../icons/Fullscreen.svg?react";
|
|
||||||
import FullscreenExit from "../icons/FullscreenExit.svg?react";
|
|
||||||
import { VolumeIcon } from "./VolumeIcon";
|
|
||||||
|
|
||||||
export type ButtonVariant =
|
interface MicButtonProps extends ComponentPropsWithoutRef<"button"> {
|
||||||
| "default"
|
|
||||||
| "toolbar"
|
|
||||||
| "toolbarSecondary"
|
|
||||||
| "icon"
|
|
||||||
| "secondary"
|
|
||||||
| "copy"
|
|
||||||
| "secondaryCopy"
|
|
||||||
| "iconCopy"
|
|
||||||
| "secondaryHangup"
|
|
||||||
| "dropdown"
|
|
||||||
| "link";
|
|
||||||
|
|
||||||
export const variantToClassName = {
|
|
||||||
default: [styles.button],
|
|
||||||
toolbar: [styles.toolbarButton],
|
|
||||||
toolbarSecondary: [styles.toolbarButtonSecondary],
|
|
||||||
icon: [styles.iconButton],
|
|
||||||
secondary: [styles.secondary],
|
|
||||||
copy: [styles.copyButton],
|
|
||||||
secondaryCopy: [styles.secondaryCopy, styles.copyButton],
|
|
||||||
iconCopy: [styles.iconCopyButton],
|
|
||||||
secondaryHangup: [styles.secondaryHangup],
|
|
||||||
dropdown: [styles.dropdownButton],
|
|
||||||
link: [styles.linkButton],
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ButtonSize = "lg";
|
|
||||||
|
|
||||||
export const sizeToClassName: { lg: string[] } = {
|
|
||||||
lg: [styles.lg],
|
|
||||||
};
|
|
||||||
interface Props {
|
|
||||||
variant: ButtonVariant;
|
|
||||||
size: ButtonSize;
|
|
||||||
on: () => void;
|
|
||||||
off: () => void;
|
|
||||||
iconStyle: string;
|
|
||||||
className: string;
|
|
||||||
children: Element[];
|
|
||||||
onPress: (e: PressEvent) => void;
|
|
||||||
onPressStart: (e: PressEvent) => void;
|
|
||||||
disabled: boolean;
|
|
||||||
// TODO: add all props for <Button>
|
|
||||||
[index: string]: unknown;
|
|
||||||
}
|
|
||||||
export const Button = forwardRef<HTMLButtonElement, Props>(
|
|
||||||
(
|
|
||||||
{
|
|
||||||
variant = "default",
|
|
||||||
size,
|
|
||||||
on,
|
|
||||||
off,
|
|
||||||
iconStyle,
|
|
||||||
className,
|
|
||||||
children,
|
|
||||||
onPress,
|
|
||||||
onPressStart,
|
|
||||||
...rest
|
|
||||||
},
|
|
||||||
ref,
|
|
||||||
) => {
|
|
||||||
const buttonRef = useObjectRef<HTMLButtonElement>(ref);
|
|
||||||
const { buttonProps } = useButton(
|
|
||||||
{ onPress, onPressStart, ...rest },
|
|
||||||
buttonRef,
|
|
||||||
);
|
|
||||||
|
|
||||||
// TODO: react-aria's useButton hook prevents form submission via keyboard
|
|
||||||
// Remove the hack below after this is merged https://github.com/adobe/react-spectrum/pull/904
|
|
||||||
let filteredButtonProps = buttonProps;
|
|
||||||
|
|
||||||
if (rest.type === "submit" && !rest.onPress) {
|
|
||||||
const { ...filtered } = buttonProps;
|
|
||||||
filteredButtonProps = filtered;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
className={classNames(
|
|
||||||
variantToClassName[variant],
|
|
||||||
sizeToClassName[size],
|
|
||||||
styles[iconStyle],
|
|
||||||
className,
|
|
||||||
{
|
|
||||||
[styles.on]: on,
|
|
||||||
[styles.off]: off,
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
{...mergeProps(rest, filteredButtonProps)}
|
|
||||||
ref={buttonRef}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
{children}
|
|
||||||
{variant === "dropdown" && <ChevronDownIcon />}
|
|
||||||
</>
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
export const MicButton: FC<{
|
|
||||||
muted: boolean;
|
muted: boolean;
|
||||||
// TODO: add all props for <Button>
|
}
|
||||||
[index: string]: unknown;
|
|
||||||
}> = ({ muted, ...rest }) => {
|
export const MicButton: FC<MicButtonProps> = ({ muted, ...props }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const Icon = muted ? MicOffSolidIcon : MicOnSolidIcon;
|
const Icon = muted ? MicOffSolidIcon : MicOnSolidIcon;
|
||||||
const label = muted
|
const label = muted
|
||||||
@@ -148,18 +42,21 @@ export const MicButton: FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip label={label}>
|
<Tooltip label={label}>
|
||||||
<Button variant="toolbar" {...rest} on={muted}>
|
<CpdButton
|
||||||
<Icon aria-label={label} />
|
iconOnly
|
||||||
</Button>
|
Icon={Icon}
|
||||||
|
kind={muted ? "primary" : "secondary"}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const VideoButton: FC<{
|
interface VideoButtonProps extends ComponentPropsWithoutRef<"button"> {
|
||||||
muted: boolean;
|
muted: boolean;
|
||||||
// TODO: add all props for <Button>
|
}
|
||||||
[index: string]: unknown;
|
|
||||||
}> = ({ muted, ...rest }) => {
|
export const VideoButton: FC<VideoButtonProps> = ({ muted, ...props }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const Icon = muted ? VideoCallOffSolidIcon : VideoCallSolidIcon;
|
const Icon = muted ? VideoCallOffSolidIcon : VideoCallSolidIcon;
|
||||||
const label = muted
|
const label = muted
|
||||||
@@ -168,19 +65,24 @@ export const VideoButton: FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip label={label}>
|
<Tooltip label={label}>
|
||||||
<Button variant="toolbar" {...rest} on={muted}>
|
<CpdButton
|
||||||
<Icon aria-label={label} />
|
iconOnly
|
||||||
</Button>
|
Icon={Icon}
|
||||||
|
kind={muted ? "primary" : "secondary"}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ScreenshareButton: FC<{
|
interface ShareScreenButtonProps extends ComponentPropsWithoutRef<"button"> {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
className?: string;
|
}
|
||||||
// TODO: add all props for <Button>
|
|
||||||
[index: string]: unknown;
|
export const ShareScreenButton: FC<ShareScreenButtonProps> = ({
|
||||||
}> = ({ enabled, className, ...rest }) => {
|
enabled,
|
||||||
|
...props
|
||||||
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const label = enabled
|
const label = enabled
|
||||||
? t("stop_screenshare_button_label")
|
? t("stop_screenshare_button_label")
|
||||||
@@ -188,87 +90,48 @@ export const ScreenshareButton: FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip label={label}>
|
<Tooltip label={label}>
|
||||||
<Button variant="toolbar" {...rest} on={enabled}>
|
<CpdButton
|
||||||
<ShareScreenSolidIcon aria-label={label} />
|
iconOnly
|
||||||
</Button>
|
Icon={ShareScreenSolidIcon}
|
||||||
|
kind={enabled ? "primary" : "secondary"}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const HangupButton: FC<{
|
export const EndCallButton: FC<ComponentPropsWithoutRef<"button">> = ({
|
||||||
className?: string;
|
className,
|
||||||
// TODO: add all props for <Button>
|
...props
|
||||||
[index: string]: unknown;
|
}) => {
|
||||||
}> = ({ className, ...rest }) => {
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip label={t("hangup_button_label")}>
|
<Tooltip label={t("hangup_button_label")}>
|
||||||
<Button
|
<CpdButton
|
||||||
variant="toolbar"
|
className={classNames(className, styles.endCall)}
|
||||||
className={classNames(styles.hangupButton, className)}
|
iconOnly
|
||||||
{...rest}
|
Icon={EndCallIcon}
|
||||||
>
|
destructive
|
||||||
<EndCallIcon aria-label={t("hangup_button_label")} />
|
{...props}
|
||||||
</Button>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SettingsButton: FC<{
|
export const SettingsButton: FC<ComponentPropsWithoutRef<"button">> = (
|
||||||
className?: string;
|
props,
|
||||||
// TODO: add all props for <Button>
|
) => {
|
||||||
[index: string]: unknown;
|
|
||||||
}> = ({ className, ...rest }) => {
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip label={t("common.settings")}>
|
<Tooltip label={t("common.settings")}>
|
||||||
<Button variant="toolbar" {...rest}>
|
<CpdButton
|
||||||
<SettingsSolidIcon aria-label={t("common.settings")} />
|
iconOnly
|
||||||
</Button>
|
Icon={SettingsSolidIcon}
|
||||||
</Tooltip>
|
kind="secondary"
|
||||||
);
|
{...props}
|
||||||
};
|
/>
|
||||||
|
|
||||||
interface AudioButtonProps extends Omit<Props, "variant"> {
|
|
||||||
/**
|
|
||||||
* A number between 0 and 1
|
|
||||||
*/
|
|
||||||
volume: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const AudioButton: FC<AudioButtonProps> = ({ volume, ...rest }) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Tooltip label={t("local_volume_label")}>
|
|
||||||
<Button variant="icon" {...rest}>
|
|
||||||
<VolumeIcon volume={volume} aria-label={t("local_volume_label")} />
|
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
interface FullscreenButtonProps extends Omit<Props, "variant"> {
|
|
||||||
fullscreen?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const FullscreenButton: FC<FullscreenButtonProps> = ({
|
|
||||||
fullscreen,
|
|
||||||
...rest
|
|
||||||
}) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const Icon = fullscreen ? FullscreenExit : Fullscreen;
|
|
||||||
const label = fullscreen
|
|
||||||
? t("exit_fullscreen_button_label")
|
|
||||||
: t("fullscreen_button_label");
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Tooltip label={label}>
|
|
||||||
<Button variant="icon" {...rest}>
|
|
||||||
<Icon aria-label={label} />
|
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2022 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 { useTranslation } from "react-i18next";
|
|
||||||
import useClipboard from "react-use-clipboard";
|
|
||||||
import { FC } from "react";
|
|
||||||
|
|
||||||
import CheckIcon from "../icons/Check.svg?react";
|
|
||||||
import CopyIcon from "../icons/Copy.svg?react";
|
|
||||||
import { Button, ButtonVariant } from "./Button";
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
value: string;
|
|
||||||
children?: JSX.Element | string;
|
|
||||||
className?: string;
|
|
||||||
variant?: ButtonVariant;
|
|
||||||
copiedMessage?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const CopyButton: FC<Props> = ({
|
|
||||||
value,
|
|
||||||
children,
|
|
||||||
className,
|
|
||||||
variant,
|
|
||||||
copiedMessage,
|
|
||||||
...rest
|
|
||||||
}) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const [isCopied, setCopied] = useClipboard(value, { successDuration: 3000 });
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Button
|
|
||||||
{...rest}
|
|
||||||
variant={variant === "icon" ? "iconCopy" : variant || "copy"}
|
|
||||||
on={isCopied}
|
|
||||||
className={className}
|
|
||||||
onPress={setCopied}
|
|
||||||
iconStyle={isCopied ? "stroke" : "fill"}
|
|
||||||
aria-label={t("action.copy")}
|
|
||||||
>
|
|
||||||
{isCopied ? (
|
|
||||||
<>
|
|
||||||
{variant !== "icon" && (
|
|
||||||
<span>{copiedMessage || t("common.copied")}</span>
|
|
||||||
)}
|
|
||||||
<CheckIcon />
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
{variant !== "icon" && <span>{children || value}</span>}
|
|
||||||
<CopyIcon />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
import { ComponentPropsWithoutRef, FC } from "react";
|
import { ComponentPropsWithoutRef, FC } from "react";
|
||||||
import { Button } from "@vector-im/compound-web";
|
import { Button } from "@vector-im/compound-web";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import UserAddIcon from "@vector-im/compound-design-tokens/icons/user-add.svg?react";
|
import { UserAddIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||||
|
|
||||||
export const InviteButton: FC<
|
export const InviteButton: FC<
|
||||||
Omit<ComponentPropsWithoutRef<"button">, "children">
|
Omit<ComponentPropsWithoutRef<"button">, "children">
|
||||||
|
|||||||
61
src/button/Link.tsx
Normal file
61
src/button/Link.tsx
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
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 {
|
||||||
|
ComponentPropsWithoutRef,
|
||||||
|
forwardRef,
|
||||||
|
MouseEvent,
|
||||||
|
useCallback,
|
||||||
|
useMemo,
|
||||||
|
} from "react";
|
||||||
|
import { Link as CpdLink } from "@vector-im/compound-web";
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
|
import { createPath, LocationDescriptor, Path } from "history";
|
||||||
|
|
||||||
|
export function useLink(
|
||||||
|
to: LocationDescriptor,
|
||||||
|
): [Path, (e: MouseEvent) => void] {
|
||||||
|
const history = useHistory();
|
||||||
|
const path = useMemo(
|
||||||
|
() => (typeof to === "string" ? to : createPath(to)),
|
||||||
|
[to],
|
||||||
|
);
|
||||||
|
const onClick = useCallback(
|
||||||
|
(e: MouseEvent) => {
|
||||||
|
e.preventDefault();
|
||||||
|
history.push(to);
|
||||||
|
},
|
||||||
|
[history, to],
|
||||||
|
);
|
||||||
|
|
||||||
|
return [path, onClick];
|
||||||
|
}
|
||||||
|
|
||||||
|
type Props = Omit<
|
||||||
|
ComponentPropsWithoutRef<typeof CpdLink>,
|
||||||
|
"href" | "onClick"
|
||||||
|
> & { to: LocationDescriptor };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A version of Compound's link component that integrates with our router setup.
|
||||||
|
*/
|
||||||
|
export const Link = forwardRef<HTMLAnchorElement, Props>(function Link(
|
||||||
|
{ to, ...props },
|
||||||
|
ref,
|
||||||
|
) {
|
||||||
|
const [path, onClick] = useLink(to);
|
||||||
|
return <CpdLink ref={ref} {...props} href={path} onClick={onClick} />;
|
||||||
|
});
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022 New Vector Ltd
|
Copyright 2024 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -14,45 +14,24 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FC, HTMLAttributes } from "react";
|
import { ComponentPropsWithoutRef, forwardRef } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Button } from "@vector-im/compound-web";
|
||||||
import classNames from "classnames";
|
import { LocationDescriptor } from "history";
|
||||||
import * as H from "history";
|
|
||||||
|
|
||||||
import {
|
import { useLink } from "./Link";
|
||||||
variantToClassName,
|
|
||||||
sizeToClassName,
|
|
||||||
ButtonVariant,
|
|
||||||
ButtonSize,
|
|
||||||
} from "./Button";
|
|
||||||
|
|
||||||
interface Props extends HTMLAttributes<HTMLAnchorElement> {
|
type Props = Omit<
|
||||||
children: JSX.Element | string;
|
ComponentPropsWithoutRef<typeof Button<"a">>,
|
||||||
to: H.LocationDescriptor | ((location: H.Location) => H.LocationDescriptor);
|
"as" | "href"
|
||||||
size?: ButtonSize;
|
> & { to: LocationDescriptor };
|
||||||
variant?: ButtonVariant;
|
|
||||||
className?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const LinkButton: FC<Props> = ({
|
/**
|
||||||
children,
|
* A version of Compound's button component that acts as a link and integrates
|
||||||
to,
|
* with our router setup.
|
||||||
size,
|
*/
|
||||||
variant,
|
export const LinkButton = forwardRef<HTMLAnchorElement, Props>(
|
||||||
className,
|
function LinkButton({ to, ...props }, ref) {
|
||||||
...rest
|
const [path, onClick] = useLink(to);
|
||||||
}) => {
|
return <Button as="a" ref={ref} {...props} href={path} onClick={onClick} />;
|
||||||
return (
|
},
|
||||||
<Link
|
);
|
||||||
className={classNames(
|
|
||||||
variantToClassName[variant || "secondary"],
|
|
||||||
size ? sizeToClassName[size] : [],
|
|
||||||
className,
|
|
||||||
)}
|
|
||||||
to={to}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user