mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-17 17:31:27 +03:00
@@ -36,6 +36,9 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
|
||||
Timer? _updateTimer;
|
||||
|
||||
final RxBool _idInputFocused = false.obs;
|
||||
final FocusNode _idFocusNode = FocusNode();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -121,10 +124,8 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
/// UI for the remote ID TextField.
|
||||
/// Search for a peer and connect to it if the id exists.
|
||||
Widget _buildRemoteIDTextField(BuildContext context) {
|
||||
RxBool inputFocused = false.obs;
|
||||
FocusNode focusNode = FocusNode();
|
||||
focusNode.addListener(() {
|
||||
inputFocused.value = focusNode.hasFocus;
|
||||
_idFocusNode.addListener(() {
|
||||
_idInputFocused.value = _idFocusNode.hasFocus;
|
||||
});
|
||||
var w = Container(
|
||||
width: 320 + 20 * 2,
|
||||
@@ -155,7 +156,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
autocorrect: false,
|
||||
enableSuggestions: false,
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
focusNode: focusNode,
|
||||
focusNode: _idFocusNode,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'WorkSans',
|
||||
fontSize: 22,
|
||||
@@ -165,7 +166,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
cursorColor:
|
||||
Theme.of(context).textTheme.titleLarge?.color,
|
||||
decoration: InputDecoration(
|
||||
hintText: inputFocused.value
|
||||
hintText: _idInputFocused.value
|
||||
? null
|
||||
: translate('Enter Remote ID'),
|
||||
border: OutlineInputBorder(
|
||||
|
||||
@@ -977,9 +977,11 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
|
||||
],
|
||||
),
|
||||
).marginOnly(left: _kCheckBoxLeftMargin),
|
||||
onTap: () {
|
||||
onChanged(!ref.value);
|
||||
},
|
||||
onTap: enabled
|
||||
? () {
|
||||
onChanged(!ref.value);
|
||||
}
|
||||
: null,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user