Make closing the SSH modal equivalent to cancelling the SSH connection task (#19568)
TODO: - [x] Fix focus not being on the modal initially Release Notes: - N/A --------- Co-authored-by: Trace <violet.white.batt@gmail.com>
This commit is contained in:
parent
f951410ef0
commit
33197608ed
5 changed files with 108 additions and 56 deletions
|
@ -5534,6 +5534,7 @@ pub fn join_hosted_project(
|
|||
pub fn open_ssh_project(
|
||||
window: WindowHandle<Workspace>,
|
||||
connection_options: SshConnectionOptions,
|
||||
cancel_rx: oneshot::Receiver<()>,
|
||||
delegate: Arc<dyn SshClientDelegate>,
|
||||
app_state: Arc<AppState>,
|
||||
paths: Vec<PathBuf>,
|
||||
|
@ -5555,11 +5556,21 @@ pub fn open_ssh_project(
|
|||
workspace_id.0
|
||||
);
|
||||
|
||||
let session = cx
|
||||
let session = match cx
|
||||
.update(|cx| {
|
||||
remote::SshRemoteClient::new(unique_identifier, connection_options, delegate, cx)
|
||||
remote::SshRemoteClient::new(
|
||||
unique_identifier,
|
||||
connection_options,
|
||||
cancel_rx,
|
||||
delegate,
|
||||
cx,
|
||||
)
|
||||
})?
|
||||
.await?;
|
||||
.await?
|
||||
{
|
||||
Some(result) => result,
|
||||
None => return Ok(()),
|
||||
};
|
||||
|
||||
let project = cx.update(|cx| {
|
||||
project::Project::ssh(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue