mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
rename type
This commit is contained in:
parent
3303003902
commit
264be544c2
3 changed files with 10 additions and 10 deletions
12
src/app.rs
12
src/app.rs
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{
|
||||
components::{
|
||||
CommandInfo, CommitComponent, Component, DiffComponent,
|
||||
HelpComponent, IndexComponent,
|
||||
ChangesComponent, CommandInfo, CommitComponent, Component,
|
||||
DiffComponent, HelpComponent,
|
||||
},
|
||||
keys, strings,
|
||||
};
|
||||
|
|
@ -44,8 +44,8 @@ pub struct App {
|
|||
do_quit: bool,
|
||||
commit: CommitComponent,
|
||||
help: HelpComponent,
|
||||
index: IndexComponent,
|
||||
index_wd: IndexComponent,
|
||||
index: ChangesComponent,
|
||||
index_wd: ChangesComponent,
|
||||
diff: DiffComponent,
|
||||
git_diff: AsyncDiff,
|
||||
git_status: AsyncStatus,
|
||||
|
|
@ -61,11 +61,11 @@ impl App {
|
|||
do_quit: false,
|
||||
commit: CommitComponent::default(),
|
||||
help: HelpComponent::default(),
|
||||
index_wd: IndexComponent::new(
|
||||
index_wd: ChangesComponent::new(
|
||||
strings::TITLE_STATUS,
|
||||
true,
|
||||
),
|
||||
index: IndexComponent::new(strings::TITLE_INDEX, false),
|
||||
index: ChangesComponent::new(strings::TITLE_INDEX, false),
|
||||
diff: DiffComponent::default(),
|
||||
git_diff: AsyncDiff::new(sender.clone()),
|
||||
git_status: AsyncStatus::new(sender),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use tui::{
|
|||
};
|
||||
|
||||
///
|
||||
pub struct IndexComponent {
|
||||
pub struct ChangesComponent {
|
||||
title: String,
|
||||
items: Vec<StatusItem>,
|
||||
selection: Option<usize>,
|
||||
|
|
@ -22,7 +22,7 @@ pub struct IndexComponent {
|
|||
show_selection: bool,
|
||||
}
|
||||
|
||||
impl IndexComponent {
|
||||
impl ChangesComponent {
|
||||
///
|
||||
pub fn new(title: &str, focus: bool) -> Self {
|
||||
Self {
|
||||
|
|
@ -83,7 +83,7 @@ impl IndexComponent {
|
|||
}
|
||||
}
|
||||
|
||||
impl Component for IndexComponent {
|
||||
impl Component for ChangesComponent {
|
||||
fn draw<B: Backend>(&self, f: &mut Frame<B>, r: Rect) {
|
||||
let item_to_text = |idx: usize, i: &StatusItem| -> Text {
|
||||
let selected = self.show_selection
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ mod command;
|
|||
mod commit;
|
||||
mod diff;
|
||||
mod help;
|
||||
pub use changes::IndexComponent;
|
||||
pub use changes::ChangesComponent;
|
||||
pub use command::CommandInfo;
|
||||
pub use commit::CommitComponent;
|
||||
pub use diff::DiffComponent;
|
||||
|
|
|
|||
Loading…
Reference in a new issue