diff options
Diffstat (limited to 'src/tui/ui.rs')
| -rw-r--r-- | src/tui/ui.rs | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/tui/ui.rs b/src/tui/ui.rs index d85f318..52d2d9a 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -410,27 +410,21 @@ pub fn render_file_info(app: &mut App, args: &CLIArgs, frame: &mut Frame, rect: .horizontal_margin(1) .areas(rect); - let file_info = if args.pos_args.len() == 1 && args.pos_args.first().unwrap().is_file() { + let file_info = if app.bibiman.main_bibfiles.len() == 1 + && app.bibiman.main_bibfiles.first().unwrap().is_file() + { Line::from(vec![ Span::raw("File: ") .fg(Color::Indexed(args.colors.main_text_color)) .bold(), - Span::raw(args.pos_args[0].file_name().unwrap().to_string_lossy()) - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), - ]) - .bg(Color::Indexed(args.colors.bar_bg_color)) - } else if args.pos_args.len() == 1 && args.pos_args.first().unwrap().is_dir() { - Line::from(vec![ - Span::raw("Directory: ") - .bold() - .fg(Color::Indexed(args.colors.main_text_color)), - Span::raw(args.pos_args[0].file_name().unwrap().to_string_lossy()) - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), - Span::raw("/*.bib") - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), + Span::raw( + app.bibiman.main_bibfiles[0] + .file_name() + .unwrap() + .to_string_lossy(), + ) + .fg(Color::Indexed(args.colors.main_text_color)) + .bold(), ]) .bg(Color::Indexed(args.colors.bar_bg_color)) } else { @@ -438,7 +432,7 @@ pub fn render_file_info(app: &mut App, args: &CLIArgs, frame: &mut Frame, rect: Span::raw("Multiple files (") .fg(Color::Indexed(args.colors.main_text_color)) .bold(), - Span::raw(count_files(&args.files).to_string()) + Span::raw(count_files(&app.bibiman.main_bibfiles).to_string()) .fg(Color::Indexed(args.colors.main_text_color)) .bold(), Span::raw(")") |
