Skip to content

Commit

Permalink
add icons
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Oct 5, 2024
1 parent 7984692 commit 6a07b86
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions oryx-tui/src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,32 @@ impl Section {
FocusedSection::Inspection => {
if is_focused {
Span::styled(
" Inspection ",
" Inspection 󰏖 ",
Style::default().bg(Color::Green).fg(Color::White).bold(),
)
} else {
Span::from(" Inspection ").fg(Color::DarkGray)
Span::from(" Inspection 󰏖 ").fg(Color::DarkGray)
}
}
FocusedSection::Stats => {
if is_focused {
Span::styled(
" Stats ",
" Stats 󱕍 ",
Style::default().bg(Color::Green).fg(Color::White).bold(),
)
} else {
Span::from(" Stats ").fg(Color::DarkGray)
Span::from(" Stats 󱕍 ").fg(Color::DarkGray)
}
}
FocusedSection::Alerts => self.alert.title_span(is_focused),
FocusedSection::Firewall => {
if is_focused {
Span::styled(
" Firewall ",
" Firewall 󰞀 ",
Style::default().bg(Color::Green).fg(Color::White).bold(),
)
} else {
Span::from(" Firewall ").fg(Color::DarkGray)
Span::from(" Firewall 󰞀 ").fg(Color::DarkGray)
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions oryx-tui/src/section/alert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ impl Alert {
if is_focused {
if self.detected {
if self.flash_count % 12 == 0 {
Span::from(" Alert 󰐼 ").fg(Color::White).bg(Color::Red)
Span::from(" Alert 󰐼 ").fg(Color::White).bg(Color::Red)
} else {
Span::from(" Alert 󰐼 ").bg(Color::Red)
Span::from(" Alert 󰐼 ").bg(Color::Red)
}
} else {
Span::styled(
" Alert ",
" Alert 󰀦 ",
Style::default().bg(Color::Green).fg(Color::White).bold(),
)
}
} else if self.detected {
if self.flash_count % 12 == 0 {
Span::from(" Alert 󰐼 ").fg(Color::White).bg(Color::Red)
Span::from(" Alert 󰐼 ").fg(Color::White).bg(Color::Red)
} else {
Span::from(" Alert 󰐼 ").fg(Color::Red)
Span::from(" Alert 󰐼 ").fg(Color::Red)
}
} else {
Span::from(" Alert ").fg(Color::DarkGray)
Span::from(" Alert 󰀦 ").fg(Color::DarkGray)
}
}
}
8 changes: 4 additions & 4 deletions oryx-tui/src/section/firewall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,10 @@ impl Firewall {
.highlight_style(Style::default().bg(Color::DarkGray))
.header(
Row::new(vec![
Line::from("Name").centered(),
Line::from("IP").centered(),
Line::from("Port").centered(),
Line::from("Status").centered(),
Line::from("Name").centered().blue(),
Line::from("IP").centered().blue(),
Line::from("Port").centered().blue(),
Line::from("Status").centered().blue(),
])
.style(Style::new().bold())
.bottom_margin(1),
Expand Down

0 comments on commit 6a07b86

Please sign in to comment.