added colours, select and delete ops, refac
This commit is contained in:
45
src/ui/textHints.rs
Normal file
45
src/ui/textHints.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
pub mod hints {
|
||||
use ratatui::{
|
||||
style::{Color, Style},
|
||||
text::{Line, Text},
|
||||
};
|
||||
|
||||
pub fn mainHints<'a>() -> Text<'a> {
|
||||
Text::from(vec![
|
||||
Line::from("(a) Add entry").style(Style::default().fg(Color::Green)),
|
||||
Line::from("(d) Delete entry").style(Style::default().fg(Color::Magenta)),
|
||||
Line::from("(q) Quit").style(Style::default().fg(Color::Red)),
|
||||
])
|
||||
}
|
||||
|
||||
pub fn addHints<'a>() -> Text<'a> {
|
||||
Text::from(vec![
|
||||
Line::from("(l) 127.0.0.1"),
|
||||
Line::from("(o) 0.0.0.0"),
|
||||
Line::from("(enter) next field"),
|
||||
Line::from("(c) clear"),
|
||||
Line::from("(C) clear all"),
|
||||
Line::from("(esc) main menu").style(Style::default().fg(Color::LightBlue)),
|
||||
])
|
||||
}
|
||||
|
||||
pub fn exitHints<'a>() -> Text<'a> {
|
||||
Text::from(vec![
|
||||
Line::from("(enter) save and exit").style(Style::default().fg(Color::Red)),
|
||||
Line::from("(esc) main menu").style(Style::default().fg(Color::LightBlue)),
|
||||
])
|
||||
}
|
||||
|
||||
pub fn delHints<'a>() -> Text<'a> {
|
||||
Text::from(vec![
|
||||
Line::from("(up) move up"),
|
||||
Line::from("(down) move down"),
|
||||
Line::from("(enter) delete selection").style(Style::default().fg(Color::Magenta)),
|
||||
Line::from("(esc) main menu").style(Style::default().fg(Color::LightBlue)),
|
||||
])
|
||||
}
|
||||
|
||||
pub fn settingsHints<'a>() -> Text<'a> {
|
||||
Text::from(Line::from("").style(Style::default().fg(Color::Red)))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user