mirror of
https://github.com/veeso/termscp.git
synced 2025-12-06 17:15:35 -08:00
wip
This commit is contained in:
@@ -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 | |
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user