This commit is contained in:
Joe Ardent 2025-08-13 14:39:37 -07:00
parent 8150bfacf2
commit 471fc5d73c

View file

@ -64,16 +64,14 @@ static CONTENT_RECEIVE_MENU: LazyLock<Line> = LazyLock::new(|| {
static CONTENT_SEND_FILE_MENU: LazyLock<Line> = LazyLock::new(|| { static CONTENT_SEND_FILE_MENU: LazyLock<Line> = LazyLock::new(|| {
Line::from(vec![ Line::from(vec![
" Fuzzy Search ".into(),
"</>".blue().bold(),
" Select Previous ".into(), " Select Previous ".into(),
"<UP>".blue().bold(), "<UP>".blue().bold(),
" Select Next ".into(), " Select Next ".into(),
"<DOWN>".blue().bold(), "<DOWN>".blue().bold(),
" Send File ".into(), " Send File ".into(),
"<ENTER>".blue().bold(), "<ENTER>".blue().bold(),
" Parent Dir ".into(),
"<LEFT>".blue().bold(),
" Child Dir ".into(),
"<RIGHT>".blue().bold(),
" Enter Text ".into(), " Enter Text ".into(),
"<T>".blue().bold(), "<T>".blue().bold(),
" Peers ".into(), " Peers ".into(),
@ -136,7 +134,7 @@ impl Widget for &mut App {
// one element in `self.screen`; see the `self.pop()` method // one element in `self.screen`; see the `self.pop()` method
let current_screen = self.screen(); let current_screen = self.screen();
match current_screen { match current_screen {
CurrentScreen::Main | CurrentScreen::Stopping => { CurrentScreen::Main => {
let rx_reqs: Vec<_> = self.receive_requests.values().collect(); let rx_reqs: Vec<_> = self.receive_requests.values().collect();
outer_frame(&current_screen, &MAIN_MENU, area, buf); outer_frame(&current_screen, &MAIN_MENU, area, buf);
logger(header_right.inner(header_margin), buf); logger(header_right.inner(header_margin), buf);
@ -158,7 +156,7 @@ impl Widget for &mut App {
buf, buf,
); );
} }
CurrentScreen::Logging => { CurrentScreen::Logging | CurrentScreen::Stopping => {
outer_frame(&current_screen, &LOGGING_MENU, area, buf); outer_frame(&current_screen, &LOGGING_MENU, area, buf);
logger(area.inner(subscreen_margin), buf); logger(area.inner(subscreen_margin), buf);
} }
@ -173,8 +171,8 @@ impl Widget for &mut App {
); );
logger(bottom.inner(subscreen_margin), buf); logger(bottom.inner(subscreen_margin), buf);
} }
CurrentScreen::Sending(s) => { CurrentScreen::Sending(sending_screen) => {
match s { match sending_screen {
SendingScreen::Files(_) => { SendingScreen::Files(_) => {
outer_frame(&current_screen, &CONTENT_SEND_FILE_MENU, area, buf) outer_frame(&current_screen, &CONTENT_SEND_FILE_MENU, area, buf)
} }
@ -188,7 +186,7 @@ impl Widget for &mut App {
let file_area = header_left.inner(header_margin); let file_area = header_left.inner(header_margin);
match s { match sending_screen {
SendingScreen::Files(FileMode::Picking) => { SendingScreen::Files(FileMode::Picking) => {
self.file_finder.widget().render(file_area, buf); self.file_finder.widget().render(file_area, buf);
} }
@ -210,7 +208,7 @@ impl Widget for &mut App {
buf, buf,
); );
if s == SendingScreen::Text { if sending_screen == SendingScreen::Text {
let rect = centered_rect(area, Constraint::Percentage(80), Constraint::Max(10)); let rect = centered_rect(area, Constraint::Percentage(80), Constraint::Max(10));
let text = if let Some(text) = self.text.as_ref() { let text = if let Some(text) = self.text.as_ref() {
text text