diff --git a/src/main.rs b/src/main.rs index 6ab59d0..cfc06a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1152,26 +1152,9 @@ fn wait_for_key(terminal: &mut Terminal, app: &App) -> Result<()> let p = Paragraph::new(prompt_span) .alignment(Alignment::Center); f.render_widget(p, centered_bottom(f.area())); - // Also show the status message if set - if let Some(ref msg) = app.tui_state.status_message { - let color = match app.tui_state.status_style { - tui::StatusStyle::Success => Color::Green, - tui::StatusStyle::Warning => Color::Yellow, - tui::StatusStyle::Error => Color::Red, - tui::StatusStyle::Info => Color::Cyan, - tui::StatusStyle::Neutral => Color::Gray, - }; - let line = Line::from(Span::styled(format!(" [{msg}]"), Style::default().fg(color))); - f.render_widget( - Paragraph::new(line), - Rect { - x: f.area().x, - y: f.area().height.saturating_sub(2), - width: f.area().width, - height: 1, - }, - ); - } + // Whale at bottom + let bar = Rect { x: 0, y: f.area().height.saturating_sub(1), width: f.area().width, height: 1 }; + tui::draw_whale_separator(f, bar, &app.tui_state); })?; if let Event::Key(_) = event::read()? { break; diff --git a/src/tui.rs b/src/tui.rs index 33a2bb3..bda4837 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -591,37 +591,12 @@ fn draw_select_list_with_info( } fn draw_status_bar(f: &mut Frame, area: Rect, app: &AppState) { - if let Some(ref msg) = app.status_message { - let color = match app.status_style { - StatusStyle::Success => Color::Green, - StatusStyle::Warning => Color::Yellow, - StatusStyle::Error => Color::Red, - StatusStyle::Info => Color::Cyan, - StatusStyle::Neutral => Color::Gray, - }; - - let icon = match app.status_style { - StatusStyle::Success => "√", - StatusStyle::Warning => "!", - StatusStyle::Error => "×", - StatusStyle::Info => "i", - StatusStyle::Neutral => " ", - }; - - let line = Line::from(vec![ - Span::styled( - format!(" [{icon}] {msg}"), - Style::default().fg(color), - ), - ]); - f.render_widget(Paragraph::new(line), area); - } draw_whale_separator(f, area, app); } /// Separator line with a whale patrolling right-to-left. /// Disappears for ~10 s after reaching the left edge. -fn draw_whale_separator(f: &mut Frame, area: Rect, app: &AppState) { +pub fn draw_whale_separator(f: &mut Frame, area: Rect, app: &AppState) { if area.width < 4 { return; } let elapsed = app.whale_start.elapsed().as_millis() as u64; let bar_w = area.width as u64;