Files
Steckbrett/src/ui/textHints.rs
Phani Pavan K d713cc8fa3
Some checks failed
/ Quality Check (push) Failing after 1m41s
/ Build (push) Successful in 1m36s
added colours, select and delete ops, refac
2025-10-19 13:06:50 +05:30

46 lines
1.5 KiB
Rust

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)))
}
}