mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
cleanup mod structure
This commit is contained in:
parent
e155773c59
commit
8a7e3414d0
6 changed files with 11 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use super::{CommandInfo, Component};
|
||||
use crate::{clear::Clear, git_utils, strings, tui_utils};
|
||||
use crate::{git_utils, strings, ui};
|
||||
use crossterm::event::{Event, KeyCode};
|
||||
use std::borrow::Cow;
|
||||
use tui::{
|
||||
|
|
@ -29,7 +29,7 @@ impl Component for CommitComponent {
|
|||
)]
|
||||
};
|
||||
|
||||
Clear::new(
|
||||
ui::Clear::new(
|
||||
Paragraph::new(txt.iter())
|
||||
.block(
|
||||
Block::default()
|
||||
|
|
@ -38,7 +38,7 @@ impl Component for CommitComponent {
|
|||
)
|
||||
.alignment(Alignment::Left),
|
||||
)
|
||||
.render(f, tui_utils::centered_rect(60, 20, f.size()));
|
||||
.render(f, ui::centered_rect(60, 20, f.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{CommandInfo, Component};
|
||||
use crate::{
|
||||
git_status::{self, StatusItem, StatusItemType},
|
||||
tui_utils,
|
||||
ui,
|
||||
};
|
||||
use crossterm::event::{Event, KeyCode};
|
||||
use git2::StatusShow;
|
||||
|
|
@ -111,7 +111,7 @@ impl Component for IndexComponent {
|
|||
Text::Styled(Cow::from(txt), style)
|
||||
};
|
||||
|
||||
tui_utils::draw_list(
|
||||
ui::draw_list(
|
||||
f,
|
||||
r,
|
||||
&self.title.to_string(),
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
mod app;
|
||||
mod clear;
|
||||
mod components;
|
||||
mod git_status;
|
||||
mod git_utils;
|
||||
mod keys;
|
||||
mod poll;
|
||||
mod strings;
|
||||
mod tui_scrolllist;
|
||||
mod tui_utils;
|
||||
mod ui;
|
||||
|
||||
use crate::{app::App, poll::QueueEvent};
|
||||
use crossterm::{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
use crate::tui_scrolllist;
|
||||
mod clear;
|
||||
mod scrolllist;
|
||||
|
||||
pub use clear::Clear;
|
||||
use scrolllist::ScrollableList;
|
||||
use tui::backend::Backend;
|
||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||
use tui::{
|
||||
|
|
@ -6,7 +10,6 @@ use tui::{
|
|||
widgets::{Block, Borders, Text, Widget},
|
||||
Frame,
|
||||
};
|
||||
use tui_scrolllist::ScrollableList;
|
||||
|
||||
/// use layouts to create a rects that
|
||||
/// centers inside `r` and sizes `percent_x`/`percent_x` of `r`
|
||||
Loading…
Reference in a new issue