diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 57e594e..f9793f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,3 +18,7 @@ jobs: run: "yarn install" - name: Jest run: "yarn run test" + - name: Upload to codecov + uses: codecov/codecov-action@v3 + with: + flags: unittests diff --git a/.gitignore b/.gitignore index 263dea0..6ad79d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ dist-ssr .idea/ public/config.json /coverage +yarn-error.log diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx index 9fda6df..928e10e 100644 --- a/.storybook/preview.jsx +++ b/.storybook/preview.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { addDecorator } from "@storybook/react"; import { MemoryRouter } from "react-router-dom"; import { usePageFocusStyle } from "../src/usePageFocusStyle"; diff --git a/babel.config.cjs b/babel.config.cjs index f7ff0ee..1a472c4 100644 --- a/babel.config.cjs +++ b/babel.config.cjs @@ -8,7 +8,12 @@ module.exports = { }, }, ], - "@babel/preset-react", + [ + "@babel/preset-react", + { + runtime: "automatic", + }, + ], "@babel/preset-typescript", ], plugins: ["babel-plugin-transform-vite-meta-env"], diff --git a/package.json b/package.json index f600b0f..183bdfb 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@types/grecaptcha": "^3.0.4", "@types/sdp-transform": "^2.4.5", "@use-gesture/react": "^10.2.11", + "@vitejs/plugin-react": "^4.0.1", "classnames": "^2.3.1", "color-hash": "^2.0.1", "events": "^3.3.0", @@ -105,9 +106,9 @@ "storybook-builder-vite": "^0.1.12", "typescript": "^4.9.5", "typescript-strict-plugin": "^2.0.1", - "vite": "^2.4.2", + "vite": "^4.2.0", "vite-plugin-html-template": "^1.1.0", - "vite-plugin-svgr": "^0.4.0" + "vite-plugin-svgr": "^3.2.0" }, "jest": { "testEnvironment": "jsdom", @@ -119,9 +120,15 @@ "/node_modules/(?!internmap)+$" ], "moduleNameMapper": { - "\\.(css|less|svg)+$": "identity-obj-proxy", + "\\.css$": "identity-obj-proxy", + "\\.svg$": "/test/mocks/svgr.ts", "^\\./IndexedDBWorker\\?worker$": "/test/mocks/workerMock.ts", "^\\./olm$": "/test/mocks/olmMock.ts" - } + }, + "collectCoverage": true, + "coverageReporters": [ + "text", + "cobertura" + ] } } diff --git a/public/locales/bg/app.json b/public/locales/bg/app.json index 0aea00e..4cf4665 100644 --- a/public/locales/bg/app.json +++ b/public/locales/bg/app.json @@ -53,7 +53,6 @@ "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Други потребители се опитват да се присъединят в разговора от несъвместими версии. Следните потребители трябва да проверят дали са презаредили браузърите си<1>{userLis}", "Password": "Парола", "Passwords must match": "Паролите не съвпадат", - "Press and hold to talk over {{name}}": "Натиснете и задръжте за да говорите заедно с {{name}}", "Profile": "Профил", "Recaptcha dismissed": "Recaptcha отхвърлена", "Recaptcha not loaded": "Recaptcha не е заредена", diff --git a/public/locales/cs/app.json b/public/locales/cs/app.json index 91f1c36..40bcd5a 100644 --- a/public/locales/cs/app.json +++ b/public/locales/cs/app.json @@ -62,7 +62,6 @@ "Inspector": "Insepktor", "Incompatible versions!": "Nekompatibilní verze!", "Incompatible versions": "Nekompatibilní verze", - "{{count}} people connected|other": "{{count}} lidí připojeno", "This site is protected by ReCAPTCHA and the Google <2>Privacy Policy and <6>Terms of Service apply.<9>By clicking \"Register\", you agree to our <12>Terms and conditions": "Tato stárnka je chráněna pomocí ReCAPTCHA a Google <2>zásad ochrany osobních údajů a <6>podmínky služby platí.<9>Kliknutím na \"Registrovat\", souhlasíte s <12>Pravidly a podmínkami", "Walkie-talkie call name": "Jméno vysílačkového hovoru", "Walkie-talkie call": "Vysílačkový hovor", diff --git a/public/locales/de/app.json b/public/locales/de/app.json index c7eb44e..516ad79 100644 --- a/public/locales/de/app.json +++ b/public/locales/de/app.json @@ -52,7 +52,6 @@ "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Andere Benutzer versuchen, diesem Aufruf von einer inkompatiblen Softwareversion aus beizutreten. Diese Benutzer sollten ihre Web-Browser Seite neu laden:<1>{userLis}", "Password": "Passwort", "Passwords must match": "Passwörter müssen übereinstimmen", - "Press and hold to talk over {{name}}": "Zum Verdrängen von {{name}} und Sprechen gedrückt halten", "Profile": "Profil", "Recaptcha dismissed": "Recaptcha abgelehnt", "Recaptcha not loaded": "Recaptcha nicht geladen", @@ -114,5 +113,7 @@ "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Wir würden uns freuen, deine Rückmeldung zu hören, um deine Erfahrung verbessern zu können.", "How did it go?": "Wie ist es gelaufen?", "{{count}} stars|one": "{{count}} Stern", - "<0>Thanks for your feedback!": "<0>Danke für deine Rückmeldung!" + "<0>Thanks for your feedback!": "<0>Danke für deine Rückmeldung!", + "{{displayName}} is presenting": "{{displayName}} präsentiert", + "Show connection stats": "Verbindungsstatistiken zeigen" } diff --git a/public/locales/el/app.json b/public/locales/el/app.json index 79157df..d61ba14 100644 --- a/public/locales/el/app.json +++ b/public/locales/el/app.json @@ -71,6 +71,5 @@ "Close": "Κλείσιμο", "Change layout": "Αλλαγή διάταξης", "Camera": "Κάμερα", - "Audio": "Ήχος", - "{{name}} (Connecting...)": "{{name}} (Συνδέεται...)" + "Audio": "Ήχος" } diff --git a/public/locales/es/app.json b/public/locales/es/app.json index 318ece5..facea46 100644 --- a/public/locales/es/app.json +++ b/public/locales/es/app.json @@ -94,7 +94,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>Crear una cuenta o <2>Acceder como invitado", "<0>Join call now<1>Or<2>Copy call link and join later": "<0>Unirse ahora<1>Or<2>Copiar el enlace y unirse más tarde", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>¿Ya tienes una cuenta?<1><0>Iniciar sesión o <2>Acceder como invitado", - "{{name}} (Connecting...)": "{{name}} (Conectando...)", "Element Call Home": "Inicio de Element Call", "Copy": "Copiar", "<0>Submitting debug logs will help us track down the problem.": "<0>Subir los registros de depuración nos ayudará a encontrar el problema.", diff --git a/public/locales/et/app.json b/public/locales/et/app.json index 2b5fcbf..8c6a4af 100644 --- a/public/locales/et/app.json +++ b/public/locales/et/app.json @@ -4,7 +4,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>Loo konto Või <2>Sisene külalisena", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>On sul juba konto?<1><0>Logi sisse Või <2>Logi sisse külalisena", "{{names}}, {{name}}": "{{names}}, {{name}}", - "{{count}} people connected|other": "{{count}} osalejat liitunud", "Invite people": "Kutsu inimesi", "Invite": "Kutsu", "Inspector": "Inspektor", @@ -114,5 +113,7 @@ "How did it go?": "Kuidas sujus?", "{{displayName}}, your call has ended.": "{{displayName}}, sinu kõne on lõppenud.", "<0>Thanks for your feedback!": "<0>Täname Sind tagasiside eest!", - "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Meie rakenduse paremaks muutmiseks me hea meelega ootame Sinu arvamusi." + "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Meie rakenduse paremaks muutmiseks me hea meelega ootame Sinu arvamusi.", + "Show connection stats": "Näita ühenduse statistikat", + "{{displayName}} is presenting": "{{displayName}} on esitlemas" } diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json index 9006512..0877ab7 100644 --- a/public/locales/fa/app.json +++ b/public/locales/fa/app.json @@ -54,7 +54,6 @@ "<0>Why not finish by setting up a password to keep your account?<1>You'll be able to keep your name and set an avatar for use on future calls": "<0>چرا یک رمز عبور برای حساب کاربری خود تنظیم نمی‌کنید؟<1>شما می‌توانید نام خود را حفظ کنید و یک آواتار برای تماس‌های آینده بسازید", "<0>Create an account Or <2>Access as a guest": "<0>ساخت حساب کاربری Or <2>دسترسی به عنوان میهمان", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>از قبل حساب کاربری دارید؟<1><0>ورود Or <2>به عنوان یک میهمان وارد شوید", - "{{count}} people connected|other": "{{count}} نفر متصل هستند", "Local volume": "حجم داخلی", "Inspector": "بازرس", "Incompatible versions!": "نسخه‌های ناسازگار!", @@ -72,7 +71,6 @@ "Register": "ثبت‌نام", "Recaptcha not loaded": "کپچا بارگیری نشد", "Recaptcha dismissed": "ریکپچا رد شد", - "Press and hold spacebar to talk": "برای صحبت کردن کلید فاصله را فشار داده و نگه دارید", "Passwords must match": "رمز عبور باید همخوانی داشته باشد", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "کاربران دیگر تلاش می‌کنند با ورژن‌های ناسازگار به مکالمه بپیوندند. این کاربران باید از بروزرسانی مرورگرشان اطمینان داشته باشند:<1>{userLis}", "Not registered yet? <2>Create an account": "هنوز ثبت‌نام نکرده‌اید؟ <2>ساخت حساب کاربری", diff --git a/public/locales/fr/app.json b/public/locales/fr/app.json index 91b3ba7..837c677 100644 --- a/public/locales/fr/app.json +++ b/public/locales/fr/app.json @@ -50,7 +50,6 @@ "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Des utilisateurs essayent de rejoindre cet appel à partir de versions incompatibles. Ces utilisateurs doivent rafraîchir la page dans leur navigateur : <1>{userLis}", "Password": "Mot de passe", "Passwords must match": "Les mots de passe doivent correspondre", - "Press and hold to talk over {{name}}": "Appuyez et maintenez enfoncé pour parler par dessus {{name}}", "Profile": "Profil", "Recaptcha dismissed": "Recaptcha refusé", "Recaptcha not loaded": "Recaptcha non chargé", @@ -114,5 +113,7 @@ "{{count}} stars|one": "{{count}} favori", "{{displayName}}, your call has ended.": "{{displayName}}, votre appel est terminé.", "<0>Thanks for your feedback!": "<0>Merci pour votre commentaire !", - "How did it go?": "Comment cela s’est-il passé ?" + "How did it go?": "Comment cela s’est-il passé ?", + "{{displayName}} is presenting": "{{displayName}} est à l’écran", + "Show connection stats": "Afficher les statistiques de la connexion" } diff --git a/public/locales/id/app.json b/public/locales/id/app.json index 9d891b3..1388dae 100644 --- a/public/locales/id/app.json +++ b/public/locales/id/app.json @@ -53,7 +53,6 @@ "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Pengguna lain sedang mencoba bergabung ke panggilan ini dari versi yang tidak kompatibel. Pengguna berikut seharusnya memastikan bahwa mereka telah memuat ulang peramban mereka: <1>{userLis}", "Password": "Kata sandi", "Passwords must match": "Kata sandi harus cocok", - "Press and hold to talk over {{name}}": "Tekan dan tahan untuk berbicara pada {{name}}", "Profile": "Profil", "Recaptcha dismissed": "Recaptcha ditutup", "Recaptcha not loaded": "Recaptcha tidak dimuat", @@ -113,5 +112,8 @@ "<0>Thanks for your feedback!": "<0>Terima kasih atas masukan Anda!", "How did it go?": "Bagaimana rasanya?", "{{count}} stars|one": "{{count}} bintang", - "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Kami ingin mendengar masukan Anda supaya kami bisa meningkatkan pengalaman Anda." + "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Kami ingin mendengar masukan Anda supaya kami bisa meningkatkan pengalaman Anda.", + "Show connection stats": "Tampilkan statistik koneksi", + "{{displayName}} is presenting": "{{displayName}} sedang menampilkan", + "{{count}} stars|other": "{{count}} bintang" } diff --git a/public/locales/ja/app.json b/public/locales/ja/app.json index 0687914..9aac334 100644 --- a/public/locales/ja/app.json +++ b/public/locales/ja/app.json @@ -1,5 +1,4 @@ { - "{{name}} (Waiting for video...)": "{{name}}(ビデオを待機しています…)", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>既にアカウントをお持ちですか?<1><0>ログインまたは<2>ゲストとしてアクセス", "<0>Create an account Or <2>Access as a guest": "<0>アカウントを作成または<2>ゲストとしてアクセス", "<0>Join call now<1>Or<2>Copy call link and join later": "<0>今すぐ通話に参加<1>または<2>通話リンクをコピーし、後で参加", diff --git a/public/locales/pl/app.json b/public/locales/pl/app.json index c8ae0a8..3e2b1d4 100644 --- a/public/locales/pl/app.json +++ b/public/locales/pl/app.json @@ -40,7 +40,6 @@ "Recaptcha not loaded": "Recaptcha nie została załadowana", "Recaptcha dismissed": "Recaptcha odrzucona", "Profile": "Profil", - "Press and hold spacebar to talk": "Przytrzymaj spację, aby mówić", "Passwords must match": "Hasła muszą pasować", "Password": "Hasło", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Inni użytkownicy próbują dołączyć do tego połączenia przy użyciu niekompatybilnych wersji. Powinni oni upewnić się, że odświeżyli stronę w swoich przeglądarkach:<1>{userLis}", @@ -93,7 +92,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>Utwórz konto lub <2>Dołącz jako gość", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>Masz już konto?<1><0>Zaloguj się lub <2>Dołącz jako gość", "{{names}}, {{name}}": "{{names}}, {{name}}", - "This feature is only supported on Firefox.": "Ta funkcjonalność jest dostępna tylko w Firefox.", "Copy": "Kopiuj", "<0>Submitting debug logs will help us track down the problem.": "<0>Wysłanie dzienników debuggowania pomoże nam ustalić przyczynę problemu.", "<0>Oops, something's gone wrong.": "<0>Ojej, coś poszło nie tak.", diff --git a/public/locales/ru/app.json b/public/locales/ru/app.json index 3041cce..5d20cb6 100644 --- a/public/locales/ru/app.json +++ b/public/locales/ru/app.json @@ -10,7 +10,6 @@ "Submit feedback": "Отправить отзыв", "Sending debug logs…": "Отправка журнала отладки…", "Select an option": "Выберите вариант", - "Press and hold spacebar to talk over {{name}}": "Чтобы говорить поверх участника {{name}}, нажмите и удерживайте [Пробел]", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Другие пользователи пытаются присоединиться с неподдерживаемых версий программы. Этим участникам надо перезагрузить браузер: <1>{userLis}", "Grid layout menu": "Меню \"Расположение сеткой\"", "By clicking \"Join call now\", you agree to our <2>Terms and conditions": "Нажимая \"Присоединиться сейчас\", вы соглашаетесь с нашими <2>положениями и условиями", @@ -94,7 +93,6 @@ "Call link copied": "Ссылка на звонок скопирована", "Avatar": "Аватар", "Audio": "Аудио", - "{{name}} is presenting": "{{name}} показывает", "Element Call Home": "Главная Element Call", "Copy": "Копировать", "<0>Join call now<1>Or<2>Copy call link and join later": "<0>Присоединиться сейчас к звонку<1>или<1><2>Скопировать ссылку на звонок и присоединиться позже", diff --git a/public/locales/sk/app.json b/public/locales/sk/app.json index bae6aac..57b0e26 100644 --- a/public/locales/sk/app.json +++ b/public/locales/sk/app.json @@ -22,7 +22,6 @@ "Recaptcha not loaded": "Recaptcha sa nenačítala", "Recaptcha dismissed": "Recaptcha zamietnutá", "Profile": "Profil", - "Press and hold spacebar to talk": "Stlačte a podržte medzerník, ak chcete hovoriť", "Passwords must match": "Heslá sa musia zhodovať", "Password": "Heslo", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Ostatní používatelia sa pokúšajú pripojiť k tomuto hovoru z nekompatibilných verzií. Títo používatelia by sa mali uistiť, že si obnovili svoje prehliadače:<1>{userLis}", @@ -97,7 +96,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>Vytvoriť konto Alebo <2>Prihlásiť sa ako hosť", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>Už máte konto?<1><0>Prihláste sa Alebo <2>Prihlásiť sa ako hosť", "{{names}}, {{name}}": "{{names}}, {{name}}", - "{{name}} (Connecting...)": "{{name}} (Pripájanie...)", "<0>Submitting debug logs will help us track down the problem.": "<0>Odoslanie záznamov ladenia nám pomôže nájsť problém.", "<0>Oops, something's gone wrong.": "<0>Hups, niečo sa pokazilo.", "Expose developer settings in the settings window.": "Zobraziť nastavenia pre vývojárov v okne nastavení.", @@ -115,5 +113,7 @@ "{{count}} stars|other": "{{count}} hviezdičiek", "{{displayName}}, your call has ended.": "{{displayName}}, váš hovor skončil.", "<0>Thanks for your feedback!": "<0> Ďakujeme za vašu spätnú väzbu!", - "<0>We'd love to hear your feedback so we can improve your experience.": "<0> Radi si vypočujeme vašu spätnú väzbu, aby sme mohli zlepšiť vaše skúsenosti." + "<0>We'd love to hear your feedback so we can improve your experience.": "<0> Radi si vypočujeme vašu spätnú väzbu, aby sme mohli zlepšiť vaše skúsenosti.", + "{{displayName}} is presenting": "{{displayName}} prezentuje", + "Show connection stats": "Zobraziť štatistiky pripojenia" } diff --git a/public/locales/uk/app.json b/public/locales/uk/app.json index 8e3a578..6e5ab0c 100644 --- a/public/locales/uk/app.json +++ b/public/locales/uk/app.json @@ -39,7 +39,6 @@ "Recaptcha not loaded": "Recaptcha не завантажено", "Recaptcha dismissed": "Recaptcha не пройдено", "Profile": "Профіль", - "Press and hold spacebar to talk": "Затисніть пробіл, щоб говорити", "Passwords must match": "Паролі відрізняються", "Password": "Пароль", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "Інші користувачі намагаються приєднатися до цього виклику з несумісних версій. Ці користувачі повинні переконатися, що вони оновили сторінки своїх браузерів:<1>{userLis}", @@ -94,7 +93,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>Створити обліковий запис або <2>Отримати доступ як гість", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>Уже маєте обліковий запис?<1><0>Увійти Or <2>Отримати доступ як гість", "{{names}}, {{name}}": "{{names}}, {{name}}", - "{{count}} people connected|one": "{{count}} під'єднується", "<0>Join call now<1>Or<2>Copy call link and join later": "<0>Приєднатися до виклику зараз<1>Or<2>Скопіювати посилання на виклик і приєднатися пізніше", "Element Call Home": "Домівка Element Call", "Copy": "Копіювати", @@ -115,5 +113,7 @@ "{{count}} stars|other": "{{count}} зірок", "{{displayName}}, your call has ended.": "{{displayName}}, ваш виклик завершено.", "<0>We'd love to hear your feedback so we can improve your experience.": "<0>Ми будемо раді почути ваші відгуки, щоб поліпшити роботу застосунку.", - "How did it go?": "Вам усе сподобалось?" + "How did it go?": "Вам усе сподобалось?", + "{{displayName}} is presenting": "{{displayName}} представляє", + "Show connection stats": "Показати стан з'єднання" } diff --git a/public/locales/zh-Hans/app.json b/public/locales/zh-Hans/app.json index 46f6a9a..a7126f8 100644 --- a/public/locales/zh-Hans/app.json +++ b/public/locales/zh-Hans/app.json @@ -31,7 +31,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>创建账户 Or <2>以访客身份继续", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>已有账户?<1><0>登录 Or <2>以访客身份继续", "{{names}}, {{name}}": "{{names}}, {{name}}", - "{{name}} (Connecting...)": "{{name}} (正在连接……)", "Inspector": "检查器", "Show call inspector": "显示通话检查器", "Share screen": "屏幕共享", @@ -47,7 +46,6 @@ "Recaptcha not loaded": "reCaptcha未加载", "Recaptcha dismissed": "reCaptcha验证失败", "Profile": "个人信息", - "Press and hold spacebar to talk": "按住空格键发言", "Passwords must match": "密码必须匹配", "Password": "密码", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "其他用户正试图从不兼容的版本加入这一呼叫。这些用户应该确保已经刷新了浏览器:<1>{userLis}", diff --git a/public/locales/zh-Hant/app.json b/public/locales/zh-Hant/app.json index 5ac0980..b507a75 100644 --- a/public/locales/zh-Hant/app.json +++ b/public/locales/zh-Hant/app.json @@ -3,7 +3,6 @@ "<0>Create an account Or <2>Access as a guest": "<0>建立帳號 或<2>以訪客身份登入", "<0>Already have an account?<1><0>Log in Or <2>Access as a guest": "<0>已經有帳號?<1><0>登入 或<2>以訪客身份登入", "{{names}}, {{name}}": "{{names}}, {{name}}", - "{{name}} (Connecting...)": "{{name}} (連結中...)", "Expose developer settings in the settings window.": "在設定視窗中顯示開發者設定。", "Developer Settings": "開發者設定", "<0>Submitting debug logs will help us track down the problem.": "<0>送出除錯紀錄,可幫助我們修正問題。", @@ -47,7 +46,6 @@ "Recaptcha not loaded": "驗證碼未載入", "Recaptcha dismissed": "略過驗證碼", "Profile": "個人檔案", - "Press and hold spacebar to talk": "說話時請按住空白鍵", "Passwords must match": "密碼必須相符", "Password": "密碼", "Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}": "有使用者試著加入通話,但他們的軟體版本不相容。這些使用者需要確認已將瀏覽器更新到最新版本:<1>{userLis}", @@ -115,5 +113,7 @@ "<0>We'd love to hear your feedback so we can improve your experience.": "<0>我們想要聽到您的回饋,如此我們才能改善您的體驗。", "{{count}} stars|one": "{{count}} 個星星", "{{displayName}}, your call has ended.": "{{displayName}},您的通話已結束。", - "How did it go?": "進展如何?" + "How did it go?": "進展如何?", + "{{displayName}} is presenting": "{{displayName}} 正在展示", + "Show connection stats": "顯示連線統計資料" } diff --git a/src/App.tsx b/src/App.tsx index f859a19..d020655 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Suspense, useEffect, useState } from "react"; +import { Suspense, useEffect, useState } from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; import * as Sentry from "@sentry/react"; import { OverlayProvider } from "@react-aria/overlays"; diff --git a/src/Avatar.tsx b/src/Avatar.tsx index a6d151f..9549cd4 100644 --- a/src/Avatar.tsx +++ b/src/Avatar.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useMemo, CSSProperties } from "react"; +import { useMemo, CSSProperties, HTMLAttributes, FC } from "react"; import classNames from "classnames"; import { MatrixClient } from "matrix-js-sdk/src/client"; @@ -62,7 +62,7 @@ function hashStringToArrIndex(str: string, arrLength: number) { const resolveAvatarSrc = (client: MatrixClient, src: string, size: number) => src?.startsWith("mxc://") ? client && getAvatarUrl(client, src, size) : src; -interface Props extends React.HTMLAttributes { +interface Props extends HTMLAttributes { bgKey?: string; src?: string; size?: Size | number; @@ -71,7 +71,7 @@ interface Props extends React.HTMLAttributes { fallback: string; } -export const Avatar: React.FC = ({ +export const Avatar: FC = ({ bgKey, src, fallback, diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index acd9511..9de2ab4 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { +import { FC, useCallback, useEffect, diff --git a/src/Facepile.tsx b/src/Facepile.tsx index 79e2788..f5ffff6 100644 --- a/src/Facepile.tsx +++ b/src/Facepile.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { HTMLAttributes, useMemo } from "react"; +import { HTMLAttributes, useMemo } from "react"; import classNames from "classnames"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; diff --git a/src/FullScreenView.tsx b/src/FullScreenView.tsx index 774e55a..95a8a7a 100644 --- a/src/FullScreenView.tsx +++ b/src/FullScreenView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { ReactNode, useCallback, useEffect } from "react"; +import { ReactNode, useCallback, useEffect } from "react"; import { useLocation } from "react-router-dom"; import classNames from "classnames"; import { Trans, useTranslation } from "react-i18next"; diff --git a/src/Header.stories.jsx b/src/Header.stories.jsx index 2ab1696..e5c4473 100644 --- a/src/Header.stories.jsx +++ b/src/Header.stories.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { GridLayoutMenu } from "./room/GridLayoutMenu"; import { Header, diff --git a/src/Header.tsx b/src/Header.tsx index c79953c..8d754b9 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import classNames from "classnames"; -import React, { HTMLAttributes, ReactNode, useCallback } from "react"; +import { HTMLAttributes, ReactNode, useCallback } from "react"; import { Link } from "react-router-dom"; import { Room } from "matrix-js-sdk/src/models/room"; import { useTranslation } from "react-i18next"; @@ -24,9 +24,7 @@ import styles from "./Header.module.css"; import { useModalTriggerState } from "./Modal"; import { Button } from "./button"; import { ReactComponent as Logo } from "./icons/Logo.svg"; -import { ReactComponent as VideoIcon } from "./icons/Video.svg"; import { Subtitle } from "./typography/Typography"; -import { Avatar, Size } from "./Avatar"; import { IncompatibleVersionModal } from "./IncompatibleVersionModal"; interface HeaderProps extends HTMLAttributes { @@ -116,21 +114,11 @@ export function HeaderLogo({ className }: HeaderLogoProps) { interface RoomHeaderInfo { roomName: string; - avatarUrl: string | null; } -export function RoomHeaderInfo({ roomName, avatarUrl }: RoomHeaderInfo) { +export function RoomHeaderInfo({ roomName }: RoomHeaderInfo) { return ( <> -
- - -
{roomName} diff --git a/src/IncompatibleVersionModal.tsx b/src/IncompatibleVersionModal.tsx index 49c9044..d11822d 100644 --- a/src/IncompatibleVersionModal.tsx +++ b/src/IncompatibleVersionModal.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import { Room } from "matrix-js-sdk/src/models/room"; -import React, { useMemo } from "react"; +import { FC, useMemo } from "react"; import { Trans, useTranslation } from "react-i18next"; import { Modal, ModalContent } from "./Modal"; @@ -27,7 +27,7 @@ interface Props { onClose: () => void; } -export const IncompatibleVersionModal: React.FC = ({ +export const IncompatibleVersionModal: FC = ({ userIds, room, onClose, diff --git a/src/ListBox.tsx b/src/ListBox.tsx index 121f367..0ee2542 100644 --- a/src/ListBox.tsx +++ b/src/ListBox.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useCallback, useRef } from "react"; +import { MutableRefObject, PointerEvent, useCallback, useRef } from "react"; import { useListBox, useOption, AriaListBoxOptions } from "@react-aria/listbox"; import { ListState } from "@react-stately/list"; import { Node } from "@react-types/shared"; @@ -26,7 +26,7 @@ interface ListBoxProps extends AriaListBoxOptions { optionClassName: string; state: ListState; className?: string; - listBoxRef?: React.MutableRefObject; + listBoxRef?: MutableRefObject; } export function ListBox({ @@ -84,7 +84,7 @@ function Option({ item, state, className }: OptionProps) { delete optionProps.onPointerUp; optionProps.onClick = useCallback( (e) => { - origPointerUp(e as unknown as React.PointerEvent); + origPointerUp(e as unknown as PointerEvent); }, [origPointerUp] ); diff --git a/src/Menu.tsx b/src/Menu.tsx index 0a995af..1e15841 100644 --- a/src/Menu.tsx +++ b/src/Menu.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Key, useRef, useState } from "react"; +import { Key, 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"; diff --git a/src/Modal.tsx b/src/Modal.tsx index 6c24f0a..0721753 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -16,7 +16,7 @@ limitations under the License. /* eslint-disable jsx-a11y/no-autofocus */ -import React, { useRef, useMemo, ReactNode } from "react"; +import { useRef, useMemo, ReactNode } from "react"; import { useOverlay, usePreventScroll, diff --git a/src/SequenceDiagramViewerPage.tsx b/src/SequenceDiagramViewerPage.tsx index e04837d..208352f 100644 --- a/src/SequenceDiagramViewerPage.tsx +++ b/src/SequenceDiagramViewerPage.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useCallback, useState } from "react"; +import { useCallback, useState } from "react"; import { useTranslation } from "react-i18next"; import { diff --git a/src/Tooltip.tsx b/src/Tooltip.tsx index c2f64f2..e090633 100644 --- a/src/Tooltip.tsx +++ b/src/Tooltip.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { +import { ForwardedRef, forwardRef, ReactElement, diff --git a/src/UserMenu.tsx b/src/UserMenu.tsx index afb4248..5648edd 100644 --- a/src/UserMenu.tsx +++ b/src/UserMenu.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useCallback, useMemo } from "react"; +import { useCallback, useMemo } from "react"; import { Item } from "@react-stately/collections"; import { useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; diff --git a/src/UserMenuContainer.tsx b/src/UserMenuContainer.tsx index 0a116d9..4702c4f 100644 --- a/src/UserMenuContainer.tsx +++ b/src/UserMenuContainer.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useCallback, useState } from "react"; +import { useCallback, useState } from "react"; import { useHistory, useLocation } from "react-router-dom"; import { useClient } from "./ClientContext"; diff --git a/src/analytics/AnalyticsNotice.tsx b/src/analytics/AnalyticsNotice.tsx index feceef7..544de61 100644 --- a/src/analytics/AnalyticsNotice.tsx +++ b/src/analytics/AnalyticsNotice.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import { FC } from "react"; import { Trans } from "react-i18next"; import { Link } from "../typography/Typography"; diff --git a/src/auth/LoginPage.tsx b/src/auth/LoginPage.tsx index 68cd326..c5a090f 100644 --- a/src/auth/LoginPage.tsx +++ b/src/auth/LoginPage.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { FC, FormEvent, useCallback, useRef, useState } from "react"; +import { FC, FormEvent, useCallback, useRef, useState } from "react"; import { useHistory, useLocation, Link } from "react-router-dom"; import { Trans, useTranslation } from "react-i18next"; diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index 5eec26d..fd8e3f0 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { +import { ChangeEvent, FC, FormEvent, diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 289f2b9..50184f0 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -13,7 +13,7 @@ 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 React, { forwardRef, useCallback } from "react"; +import { forwardRef, useCallback } from "react"; import { PressEvent } from "@react-types/shared"; import classNames from "classnames"; import { useButton } from "@react-aria/button"; diff --git a/src/button/CopyButton.tsx b/src/button/CopyButton.tsx index 7453e45..91c8e75 100644 --- a/src/button/CopyButton.tsx +++ b/src/button/CopyButton.tsx @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; import { useTranslation } from "react-i18next"; import useClipboard from "react-use-clipboard"; diff --git a/src/button/LinkButton.tsx b/src/button/LinkButton.tsx index e918965..3f3b1d5 100644 --- a/src/button/LinkButton.tsx +++ b/src/button/LinkButton.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { HTMLAttributes } from "react"; +import { HTMLAttributes } from "react"; import { Link } from "react-router-dom"; import classNames from "classnames"; import * as H from "history"; diff --git a/src/button/VolumeIcon.tsx b/src/button/VolumeIcon.tsx index d4958e4..163699f 100644 --- a/src/button/VolumeIcon.tsx +++ b/src/button/VolumeIcon.tsx @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; - import { ReactComponent as AudioMuted } from "../icons/AudioMuted.svg"; import { ReactComponent as AudioLow } from "../icons/AudioLow.svg"; import { ReactComponent as Audio } from "../icons/Audio.svg"; diff --git a/src/form/Form.tsx b/src/form/Form.tsx index fd98a62..5496179 100644 --- a/src/form/Form.tsx +++ b/src/form/Form.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import classNames from "classnames"; -import React, { FormEventHandler, forwardRef, ReactNode } from "react"; +import { FormEventHandler, forwardRef, ReactNode } from "react"; import styles from "./Form.module.css"; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index b2a7774..545dfad 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; import { Link } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; diff --git a/src/home/CallTypeDropdown.tsx b/src/home/CallTypeDropdown.tsx index 991c528..712523d 100644 --- a/src/home/CallTypeDropdown.tsx +++ b/src/home/CallTypeDropdown.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { FC } from "react"; +import { FC } from "react"; import { Item } from "@react-stately/collections"; import { useTranslation } from "react-i18next"; diff --git a/src/home/HomePage.tsx b/src/home/HomePage.tsx index 7ff6efc..4c5522d 100644 --- a/src/home/HomePage.tsx +++ b/src/home/HomePage.tsx @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; import { useTranslation } from "react-i18next"; import { useClient } from "../ClientContext"; diff --git a/src/home/JoinExistingCallModal.tsx b/src/home/JoinExistingCallModal.tsx index 078d317..dfa6b09 100644 --- a/src/home/JoinExistingCallModal.tsx +++ b/src/home/JoinExistingCallModal.tsx @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; import { PressEvent } from "@react-types/shared"; import { useTranslation } from "react-i18next"; diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 41559d6..ee696d2 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -14,12 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { - useState, - useCallback, - FormEvent, - FormEventHandler, -} from "react"; +import { useState, useCallback, FormEvent, FormEventHandler } from "react"; import { useHistory } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { useTranslation } from "react-i18next"; diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 44f16ad..1fb1a84 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { FC, useCallback, useState, FormEventHandler } from "react"; +import { FC, useCallback, useState, FormEventHandler } from "react"; import { useHistory } from "react-router-dom"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { Trans, useTranslation } from "react-i18next"; diff --git a/src/input/AvatarInputField.tsx b/src/input/AvatarInputField.tsx index aec4880..9280fad 100644 --- a/src/input/AvatarInputField.tsx +++ b/src/input/AvatarInputField.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import { useObjectRef } from "@react-aria/utils"; -import React, { AllHTMLAttributes, useEffect } from "react"; +import { AllHTMLAttributes, ChangeEvent, useEffect } from "react"; import { useCallback } from "react"; import { useState } from "react"; import { forwardRef } from "react"; @@ -51,7 +51,7 @@ export const AvatarInputField = forwardRef( const currentInput = fileInputRef.current; const onChange = (e: Event) => { - const inputEvent = e as unknown as React.ChangeEvent; + const inputEvent = e as unknown as ChangeEvent; if (inputEvent.target.files.length > 0) { setObjUrl(URL.createObjectURL(inputEvent.target.files[0])); setRemoved(false); diff --git a/src/input/Input.tsx b/src/input/Input.tsx index 3548d5b..a983f71 100644 --- a/src/input/Input.tsx +++ b/src/input/Input.tsx @@ -14,7 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { ChangeEvent, FC, forwardRef, ReactNode, useId } from "react"; +import { + ChangeEvent, + FC, + ForwardedRef, + forwardRef, + ReactNode, + useId, +} from "react"; import classNames from "classnames"; import styles from "./Input.module.css"; @@ -114,7 +121,7 @@ export const InputField = forwardRef< {type === "textarea" ? (