Compare commits
No commits in common. "4517fe62e487d21dc53e265988ac90e0a62aca30" and "35e367693073151d65fef65ce570aa8833ab8439" have entirely different histories.
4517fe62e4
...
35e3676930
2 changed files with 10 additions and 2 deletions
|
@ -4,6 +4,7 @@ use git_next_core::ForgeAlias;
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
buffer::Buffer,
|
buffer::Buffer,
|
||||||
layout::{Constraint, Direction, Layout, Rect},
|
layout::{Constraint, Direction, Layout, Rect},
|
||||||
|
text::Line,
|
||||||
widgets::Widget,
|
widgets::Widget,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,6 +20,13 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
|
let layout_app = Layout::default()
|
||||||
|
.direction(Direction::Vertical)
|
||||||
|
.constraints(vec![Constraint::Length(1), Constraint::Fill(1)])
|
||||||
|
.split(area);
|
||||||
|
|
||||||
|
Line::from(format!("Forges: ({})", self.forges.keys().len())).render(layout_app[0], buf);
|
||||||
|
|
||||||
let layout_forge_list = Layout::default()
|
let layout_forge_list = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.constraints(
|
.constraints(
|
||||||
|
@ -29,7 +37,7 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
|
||||||
ViewState::Expanded => Constraint::Fill(1),
|
ViewState::Expanded => Constraint::Fill(1),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.split(area);
|
.split(layout_app[1]);
|
||||||
|
|
||||||
self.forges
|
self.forges
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
let block = Block::default()
|
let block = Block::default()
|
||||||
.title(Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left))
|
.title(Title::from(self.forge_alias.to_string()).alignment(Alignment::Center))
|
||||||
.borders(Borders::ALL);
|
.borders(Borders::ALL);
|
||||||
let layout = Layout::default()
|
let layout = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
|
|
Loading…
Reference in a new issue