diff --git a/src/ui/detail.rs b/src/ui/detail.rs index e696c1c..87d7a57 100644 --- a/src/ui/detail.rs +++ b/src/ui/detail.rs @@ -3,7 +3,6 @@ use ratatui::prelude::*; use ratatui::widgets::{Block, Borders, List, ListItem, Paragraph}; use crate::app::App; -use crate::instance::SimStatus; pub fn render(f: &mut Frame<'_>, area: Rect, app: &App) { let Some(inst) = app.selected_instance() else { @@ -15,11 +14,7 @@ pub fn render(f: &mut Frame<'_>, area: Rect, app: &App) { let chunks = Layout::default() .direction(Direction::Vertical) - .constraints([ - Constraint::Length(3), - Constraint::Min(8), - Constraint::Length(2), - ]) + .constraints([Constraint::Length(3), Constraint::Min(8)]) .split(area); let score = Paragraph::new(inst.scoreboard.clone()) @@ -49,12 +44,6 @@ pub fn render(f: &mut Frame<'_>, area: Rect, app: &App) { f.render_widget(log_widget, middle[0]); let mut right_lines: Vec = Vec::new(); - let status = match &inst.status { - SimStatus::Pending => "pending", - SimStatus::Running { .. } => "running", - SimStatus::Completed => "completed", - }; - right_lines.push(ListItem::new(format!("Status: {}", status))); right_lines.push(ListItem::new(format!("Seed: {}", inst.seed))); right_lines.push(ListItem::new(format!("Mode: {}", inst.sim_type.as_str()))); right_lines.push(ListItem::new("")); @@ -68,8 +57,4 @@ pub fn render(f: &mut Frame<'_>, area: Rect, app: &App) { .borders(Borders::ALL), ); f.render_widget(side, middle[1]); - - let help = Paragraph::new("Open readable panels: t=Stats, g=Standings/Bracket, h=History") - .block(Block::default().borders(Borders::ALL).title("Panels")); - f.render_widget(help, chunks[2]); } diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 598591e..708ea8c 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -12,11 +12,7 @@ use crate::app::App; pub fn draw(f: &mut Frame<'_>, app: &App) { let areas = Layout::default() .direction(Direction::Vertical) - .constraints([ - Constraint::Length(3), - Constraint::Min(10), - Constraint::Length(2), - ]) + .constraints([Constraint::Length(3), Constraint::Min(10)]) .split(f.area()); let header = Paragraph::new("MentalNet SoccerCloud | n/l/o create | s start | c clone | d delete | e export | v detail | t stats | g standings | h history | q quit") @@ -30,15 +26,6 @@ pub fn draw(f: &mut Frame<'_>, app: &App) { dashboard::render(f, areas[1], app); } - let footer = Paragraph::new(format!( - "{} | speed={} (1/2/4/0) | create modal: m=manual p=cpu [ ] team Enter=create Esc=cancel | view modal: j/k scroll Esc/q close", - app.status_line, - app.speed.label() - )) - .block(Block::default().borders(Borders::ALL).title("Status")) - .style(Style::default().fg(Color::Green)); - f.render_widget(footer, areas[2]); - if let Some(draft) = &app.create_draft { modal::render_create(f, f.area(), app, draft); }