fix id input focus problem
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
52a21234d4
commit
cba450b32f
@ -36,6 +36,9 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||||||
|
|
||||||
Timer? _updateTimer;
|
Timer? _updateTimer;
|
||||||
|
|
||||||
|
final RxBool _idInputFocused = false.obs;
|
||||||
|
final FocusNode _idFocusNode = FocusNode();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -121,10 +124,8 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||||||
/// UI for the remote ID TextField.
|
/// UI for the remote ID TextField.
|
||||||
/// Search for a peer and connect to it if the id exists.
|
/// Search for a peer and connect to it if the id exists.
|
||||||
Widget _buildRemoteIDTextField(BuildContext context) {
|
Widget _buildRemoteIDTextField(BuildContext context) {
|
||||||
RxBool inputFocused = false.obs;
|
_idFocusNode.addListener(() {
|
||||||
FocusNode focusNode = FocusNode();
|
_idInputFocused.value = _idFocusNode.hasFocus;
|
||||||
focusNode.addListener(() {
|
|
||||||
inputFocused.value = focusNode.hasFocus;
|
|
||||||
});
|
});
|
||||||
var w = Container(
|
var w = Container(
|
||||||
width: 320 + 20 * 2,
|
width: 320 + 20 * 2,
|
||||||
@ -155,7 +156,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
enableSuggestions: false,
|
enableSuggestions: false,
|
||||||
keyboardType: TextInputType.visiblePassword,
|
keyboardType: TextInputType.visiblePassword,
|
||||||
focusNode: focusNode,
|
focusNode: _idFocusNode,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'WorkSans',
|
fontFamily: 'WorkSans',
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
@ -165,7 +166,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||||||
cursorColor:
|
cursorColor:
|
||||||
Theme.of(context).textTheme.titleLarge?.color,
|
Theme.of(context).textTheme.titleLarge?.color,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: inputFocused.value
|
hintText: _idInputFocused.value
|
||||||
? null
|
? null
|
||||||
: translate('Enter Remote ID'),
|
: translate('Enter Remote ID'),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
|
@ -977,9 +977,11 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
).marginOnly(left: _kCheckBoxLeftMargin),
|
).marginOnly(left: _kCheckBoxLeftMargin),
|
||||||
onTap: () {
|
onTap: enabled
|
||||||
onChanged(!ref.value);
|
? () {
|
||||||
},
|
onChanged(!ref.value);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -364,6 +364,10 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildKeyboard(BuildContext context) {
|
Widget _buildKeyboard(BuildContext context) {
|
||||||
|
FfiModel ffiModel = Provider.of<FfiModel>(context);
|
||||||
|
if (ffiModel.permissions['keyboard'] == false) {
|
||||||
|
return Offstage();
|
||||||
|
}
|
||||||
return mod_menu.PopupMenuButton(
|
return mod_menu.PopupMenuButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
@ -517,7 +521,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gFFI.ffiModel.permissions["restart"] != false &&
|
if (perms["restart"] != false &&
|
||||||
(pi.platform == "Linux" ||
|
(pi.platform == "Linux" ||
|
||||||
pi.platform == "Windows" ||
|
pi.platform == "Windows" ||
|
||||||
pi.platform == "Mac OS")) {
|
pi.platform == "Mac OS")) {
|
||||||
|
@ -556,6 +556,9 @@ class Client {
|
|||||||
data['keyboard'] = keyboard;
|
data['keyboard'] = keyboard;
|
||||||
data['clipboard'] = clipboard;
|
data['clipboard'] = clipboard;
|
||||||
data['audio'] = audio;
|
data['audio'] = audio;
|
||||||
|
data['file'] = file;
|
||||||
|
data['restart'] = restart;
|
||||||
|
data['recording'] = recording;
|
||||||
data['disconnected'] = disconnected;
|
data['disconnected'] = disconnected;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", "会话已结束"),
|
("Disconnected", "会话已结束"),
|
||||||
("Other", "其他"),
|
("Other", "其他"),
|
||||||
("Confirm before closing multiple tabs", "关闭多个标签页时向您确认"),
|
("Confirm before closing multiple tabs", "关闭多个标签页时向您确认"),
|
||||||
|
("Keyboard Settings", "键盘设置"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", "Afbrudt"),
|
("Disconnected", "Afbrudt"),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", "他の"),
|
("Other", "他の"),
|
||||||
("Confirm before closing multiple tabs", "同時に複数のタブを閉じる前に確認する"),
|
("Confirm before closing multiple tabs", "同時に複数のタブを閉じる前に確認する"),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", "會話已結束"),
|
("Disconnected", "會話已結束"),
|
||||||
("Other", "其他"),
|
("Other", "其他"),
|
||||||
("Confirm before closing multiple tabs", "關閉多個分頁前跟我確認"),
|
("Confirm before closing multiple tabs", "關閉多個分頁前跟我確認"),
|
||||||
|
("Keyboard Settings", "鍵盤設置"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -373,5 +373,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Disconnected", ""),
|
("Disconnected", ""),
|
||||||
("Other", ""),
|
("Other", ""),
|
||||||
("Confirm before closing multiple tabs", ""),
|
("Confirm before closing multiple tabs", ""),
|
||||||
|
("Keyboard Settings", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user