Theme provider and '-t' and '-c' CLI options

This commit is contained in:
veeso
2021-07-07 12:54:30 +02:00
parent a105a42519
commit 0a7e29d92f
50 changed files with 5453 additions and 1835 deletions
+15 -7
View File
@@ -35,6 +35,7 @@ pub(self) mod view;
// locals
use super::{Activity, Context, ExitReason};
use crate::config::themes::Theme;
use crate::filetransfer::ftp_transfer::FtpFileTransfer;
use crate::filetransfer::scp_transfer::ScpFileTransfer;
use crate::filetransfer::sftp_transfer::SftpFileTransfer;
@@ -165,34 +166,34 @@ impl FileTransferActivity {
}
}
pub(crate) fn local(&self) -> &FileExplorer {
fn local(&self) -> &FileExplorer {
self.browser.local()
}
pub(crate) fn local_mut(&mut self) -> &mut FileExplorer {
fn local_mut(&mut self) -> &mut FileExplorer {
self.browser.local_mut()
}
pub(crate) fn remote(&self) -> &FileExplorer {
fn remote(&self) -> &FileExplorer {
self.browser.remote()
}
pub(crate) fn remote_mut(&mut self) -> &mut FileExplorer {
fn remote_mut(&mut self) -> &mut FileExplorer {
self.browser.remote_mut()
}
pub(crate) fn found(&self) -> Option<&FileExplorer> {
fn found(&self) -> Option<&FileExplorer> {
self.browser.found()
}
pub(crate) fn found_mut(&mut self) -> Option<&mut FileExplorer> {
fn found_mut(&mut self) -> Option<&mut FileExplorer> {
self.browser.found_mut()
}
/// ### get_cache_tmp_name
///
/// Get file name for a file in cache
pub(crate) fn get_cache_tmp_name(&self, name: &str, file_type: Option<&str>) -> Option<String> {
fn get_cache_tmp_name(&self, name: &str, file_type: Option<&str>) -> Option<String> {
self.cache.as_ref().map(|_| {
let base: String = format!(
"{}-{}",
@@ -208,6 +209,13 @@ impl FileTransferActivity {
}
})
}
/// ### theme
///
/// Get a reference to `Theme`
fn theme(&self) -> &Theme {
self.context.as_ref().unwrap().theme_provider.theme()
}
}
/**
+126 -75
View File
@@ -65,13 +65,22 @@ impl FileTransferActivity {
/// Initialize file transfer activity's view
pub(super) fn init(&mut self) {
// Mount local file explorer
let local_explorer_background = self.theme().transfer_local_explorer_background;
let local_explorer_foreground = self.theme().transfer_local_explorer_foreground;
let local_explorer_highlighted = self.theme().transfer_local_explorer_highlighted;
let remote_explorer_background = self.theme().transfer_remote_explorer_background;
let remote_explorer_foreground = self.theme().transfer_remote_explorer_foreground;
let remote_explorer_highlighted = self.theme().transfer_remote_explorer_highlighted;
let log_panel = self.theme().transfer_log_window;
let log_background = self.theme().transfer_log_background;
self.view.mount(
super::COMPONENT_EXPLORER_LOCAL,
Box::new(FileList::new(
FileListPropsBuilder::default()
.with_background(Color::Yellow)
.with_foreground(Color::Yellow)
.with_borders(Borders::ALL, BorderType::Plain, Color::Yellow)
.with_highlight_color(local_explorer_highlighted)
.with_background(local_explorer_background)
.with_foreground(local_explorer_foreground)
.with_borders(Borders::ALL, BorderType::Plain, local_explorer_highlighted)
.build(),
)),
);
@@ -80,9 +89,10 @@ impl FileTransferActivity {
super::COMPONENT_EXPLORER_REMOTE,
Box::new(FileList::new(
FileListPropsBuilder::default()
.with_background(Color::LightBlue)
.with_foreground(Color::LightBlue)
.with_borders(Borders::ALL, BorderType::Plain, Color::LightBlue)
.with_highlight_color(remote_explorer_highlighted)
.with_background(remote_explorer_background)
.with_foreground(remote_explorer_foreground)
.with_borders(Borders::ALL, BorderType::Plain, remote_explorer_highlighted)
.build(),
)),
);
@@ -91,7 +101,8 @@ impl FileTransferActivity {
super::COMPONENT_LOG_BOX,
Box::new(LogBox::new(
LogboxPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Plain, Color::LightGreen)
.with_background(log_background)
.with_borders(Borders::ALL, BorderType::Plain, log_panel)
.build(),
)),
);
@@ -369,12 +380,13 @@ impl FileTransferActivity {
/// Mount error box
pub(super) fn mount_error(&mut self, text: &str) {
// Mount
let error_color = self.theme().misc_error_dialog;
self.view.mount(
super::COMPONENT_TEXT_ERROR,
Box::new(MsgBox::new(
MsgBoxPropsBuilder::default()
.with_foreground(Color::Red)
.with_borders(Borders::ALL, BorderType::Rounded, Color::Red)
.with_foreground(error_color)
.with_borders(Borders::ALL, BorderType::Rounded, error_color)
.bold()
.with_texts(None, vec![TextSpan::from(text)])
.build(),
@@ -393,12 +405,13 @@ impl FileTransferActivity {
pub(super) fn mount_fatal(&mut self, text: &str) {
// Mount
let error_color = self.theme().misc_error_dialog;
self.view.mount(
super::COMPONENT_TEXT_FATAL,
Box::new(MsgBox::new(
MsgBoxPropsBuilder::default()
.with_foreground(Color::Red)
.with_borders(Borders::ALL, BorderType::Rounded, Color::Red)
.with_foreground(error_color)
.with_borders(Borders::ALL, BorderType::Rounded, error_color)
.bold()
.with_texts(None, vec![TextSpan::from(text)])
.build(),
@@ -434,13 +447,14 @@ impl FileTransferActivity {
/// Mount quit popup
pub(super) fn mount_quit(&mut self) {
// Protocol
let quit_color = self.theme().misc_quit_dialog;
self.view.mount(
super::COMPONENT_RADIO_QUIT,
Box::new(Radio::new(
RadioPropsBuilder::default()
.with_color(Color::Yellow)
.with_color(quit_color)
.with_inverted_color(Color::Black)
.with_borders(Borders::ALL, BorderType::Rounded, Color::Yellow)
.with_borders(Borders::ALL, BorderType::Rounded, quit_color)
.with_options(
Some(String::from("Are you sure you want to quit?")),
vec![String::from("Yes"), String::from("No")],
@@ -463,13 +477,14 @@ impl FileTransferActivity {
/// Mount disconnect popup
pub(super) fn mount_disconnect(&mut self) {
// Protocol
let quit_color = self.theme().misc_quit_dialog;
self.view.mount(
super::COMPONENT_RADIO_DISCONNECT,
Box::new(Radio::new(
RadioPropsBuilder::default()
.with_color(Color::Yellow)
.with_color(quit_color)
.with_inverted_color(Color::Black)
.with_borders(Borders::ALL, BorderType::Rounded, Color::Yellow)
.with_borders(Borders::ALL, BorderType::Rounded, quit_color)
.with_options(
Some(String::from("Are you sure you want to disconnect?")),
vec![String::from("Yes"), String::from("No")],
@@ -488,11 +503,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_copy(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_COPY,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Copy file(s) to..."))
.build(),
)),
@@ -505,11 +522,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_exec(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_EXEC,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Plain, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Execute command"))
.build(),
)),
@@ -523,9 +542,17 @@ impl FileTransferActivity {
pub(super) fn mount_find(&mut self, search: &str) {
// Get color
let color: Color = match self.browser.tab() {
FileExplorerTab::Local | FileExplorerTab::FindLocal => Color::Yellow,
FileExplorerTab::Remote | FileExplorerTab::FindRemote => Color::LightBlue,
let (bg, fg, hg): (Color, Color, Color) = match self.browser.tab() {
FileExplorerTab::Local | FileExplorerTab::FindLocal => (
self.theme().transfer_local_explorer_background,
self.theme().transfer_local_explorer_foreground,
self.theme().transfer_local_explorer_highlighted,
),
FileExplorerTab::Remote | FileExplorerTab::FindRemote => (
self.theme().transfer_remote_explorer_background,
self.theme().transfer_remote_explorer_foreground,
self.theme().transfer_remote_explorer_highlighted,
),
};
// Mount component
self.view.mount(
@@ -533,9 +560,10 @@ impl FileTransferActivity {
Box::new(FileList::new(
FileListPropsBuilder::default()
.with_files(Some(format!("Search results for \"{}\"", search)), vec![])
.with_borders(Borders::ALL, BorderType::Plain, color)
.with_background(color)
.with_foreground(color)
.with_borders(Borders::ALL, BorderType::Plain, hg)
.with_highlight_color(hg)
.with_background(bg)
.with_foreground(fg)
.build(),
)),
);
@@ -548,11 +576,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_find_input(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_FIND,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Search files by name"))
.build(),
)),
@@ -567,11 +597,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_goto(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_GOTO,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Change working directory"))
.build(),
)),
@@ -584,11 +616,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_mkdir(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_MKDIR,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Insert directory name"))
.build(),
)),
@@ -601,11 +635,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_newfile(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_NEWFILE,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("New file name"))
.build(),
)),
@@ -618,11 +654,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_openwith(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_OPEN_WITH,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Open file with..."))
.build(),
)),
@@ -635,11 +673,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_rename(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_RENAME,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Move file(s) to..."))
.build(),
)),
@@ -652,11 +692,13 @@ impl FileTransferActivity {
}
pub(super) fn mount_saveas(&mut self) {
let input_color = self.theme().misc_input_dialog;
self.view.mount(
super::COMPONENT_INPUT_SAVEAS,
Box::new(Input::new(
InputPropsBuilder::default()
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
.with_borders(Borders::ALL, BorderType::Rounded, input_color)
.with_foreground(input_color)
.with_label(String::from("Save as..."))
.build(),
)),
@@ -669,11 +711,12 @@ impl FileTransferActivity {
}
pub(super) fn mount_progress_bar(&mut self, root_name: String) {
let prog_color = self.theme().transfer_progress_bar;
self.view.mount(
super::COMPONENT_PROGRESS_BAR_FULL,
Box::new(ProgressBar::new(
ProgressBarPropsBuilder::default()
.with_progbar_color(Color::Green)
.with_progbar_color(prog_color)
.with_background(Color::Black)
.with_borders(
Borders::TOP | Borders::RIGHT | Borders::LEFT,
@@ -688,7 +731,7 @@ impl FileTransferActivity {
super::COMPONENT_PROGRESS_BAR_PARTIAL,
Box::new(ProgressBar::new(
ProgressBarPropsBuilder::default()
.with_progbar_color(Color::Green)
.with_progbar_color(prog_color)
.with_background(Color::Black)
.with_borders(
Borders::BOTTOM | Borders::RIGHT | Borders::LEFT,
@@ -708,6 +751,7 @@ impl FileTransferActivity {
}
pub(super) fn mount_file_sorting(&mut self) {
let sorting_color = self.theme().transfer_status_sorting;
let sorting: FileSorting = match self.browser.tab() {
FileExplorerTab::Local => self.local().get_file_sorting(),
FileExplorerTab::Remote => self.remote().get_file_sorting(),
@@ -723,9 +767,9 @@ impl FileTransferActivity {
super::COMPONENT_RADIO_SORTING,
Box::new(Radio::new(
RadioPropsBuilder::default()
.with_color(Color::LightMagenta)
.with_color(sorting_color)
.with_inverted_color(Color::Black)
.with_borders(Borders::ALL, BorderType::Rounded, Color::LightMagenta)
.with_borders(Borders::ALL, BorderType::Rounded, sorting_color)
.with_options(
Some(String::from("Sort files by")),
vec![
@@ -747,13 +791,14 @@ impl FileTransferActivity {
}
pub(super) fn mount_radio_delete(&mut self) {
let warn_color = self.theme().misc_warn_dialog;
self.view.mount(
super::COMPONENT_RADIO_DELETE,
Box::new(Radio::new(
RadioPropsBuilder::default()
.with_color(Color::Red)
.with_color(warn_color)
.with_inverted_color(Color::Black)
.with_borders(Borders::ALL, BorderType::Plain, Color::Red)
.with_borders(Borders::ALL, BorderType::Plain, warn_color)
.with_options(
Some(String::from("Delete file")),
vec![String::from("Yes"), String::from("No")],
@@ -881,21 +926,23 @@ impl FileTransferActivity {
}
pub(super) fn refresh_local_status_bar(&mut self) {
let sorting_color = self.theme().transfer_status_sorting;
let hidden_color = self.theme().transfer_status_hidden;
let local_bar_spans: Vec<TextSpan> = vec![
TextSpanBuilder::new("File sorting: ")
.with_foreground(Color::LightYellow)
.with_foreground(sorting_color)
.build(),
TextSpanBuilder::new(Self::get_file_sorting_str(self.local().get_file_sorting()))
.with_foreground(Color::LightYellow)
.with_foreground(sorting_color)
.reversed()
.build(),
TextSpanBuilder::new(" Hidden files: ")
.with_foreground(Color::LightBlue)
.with_foreground(hidden_color)
.build(),
TextSpanBuilder::new(Self::get_hidden_files_str(
self.local().hidden_files_visible(),
))
.with_foreground(Color::LightBlue)
.with_foreground(hidden_color)
.reversed()
.build(),
];
@@ -910,31 +957,34 @@ impl FileTransferActivity {
}
pub(super) fn refresh_remote_status_bar(&mut self) {
let sorting_color = self.theme().transfer_status_sorting;
let hidden_color = self.theme().transfer_status_hidden;
let sync_color = self.theme().transfer_status_sync_browsing;
let remote_bar_spans: Vec<TextSpan> = vec![
TextSpanBuilder::new("File sorting: ")
.with_foreground(Color::LightYellow)
.with_foreground(sorting_color)
.build(),
TextSpanBuilder::new(Self::get_file_sorting_str(self.remote().get_file_sorting()))
.with_foreground(Color::LightYellow)
.with_foreground(sorting_color)
.reversed()
.build(),
TextSpanBuilder::new(" Hidden files: ")
.with_foreground(Color::LightBlue)
.with_foreground(hidden_color)
.build(),
TextSpanBuilder::new(Self::get_hidden_files_str(
self.remote().hidden_files_visible(),
))
.with_foreground(Color::LightBlue)
.with_foreground(hidden_color)
.reversed()
.build(),
TextSpanBuilder::new(" Sync Browsing: ")
.with_foreground(Color::LightGreen)
.with_foreground(sync_color)
.build(),
TextSpanBuilder::new(match self.browser.sync_browsing {
true => "ON ",
false => "OFF",
})
.with_foreground(Color::LightGreen)
.with_foreground(sync_color)
.reversed()
.build(),
];
@@ -952,6 +1002,7 @@ impl FileTransferActivity {
///
/// Mount help
pub(super) fn mount_help(&mut self) {
let key_color = self.theme().misc_keys;
self.view.mount(
super::COMPONENT_TEXT_HELP,
Box::new(Scrolltable::new(
@@ -966,7 +1017,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<ESC>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Disconnect"))
@@ -974,7 +1025,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<TAB>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(
@@ -984,7 +1035,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<BACKSPACE>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Go to previous directory"))
@@ -992,7 +1043,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<RIGHT/LEFT>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Change explorer tab"))
@@ -1000,7 +1051,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<UP/DOWN>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Move up/down in list"))
@@ -1008,7 +1059,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<ENTER>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Enter directory"))
@@ -1016,7 +1067,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<SPACE>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Upload/Download file"))
@@ -1024,7 +1075,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<A>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Toggle hidden files"))
@@ -1032,7 +1083,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<B>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Change file sorting mode"))
@@ -1040,7 +1091,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<C>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Copy"))
@@ -1048,7 +1099,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<D>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Make directory"))
@@ -1056,7 +1107,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<G>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Go to path"))
@@ -1064,7 +1115,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<H>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Show help"))
@@ -1072,7 +1123,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<I>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Show info about selected file"))
@@ -1080,7 +1131,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<L>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Reload directory content"))
@@ -1088,7 +1139,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<M>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Select file"))
@@ -1096,7 +1147,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<N>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Create new file"))
@@ -1104,7 +1155,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<O>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(
@@ -1114,7 +1165,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<Q>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Quit termscp"))
@@ -1122,7 +1173,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<R>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Rename file"))
@@ -1130,7 +1181,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<S>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Save file as"))
@@ -1138,7 +1189,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<U>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Go to parent directory"))
@@ -1146,7 +1197,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<V>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(
@@ -1156,7 +1207,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<W>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(
@@ -1166,7 +1217,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<X>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Execute shell command"))
@@ -1174,7 +1225,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<Y>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Toggle synchronized browsing"))
@@ -1182,7 +1233,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<DEL|E>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Delete selected file"))
@@ -1190,7 +1241,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<CTRL+A>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Select all files"))
@@ -1198,7 +1249,7 @@ impl FileTransferActivity {
.add_col(
TextSpanBuilder::new("<CTRL+C>")
.bold()
.with_foreground(Color::Cyan)
.with_foreground(key_color)
.build(),
)
.add_col(TextSpan::from(" Interrupt file transfer"))