mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-16 17:51:04 +03:00
terminal works basically. (#12189)
* terminal works basically. todo: - persistent - sessions restore - web - mobile * missed terminal persistent option change * android sdk 34 -> 35 * +#![cfg_attr(lt_1_77, feature(c_str_literals))] * fixing ci * fix ci * fix ci for android * try "Fix Android SDK Platform 35" * fix android 34 * revert flutter_plugin_android_lifecycle to 2.0.17 which used in rustdesk 1.4.0 * refactor, but break something of desktop terminal (new tab showing loading) * fix connecting...
This commit is contained in:
@@ -48,6 +48,7 @@ pub struct Client {
|
||||
pub disconnected: bool,
|
||||
pub is_file_transfer: bool,
|
||||
pub is_view_camera: bool,
|
||||
pub is_terminal: bool,
|
||||
pub port_forward: String,
|
||||
pub name: String,
|
||||
pub peer_id: String,
|
||||
@@ -130,6 +131,7 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
id: i32,
|
||||
is_file_transfer: bool,
|
||||
is_view_camera: bool,
|
||||
is_terminal: bool,
|
||||
port_forward: String,
|
||||
peer_id: String,
|
||||
name: String,
|
||||
@@ -150,6 +152,7 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
disconnected: false,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
is_terminal,
|
||||
port_forward,
|
||||
name: name.clone(),
|
||||
peer_id: peer_id.clone(),
|
||||
@@ -206,7 +209,7 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
.read()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.filter(|(_k, v)| !v.is_file_transfer)
|
||||
.filter(|(_k, v)| !v.is_file_transfer && !v.is_terminal)
|
||||
.next()
|
||||
.is_none()
|
||||
{
|
||||
@@ -405,9 +408,9 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
}
|
||||
Ok(Some(data)) => {
|
||||
match data {
|
||||
Data::Login{id, is_file_transfer, is_view_camera, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, file_transfer_enabled: _file_transfer_enabled, restart, recording, block_input, from_switch} => {
|
||||
Data::Login{id, is_file_transfer, is_view_camera, is_terminal, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, file_transfer_enabled: _file_transfer_enabled, restart, recording, block_input, from_switch} => {
|
||||
log::debug!("conn_id: {}", id);
|
||||
self.cm.add_connection(id, is_file_transfer, is_view_camera, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording, block_input, from_switch, self.tx.clone());
|
||||
self.cm.add_connection(id, is_file_transfer, is_view_camera, is_terminal, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording, block_input, from_switch, self.tx.clone());
|
||||
self.conn_id = id;
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
@@ -676,6 +679,7 @@ pub async fn start_listen<T: InvokeUiCM>(
|
||||
id,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
is_terminal,
|
||||
port_forward,
|
||||
peer_id,
|
||||
name,
|
||||
@@ -695,6 +699,7 @@ pub async fn start_listen<T: InvokeUiCM>(
|
||||
id,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
is_terminal,
|
||||
port_forward,
|
||||
peer_id,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user