mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
This commit is contained in:
parent
9f30f77aee
commit
daaa4f7bef
2 changed files with 10 additions and 9 deletions
|
|
@ -42,20 +42,22 @@ impl Tek {
|
|||
}
|
||||
|
||||
fn view_modal_help (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
let bindings = ||self.keys.layers.iter().flat_map(|a|a.1)
|
||||
let bindings = ||self.keys.layers.iter()
|
||||
.filter_map(|a|(a.0)(self).then_some(a.1))
|
||||
.flat_map(|a|a)
|
||||
.filter_map(|x|if let Value::Exp(_, iter)=x.value{
|
||||
Some(iter)
|
||||
} else {
|
||||
None
|
||||
});
|
||||
let binding = |mut binding: TokenIter, _|Bsp::e(
|
||||
Tui::bold(true, Tui::fg(Color::Rgb(255,192,0), if let Some(Token {
|
||||
Fixed::x(15, Align::w(Tui::bold(true, Tui::fg(Color::Rgb(255,192,0), if let Some(Token {
|
||||
value: Value::Sym(key), ..
|
||||
}) = binding.next() {
|
||||
Some(key.to_string())
|
||||
} else {
|
||||
None
|
||||
})),
|
||||
})))),
|
||||
Bsp::e(" ", Tui::fg(Color::Rgb(255,255,255), if let Some(Token {
|
||||
value: Value::Key(command), ..
|
||||
}) = binding.next() {
|
||||
|
|
@ -64,8 +66,7 @@ impl Tek {
|
|||
None
|
||||
})),
|
||||
);
|
||||
let layer = Map::south(1, bindings, binding);
|
||||
Bsp::s(Tui::bold(true, "Help"), Bsp::s("", layer))
|
||||
Bsp::s(Tui::bold(true, "Help"), Bsp::s("", Map::south(1, bindings, binding)))
|
||||
}
|
||||
|
||||
pub fn view_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue