Draws the exit confirmation dialog. Shows a centered dialog box asking the user to confirm exit with: - A clear question - Instructions for confirming ('y') or canceling ('n') - Red border to indicate a destructive action - Proper spacing and alignment
(&mut self)
| 553 | /// - Red border to indicate a destructive action |
| 554 | /// - Proper spacing and alignment |
| 555 | fn draw_exit_dialog(&mut self) { |
| 556 | let content = vec![ |
| 557 | Line::from(Span::styled("Are you sure you want to quit?", Style::default().fg(Color::White))), |
| 558 | Line::from(""), |
| 559 | Line::from(vec![ |
| 560 | Span::styled("Press ", styles::HELP), |
| 561 | Span::styled("y", styles::KEY_HIGHLIGHT.add_modifier(ratatui::style::Modifier::BOLD)), |
| 562 | Span::styled(" to confirm, ", styles::HELP), |
| 563 | Span::styled("n", styles::KEY_HIGHLIGHT.add_modifier(ratatui::style::Modifier::BOLD)), |
| 564 | Span::styled(" to cancel", styles::HELP), |
| 565 | ]), |
| 566 | ]; |
| 567 | |
| 568 | self.draw_dialog("Exit Confirmation", &content, Color::Red); |
| 569 | } |
| 570 | |
| 571 | /// Draws the PDF not found error dialog. |
| 572 | /// |