This commit is contained in:
ChristianVisintin
2020-12-01 15:14:49 +01:00
parent 3944367fb3
commit cd3ffae285

View File

@@ -126,11 +126,11 @@ impl AuthActivity {
InputProtocol::Sftp => { InputProtocol::Sftp => {
self.secure = false; self.secure = false;
self.protocol = FileTransferProtocol::Sftp; self.protocol = FileTransferProtocol::Sftp;
}, }
InputProtocol::Ftp => { InputProtocol::Ftp => {
self.secure = false; self.secure = false;
self.protocol = FileTransferProtocol::Ftp; self.protocol = FileTransferProtocol::Ftp;
}, }
InputProtocol::Ftps => { InputProtocol::Ftps => {
self.secure = true; self.secure = true;
self.protocol = FileTransferProtocol::Ftp; self.protocol = FileTransferProtocol::Ftp;
@@ -335,7 +335,8 @@ impl AuthActivity {
/// ///
/// Draw protocol select /// Draw protocol select
fn draw_protocol_select(&self) -> Tabs { fn draw_protocol_select(&self) -> Tabs {
let protocols: Vec<Spans> = vec![Spans::from("SFTP"), Spans::from("FTP"), Spans::from("FTPS")]; let protocols: Vec<Spans> =
vec![Spans::from("SFTP"), Spans::from("FTP"), Spans::from("FTPS")];
let index: usize = match self.input_protocol { let index: usize = match self.input_protocol {
InputProtocol::Sftp => 0, InputProtocol::Sftp => 0,
InputProtocol::Ftp => 1, InputProtocol::Ftp => 1,
@@ -352,7 +353,7 @@ impl AuthActivity {
Style::default() Style::default()
.add_modifier(Modifier::BOLD) .add_modifier(Modifier::BOLD)
.bg(Color::Green) .bg(Color::Green)
.fg(Color::Black) .fg(Color::Black),
) )
} }
@@ -560,8 +561,8 @@ impl Activity for AuthActivity {
Some(mut ctx) => { Some(mut ctx) => {
let _ = ctx.terminal.clear(); let _ = ctx.terminal.clear();
Some(ctx) Some(ctx)
}, }
None => None None => None,
} }
} }
} }