mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
desktop close connection tab (remote page)
This commit is contained in:
@@ -29,7 +29,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
||||
gFFI.connect(widget.id, isFileTransfer: true);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
gFFI.dialogManager
|
||||
.showLoading(translate('Connecting...'), onCancel: backToHomePage);
|
||||
.showLoading(translate('Connecting...'), onCancel: closeConnection);
|
||||
});
|
||||
gFFI.ffiModel.updateEventListener(widget.id);
|
||||
Wakelock.enable();
|
||||
|
||||
@@ -51,7 +51,7 @@ class _RemotePageState extends State<RemotePage> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
|
||||
gFFI.dialogManager
|
||||
.showLoading(translate('Connecting...'), onCancel: backToHomePage);
|
||||
.showLoading(translate('Connecting...'), onCancel: closeConnection);
|
||||
_interval =
|
||||
Timer.periodic(Duration(milliseconds: 30), (timer) => interval());
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ class _ScanPageState extends State<ScanPage> {
|
||||
}
|
||||
|
||||
void showServerSettingFromQr(String data) async {
|
||||
backToHomePage();
|
||||
closeConnection();
|
||||
await controller?.pauseCamera();
|
||||
if (!data.startsWith('config=')) {
|
||||
showToast('Invalid QR code');
|
||||
|
||||
@@ -184,7 +184,7 @@ void enterPasswordDialog(String id, OverlayDialogManager dialogManager) async {
|
||||
style: flatButtonStyle,
|
||||
onPressed: () {
|
||||
close();
|
||||
backToHomePage();
|
||||
closeConnection();
|
||||
},
|
||||
child: Text(translate('Cancel')),
|
||||
),
|
||||
@@ -196,7 +196,7 @@ void enterPasswordDialog(String id, OverlayDialogManager dialogManager) async {
|
||||
gFFI.login(id, text, remember);
|
||||
close();
|
||||
dialogManager.showLoading(translate('Logging in...'),
|
||||
onCancel: backToHomePage);
|
||||
onCancel: closeConnection);
|
||||
},
|
||||
child: Text(translate('OK')),
|
||||
),
|
||||
@@ -214,7 +214,7 @@ void wrongPasswordDialog(String id, OverlayDialogManager dialogManager) {
|
||||
style: flatButtonStyle,
|
||||
onPressed: () {
|
||||
close();
|
||||
backToHomePage();
|
||||
closeConnection();
|
||||
},
|
||||
child: Text(translate('Cancel')),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user