mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
parent
e9f912f4d9
commit
f488811767
3 changed files with 39 additions and 22 deletions
|
|
@ -38,16 +38,19 @@ impl App {
|
|||
"nil"
|
||||
}
|
||||
pub fn view_menu (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
Stack::south(|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
add(&Tui::bold(true, "tek 0.3.0-rc0"));
|
||||
add(&"");
|
||||
for (name, _) in self.configs.profiles.read().unwrap().iter() {
|
||||
add(&"");
|
||||
add(&name);
|
||||
}
|
||||
add(&"");
|
||||
add(&"+ new session");
|
||||
})
|
||||
Bsp::s(Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), Tui::bold(true, "tek 0.3.0-rc0")))),
|
||||
Bsp::n(Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), "+ new session"))),
|
||||
Fill::xy(Stack::south(|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, (id, profile)) in self.configs.profiles.read().unwrap().iter().enumerate() {
|
||||
add(&Fixed::y(3, Tui::bg(if index == 0 { Rgb(64,64,64) } else { Rgb(32,32,32) }, Bsp::s(
|
||||
Fill::x(Bsp::a(
|
||||
Fill::x(Align::w(Tui::fg(Rgb(224,192,128), &profile.name))),
|
||||
Fill::x(Align::e(Tui::fg(Rgb(224,128,32), id)))
|
||||
)),
|
||||
Fill::x(Align::w(&profile.info))
|
||||
))));
|
||||
}
|
||||
}))))
|
||||
}
|
||||
pub fn view_dialog (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
self.dialog.as_ref().map(|dialog|Bsp::b("",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue