ssh remoting: Restore SSH projects when reopening Zed (#19188)
Release Notes: - N/A --------- Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
parent
71a878aa39
commit
6ec00cdb06
5 changed files with 248 additions and 70 deletions
|
@ -11,7 +11,7 @@ use db::sqlez::{
|
|||
};
|
||||
use gpui::{AsyncWindowContext, Model, View, WeakView};
|
||||
use project::Project;
|
||||
use remote::ssh_session::SshProjectId;
|
||||
use remote::{ssh_session::SshProjectId, SshConnectionOptions};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
|
@ -50,6 +50,15 @@ impl SerializedSshProject {
|
|||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn connection_options(&self) -> SshConnectionOptions {
|
||||
SshConnectionOptions {
|
||||
host: self.host.clone(),
|
||||
username: self.user.clone(),
|
||||
port: self.port,
|
||||
password: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticColumnCount for SerializedSshProject {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue