feat(mobile): redesign connect screen and instances sheet

- Connect screen leads with Scan QR code plus a plain-words hint of where the
  code lives; manual URL entry is collapsed behind Connect by address (expanded
  automatically on web where scanning is unavailable); saved connections show a
  per-row connecting spinner
- Instances sheet is list-first: the active instance shows a live status dot
  and transport (Connected - Local network / Private relay), rows connect on
  tap with an inline spinner, and the add/edit form hides behind Scan QR code /
  Add by address
- Deleting the last instance returns to the connect screen: without a runtime
  endpoint the native app no longer bootstraps against the webview's own origin
  (which faked a successful connection), and the connect screen renders
  regardless of a stale isConnected flag
This commit is contained in:
Bohdan Triapitsyn
2026-07-10 01:44:42 +03:00
parent 91a95bfdaa
commit e74834a739
11 changed files with 307 additions and 184 deletions
+5
View File
@@ -53,7 +53,9 @@ export const dict: Record<I18nKey, string> = {
'mobile.connect.cancelPassword': 'Użyj innego serwera',
'mobile.connect.connecting': 'Łączenie...',
'mobile.connect.scanQr': 'Skanuj kod QR',
'mobile.connect.welcome.scanHint': 'Na komputerze otwórz «Dodaj urządzenie», aby wyświetlić kod QR, i zeskanuj go tutaj.',
'mobile.connect.advanced': 'Zaawansowane',
'mobile.connect.manual.toggle': 'Połącz przez adres',
'mobile.connect.scan.permissionDenied': 'Dostęp do aparatu jest wyłączony. Włącz go w Ustawieniach, aby zeskanować kod QR.',
'mobile.connect.scan.failed': 'Nie udało się zeskanować tego kodu QR. Spróbuj ponownie lub wpisz adres URL ręcznie.',
'mobile.connect.scan.invalid': 'Ten kod QR nie jest kodem połączenia OpenChamber.',
@@ -67,6 +69,7 @@ export const dict: Record<I18nKey, string> = {
'mobile.connect.error.authRequired': 'Ten serwer wymaga hasła lub tokenu klienta.',
'mobile.connect.error.passwordFailed': 'Nie udało się odblokować tego serwera. Sprawdź hasło.',
'mobile.instances.addTitle': 'Dodaj instancję',
'mobile.instances.addManual': 'Dodaj przez adres',
'mobile.instances.editTitle': 'Edytuj instancję',
'mobile.instances.edit': 'Edytuj',
'mobile.instances.delete': 'Usuń',
@@ -77,6 +80,8 @@ export const dict: Record<I18nKey, string> = {
'mobile.instances.label.label': 'Nazwa',
'mobile.instances.label.placeholder': 'Opcjonalna nazwa wyświetlana',
'mobile.instances.saveNew': 'Zapisz instancję',
'mobile.instances.status.connectedDirect': 'Połączono · Sieć lokalna',
'mobile.instances.status.connectedRelay': 'Połączono · Prywatny relay',
'mobile.instances.saveEdit': 'Zapisz zmiany',
'mobile.nav.changes': 'Zmiany',
'mobile.nav.settings': 'Ustawienia',