mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
This commit is contained in:
parent
f60dd2185a
commit
9e147cda69
2 changed files with 9 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ 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_nil()))))
|
||||
ErrorBoundary::new(Ok(Some(Tui::bg(Black, model.view_menu()))))
|
||||
//ErrorBoundary::new(Take::take(model, &mut model.config.view.clone()))
|
||||
//ErrorBoundary::new(Give::give(model, &mut model.config.view.clone()))
|
||||
}
|
||||
|
|
@ -37,6 +37,13 @@ impl App {
|
|||
pub fn view_nil (&self) -> impl Content<TuiOut> + '_ {
|
||||
"nil"
|
||||
}
|
||||
pub fn view_menu (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
Stack::south(|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
add(&Tui::bold(true, "tek"));
|
||||
add(&"");
|
||||
add(&"+ new session");
|
||||
})
|
||||
}
|
||||
pub fn view_dialog (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
self.dialog.as_ref().map(|dialog|Bsp::b("",
|
||||
Fixed::xy(70, 23, Tui::fg_bg(Rgb(255,255,255), Rgb(16,16,16), Bsp::b(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue