unify default configs
Some checks failed
/ build (push) Has been cancelled

the definitions are unified alright. it's just not supported yet :D

the idea being that tek offers to write out the default configs to
~/.config/tek-v0 where the user can customize them.
This commit is contained in:
🪞👃🪞 2025-07-30 19:12:45 +03:00
parent 9e147cda69
commit 3c8616deba
43 changed files with 441 additions and 465 deletions

View file

@ -23,14 +23,14 @@ impl<T: Content<TuiOut>> Content<TuiOut> for ErrorBoundary<TuiOut, T> {
}
impl App {
pub fn view (model: &Self) -> impl Content<TuiOut> + '_ {
ErrorBoundary::new(Ok(Some(Tui::bg(Black, model.view_menu()))))
pub fn view (&self) -> impl Content<TuiOut> + '_ {
ErrorBoundary::new(Ok(Some(Tui::bg(Black, self.view_menu()))))
//ErrorBoundary::new(Take::take(model, &mut model.config.view.clone()))
//ErrorBoundary::new(Give::give(model, &mut model.config.view.clone()))
}
}
content!(TuiOut: |self: App| ErrorBoundary::new(Ok(Some(Tui::bg(Black, self.view_nil())))));
content!(TuiOut: |self: App| ErrorBoundary::new(Ok(Some(Tui::bg(Black, self.view())))));
#[tengri_proc::view(TuiOut)]
impl App {
@ -39,7 +39,7 @@ impl App {
}
pub fn view_menu (&self) -> impl Content<TuiOut> + use<'_> {
Stack::south(|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
add(&Tui::bold(true, "tek"));
add(&Tui::bold(true, "tek 0.3.0-rc0"));
add(&"");
add(&"+ new session");
})