Compare commits

...

2 commits

Author SHA1 Message Date
4517fe62e4 feat(tui): move forge alias to left and add prefix
All checks were successful
Rust / build (push) Successful in 7m14s
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 1m10s
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
2024-08-27 19:15:36 +01:00
c6bf287ed1 feat(tui): remove count of forges
All checks were successful
Rust / build (push) Successful in 10m29s
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 1m27s
2024-08-27 19:15:21 +01:00
2 changed files with 2 additions and 10 deletions

View file

@ -4,7 +4,6 @@ use git_next_core::ForgeAlias;
use ratatui::{
buffer::Buffer,
layout::{Constraint, Direction, Layout, Rect},
text::Line,
widgets::Widget,
};
@ -20,13 +19,6 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
where
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()
.direction(Direction::Vertical)
.constraints(
@ -37,7 +29,7 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
ViewState::Expanded => Constraint::Fill(1),
}),
)
.split(layout_app[1]);
.split(area);
self.forges
.iter()

View file

@ -20,7 +20,7 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
Self: Sized,
{
let block = Block::default()
.title(Title::from(self.forge_alias.to_string()).alignment(Alignment::Center))
.title(Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left))
.borders(Borders::ALL);
let layout = Layout::default()
.direction(Direction::Vertical)