(frame: &mut Frame, app: &mut App)
| 326 | // ── Drawing ──────────────────────────────────────────────────────────────── |
| 327 | |
| 328 | fn draw(frame: &mut Frame, app: &mut App) { |
| 329 | let area = frame.area(); |
| 330 | |
| 331 | let layout = Layout::vertical([ |
| 332 | Constraint::Length(1), // tab bar |
| 333 | Constraint::Min(1), // content |
| 334 | ]) |
| 335 | .split(area); |
| 336 | |
| 337 | draw_tab_bar(frame, app, layout[0]); |
| 338 | |
| 339 | match app.tab { |
| 340 | Tab::Chat => draw_chat(frame, app, layout[1]), |
| 341 | Tab::Cluster => draw_cluster(frame, app, layout[1]), |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | fn draw_tab_bar(frame: &mut Frame, app: &App, area: Rect) { |
| 346 | let chat_style = if app.tab == Tab::Chat { |
no test coverage detected