mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
add desktop cm backend
This commit is contained in:
@@ -106,7 +106,6 @@ class DesktopServerPage extends StatefulWidget implements PageShape {
|
||||
}
|
||||
|
||||
class _DesktopServerPageState extends State<DesktopServerPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider.value(
|
||||
@@ -182,7 +181,7 @@ class ConnectionManager extends StatelessWidget {
|
||||
MaterialStateProperty.all(Colors.red)),
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () {
|
||||
bind.serverCloseConnection(connId: entry.key);
|
||||
bind.cmCloseConnection(connId: entry.key);
|
||||
gFFI.invokeMethod(
|
||||
"cancel_notification", entry.key);
|
||||
},
|
||||
|
||||
@@ -409,7 +409,7 @@ class ConnectionManager extends StatelessWidget {
|
||||
MaterialStateProperty.all(Colors.red)),
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () {
|
||||
bind.serverCloseConnection(connId: entry.key);
|
||||
bind.cmCloseConnection(connId: entry.key);
|
||||
gFFI.invokeMethod(
|
||||
"cancel_notification", entry.key);
|
||||
},
|
||||
|
||||
@@ -206,7 +206,7 @@ class ChatModel with ChangeNotifier {
|
||||
bind.sessionSendChat(id: _ffi.target!.id, text: message.text);
|
||||
}
|
||||
} else {
|
||||
bind.serverSendChat(connId: _currentID, msg: message.text);
|
||||
bind.cmSendChat(connId: _currentID, msg: message.text);
|
||||
}
|
||||
}
|
||||
notifyListeners();
|
||||
|
||||
@@ -423,7 +423,7 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
void sendLoginResponse(Client client, bool res) async {
|
||||
if (res) {
|
||||
bind.serverLoginRes(connId: client.id, res: res);
|
||||
bind.cmLoginRes(connId: client.id, res: res);
|
||||
if (!client.isFileTransfer) {
|
||||
parent.target?.invokeMethod("start_capture");
|
||||
}
|
||||
@@ -431,7 +431,7 @@ class ServerModel with ChangeNotifier {
|
||||
_clients[client.id]?.authorized = true;
|
||||
notifyListeners();
|
||||
} else {
|
||||
bind.serverLoginRes(connId: client.id, res: res);
|
||||
bind.cmLoginRes(connId: client.id, res: res);
|
||||
parent.target?.invokeMethod("cancel_notification", client.id);
|
||||
_clients.remove(client.id);
|
||||
}
|
||||
@@ -463,7 +463,7 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
closeAll() {
|
||||
_clients.forEach((id, client) {
|
||||
bind.serverCloseConnection(connId: id);
|
||||
bind.cmCloseConnection(connId: id);
|
||||
});
|
||||
_clients.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user