mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-21 02:03:19 +03:00
sync setting page service status
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -39,6 +39,10 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
final RxBool _idInputFocused = false.obs;
|
||||
final FocusNode _idFocusNode = FocusNode();
|
||||
|
||||
var svcStopped = false.obs;
|
||||
var svcStatusCode = 0.obs;
|
||||
var svcIsUsingPublicServer = true.obs;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -58,6 +62,15 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
_idFocusNode.addListener(() {
|
||||
_idInputFocused.value = _idFocusNode.hasFocus;
|
||||
});
|
||||
Get.put<RxBool>(svcStopped, tag: 'service-stop');
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_idController.dispose();
|
||||
_updateTimer?.cancel();
|
||||
Get.delete<RxBool>(tag: 'service-stop');
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -222,17 +235,6 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
constraints: const BoxConstraints(maxWidth: 600), child: w));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_idController.dispose();
|
||||
_updateTimer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
var svcStopped = false.obs;
|
||||
var svcStatusCode = 0.obs;
|
||||
var svcIsUsingPublicServer = true.obs;
|
||||
|
||||
Widget buildStatus() {
|
||||
final em = 14.0;
|
||||
return ConstrainedBox(
|
||||
|
||||
Reference in New Issue
Block a user