rust: Nexus Terminal app shell (title bar, sidebar, tabs, split panes, terminal view, palette, prompts, dialogs, toasts, status bar)

This commit is contained in:
Andy Dixon
2026-10-11 16:48:33 +01:00
parent c36f4633a1
commit 43acc57c51
31 changed files with 3723 additions and 8 deletions
+41
View File
@@ -0,0 +1,41 @@
//! SFTP browser (right dock), the file-drop dialog and the remote directory picker.
//! STUB — interface fixed; implementation pending.
use crate::state::Shared;
use nexus_core::clients::sftp::Progress;
use std::path::PathBuf;
#[derive(Default)]
pub struct Sftp {
open_for: Option<String>,
}
impl Sftp {
pub fn toggle(&mut self, session: &str) {
self.open_for = if self.open_for.as_deref() == Some(session) { None } else { Some(session.into()) };
}
/// The session whose browser is showing in the dock, if any.
pub fn open_for(&self) -> Option<&str> {
self.open_for.as_deref()
}
pub fn close(&mut self, session: &str) {
if self.open_for.as_deref() == Some(session) {
self.open_for = None;
}
}
pub fn on_progress(&mut self, _session: &str, _p: Progress) {}
/// Files dropped on a terminal: offer "paste contents" or (SSH) "upload to a directory".
pub fn drop_files(&mut self, _s: &mut Shared, _session: &str, _paths: Vec<PathBuf>) {}
/// The dock panel.
pub fn ui(&mut self, ui: &mut egui::Ui, _s: &mut Shared) {
ui.label("SFTP");
}
/// Modal dialogs (file drop, directory picker), drawn every frame.
pub fn dialogs(&mut self, _ctx: &egui::Context, _s: &mut Shared) {}
}