feat(remote): 修复键盘输入映射并重构连接流程
- Android端注入按键时显式设置SOURCE_KEYBOARD,修复IME丢弃事件导致输入框无法输入文字的问题 - Flutter端新增Flutter逻辑键到Android keyCode的转换映射,避免功能键误触发 - 重构RemoteController,分离信令连接与远程控制逻辑,支持设备列表选择与配对码兑换 - AuthRepository接口新增getBindings、getOnlineDevices、redeemPairingCode方法 - DioAuthRepository实现401自动刷新token重试机制 - ConnectionSessionState扩展设备列表、在线状态、配对码等状态字段
This commit is contained in:
@@ -13,8 +13,7 @@
|
||||
"connecting": "Connecting...",
|
||||
"loginAccount": "Login Account",
|
||||
"connectDevice": "Connect Device",
|
||||
"serverUrl": "Signal Server URL:",
|
||||
"serverUrlPlaceholder": "wss://www.ttstd.com/signal",
|
||||
|
||||
"deviceId": "Device ID (assigned by server):",
|
||||
"deviceIdPlaceholder": "Assigned by server",
|
||||
"targetDeviceId": "Target Device ID:",
|
||||
@@ -23,7 +22,7 @@
|
||||
"password": "Password",
|
||||
"loginFailed": "Login failed: {error}",
|
||||
"usernamePasswordRequired": "Please enter username and password",
|
||||
"serverAndTargetRequired": "Please enter server URL and target device ID",
|
||||
"targetRequired": "Please enter target device ID",
|
||||
"authTitle": "Connection Auth",
|
||||
"authNone": "Passwordless",
|
||||
"authNoneDesc": "Manual confirmation on the controlled device",
|
||||
@@ -67,5 +66,16 @@
|
||||
"forceLogout": "Account logged in elsewhere, force logged out.",
|
||||
"loginFirst": "Please login before connecting",
|
||||
"pleaseFillAuth": "Please enter the code or password",
|
||||
"streamModeSelfCodecDesc": "Self-codec hardware decoding is not supported on this platform."
|
||||
"streamModeSelfCodecDesc": "Self-codec hardware decoding is not supported on this platform.",
|
||||
"boundDevices": "Bound Devices",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"noBoundDevices": "No bound devices yet",
|
||||
"refreshDevices": "Refresh",
|
||||
"redeemPairingCode": "Bind with Pairing Code",
|
||||
"pairingCodeHint": "Enter the pairing code shown on the controlled device",
|
||||
"bindingFailed": "Binding failed: {error}",
|
||||
"deviceOfflineCannotConnect": "Device \"{name}\" is currently offline and cannot be connected",
|
||||
"pleaseSelectDevice": "Please select a bound device first",
|
||||
"bindSuccess": "Bound successfully"
|
||||
}
|
||||
|
||||
@@ -176,18 +176,6 @@ abstract class AppLocalizations {
|
||||
/// **'连接被控设备'**
|
||||
String get connectDevice;
|
||||
|
||||
/// No description provided for @serverUrl.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'信令服务器地址:'**
|
||||
String get serverUrl;
|
||||
|
||||
/// No description provided for @serverUrlPlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'wss://www.ttstd.com/signal'**
|
||||
String get serverUrlPlaceholder;
|
||||
|
||||
/// No description provided for @deviceId.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
@@ -236,11 +224,11 @@ abstract class AppLocalizations {
|
||||
/// **'请输入用户名和密码'**
|
||||
String get usernamePasswordRequired;
|
||||
|
||||
/// No description provided for @serverAndTargetRequired.
|
||||
/// No description provided for @targetRequired.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请填写服务器地址和目标设备ID'**
|
||||
String get serverAndTargetRequired;
|
||||
/// **'请填写目标设备ID'**
|
||||
String get targetRequired;
|
||||
|
||||
/// No description provided for @authTitle.
|
||||
///
|
||||
@@ -505,6 +493,72 @@ abstract class AppLocalizations {
|
||||
/// In zh, this message translates to:
|
||||
/// **'当前平台不支持自编码硬解。'**
|
||||
String get streamModeSelfCodecDesc;
|
||||
|
||||
/// No description provided for @boundDevices.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'已绑定设备'**
|
||||
String get boundDevices;
|
||||
|
||||
/// No description provided for @online.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'在线'**
|
||||
String get online;
|
||||
|
||||
/// No description provided for @offline.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'离线'**
|
||||
String get offline;
|
||||
|
||||
/// No description provided for @noBoundDevices.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'暂无已绑定设备'**
|
||||
String get noBoundDevices;
|
||||
|
||||
/// No description provided for @refreshDevices.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'刷新'**
|
||||
String get refreshDevices;
|
||||
|
||||
/// No description provided for @redeemPairingCode.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'使用配对码绑定'**
|
||||
String get redeemPairingCode;
|
||||
|
||||
/// No description provided for @pairingCodeHint.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入被控端显示的配对码'**
|
||||
String get pairingCodeHint;
|
||||
|
||||
/// No description provided for @bindingFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'绑定失败:{error}'**
|
||||
String bindingFailed(Object error);
|
||||
|
||||
/// No description provided for @deviceOfflineCannotConnect.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'设备「{name}」当前不在线,无法连接'**
|
||||
String deviceOfflineCannotConnect(Object name);
|
||||
|
||||
/// No description provided for @pleaseSelectDevice.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请先选择一个绑定的设备'**
|
||||
String get pleaseSelectDevice;
|
||||
|
||||
/// No description provided for @bindSuccess.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'绑定成功'**
|
||||
String get bindSuccess;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
||||
@@ -49,12 +49,6 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get connectDevice => 'Connect Device';
|
||||
|
||||
@override
|
||||
String get serverUrl => 'Signal Server URL:';
|
||||
|
||||
@override
|
||||
String get serverUrlPlaceholder => 'wss://www.ttstd.com/signal';
|
||||
|
||||
@override
|
||||
String get deviceId => 'Device ID (assigned by server):';
|
||||
|
||||
@@ -82,8 +76,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get usernamePasswordRequired => 'Please enter username and password';
|
||||
|
||||
@override
|
||||
String get serverAndTargetRequired =>
|
||||
'Please enter server URL and target device ID';
|
||||
String get targetRequired => 'Please enter target device ID';
|
||||
|
||||
@override
|
||||
String get authTitle => 'Connection Auth';
|
||||
@@ -239,4 +232,42 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@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';
|
||||
}
|
||||
|
||||
@@ -49,12 +49,6 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get connectDevice => '连接被控设备';
|
||||
|
||||
@override
|
||||
String get serverUrl => '信令服务器地址:';
|
||||
|
||||
@override
|
||||
String get serverUrlPlaceholder => 'wss://www.ttstd.com/signal';
|
||||
|
||||
@override
|
||||
String get deviceId => '本机设备ID(连接后由服务端下发,无需填写):';
|
||||
|
||||
@@ -82,7 +76,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
String get usernamePasswordRequired => '请输入用户名和密码';
|
||||
|
||||
@override
|
||||
String get serverAndTargetRequired => '请填写服务器地址和目标设备ID';
|
||||
String get targetRequired => '请填写目标设备ID';
|
||||
|
||||
@override
|
||||
String get authTitle => '连接鉴权';
|
||||
@@ -231,4 +225,41 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get streamModeSelfCodecDesc => '当前平台不支持自编码硬解。';
|
||||
|
||||
@override
|
||||
String get boundDevices => '已绑定设备';
|
||||
|
||||
@override
|
||||
String get online => '在线';
|
||||
|
||||
@override
|
||||
String get offline => '离线';
|
||||
|
||||
@override
|
||||
String get noBoundDevices => '暂无已绑定设备';
|
||||
|
||||
@override
|
||||
String get refreshDevices => '刷新';
|
||||
|
||||
@override
|
||||
String get redeemPairingCode => '使用配对码绑定';
|
||||
|
||||
@override
|
||||
String get pairingCodeHint => '请输入被控端显示的配对码';
|
||||
|
||||
@override
|
||||
String bindingFailed(Object error) {
|
||||
return '绑定失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String deviceOfflineCannotConnect(Object name) {
|
||||
return '设备「$name」当前不在线,无法连接';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pleaseSelectDevice => '请先选择一个绑定的设备';
|
||||
|
||||
@override
|
||||
String get bindSuccess => '绑定成功';
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"connecting": "正在连接...",
|
||||
"loginAccount": "登录账号",
|
||||
"connectDevice": "连接被控设备",
|
||||
"serverUrl": "信令服务器地址:",
|
||||
"serverUrlPlaceholder": "wss://www.ttstd.com/signal",
|
||||
|
||||
"deviceId": "本机设备ID(连接后由服务端下发,无需填写):",
|
||||
"deviceIdPlaceholder": "连接后由服务端下发",
|
||||
"targetDeviceId": "目标被控设备ID:",
|
||||
@@ -23,7 +22,7 @@
|
||||
"password": "密码",
|
||||
"loginFailed": "登录失败:{error}",
|
||||
"usernamePasswordRequired": "请输入用户名和密码",
|
||||
"serverAndTargetRequired": "请填写服务器地址和目标设备ID",
|
||||
"targetRequired": "请填写目标设备ID",
|
||||
"authTitle": "连接鉴权",
|
||||
"authNone": "免密连接",
|
||||
"authNoneDesc": "被控端弹出手动确认框,无需验证码或密码",
|
||||
@@ -67,5 +66,16 @@
|
||||
"forceLogout": "账号已在其他位置登录,已强制下线。",
|
||||
"loginFirst": "请先登录后再连接",
|
||||
"pleaseFillAuth": "请输入验证码或密码",
|
||||
"streamModeSelfCodecDesc": "当前平台不支持自编码硬解。"
|
||||
"streamModeSelfCodecDesc": "当前平台不支持自编码硬解。",
|
||||
"boundDevices": "已绑定设备",
|
||||
"online": "在线",
|
||||
"offline": "离线",
|
||||
"noBoundDevices": "暂无已绑定设备",
|
||||
"refreshDevices": "刷新",
|
||||
"redeemPairingCode": "使用配对码绑定",
|
||||
"pairingCodeHint": "请输入被控端显示的配对码",
|
||||
"bindingFailed": "绑定失败:{error}",
|
||||
"deviceOfflineCannotConnect": "设备「{name}」当前不在线,无法连接",
|
||||
"pleaseSelectDevice": "请先选择一个绑定的设备",
|
||||
"bindSuccess": "绑定成功"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user