mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 22:16:26 +00:00
c5765bbf15
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.
27 lines
1.7 KiB
TypeScript
27 lines
1.7 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const native: TranslationStrings = {
|
|
'native.connect.title': 'TREK に接続',
|
|
'native.connect.hint': 'ブラウザで TREK を開くときのアドレスを入力してください。',
|
|
'native.connect.placeholder': 'trek.example.com',
|
|
'native.connect.submit': '接続',
|
|
'native.connect.checking': '確認中…',
|
|
'native.connect.errorInvalid': 'Web アドレスではないようです。',
|
|
'native.connect.errorUnreachable': 'このアドレスで応答するサーバーがありません。アドレスと接続を確認してください。',
|
|
'native.connect.errorNotTrek': 'このアドレスのサーバーは TREK ではありません。',
|
|
'native.connect.errorTooOld': 'この TREK サーバーはアプリに対して古すぎます。先に更新が必要です。',
|
|
'native.offline.title': 'サーバーに接続できません',
|
|
'native.offline.hint': 'TREK は {server} に接続できませんでした。接続を確認して、もう一度お試しください。',
|
|
'native.offline.retry': '再試行',
|
|
'native.changeServer': 'サーバーを変更',
|
|
'native.login.failed': 'ログインできませんでした。もう一度お試しください。',
|
|
'native.handoff.title': 'アプリで続行',
|
|
'native.handoff.hint': '{name} としてログインしています。TREK アプリを開いて、そちらでログインを完了してください。',
|
|
'native.handoff.open': 'TREK アプリを開く',
|
|
'native.handoff.switchAccount': '別のアカウントを使う',
|
|
'native.settings.server': 'サーバー',
|
|
'native.settings.serverHint': 'このアプリは {server} に接続されています。',
|
|
};
|
|
|
|
export default native;
|