MCPcopy Create free account
hub / github.com/Autoparallel/learner / draw_exit_dialog

Method draw_exit_dialog

crates/learnerd/src/tui/ui.rs:555–569  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers 1

drawMethod · 0.80

Calls 1

draw_dialogMethod · 0.80

Tested by

no test coverage detected