mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
feat(native): the apps load the server's own UI
The apps ship only an address screen now. Once a server is picked, the native side points the WebView at it: TrekBridgeViewController on iOS and a config copy with server.url on Android. The UI then comes from that server, in the version it runs and on its own origin, so the session cookie, uploads, /ws and plugins work exactly as in a browser and no app release has to keep pace with the servers out there. The address screen (native-shell/, built into native-dist/) probes /api/health/features through native HTTP, tries https before http when no scheme was typed, and refuses servers without the nativeApp flag. It also serves as the error page when the remembered server does not load: retry, change server, or on iOS the stored copy of the server's start page. TrekShell is the app's own plugin for all of that: remember, change and reload the server, sign in through ASWebAuthenticationSession or a Custom Tab, and on iOS keep and open the offline copy of the start page, because WKWebView runs no service worker for a domain the app does not list. Plugins the frame does not use are gone (push, camera, geolocation, calendar, file transfer, in-app browser and more): the WebView covers the camera and location itself, and push needs a relay before it is worth shipping. With them go the push entitlement, the calendar usage strings and the Firebase bits. The iOS scheme falls back to capacitor://, since Capacitor drops an iosScheme of https, and the arm64 capability replaces armv7.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.connect.title': 'Connecta amb TREK',
|
||||
'native.connect.hint': 'Introdueix l’adreça amb què obres TREK al navegador.',
|
||||
'native.connect.placeholder': 'trek.example.com',
|
||||
'native.connect.submit': 'Connecta',
|
||||
'native.connect.checking': 'S’està comprovant…',
|
||||
'native.connect.errorInvalid': 'Això no sembla una adreça web.',
|
||||
'native.connect.errorUnreachable': 'Cap servidor respon en aquesta adreça. Comprova l’adreça i la connexió.',
|
||||
'native.connect.errorNotTrek': 'El servidor d’aquesta adreça no és TREK.',
|
||||
'native.connect.errorTooOld': 'Aquest servidor de TREK és massa antic per a l’app. Primer cal actualitzar-lo.',
|
||||
'native.offline.title': 'No es pot accedir al servidor',
|
||||
'native.offline.hint': 'TREK no ha pogut connectar amb {server}. Comprova la connexió i torna-ho a provar.',
|
||||
'native.offline.retry': 'Torna-ho a provar',
|
||||
'native.changeServer': 'Canvia de servidor',
|
||||
'native.login.failed': 'No s’ha pogut iniciar la sessió. Torna-ho a provar.',
|
||||
'native.handoff.title': 'Continua a l’app',
|
||||
'native.handoff.hint': 'Has iniciat la sessió com a {name}. Obre l’app de TREK per acabar d’iniciar-hi la sessió.',
|
||||
'native.handoff.open': 'Obre l’app de TREK',
|
||||
'native.handoff.switchAccount': 'Fes servir un altre compte',
|
||||
'native.settings.server': 'Servidor',
|
||||
'native.settings.serverHint': 'Aquesta app està connectada a {server}.',
|
||||
};
|
||||
|
||||
export default native;
|
||||
Reference in New Issue
Block a user