handle * ip, ui refac, fix #1 to handle .conf
This commit is contained in:
25
src/ui/exitPrompt.rs
Normal file
25
src/ui/exitPrompt.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use ratatui::{
|
||||
style::{Color, Style},
|
||||
text::{Line, Text},
|
||||
widgets::{Block, Borders, Paragraph, Wrap},
|
||||
};
|
||||
|
||||
pub fn getExitPara() -> Paragraph<'static> {
|
||||
let exitPopup = Block::default()
|
||||
.title("Exit Window")
|
||||
.borders(Borders::ALL)
|
||||
.style(Style::default().bg(Color::DarkGray))
|
||||
.border_style(Style::default().fg(Color::Red));
|
||||
|
||||
let exitText = Text::from(vec![
|
||||
Line::from("Exit the app?"),
|
||||
Line::from("ANY UNSAVED CHANGES WILL BE DISCARDED."),
|
||||
Line::from("Press (s) to save from the main screen."),
|
||||
]);
|
||||
let exitPara = Paragraph::new(exitText)
|
||||
.block(exitPopup)
|
||||
.wrap(Wrap { trim: false })
|
||||
.style(Style::default().fg(Color::White));
|
||||
|
||||
exitPara
|
||||
}
|
||||
Reference in New Issue
Block a user