This commit is contained in:
veeso
2021-05-02 12:09:50 +02:00
parent 4bd18c1386
commit 60269c7777
3 changed files with 28 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ Password can be basically provided through 3 ways when address argument is provi
| `<S>` | Save file as... | Save |
| `<U>` | Go to parent directory | Upper |
| `<X>` | Execute a command | eXecute |
| `<Y>` | Toggle synchronized browsing | sYnc |
| `<DEL>` | Delete file | |
| `<CTRL+C>` | Abort file transfer process | |

View File

@@ -202,6 +202,30 @@ impl Default for TransferStates {
}
}
/// ## Browser
///
/// Browser contains the browser options
struct Browser {
pub sync_browsing: bool,
}
impl Default for Browser {
fn default() -> Self {
Self {
sync_browsing: false,
}
}
}
impl Browser {
/// ### toggle_sync_browsing
///
/// Invert the current state for the sync browsing
pub fn toggle_sync_browsing(&mut self) {
self.sync_browsing = !self.sync_browsing;
}
}
/// ## FileTransferActivity
///
/// FileTransferActivity is the data holder for the file transfer activity
@@ -217,6 +241,7 @@ pub struct FileTransferActivity {
log_records: VecDeque<LogRecord>, // Log records
log_size: usize, // Log records size (max)
transfer: TransferStates, // Transfer states
browser: Browser, // Browser states
}
impl FileTransferActivity {
@@ -246,6 +271,7 @@ impl FileTransferActivity {
log_records: VecDeque::with_capacity(256), // 256 events is enough I guess
log_size: 256, // Must match with capacity
transfer: TransferStates::default(),
browser: Browser::default(),
}
}
}

View File

@@ -179,11 +179,11 @@ pub const MSG_KEY_CHAR_X: Msg = Msg::OnKey(KeyEvent {
code: KeyCode::Char('x'),
modifiers: KeyModifiers::NONE,
});
/*
pub const MSG_KEY_CHAR_Y: Msg = Msg::OnKey(KeyEvent {
code: KeyCode::Char('y'),
modifiers: KeyModifiers::NONE,
});
/*
pub const MSG_KEY_CHAR_Z: Msg = Msg::OnKey(KeyEvent {
code: KeyCode::Char('z'),
modifiers: KeyModifiers::NONE,