Skip to content

Commit 904885e

Browse files
committed
tui -> ratatui
tui is not maintained anymore and it seems that ratatui is the successor: fdehau/tui-rs#654
1 parent 19b820b commit 904885e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+161
-156
lines changed

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bytesize = { version = "1.2", default-features = false }
2929
chrono = { version = "0.4", default-features = false, features = [ "clock" ] }
3030
clap = { version = "4.1", features = [ "env", "cargo" ] }
3131
crossbeam-channel = "0.5"
32-
crossterm = { version = "0.25", features = [ "serde" ] }
32+
crossterm = { version = "0.26.1", features = [ "serde" ] }
3333
dirs-next = "2.0"
3434
easy-cast = "0.5"
3535
filetreelist = { path = "./filetreelist", version = "0.5" }
@@ -40,6 +40,7 @@ log = "0.4"
4040
notify = "5.1"
4141
notify-debouncer-mini = "0.2"
4242
once_cell = "1"
43+
ratatui = { version = "0.20", default-features = false, features = ['crossterm', 'serde'] }
4344
rayon-core = "1.11"
4445
ron = "0.8"
4546
scopeguard = "1.1"
@@ -49,7 +50,6 @@ simplelog = { version = "0.12", default-features = false }
4950
struct-patch = "0.2"
5051
syntect = { version = "5.0", default-features = false, features = ["parsing", "default-syntaxes", "default-themes", "html"] }
5152
textwrap = "0.16"
52-
tui = { version = "0.19", default-features = false, features = ['crossterm', 'serde'] }
5353
unicode-segmentation = "1.10"
5454
unicode-truncate = "0.2"
5555
unicode-width = "0.1"

src/app.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ use asyncgit::{
3434
};
3535
use crossbeam_channel::Sender;
3636
use crossterm::event::{Event, KeyEvent};
37-
use std::{
38-
cell::{Cell, RefCell},
39-
path::Path,
40-
rc::Rc,
41-
};
42-
use tui::{
37+
use ratatui::{
4338
backend::Backend,
4439
layout::{
4540
Alignment, Constraint, Direction, Layout, Margin, Rect,
@@ -48,6 +43,11 @@ use tui::{
4843
widgets::{Block, Borders, Paragraph, Tabs},
4944
Frame,
5045
};
46+
use std::{
47+
cell::{Cell, RefCell},
48+
path::Path,
49+
rc::Rc,
50+
};
5151
use unicode_width::UnicodeWidthStr;
5252

5353
#[derive(Clone)]

src/cmdbar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ use crate::{
22
components::CommandInfo, keys::SharedKeyConfig, strings,
33
ui::style::SharedTheme,
44
};
5-
use std::borrow::Cow;
6-
use tui::{
5+
use ratatui::{
76
backend::Backend,
87
layout::{Alignment, Rect},
98
text::{Span, Spans},
109
widgets::Paragraph,
1110
Frame,
1211
};
12+
use std::borrow::Cow;
1313
use unicode_width::UnicodeWidthStr;
1414

1515
enum DrawListEntry {

src/components/blame_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ use asyncgit::{
1818
};
1919
use crossbeam_channel::Sender;
2020
use crossterm::event::Event;
21-
use std::convert::TryInto;
22-
use tui::{
21+
use ratatui::{
2322
backend::Backend,
2423
layout::{Constraint, Rect},
2524
symbols::line::VERTICAL,
2625
text::Span,
2726
widgets::{Block, Borders, Cell, Clear, Row, Table, TableState},
2827
Frame,
2928
};
29+
use std::convert::TryInto;
3030

3131
static NO_COMMIT_ID: &str = "0000000";
3232
static NO_AUTHOR: &str = "<no author>";

src/components/branchlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ use asyncgit::{
2626
AsyncGitNotification,
2727
};
2828
use crossterm::event::Event;
29-
use std::{cell::Cell, convert::TryInto};
30-
use tui::{
29+
use ratatui::{
3130
backend::Backend,
3231
layout::{
3332
Alignment, Constraint, Direction, Layout, Margin, Rect,
@@ -36,6 +35,7 @@ use tui::{
3635
widgets::{Block, BorderType, Borders, Clear, Paragraph, Tabs},
3736
Frame,
3837
};
38+
use std::{cell::Cell, convert::TryInto};
3939
use ui::style::SharedTheme;
4040
use unicode_truncate::UnicodeTruncateStr;
4141

src/components/changes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use asyncgit::{
1717
StatusItem, StatusItemType,
1818
};
1919
use crossterm::event::Event;
20+
use ratatui::{backend::Backend, layout::Rect, Frame};
2021
use std::path::Path;
21-
use tui::{backend::Backend, layout::Rect, Frame};
2222

2323
///
2424
pub struct ChangesComponent {

src/components/commit.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ use asyncgit::{
2121
};
2222
use crossterm::event::Event;
2323
use easy_cast::Cast;
24-
use std::{
25-
fs::{read_to_string, File},
26-
io::{Read, Write},
27-
};
28-
use tui::{
24+
use ratatui::{
2925
backend::Backend,
3026
layout::{Alignment, Rect},
3127
widgets::Paragraph,
3228
Frame,
3329
};
30+
use std::{
31+
fs::{read_to_string, File},
32+
io::{Read, Write},
33+
};
3434

3535
enum CommitResult {
3636
ComitDone,

src/components/commit_details/compare_details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
use anyhow::Result;
1515
use asyncgit::sync::{self, CommitDetails, CommitId, RepoPathRef};
1616
use crossterm::event::Event;
17-
use tui::{
17+
use ratatui::{
1818
backend::Backend,
1919
layout::{Constraint, Direction, Layout, Rect},
2020
text::{Span, Spans, Text},

src/components/commit_details/details.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ use asyncgit::sync::{
1515
self, CommitDetails, CommitId, CommitMessage, RepoPathRef, Tag,
1616
};
1717
use crossterm::event::Event;
18-
use std::clone::Clone;
19-
use std::{borrow::Cow, cell::Cell};
20-
use sync::CommitTags;
21-
use tui::{
18+
use ratatui::{
2219
backend::Backend,
2320
layout::{Constraint, Direction, Layout, Rect},
2421
style::{Modifier, Style},
2522
text::{Span, Spans, Text},
2623
Frame,
2724
};
25+
use std::clone::Clone;
26+
use std::{borrow::Cow, cell::Cell};
27+
use sync::CommitTags;
2828

2929
use super::style::Detail;
3030

0 commit comments

Comments
 (0)