mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed help popup
This commit is contained in:
@@ -129,10 +129,9 @@ impl FileTransferActivity {
|
||||
self.draw_popup_wait(txt.clone(), popup_area.width),
|
||||
popup_area,
|
||||
),
|
||||
PopupType::YesNo(txt, _, _) => f.render_widget(
|
||||
self.draw_popup_yesno(txt.clone()),
|
||||
popup_area,
|
||||
),
|
||||
PopupType::YesNo(txt, _, _) => {
|
||||
f.render_widget(self.draw_popup_yesno(txt.clone()), popup_area)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -411,11 +410,7 @@ impl FileTransferActivity {
|
||||
DialogYesNoOption::No => 1,
|
||||
};
|
||||
Tabs::new(choices)
|
||||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.title(text),
|
||||
)
|
||||
.block(Block::default().borders(Borders::ALL).title(text))
|
||||
.select(index)
|
||||
.style(Style::default())
|
||||
.highlight_style(
|
||||
@@ -435,8 +430,7 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<ESC>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -446,19 +440,27 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<TAB>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("change input field"),
|
||||
Span::raw("Switch between log tab and explorer"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<BACKSPACE>",
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("Go to previous directory in stack"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<RIGHT/LEFT>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -468,8 +470,7 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<UP/DOWN>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -479,8 +480,7 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<PGUP/PGDOWN>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -490,8 +490,7 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<ENTER>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -501,19 +500,27 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<SPACE>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("upload/download file"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CANC>",
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("delete file"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CTRL+D>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -523,19 +530,27 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<CTRL+G>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("goto path"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CTRL+H>",
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("show help"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CTRL+Q>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -545,8 +560,7 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<CTRL+R>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
@@ -556,24 +570,12 @@ impl FileTransferActivity {
|
||||
Span::styled(
|
||||
"<CTRL+U>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("go to parent directory"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CANC>",
|
||||
Style::default()
|
||||
.bg(Color::Cyan)
|
||||
.fg(Color::White)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw("delete file"),
|
||||
])),
|
||||
];
|
||||
List::new(cmds)
|
||||
.block(
|
||||
|
||||
Reference in New Issue
Block a user