This commit is contained in:
ChristianVisintin
2020-11-29 16:18:55 +01:00
parent a843a5a0de
commit 585ad19462

View File

@@ -1619,13 +1619,16 @@ impl FileTransferActivity {
.block( .block(
Block::default() Block::default()
.borders(Borders::ALL) .borders(Borders::ALL)
.style(match self.tab { .border_style(match self.input_field {
FileExplorerTab::Remote => Style::default().fg(Color::Yellow), InputField::Explorer => match self.tab {
FileExplorerTab::Local => Style::default().fg(Color::Yellow),
_ => Style::default(),
},
_ => Style::default(), _ => Style::default(),
}) })
.title("Localhost"), .title("Localhost"),
) )
.start_corner(Corner::BottomLeft) .start_corner(Corner::TopLeft)
.highlight_style( .highlight_style(
Style::default() Style::default()
.fg(Color::LightYellow) .fg(Color::LightYellow)
@@ -1647,7 +1650,7 @@ impl FileTransferActivity {
.block( .block(
Block::default() Block::default()
.borders(Borders::ALL) .borders(Borders::ALL)
.style(match self.input_field { .border_style(match self.input_field {
InputField::Explorer => match self.tab { InputField::Explorer => match self.tab {
FileExplorerTab::Remote => Style::default().fg(Color::Yellow), FileExplorerTab::Remote => Style::default().fg(Color::Yellow),
_ => Style::default(), _ => Style::default(),
@@ -1656,7 +1659,7 @@ impl FileTransferActivity {
}) })
.title(self.params.address.clone()), .title(self.params.address.clone()),
) )
.start_corner(Corner::BottomLeft) .start_corner(Corner::TopLeft)
.highlight_style( .highlight_style(
Style::default() Style::default()
.fg(Color::LightYellow) .fg(Color::LightYellow)
@@ -1701,7 +1704,7 @@ impl FileTransferActivity {
.block( .block(
Block::default() Block::default()
.borders(Borders::ALL) .borders(Borders::ALL)
.style(match self.input_field { .border_style(match self.input_field {
InputField::Logs => Style::default().fg(Color::Yellow), InputField::Logs => Style::default().fg(Color::Yellow),
_ => Style::default(), _ => Style::default(),
}) })
@@ -1929,8 +1932,12 @@ impl Activity for FileTransferActivity {
if self.context.is_none() { if self.context.is_none() {
return; return;
} }
let is_explorer_mode: bool = match self.input_mode {
InputMode::Explorer => true,
_ => false,
};
// Check if connected // Check if connected
if !self.client.is_connected() { if !self.client.is_connected() && is_explorer_mode {
// Set init state to connecting popup // Set init state to connecting popup
self.input_mode = InputMode::Popup(PopupType::Wait(format!( self.input_mode = InputMode::Popup(PopupType::Wait(format!(
"Connecting to {}:{}...", "Connecting to {}:{}...",