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