chore(deps): update rust crate ratatui to 0.29
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 6m57s
Rust / build (map[name:stable]) (push) Successful in 14m18s
Release Please / Release-plz (push) Successful in 1m50s

This commit is contained in:
Renovate Bot 2024-10-21 12:46:41 +00:00 committed by Paul Campbell
parent 23de987444
commit d989da659c
4 changed files with 44 additions and 25 deletions

36
Cargo.lock generated
View file

@ -1118,7 +1118,7 @@ dependencies = [
"notify",
"pretty_assertions",
"rand",
"ratatui",
"ratatui 0.29.0",
"regex",
"rstest 0.23.0",
"secrecy 0.10.3",
@ -3352,7 +3352,6 @@ dependencies = [
"bitflags 2.6.0",
"cassowary",
"compact_str",
"crossterm",
"instability",
"itertools",
"lru",
@ -3361,7 +3360,28 @@ dependencies = [
"strum_macros 0.26.4",
"unicode-segmentation",
"unicode-truncate",
"unicode-width",
"unicode-width 0.1.13",
]
[[package]]
name = "ratatui"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
dependencies = [
"bitflags 2.6.0",
"cassowary",
"compact_str",
"crossterm",
"indoc",
"instability",
"itertools",
"lru",
"paste",
"strum 0.26.3",
"unicode-segmentation",
"unicode-truncate",
"unicode-width 0.2.0",
]
[[package]]
@ -4401,7 +4421,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27a65189ac0c5f8af32660c453a1babae3ac7e72791b9dbeb1221073569f44ea"
dependencies = [
"indoc",
"ratatui",
"ratatui 0.28.1",
"rstest 0.22.0",
]
@ -4500,7 +4520,7 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
dependencies = [
"itertools",
"unicode-segmentation",
"unicode-width",
"unicode-width 0.1.13",
]
[[package]]
@ -4509,6 +4529,12 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]]
name = "unicode-width"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "unicode-xid"
version = "0.2.5"

View file

@ -27,7 +27,7 @@ git-next-forge-forgejo = { path = "crates/forge-forgejo", version = "0.13" }
git-next-forge-github = { path = "crates/forge-github", version = "0.13" }
# TUI
ratatui = "0.28"
ratatui = "0.29"
directories = "5.0"
lazy_static = "1.5"
color-eyre = "0.6"

View file

@ -5,10 +5,7 @@ use ratatui::{
style::{Color, Style, Stylize as _},
symbols::border,
text::{Line, Span},
widgets::{
block::{Position, Title},
Block, Paragraph, StatefulWidget, Widget,
},
widgets::{Block, Paragraph, StatefulWidget, Widget},
};
use git_next_core::{
@ -363,24 +360,19 @@ impl StatefulWidget for &State {
Self: Sized,
{
let block = Block::bordered()
.title(
Title::from(format!(" Git-Next v{} ", clap::crate_version!()).bold())
.title_top(
Line::from(format!(" Git-Next v{} ", clap::crate_version!()).bold())
.alignment(Alignment::Center),
)
.title(
Title::from(Line::from(vec![
.title_bottom(
Line::from(vec![
" [q]uit ".into(),
self.beating_heart().into(),
" ".into(),
]))
.alignment(Alignment::Center)
.position(Position::Bottom),
)
.title(
Title::from(format!(" {} ", time()))
.alignment(Alignment::Right)
.position(Position::Bottom),
])
.alignment(Alignment::Center),
)
.title_bottom(Line::from(format!(" {} ", time())).alignment(Alignment::Right))
.border_set(border::THICK);
let interior = block.inner(area);
block.render(area, buf);

View file

@ -5,7 +5,8 @@ use git_next_core::{ForgeAlias, RepoAlias};
use ratatui::{
buffer::Buffer,
layout::{Alignment, Direction, Layout, Rect},
widgets::{block::Title, Block, Widget},
text::Line,
widgets::{Block, Widget},
};
use crate::tui::{
@ -31,8 +32,8 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
where
Self: Sized,
{
let block = Block::default().title(
Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left),
let block = Block::default().title_top(
Line::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left),
);
let children = self.children();
let layout = Layout::default()