mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16: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 {
|
impl App {
|
||||||
pub fn view (model: &Self) -> impl Content<TuiOut> + '_ {
|
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(Take::take(model, &mut model.config.view.clone()))
|
||||||
//ErrorBoundary::new(Give::give(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> + '_ {
|
pub fn view_nil (&self) -> impl Content<TuiOut> + '_ {
|
||||||
"nil"
|
"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<'_> {
|
pub fn view_dialog (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
self.dialog.as_ref().map(|dialog|Bsp::b("",
|
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(
|
Fixed::xy(70, 23, Tui::fg_bg(Rgb(255,255,255), Rgb(16,16,16), Bsp::b(
|
||||||
|
|
|
||||||
2
deps/tengri
vendored
2
deps/tengri
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9f7d0efda5a71dfbb55c55dbff32c348b55dd870
|
Subproject commit 85c305385bc08ef805afb113f677c510027a7234
|
||||||
Loading…
Add table
Add a link
Reference in a new issue