Skip to content

Commit

Permalink
Centered indexing message
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus-Mussmaecher committed May 7, 2024
1 parent b9b0d12 commit bbd8255
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ fn main() -> color_eyre::Result<()> {
// Draw 'loading' screen
terminal.draw(|frame| {
frame.render_widget(
ratatui::widgets::Paragraph::new("Indexing..."),
frame.size(),
ratatui::widgets::Paragraph::new("Indexing...").alignment(Alignment::Center),
Layout::vertical([
Constraint::Fill(1),
Constraint::Length(3),
Constraint::Fill(1),
])
.split(frame.size())[1],
);
})?;

Expand Down
3 changes: 3 additions & 0 deletions src/ui/screen/select_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,14 @@ impl super::Screen for SelectScreen {
"{:7} ({:3}%)",
self.local_stats.global_local_links,
self.local_stats.global_local_links * 100
/ self.global_stats.local_local_links.max(1),
)),
Cell::from("Outgoing links:"),
Cell::from(format!(
"{:7} ({:3}%)",
self.local_stats.local_global_links,
self.local_stats.local_global_links * 100
/ self.global_stats.local_local_links.max(1),
)),
]),
Row::new(vec![
Expand All @@ -503,6 +505,7 @@ impl super::Screen for SelectScreen {
"{:7} ({:3}%)",
self.local_stats.local_local_links,
self.local_stats.local_local_links * 100
/ self.global_stats.local_local_links.max(1),
)),
Cell::from("Broken links:"),
Cell::from(format!(
Expand Down

0 comments on commit bbd8255

Please sign in to comment.