- Android端注入按键时显式设置SOURCE_KEYBOARD,修复IME丢弃事件导致输入框无法输入文字的问题 - Flutter端新增Flutter逻辑键到Android keyCode的转换映射,避免功能键误触发 - 重构RemoteController,分离信令连接与远程控制逻辑,支持设备列表选择与配对码兑换 - AuthRepository接口新增getBindings、getOnlineDevices、redeemPairingCode方法 - DioAuthRepository实现401自动刷新token重试机制 - ConnectionSessionState扩展设备列表、在线状态、配对码等状态字段
274 lines
6.2 KiB
Dart
274 lines
6.2 KiB
Dart
// ignore: unused_import
|
|
import 'package:intl/intl.dart' as intl;
|
|
import 'app_localizations.dart';
|
|
|
|
// ignore_for_file: type=lint
|
|
|
|
/// The translations for English (`en`).
|
|
class AppLocalizationsEn extends AppLocalizations {
|
|
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
|
|
|
@override
|
|
String get appTitle => 'WebRTC Controller';
|
|
|
|
@override
|
|
String get login => 'Login';
|
|
|
|
@override
|
|
String get logout => 'Logout';
|
|
|
|
@override
|
|
String get registerAccount => 'Create Account';
|
|
|
|
@override
|
|
String get registerSuccess => 'Registered successfully, please log in';
|
|
|
|
@override
|
|
String registerFailed(Object error) {
|
|
return 'Registration failed: $error';
|
|
}
|
|
|
|
@override
|
|
String get loginSubtitle => 'Log in to connect your bound devices';
|
|
|
|
@override
|
|
String get cancel => 'Cancel';
|
|
|
|
@override
|
|
String get confirm => 'OK';
|
|
|
|
@override
|
|
String get connect => 'Connect';
|
|
|
|
@override
|
|
String get connecting => 'Connecting...';
|
|
|
|
@override
|
|
String get loginAccount => 'Login Account';
|
|
|
|
@override
|
|
String get connectDevice => 'Connect Device';
|
|
|
|
@override
|
|
String get deviceId => 'Device ID (assigned by server):';
|
|
|
|
@override
|
|
String get deviceIdPlaceholder => 'Assigned by server';
|
|
|
|
@override
|
|
String get targetDeviceId => 'Target Device ID:';
|
|
|
|
@override
|
|
String get targetDeviceIdPlaceholder => 'Controlled device ID';
|
|
|
|
@override
|
|
String get username => 'Username';
|
|
|
|
@override
|
|
String get password => 'Password';
|
|
|
|
@override
|
|
String loginFailed(Object error) {
|
|
return 'Login failed: $error';
|
|
}
|
|
|
|
@override
|
|
String get usernamePasswordRequired => 'Please enter username and password';
|
|
|
|
@override
|
|
String get targetRequired => 'Please enter target device ID';
|
|
|
|
@override
|
|
String get authTitle => 'Connection Auth';
|
|
|
|
@override
|
|
String get authNone => 'Passwordless';
|
|
|
|
@override
|
|
String get authNoneDesc => 'Manual confirmation on the controlled device';
|
|
|
|
@override
|
|
String get authCode => 'Dynamic Code';
|
|
|
|
@override
|
|
String get authCodeDesc => 'Use a one-time dynamic code';
|
|
|
|
@override
|
|
String get authPassword => 'Fixed Password';
|
|
|
|
@override
|
|
String get authPasswordDesc => 'Use a fixed connection password';
|
|
|
|
@override
|
|
String get authNonePlaceholder => 'No value needed';
|
|
|
|
@override
|
|
String get authPasswordPlaceholder => 'Enter fixed password';
|
|
|
|
@override
|
|
String get authCodePlaceholder => 'Enter dynamic code';
|
|
|
|
@override
|
|
String get authValueRequired => 'Please enter the code or password';
|
|
|
|
@override
|
|
String get statusStopped => 'Status: Stopped';
|
|
|
|
@override
|
|
String get statusConnectingSignal => 'Status: Connecting to signal server...';
|
|
|
|
@override
|
|
String get statusConnected => 'Status: Connected - remote control active';
|
|
|
|
@override
|
|
String get statusDisconnected => 'Status: Remote disconnected';
|
|
|
|
@override
|
|
String get statusSignalConnected =>
|
|
'Status: Signal connected, waiting for registration...';
|
|
|
|
@override
|
|
String statusRegistered(Object deviceId) {
|
|
return 'Status: Registered ($deviceId), establishing...';
|
|
}
|
|
|
|
@override
|
|
String statusAuthFailed(Object error) {
|
|
return 'Status: Auth failed - $error';
|
|
}
|
|
|
|
@override
|
|
String statusConnectError(Object error) {
|
|
return 'Status: Connection error - $error';
|
|
}
|
|
|
|
@override
|
|
String get statusTargetAccept =>
|
|
'Status: Target accepted, establishing connection...';
|
|
|
|
@override
|
|
String statusTokenRefreshFailed(Object error) {
|
|
return 'Status: Token refresh failed - $error';
|
|
}
|
|
|
|
@override
|
|
String get statusForceLogout =>
|
|
'Status: Account logged in elsewhere, force logged out';
|
|
|
|
@override
|
|
String connectedBindings(Object uids) {
|
|
return 'Bound devices: $uids';
|
|
}
|
|
|
|
@override
|
|
String get resolutionSwitch => 'Switch Resolution';
|
|
|
|
@override
|
|
String get fpsSwitch => 'Switch FPS';
|
|
|
|
@override
|
|
String get selfCodec => 'SelfCodec';
|
|
|
|
@override
|
|
String get record => 'Record';
|
|
|
|
@override
|
|
String get stop => 'Stop';
|
|
|
|
@override
|
|
String get recording => 'Recording...';
|
|
|
|
@override
|
|
String recordSaved(Object path) {
|
|
return 'Saved: $path';
|
|
}
|
|
|
|
@override
|
|
String get recordStopped => 'Recording stopped';
|
|
|
|
@override
|
|
String get recordNoStream => 'Not connected or no video stream available';
|
|
|
|
@override
|
|
String get recordSwitchToStd =>
|
|
'Switching back to standard mode to record...';
|
|
|
|
@override
|
|
String recordStartFailed(Object error) {
|
|
return 'Failed to start recording: $error';
|
|
}
|
|
|
|
@override
|
|
String get recordNoVideoTrack => 'No remote video track received';
|
|
|
|
@override
|
|
String get selfCodecNotSupported =>
|
|
'Self-codec hardware decoding is not supported on this platform, fell back to WebRTC media stream.';
|
|
|
|
@override
|
|
String get iceDisconnected => 'ICE connection disconnected';
|
|
|
|
@override
|
|
String get targetOffline =>
|
|
'Target device is offline. Please confirm it is powered on and connected.';
|
|
|
|
@override
|
|
String connectionFailed(Object error) {
|
|
return 'Connection failed: $error';
|
|
}
|
|
|
|
@override
|
|
String get tokenExpired => 'Session expired. Please login again.';
|
|
|
|
@override
|
|
String get forceLogout => 'Account logged in elsewhere, force logged out.';
|
|
|
|
@override
|
|
String get loginFirst => 'Please login before connecting';
|
|
|
|
@override
|
|
String get pleaseFillAuth => 'Please enter the code or password';
|
|
|
|
@override
|
|
String get streamModeSelfCodecDesc =>
|
|
'Self-codec hardware decoding is not supported on this platform.';
|
|
|
|
@override
|
|
String get boundDevices => 'Bound Devices';
|
|
|
|
@override
|
|
String get online => 'Online';
|
|
|
|
@override
|
|
String get offline => 'Offline';
|
|
|
|
@override
|
|
String get noBoundDevices => 'No bound devices yet';
|
|
|
|
@override
|
|
String get refreshDevices => 'Refresh';
|
|
|
|
@override
|
|
String get redeemPairingCode => 'Bind with Pairing Code';
|
|
|
|
@override
|
|
String get pairingCodeHint =>
|
|
'Enter the pairing code shown on the controlled device';
|
|
|
|
@override
|
|
String bindingFailed(Object error) {
|
|
return 'Binding failed: $error';
|
|
}
|
|
|
|
@override
|
|
String deviceOfflineCannotConnect(Object name) {
|
|
return 'Device \"$name\" is currently offline and cannot be connected';
|
|
}
|
|
|
|
@override
|
|
String get pleaseSelectDevice => 'Please select a bound device first';
|
|
|
|
@override
|
|
String get bindSuccess => 'Bound successfully';
|
|
}
|