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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user