mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
app: wrap keys and view in Configuration
This commit is contained in:
parent
0e5207a79d
commit
6ed0627056
4 changed files with 102 additions and 94 deletions
|
|
@ -2,7 +2,7 @@ use crate::*;
|
|||
pub(crate) use std::fmt::Write;
|
||||
pub(crate) use ::tengri::tui::ratatui::prelude::Position;
|
||||
|
||||
view!(TuiOut: |self: Tek| self.size.of(View(self, self.view)); {
|
||||
view!(TuiOut: |self: Tek| self.size.of(View(self, self.config.view)); {
|
||||
":nil" => Box::new("nil"),
|
||||
":modal" => self.view_modal(),
|
||||
":status" => self.view_status(),
|
||||
|
|
@ -42,7 +42,7 @@ impl Tek {
|
|||
}
|
||||
|
||||
fn view_modal_help (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
let bindings = ||self.keys.layers.iter()
|
||||
let bindings = ||self.config.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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue