mirror of
https://github.com/veeso/termscp.git
synced 2026-04-06 02:01:34 -07: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 |
|
| `<S>` | Save file as... | Save |
|
||||||
| `<U>` | Go to parent directory | Upper |
|
| `<U>` | Go to parent directory | Upper |
|
||||||
| `<X>` | Execute a command | eXecute |
|
| `<X>` | Execute a command | eXecute |
|
||||||
|
| `<Y>` | Toggle synchronized browsing | sYnc |
|
||||||
| `<DEL>` | Delete file | |
|
| `<DEL>` | Delete file | |
|
||||||
| `<CTRL+C>` | Abort file transfer process | |
|
| `<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
|
||||||
///
|
///
|
||||||
/// FileTransferActivity is the data holder for the file transfer activity
|
/// FileTransferActivity is the data holder for the file transfer activity
|
||||||
@@ -217,6 +241,7 @@ pub struct FileTransferActivity {
|
|||||||
log_records: VecDeque<LogRecord>, // Log records
|
log_records: VecDeque<LogRecord>, // Log records
|
||||||
log_size: usize, // Log records size (max)
|
log_size: usize, // Log records size (max)
|
||||||
transfer: TransferStates, // Transfer states
|
transfer: TransferStates, // Transfer states
|
||||||
|
browser: Browser, // Browser states
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileTransferActivity {
|
impl FileTransferActivity {
|
||||||
@@ -246,6 +271,7 @@ impl FileTransferActivity {
|
|||||||
log_records: VecDeque::with_capacity(256), // 256 events is enough I guess
|
log_records: VecDeque::with_capacity(256), // 256 events is enough I guess
|
||||||
log_size: 256, // Must match with capacity
|
log_size: 256, // Must match with capacity
|
||||||
transfer: TransferStates::default(),
|
transfer: TransferStates::default(),
|
||||||
|
browser: Browser::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,11 +179,11 @@ pub const MSG_KEY_CHAR_X: Msg = Msg::OnKey(KeyEvent {
|
|||||||
code: KeyCode::Char('x'),
|
code: KeyCode::Char('x'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
pub const MSG_KEY_CHAR_Y: Msg = Msg::OnKey(KeyEvent {
|
pub const MSG_KEY_CHAR_Y: Msg = Msg::OnKey(KeyEvent {
|
||||||
code: KeyCode::Char('y'),
|
code: KeyCode::Char('y'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
pub const MSG_KEY_CHAR_Z: Msg = Msg::OnKey(KeyEvent {
|
pub const MSG_KEY_CHAR_Z: Msg = Msg::OnKey(KeyEvent {
|
||||||
code: KeyCode::Char('z'),
|
code: KeyCode::Char('z'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
|||||||
Reference in New Issue
Block a user