From 364fdb5e543b2ab4666e31598f549925aa665ef5 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 13 Apr 2026 15:43:39 +0200 Subject: [PATCH] Get rid of the 'open in app' mobile prompt We've determined that calls are working fine in mobile browsers these days and we no longer need it. --- docs/url-params.md | 1 - locales/cs/app.json | 6 -- locales/da/app.json | 6 -- locales/de/app.json | 6 -- locales/el/app.json | 6 -- locales/en/app.json | 6 -- locales/es/app.json | 6 -- locales/et/app.json | 6 -- locales/fi/app.json | 6 -- locales/fr/app.json | 6 -- locales/id/app.json | 6 -- locales/it/app.json | 6 -- locales/ja/app.json | 6 -- locales/lv/app.json | 6 -- locales/pl/app.json | 6 -- locales/ro/app.json | 6 -- locales/ru/app.json | 6 -- locales/sk/app.json | 6 -- locales/sv/app.json | 6 -- locales/tr/app.json | 6 -- locales/uk/app.json | 6 -- locales/zh-Hans/app.json | 6 -- locales/zh-Hant/app.json | 6 -- playwright/fixtures/fixture-mobile-create.ts | 3 - playwright/mobile/create-call-mobile.spec.ts | 6 -- src/UrlParams.test.ts | 3 - src/UrlParams.ts | 30 ------- src/config/ConfigOptions.ts | 10 --- src/room/AppSelectionModal.module.css | 24 ----- src/room/AppSelectionModal.tsx | 92 -------------------- src/room/RoomPage.tsx | 38 ++------ 31 files changed, 8 insertions(+), 331 deletions(-) delete mode 100644 src/room/AppSelectionModal.module.css delete mode 100644 src/room/AppSelectionModal.tsx diff --git a/docs/url-params.md b/docs/url-params.md index ac6f2f7a..a1e4793d 100644 --- a/docs/url-params.md +++ b/docs/url-params.md @@ -51,7 +51,6 @@ These parameters are relevant to both [widget](./embedded-standalone.md) and [st | `intent` | `start_call`, `join_existing`, `start_call_voice`, `join_existing_voice`, `start_call_dm`, `join_existing_dm`, `start_call_dm_voice`, or `join_existing_dm_voice`. | No, defaults to `start_call` | No, defaults to `start_call` | The intent is a special url parameter that defines the defaults for all the other parameters. In most cases it should be enough to only set the intent to setup element-call. | | `allowIceFallback` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Allows use of fallback STUN servers for ICE if the user's homeserver doesn’t provide any. | | `posthogUserId` | Posthog analytics ID | No | No | Available only with user's consent for sharing telemetry in Element Web. | -| `appPrompt` | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Prompts the user to launch the native mobile app upon entering a room, applicable only on Android and iOS, and must be enabled in config. | | `confineToRoom` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Keeps the user confined to the current call/room. | | `displayName` | | No | No | Display name used for auto-registration. | | `enableE2EE` (deprecated) | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Legacy flag to enable end-to-end encryption, not used in the `livekit` branch. | diff --git a/locales/cs/app.json b/locales/cs/app.json index f307bf6b..46e96bde 100644 --- a/locales/cs/app.json +++ b/locales/cs/app.json @@ -22,12 +22,6 @@ "upload_file": "Nahrát soubor" }, "analytics_notice": "Účastí v této beta verzi souhlasíte se shromažďováním anonymních údajů, které používáme ke zlepšování produktu. Více informací o tom, které údaje sledujeme, najdete v našich <2>Zásadách ochrany osobních údajů a <6>Zásadách používání souborů cookie.", - "app_selection_modal": { - "continue_in_browser": "Pokračovat v prohlížeči", - "open_in_app": "Otevřít v aplikaci", - "text": "Jste připraveni se připojit?", - "title": "Vybrat aplikaci" - }, "call_ended_view": { "create_account_button": "Vytvořit účet", "create_account_prompt": "<0>Proč neskončit nastavením hesla, abyste mohli účet použít znovu?<1>Budete si moci nechat své jméno a nastavit si avatar pro budoucí hovory ", diff --git a/locales/da/app.json b/locales/da/app.json index 7708551f..73d883cf 100644 --- a/locales/da/app.json +++ b/locales/da/app.json @@ -22,12 +22,6 @@ "upload_file": "Upload fil" }, "analytics_notice": "Ved at deltage i denne beta giver du samtykke til indsamling af anonyme data, som vi bruger til at forbedre produktet. Du kan finde flere oplysninger om, hvilke data vi sporer, i vores <2>fortrolighedspolitik og vores <6>cookiepolitik.", - "app_selection_modal": { - "continue_in_browser": "Fortsæt i browseren", - "open_in_app": "Åbn i appen", - "text": "Klar til at deltage?", - "title": "Vælg app" - }, "call_ended_view": { "create_account_button": "Opret konto", "create_account_prompt": "<0>Hvorfor ikke afslutte med at oprette en adgangskode for at beholde din konto? <1>Du kan beholde dit navn og indstille en avatar til brug ved fremtidige opkald ", diff --git a/locales/de/app.json b/locales/de/app.json index bb6328e7..95cc49a5 100644 --- a/locales/de/app.json +++ b/locales/de/app.json @@ -22,12 +22,6 @@ "upload_file": "Datei hochladen" }, "analytics_notice": "Mit der Teilnahme an der Beta akzeptierst du die Sammlung von anonymen Daten, die wir zur Verbesserung des Produkts verwenden. Weitere Informationen zu den von uns erhobenen Daten findest du in unserer <2>Datenschutzerklärung und unseren <6>Cookie-Richtlinien.", - "app_selection_modal": { - "continue_in_browser": "Weiter im Browser", - "open_in_app": "In der App öffnen", - "text": "Bereit, beizutreten?", - "title": "App auswählen" - }, "call_ended_view": { "create_account_button": "Konto erstellen", "create_account_prompt": "<0>Warum vergibst du nicht abschließend ein Passwort, um dein Konto zu erhalten?<1>Du kannst deinen Namen behalten und ein Profilbild für zukünftige Anrufe festlegen.", diff --git a/locales/el/app.json b/locales/el/app.json index 6eec5278..e85fbc9d 100644 --- a/locales/el/app.json +++ b/locales/el/app.json @@ -22,12 +22,6 @@ "upload_file": "Μεταφόρτωση αρχείου" }, "analytics_notice": "Συμμετέχοντας σε αυτή τη δοκιμαστική έκδοση, συναινείτε στη συλλογή ανώνυμων δεδομένων, τα οποία χρησιμοποιούμε για τη βελτίωση του προϊόντος. Μπορείτε να βρείτε περισσότερες πληροφορίες σχετικά με το ποια δεδομένα καταγράφουμε στην <2>Πολιτική απορρήτου και στην <6>Πολιτική cookies.", - "app_selection_modal": { - "continue_in_browser": "Συνέχεια στο πρόγραμμα περιήγησης", - "open_in_app": "Ανοίξτε στην εφαρμογή", - "text": "Έτοιμοι να συμμετάσχετε?", - "title": "Επιλέξτε εφαρμογή" - }, "call_ended_view": { "create_account_button": "Δημιουργία λογαριασμού", "create_account_prompt": "<0>Γιατί να μην ολοκληρώσετε με τη δημιουργία ενός κωδικού πρόσβασης για τη διατήρηση του λογαριασμού σας;<1>Θα μπορείτε να διατηρήσετε το όνομά σας και να ορίσετε ένα avatar για χρήση σε μελλοντικές κλήσεις.", diff --git a/locales/en/app.json b/locales/en/app.json index f5749cf7..5398930f 100644 --- a/locales/en/app.json +++ b/locales/en/app.json @@ -22,12 +22,6 @@ "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 and our <6>Cookie Policy.", - "app_selection_modal": { - "continue_in_browser": "Continue in browser", - "open_in_app": "Open in the app", - "text": "Ready to join?", - "title": "Select app" - }, "call_ended_view": { "create_account_button": "Create account", "create_account_prompt": "<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", diff --git a/locales/es/app.json b/locales/es/app.json index df9948b4..e84ef1d8 100644 --- a/locales/es/app.json +++ b/locales/es/app.json @@ -15,12 +15,6 @@ "submit": "Enviar" }, "analytics_notice": "Al participar en esta beta, consientes a la recogida de datos anónimos, los cuales usaremos para mejorar el producto. Puedes encontrar más información sobre que datos recogemos en nuestra <2>Política de privacidad y en nuestra <5>Política sobre Cookies.", - "app_selection_modal": { - "continue_in_browser": "Continuar en el navegador", - "open_in_app": "Abrir en la aplicación", - "text": "¿Listo para unirte?", - "title": "Selecciona aplicación" - }, "call_ended_view": { "create_account_button": "Crear cuenta", "create_account_prompt": "<0>¿Por qué no mantienes tu cuenta estableciendo una contraseña?<1>Podrás mantener tu nombre y establecer un avatar para usarlo en futuras llamadas", diff --git a/locales/et/app.json b/locales/et/app.json index e269e53f..450a1e7d 100644 --- a/locales/et/app.json +++ b/locales/et/app.json @@ -22,12 +22,6 @@ "upload_file": "Laadi fail üles" }, "analytics_notice": "Nõustudes selle beetaversiooni kasutamisega, sa nõustud ka toote arendamiseks kasutatavate anonüümsete andmete kogumisega. Täpsemat teavet kogutavate andmete kohta leiad meie <2>Privaatsuspoliitikast ja meie <6>Küpsiste kasutamise reeglitest.", - "app_selection_modal": { - "continue_in_browser": "Jätka veebibrauseris", - "open_in_app": "Ava rakenduses", - "text": "Oled valmis liituma?", - "title": "Vali rakendus" - }, "call_ended_view": { "create_account_button": "Loo konto", "create_account_prompt": "<0>Kas soovid salasõna seadistada ja sellega oma kasutajakonto alles jätta?<1>Nii saad säilitada oma nime ja määrata profiilipildi, mida saad kasutada tulevastes kõnedes", diff --git a/locales/fi/app.json b/locales/fi/app.json index 9e8a463c..8728cd68 100644 --- a/locales/fi/app.json +++ b/locales/fi/app.json @@ -22,12 +22,6 @@ "upload_file": "Lähetä tiedosto" }, "analytics_notice": "Osallistumalla tähän betaan hyväksyt nimettömien tietojen keräämisen, joita käytämme tuotteen parantamiseen. Löydät lisätietoa siitä, mitä tietoja seuraamme meidän <2> Tietosuojakäytännöstä ja <6>Evästekäytännöstä .", - "app_selection_modal": { - "continue_in_browser": "Jatka selaimessa", - "open_in_app": "Avaa sovelluksessa", - "text": "Oletko valmis liittymään?", - "title": "Valitse sovellus" - }, "call_ended_view": { "create_account_button": "Luo tili", "create_account_prompt": "<0>Miksi et viimeistelisi määrittämällä salasanaa tilisi säilyttämiseksi?<1>Voit säilyttää nimesi ja asettaa avatarin käytettäväksi tulevissa puheluissa", diff --git a/locales/fr/app.json b/locales/fr/app.json index 279542b1..4acda0e1 100644 --- a/locales/fr/app.json +++ b/locales/fr/app.json @@ -15,12 +15,6 @@ "submit": "Envoyer" }, "analytics_notice": "En participant à cette beta, vous consentez à la collecte de données anonymes, qui seront utilisées pour améliorer le produit. Vous trouverez plus d’informations sur les données collectées dans notre <2>Politique de vie privée et notre <5>Politique de cookies.", - "app_selection_modal": { - "continue_in_browser": "Continuer dans le navigateur", - "open_in_app": "Ouvrir dans l’application", - "text": "Prêt à rejoindre ?", - "title": "Choisissez l’application" - }, "call_ended_view": { "create_account_button": "Créer un compte", "create_account_prompt": "<0>Pourquoi ne pas créer un mot de passe pour conserver votre compte ?<1>Vous pourrez garder votre nom et définir un avatar pour vos futurs appels", diff --git a/locales/id/app.json b/locales/id/app.json index ac1c6221..b8001897 100644 --- a/locales/id/app.json +++ b/locales/id/app.json @@ -22,12 +22,6 @@ "upload_file": "Unggah berkas" }, "analytics_notice": "Dengan bergabung dalam beta ini, Anda mengizinkan kami untuk mengumpulkan data anonim, yang kami gunakan untuk meningkatkan produk ini. Anda dapat mempelajari lebih lanjut tentang data apa yang kami lacak dalam <2>Kebijakan Privasi dan <5>Kebijakan Kuki kami.", - "app_selection_modal": { - "continue_in_browser": "Lanjutkan dalam peramban", - "open_in_app": "Buka dalam aplikasi", - "text": "Siap untuk bergabung?", - "title": "Pilih plikasi" - }, "call_ended_view": { "create_account_button": "Buat akun", "create_account_prompt": "<0>Kenapa tidak selesaikan dengan mengatur sebuah kata sandi untuk menjaga akun Anda?<1>Anda akan dapat tetap menggunakan nama Anda dan atur sebuah avatar untuk digunakan dalam panggilan di masa mendatang", diff --git a/locales/it/app.json b/locales/it/app.json index d3708d11..84701c1c 100644 --- a/locales/it/app.json +++ b/locales/it/app.json @@ -22,12 +22,6 @@ "upload_file": "Carica file" }, "analytics_notice": "Partecipando a questa beta, acconsenti alla raccolta di dati anonimi che usiamo per migliorare il prodotto. Puoi trovare più informazioni su quali dati monitoriamo nella nostra <2>informativa sulla privacy e nell'<5>informativa sui cookie.", - "app_selection_modal": { - "continue_in_browser": "Continua nel browser", - "open_in_app": "Apri nell'app", - "text": "Tutto pronto per entrare?", - "title": "Seleziona app" - }, "call_ended_view": { "create_account_button": "Crea profilo", "create_account_prompt": "<0>Ti va di terminare impostando una password per mantenere il profilo?<1>Potrai mantenere il tuo nome e impostare un avatar da usare in chiamate future", diff --git a/locales/ja/app.json b/locales/ja/app.json index 2b52cfe2..152ef51f 100644 --- a/locales/ja/app.json +++ b/locales/ja/app.json @@ -15,12 +15,6 @@ "submit": "送信" }, "analytics_notice": "ベータ版への参加と同時に、製品の改善のために匿名データを収集することに同意したことになります。追跡するデータの詳細については、<2>プライバシーポリシーと<6>クッキーポリシーをご確認下さい。", - "app_selection_modal": { - "continue_in_browser": "ブラウザで続行", - "open_in_app": "アプリで開く", - "text": "準備完了?", - "title": "アプリを選択" - }, "call_ended_view": { "create_account_button": "アカウントを作成", "create_account_prompt": "<0>パスワードを設定してアカウント設定を保持してみませんか?<1>名前とアバターの設定を次の通話に利用する事ができます。", diff --git a/locales/lv/app.json b/locales/lv/app.json index 4c351d97..f5220310 100644 --- a/locales/lv/app.json +++ b/locales/lv/app.json @@ -22,12 +22,6 @@ "upload_file": "Augšupielādēt failu" }, "analytics_notice": "Piedaloties šajā beta versijā, jūs piekrītat anonīmu datu vākšanai, ko mēs izmantojam produkta uzlabošanai. Plašāku informāciju par to, kādus datus mēs izsekojam, varat atrast mūsu <2>konfidencialitātes politikā un mūsu <6>sīkfailu politikā.", - "app_selection_modal": { - "continue_in_browser": "Turpināt pārlūkprogrammā", - "open_in_app": "Atvērt lietotnē", - "text": "Gatavs pievienoties?", - "title": "Izvēlies lietotni" - }, "call_ended_view": { "create_account_button": "Izveidot kontu", "create_account_prompt": "<0>Kādēļ nepabeigt ar paroles iestatīšanu, lai paturētu savu kontu?<1>Būs iespējams paturēt savu vārdu un iestatīt attēlu izmantošanai turpmākajos zvanos", diff --git a/locales/pl/app.json b/locales/pl/app.json index c6d9a0f3..c2b25675 100644 --- a/locales/pl/app.json +++ b/locales/pl/app.json @@ -22,12 +22,6 @@ "upload_file": "Prześlij plik" }, "analytics_notice": "Uczestnicząc w tej becie, upoważniasz nas do zbierania anonimowych danych, które wykorzystamy do ulepszenia produktu. Dowiedz się więcej na temat danych, które zbieramy w naszej <2>Polityce prywatności i <5>Polityce ciasteczek.", - "app_selection_modal": { - "continue_in_browser": "Kontynuuj w przeglądarce", - "open_in_app": "Otwórz w aplikacji", - "text": "Gotowy, by dołączyć?", - "title": "Wybierz aplikację" - }, "call_ended_view": { "create_account_button": "Utwórz konto", "create_account_prompt": "<0>Może zechcesz ustawić hasło, aby zachować swoje konto?<1>Będziesz w stanie utrzymać swoją nazwę i ustawić awatar do wyświetlania podczas połączeń w przyszłości", diff --git a/locales/ro/app.json b/locales/ro/app.json index ceaa79b7..d733cbba 100644 --- a/locales/ro/app.json +++ b/locales/ro/app.json @@ -22,12 +22,6 @@ "upload_file": "Încărcați fișierul" }, "analytics_notice": "Prin participarea la această versiune beta, sunteți de acord cu colectarea de date anonime, pe care le folosim pentru a îmbunătăți produsul. Puteți găsi mai multe informații despre datele pe care le urmărim în Politica noastră de <2> confidențialitate și Politica noastră <6> privind cookie-urile.", - "app_selection_modal": { - "continue_in_browser": "Continuați în browser", - "open_in_app": "Deschideți în aplicație", - "text": "Sunteți gata să vă alăturați?", - "title": "Selectați o aplicație" - }, "call_ended_view": { "create_account_button": "Creaţi un cont", "create_account_prompt": "<0>De ce să nu terminați prin configurarea unei parole pentru a vă păstra contul? <1>Veți putea să vă păstrați numele și să setați un avatar pentru a fi utilizat la apelurile viitoare ", diff --git a/locales/ru/app.json b/locales/ru/app.json index 99b8775a..651d119d 100644 --- a/locales/ru/app.json +++ b/locales/ru/app.json @@ -22,12 +22,6 @@ "upload_file": "Загрузить файл" }, "analytics_notice": "Участвуя в этой бета-версии, вы соглашаетесь на сбор анонимных данных, которые мы используем для улучшения продукта. Дополнительную информацию о том, какие данные мы отслеживаем, можно найти в нашей <2> Политике конфиденциальности и Политике <6> использования файлов cookie.", - "app_selection_modal": { - "continue_in_browser": "Продолжить в браузере", - "open_in_app": "Открыть в приложении", - "text": "Готовы присоединиться?", - "title": "Выбрать приложение" - }, "call_ended_view": { "create_account_button": "Создать аккаунт", "create_account_prompt": "<0>Почему бы не задать пароль, тем самым сохранив аккаунт?<1>Так вы можете оставить своё имя и задать аватар для будущих звонков.", diff --git a/locales/sk/app.json b/locales/sk/app.json index d017220b..d2a12f26 100644 --- a/locales/sk/app.json +++ b/locales/sk/app.json @@ -22,12 +22,6 @@ "upload_file": "Nahrať súbor" }, "analytics_notice": "Účasťou v tejto beta verzii súhlasíte so zhromažďovaním anonymných údajov, ktoré použijeme na zlepšenie produktu. Viac informácií o tom, ktoré údaje sledujeme, nájdete v našich <2>Zásadách ochrany osobných údajov a <6>Zásadách používania súborov cookie.", - "app_selection_modal": { - "continue_in_browser": "Pokračovať v prehliadači", - "open_in_app": "Otvoriť v aplikácii", - "text": "Ste pripravení sa pridať?", - "title": "Vybrať aplikáciu" - }, "call_ended_view": { "create_account_button": "Vytvoriť účet", "create_account_prompt": "<0>Prečo neskončiť nastavením hesla, aby ste si zachovali svoj účet? <1>Budete si môcť ponechať svoje meno a nastaviť obrázok, ktorý sa bude používať pri budúcich hovoroch", diff --git a/locales/sv/app.json b/locales/sv/app.json index bf0b742f..748e124f 100644 --- a/locales/sv/app.json +++ b/locales/sv/app.json @@ -22,12 +22,6 @@ "upload_file": "Ladda upp fil" }, "analytics_notice": "Genom att delta i denna beta samtycker du till insamling av anonyma uppgifter, som vi använder för att förbättra produkten. Du kan hitta mer information om vilka data vi spårar i vår <2>integritetspolicy och vår <5>cookiepolicy.", - "app_selection_modal": { - "continue_in_browser": "Fortsätt i webbläsaren", - "open_in_app": "Öppna i appen", - "text": "Är du redo att gå med?", - "title": "Välj app" - }, "call_ended_view": { "create_account_button": "Skapa konto", "create_account_prompt": "<0>Varför inte avsluta genom att skapa ett lösenord för att behålla ditt konto?<1>Du kommer att kunna behålla ditt namn och ställa in en avatar för användning vid framtida samtal", diff --git a/locales/tr/app.json b/locales/tr/app.json index da26eb0f..c976e984 100644 --- a/locales/tr/app.json +++ b/locales/tr/app.json @@ -22,12 +22,6 @@ "upload_file": "Dosya Yükle" }, "analytics_notice": "Bu beta sürümüne katılarak, ürünü geliştirmek için kullandığımız anonim verilerin toplanmasına izin vermiş olursunuz. Hangi verileri izlediğimiz hakkında daha fazla bilgiyi <2>Gizlilik Politikamızda ve <6>Çerez Politikamızda bulabilirsiniz..", - "app_selection_modal": { - "continue_in_browser": "Tarayıcıda devam et", - "open_in_app": "Uygulamada aç", - "text": "Katılmaya hazır mısınız?", - "title": "Uygulama seçin" - }, "call_ended_view": { "create_account_button": "Hesap aç", "create_account_prompt": "<0>Hesabınızı tutmak için niye bir parola açmıyorsunuz?<1>Böylece ileriki aramalarda adınızı ve avatarınızı kullanabileceksiniz", diff --git a/locales/uk/app.json b/locales/uk/app.json index d7d1b0ea..bcccf310 100644 --- a/locales/uk/app.json +++ b/locales/uk/app.json @@ -22,12 +22,6 @@ "upload_file": "Завантажити файл" }, "analytics_notice": "Користуючись дочасним доступом, ви даєте згоду на збір анонімних даних, які ми використовуємо для вдосконалення продукту. Ви можете знайти більше інформації про те, які дані ми відстежуємо в нашій <2>Політиці Приватності і нашій <6>Політиці про файли cookie.", - "app_selection_modal": { - "continue_in_browser": "Продовжити у браузері", - "open_in_app": "Відкрити у застосунку", - "text": "Готові приєднатися?", - "title": "Вибрати застосунок" - }, "call_ended_view": { "create_account_button": "Створити обліковий запис", "create_account_prompt": "<0>Чому б не завершити, налаштувавши пароль для збереження свого облікового запису?<1>Ви зможете зберегти своє ім'я та встановити аватарку для подальшого користування під час майбутніх викликів", diff --git a/locales/zh-Hans/app.json b/locales/zh-Hans/app.json index 9c0e7c8f..17a4f60f 100644 --- a/locales/zh-Hans/app.json +++ b/locales/zh-Hans/app.json @@ -15,12 +15,6 @@ "submit": "提交" }, "analytics_notice": "参与测试即表示您同意我们收集匿名数据,用于改进产品。您可以在我们的<2>隐私政策和<5>Cookie政策中找到有关我们跟踪哪些数据以及更多信息。", - "app_selection_modal": { - "continue_in_browser": "在浏览器中继续", - "open_in_app": "在应用中打开", - "text": "准备好加入了吗?", - "title": "选择应用程序" - }, "call_ended_view": { "create_account_button": "创建账户", "create_account_prompt": "<0>为何不设置密码来保留你的账户?<1>保留昵称并设置头像,以便在未来的通话中使用。", diff --git a/locales/zh-Hant/app.json b/locales/zh-Hant/app.json index 8d474be5..06cf1e4a 100644 --- a/locales/zh-Hant/app.json +++ b/locales/zh-Hant/app.json @@ -15,12 +15,6 @@ "submit": "遞交" }, "analytics_notice": "參與此測試版即表示您同意蒐集匿名資料,我們使用這些資料來改進產品。您可以在我們的<2>隱私政策與我們的 <5>Cookie 政策 中找到關於我們追蹤哪些資料的更多資訊。", - "app_selection_modal": { - "continue_in_browser": "在瀏覽器中繼續", - "open_in_app": "在應用程式中開啟", - "text": "準備好加入了?", - "title": "選取應用程式" - }, "call_ended_view": { "create_account_button": "建立帳號", "create_account_prompt": "<0>何不設定密碼以保留此帳號?<1>您可以保留暱稱並設定頭像,以便未來通話時使用", diff --git a/playwright/fixtures/fixture-mobile-create.ts b/playwright/fixtures/fixture-mobile-create.ts index 3920c978..8b729e4c 100644 --- a/playwright/fixtures/fixture-mobile-create.ts +++ b/playwright/fixtures/fixture-mobile-create.ts @@ -45,9 +45,6 @@ async function createCallAndInvite( await creatorPage.getByTestId("home_go").click(); await expect(creatorPage.locator("video")).toBeVisible(); - await creatorPage - .getByRole("button", { name: "Continue in browser" }) - .click(); // join await creatorPage.getByTestId("lobby_joinCall").click(); diff --git a/playwright/mobile/create-call-mobile.spec.ts b/playwright/mobile/create-call-mobile.spec.ts index 1c4eef57..322be5eb 100644 --- a/playwright/mobile/create-call-mobile.spec.ts +++ b/playwright/mobile/create-call-mobile.spec.ts @@ -23,8 +23,6 @@ test("@mobile Start a new call then leave and show the feedback screen", async ( // await page.pause(); await expect(page.locator("video")).toBeVisible(); await expect(page.getByTestId("lobby_joinCall")).toBeVisible(); - - await page.getByRole("button", { name: "Continue in browser" }).click(); // Join the call await page.getByTestId("lobby_joinCall").click(); @@ -67,10 +65,6 @@ mobileTest( const guestPage = await guestInviteeContext.newPage(); await guestPage.goto(inviteLink + "&controlledAudioDevices=true"); - await guestPage - .getByRole("button", { name: "Continue in browser" }) - .click(); - await guestPage.getByTestId("joincall_displayName").fill("Invitee"); await expect(guestPage.getByTestId("joincall_joincall")).toBeVisible(); await guestPage.getByTestId("joincall_joincall").click(); diff --git a/src/UrlParams.test.ts b/src/UrlParams.test.ts index a18d10f1..75bf9bfb 100644 --- a/src/UrlParams.test.ts +++ b/src/UrlParams.test.ts @@ -218,7 +218,6 @@ describe("UrlParams", () => { describe("intent", () => { const noIntentDefaults = { confineToRoom: false, - appPrompt: true, preload: false, header: HeaderStyle.Standard, showControls: true, @@ -232,7 +231,6 @@ describe("UrlParams", () => { }; const startNewCallDefaults = (platform: string): object => ({ confineToRoom: true, - appPrompt: false, preload: false, header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar, showControls: true, @@ -246,7 +244,6 @@ describe("UrlParams", () => { }); const joinExistingCallDefaults = (platform: string): object => ({ confineToRoom: true, - appPrompt: false, preload: false, header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar, showControls: true, diff --git a/src/UrlParams.ts b/src/UrlParams.ts index 3a972119..f4ea840d 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -159,13 +159,6 @@ export interface UrlConfiguration { * Whether the app should keep the user confined to the current call/room. */ confineToRoom: boolean; - /** - * Whether upon entering a room, the user should be prompted to launch the - * native mobile app. (Affects only Android and iOS.) - * - * The app prompt must also be enabled in the config for this to take effect. - */ - appPrompt: boolean; /** * Whether the app should pause before joining the call until it sees an * io.element.join widget action, allowing it to be preloaded. @@ -257,26 +250,6 @@ export interface UrlConfiguration { // behavior to the needs of specific consumers. export interface UrlParams extends UrlProperties, UrlConfiguration {} -// This is here as a stopgap, but what would be far nicer is a function that -// takes a UrlParams and returns a query string. That would enable us to -// consolidate all the data about URL parameters and their meanings to this one -// file. -export function editFragmentQuery( - hash: string, - edit: (params: URLSearchParams) => URLSearchParams, -): string { - const fragmentQueryStart = hash.indexOf("?"); - const fragmentParams = edit( - new URLSearchParams( - fragmentQueryStart === -1 ? "" : hash.substring(fragmentQueryStart), - ), - ); - return `${hash.substring( - 0, - fragmentQueryStart, - )}?${fragmentParams.toString()}`; -} - class ParamParser { private fragmentParams: URLSearchParams; private queryParams: URLSearchParams; @@ -392,7 +365,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => { // Here we only use constants and `platform` to determine the intent preset. let intentPreset: UrlConfiguration = { confineToRoom: true, - appPrompt: false, preload: false, header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar, showControls: true, @@ -448,7 +420,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => { default: intentPreset = { confineToRoom: false, - appPrompt: true, preload: false, header: HeaderStyle.Standard, showControls: true, @@ -493,7 +464,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => { const configuration: Partial = { confineToRoom: parser.getFlag("confineToRoom"), - appPrompt: parser.getFlag("appPrompt"), preload: isWidget ? parser.getFlag("preload") : undefined, // Check hideHeader for backwards compatibility. If header is set, hideHeader // is ignored. diff --git a/src/config/ConfigOptions.ts b/src/config/ConfigOptions.ts index 4da633ca..1b120546 100644 --- a/src/config/ConfigOptions.ts +++ b/src/config/ConfigOptions.ts @@ -97,14 +97,6 @@ export interface ConfigOptions { enable_video?: boolean; }; - /** - * Whether upon entering a room, the user should be prompted to launch the - * native mobile app. (Affects only Android and iOS.) - * - * Note that this can additionally be disabled by the app's URL parameters. - */ - app_prompt?: boolean; - /** * These are low level options that are used to configure the MatrixRTC session. * Take care when changing these options. @@ -164,7 +156,6 @@ export interface ResolvedConfigOptions extends ConfigOptions { }; }; ssla: string; - app_prompt: boolean; } export const DEFAULT_CONFIG: ResolvedConfigOptions = { @@ -178,5 +169,4 @@ export const DEFAULT_CONFIG: ResolvedConfigOptions = { feature_use_device_session_member_events: true, }, ssla: "https://static.element.io/legal/element-software-and-services-license-agreement-uk-1.pdf", - app_prompt: true, }; diff --git a/src/room/AppSelectionModal.module.css b/src/room/AppSelectionModal.module.css deleted file mode 100644 index ed510c3c..00000000 --- a/src/room/AppSelectionModal.module.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2023, 2024 New Vector Ltd. - -SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial -Please see LICENSE in the repository root for full details. -*/ - -.modal p { - text-align: center; - margin-block-end: var(--cpd-space-8x); -} - -.modal button, -.modal a { - width: 100%; -} - -.modal button { - margin-block-end: var(--cpd-space-6x); -} - -.modal a { - box-sizing: border-box; -} diff --git a/src/room/AppSelectionModal.tsx b/src/room/AppSelectionModal.tsx deleted file mode 100644 index c57abfca..00000000 --- a/src/room/AppSelectionModal.tsx +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2023, 2024 New Vector Ltd. - -SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial -Please see LICENSE in the repository root for full details. -*/ - -import { - type FC, - type MouseEvent, - useCallback, - useMemo, - useState, -} from "react"; -import { useTranslation } from "react-i18next"; -import { Button, Text } from "@vector-im/compound-web"; -import { PopOutIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; -import { logger } from "matrix-js-sdk/lib/logger"; - -import { Modal } from "../Modal"; -import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; -import { getAbsoluteRoomUrl } from "../utils/matrix"; -import styles from "./AppSelectionModal.module.css"; -import { editFragmentQuery } from "../UrlParams"; -import { E2eeType } from "../e2ee/e2eeType"; - -interface Props { - roomId: string; -} - -export const AppSelectionModal: FC = ({ roomId }) => { - const { t } = useTranslation(); - - const [open, setOpen] = useState(true); - const onBrowserClick = useCallback( - (e: MouseEvent) => { - e.preventDefault(); - e.stopPropagation(); - setOpen(false); - }, - [setOpen], - ); - const e2eeSystem = useRoomEncryptionSystem(roomId); - - if (e2eeSystem.kind === E2eeType.NONE) { - logger.error( - "Generating app redirect URL for encrypted room but don't have key available!", - ); - } - - const appUrl = useMemo(() => { - // If the room ID is not known, fall back to the URL of the current page - // Also, we don't really know the room name at this stage as we haven't - // started a client and synced to get the room details. We could take the one - // we got in our own URL and use that, but it's not a string that a human - // ever sees so it's somewhat redundant. We just don't pass a name. - const url = new URL( - roomId === null - ? window.location.href - : getAbsoluteRoomUrl(roomId, e2eeSystem), - ); - // Edit the URL to prevent the app selection prompt from appearing a second - // time within the app, and to keep the user confined to the current room - url.hash = editFragmentQuery(url.hash, (params) => { - params.set("appPrompt", "false"); - params.set("confineToRoom", "true"); - return params; - }); - - const result = new URL("io.element.call:/"); - result.searchParams.set("url", url.toString()); - return result.toString(); - }, [e2eeSystem, roomId]); - - return ( - - - {t("app_selection_modal.text")} - - - - - ); -}; diff --git a/src/room/RoomPage.tsx b/src/room/RoomPage.tsx index 2aee4d53..59454d2c 100644 --- a/src/room/RoomPage.tsx +++ b/src/room/RoomPage.tsx @@ -29,15 +29,12 @@ import { GroupCallView } from "./GroupCallView"; import { useRoomIdentifier, useUrlParams } from "../UrlParams"; import { useRegisterPasswordlessUser } from "../auth/useRegisterPasswordlessUser"; import { HomePage } from "../home/HomePage"; -import { platform } from "../Platform"; -import { AppSelectionModal } from "./AppSelectionModal"; import { widget } from "../widget"; import { CallTerminatedMessage, useLoadGroupCall } from "./useLoadGroupCall"; import { LobbyView } from "./LobbyView"; import { E2eeType } from "../e2ee/e2eeType"; import { useProfile } from "../profile/useProfile"; import { useOptInAnalytics } from "../settings/settings"; -import { Config } from "../config/Config"; import { Link } from "../button/Link"; import { ErrorView } from "../ErrorView"; import { useMediaDevices } from "../MediaDevicesContext"; @@ -45,10 +42,9 @@ import { MuteStates } from "../state/MuteStates"; import { ObservableScope } from "../state/ObservableScope"; import { calculateInitialMuteState } from "../state/initialMuteState.ts"; -export const RoomPage: FC = () => { +export const RoomPage: FC = (): ReactNode => { const urlParams = useUrlParams(); - const { confineToRoom, appPrompt, preload, header, displayName, skipLobby } = - urlParams; + const { confineToRoom, preload, header, displayName, skipLobby } = urlParams; const { t } = useTranslation(); const { roomAlias, roomId, viaServers } = useRoomIdentifier(); @@ -242,28 +238,10 @@ export const RoomPage: FC = () => { } }; - let content: ReactNode; - if (loading || isRegistering) { - content = ; - } else if (error) { - content = ; - } else if (!client) { - content = ; - } else if (!roomIdOrAlias) { - // TODO: This doesn't belong here, the app routes need to be reworked - content = ; - } else { - content = groupCallView(); - } - - return ( - <> - {content} - {/* On Android and iOS, show a prompt to launch the mobile app. */} - {appPrompt && - Config.get().app_prompt && - (platform === "android" || platform === "ios") && - roomId && } - - ); + if (loading || isRegistering) return ; + if (error) return ; + if (!client) return ; + // TODO: This doesn't belong here, the app routes need to be reworked + if (!roomIdOrAlias) return ; + return groupCallView(); };