feat: Replaced the Exec popup with a fully functional terminal emulator

closes #340
This commit is contained in:
veeso
2025-06-09 22:51:04 +02:00
parent 81ae0035c3
commit 27c4a02108
18 changed files with 954 additions and 121 deletions

View File

@@ -56,6 +56,8 @@ pub struct FileExplorer {
pub(crate) opts: ExplorerOpts,
/// Formatter for file entries
pub(crate) fmt: Formatter,
/// Is terminal open for this explorer?
terminal: bool,
/// Files in directory
files: Vec<File>,
/// files enqueued for transfer. Map between source and destination
@@ -73,6 +75,7 @@ impl Default for FileExplorer {
opts: ExplorerOpts::empty(),
fmt: Formatter::default(),
files: Vec::new(),
terminal: false,
transfer_queue: HashMap::new(),
}
}
@@ -179,6 +182,15 @@ impl FileExplorer {
self.transfer_queue.clear();
}
/// Toggle terminal state
pub fn toggle_terminal(&mut self, terminal: bool) {
self.terminal = terminal;
}
pub fn terminal_open(&self) -> bool {
self.terminal
}
// Formatting
/// Format a file entry