wip: port: make device

This commit is contained in:
🪞👃🪞 2025-05-21 00:07:35 +03:00
parent 447638ee71
commit cb7e4f7a95
31 changed files with 602 additions and 865 deletions

View file

@ -5,7 +5,7 @@ pub(crate) use ::tengri::tui::ratatui::prelude::Position;
impl App {
pub fn view (&self) -> impl Content<TuiOut> + '_ {
let view: Perhaps<Box<dyn Render<TuiOut>>> =
FromDsl::take_from(self, &mut self.config.view.clone());
Namespace::take_from(self, &mut self.config.view.clone());
Either(view.is_ok(),
ThunkRender::new(move|to|if let Some(view) = view.as_ref().unwrap().as_ref() {
Content::render(view, to)