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
@@ -52,7 +52,9 @@ export const dict: Record<I18nKey, string> = {
"mobile.connect.cancelPassword": "Інший сервер",
"mobile.connect.connecting": "Підключення...",
"mobile.connect.scanQr": "Сканувати QR-код",
"mobile.connect.welcome.scanHint": "На компʼютері відкрийте «Додати пристрій», щоб показати QR-код, і відскануйте його тут.",
"mobile.connect.advanced": "Додатково",
"mobile.connect.manual.toggle": "Підключитися за адресою",
"mobile.connect.scan.permissionDenied": "Доступ до камери вимкнено. Увімкни його в Налаштуваннях, щоб сканувати QR-код.",
"mobile.connect.scan.failed": "Не вдалося відсканувати QR-код. Спробуй ще раз або введи адресу вручну.",
"mobile.connect.scan.invalid": "Це не QR-код підключення OpenChamber.",
@@ -66,6 +68,7 @@ export const dict: Record<I18nKey, string> = {
"mobile.connect.error.authRequired": "Цьому серверу потрібен пароль або client token.",
"mobile.connect.error.passwordFailed": "Не вдалося розблокувати сервер. Перевір пароль.",
"mobile.instances.addTitle": "Додати інстанс",
"mobile.instances.addManual": "Додати за адресою",
"mobile.instances.editTitle": "Редагувати інстанс",
"mobile.instances.edit": "Редагувати",
"mobile.instances.delete": "Видалити",
@@ -76,6 +79,8 @@ export const dict: Record<I18nKey, string> = {
"mobile.instances.label.label": "Назва",
"mobile.instances.label.placeholder": "Необовʼязкова назва",
"mobile.instances.saveNew": "Зберегти інстанс",
"mobile.instances.status.connectedDirect": "Підключено · Локальна мережа",
"mobile.instances.status.connectedRelay": "Підключено · Приватний relay",
"mobile.instances.saveEdit": "Зберегти зміни",
"mobile.nav.changes": "Зміни",
"mobile.nav.settings": "Налаштування",