mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
fix cm elevate button visibility of different conn type
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -581,10 +581,17 @@ class ServerModel with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
enum ClientType {
|
||||
remote,
|
||||
file,
|
||||
portForward,
|
||||
}
|
||||
|
||||
class Client {
|
||||
int id = 0; // client connections inner count id
|
||||
bool authorized = false;
|
||||
bool isFileTransfer = false;
|
||||
String portForward = "";
|
||||
String name = "";
|
||||
String peerId = ""; // peer user's id,show at app
|
||||
bool keyboard = false;
|
||||
@@ -604,6 +611,7 @@ class Client {
|
||||
id = json['id'];
|
||||
authorized = json['authorized'];
|
||||
isFileTransfer = json['is_file_transfer'];
|
||||
portForward = json['port_forward'];
|
||||
name = json['name'];
|
||||
peerId = json['peer_id'];
|
||||
keyboard = json['keyboard'];
|
||||
@@ -620,6 +628,7 @@ class Client {
|
||||
data['id'] = id;
|
||||
data['is_start'] = authorized;
|
||||
data['is_file_transfer'] = isFileTransfer;
|
||||
data['port_forward'] = portForward;
|
||||
data['name'] = name;
|
||||
data['peer_id'] = peerId;
|
||||
data['keyboard'] = keyboard;
|
||||
@@ -631,6 +640,16 @@ class Client {
|
||||
data['disconnected'] = disconnected;
|
||||
return data;
|
||||
}
|
||||
|
||||
ClientType type_() {
|
||||
if (isFileTransfer) {
|
||||
return ClientType.file;
|
||||
} else if (portForward.isNotEmpty) {
|
||||
return ClientType.portForward;
|
||||
} else {
|
||||
return ClientType.remote;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String getLoginDialogTag(int id) {
|
||||
|
||||
Reference in New Issue
Block a user