better style for network info
This commit is contained in:
parent
a7cfe419b4
commit
829c300b56
1 changed files with 9 additions and 6 deletions
|
@ -229,10 +229,11 @@ impl Widget for NetworkInfoWidget {
|
|||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let udp = "UDP socket".yellow();
|
||||
let udp = "UDP socket";
|
||||
let udp = udp.to_line().left_aligned();
|
||||
let uaddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR).yellow();
|
||||
let udp = Row::new(vec![udp, uaddr.to_line().right_aligned()]);
|
||||
let udp = Row::new(vec![udp, uaddr.to_line().right_aligned()])
|
||||
.style(Style::new().fg(Color::LightYellow));
|
||||
|
||||
let mip = format!(
|
||||
"{:?}:{:?}",
|
||||
|
@ -240,18 +241,20 @@ impl Widget for NetworkInfoWidget {
|
|||
joecalsend::DEFAULT_PORT
|
||||
)
|
||||
.yellow();
|
||||
let multicast = "Multicast address".yellow();
|
||||
let multicast = "Multicast address";
|
||||
let multicast = Row::new(vec![
|
||||
multicast.to_line().left_aligned(),
|
||||
mip.to_line().right_aligned(),
|
||||
]);
|
||||
])
|
||||
.style(Style::new().fg(Color::LightYellow));
|
||||
|
||||
let haddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR).yellow();
|
||||
let http = "HTTP address".yellow();
|
||||
let http = "HTTP address";
|
||||
let http = Row::new(vec![
|
||||
http.to_line().left_aligned(),
|
||||
haddr.to_line().right_aligned(),
|
||||
]);
|
||||
])
|
||||
.style(Style::new().fg(Color::LightYellow));
|
||||
|
||||
let rows = vec![udp, multicast, http];
|
||||
let widths = vec![Constraint::Percentage(50), Constraint::Percentage(50)];
|
||||
|
|
Loading…
Reference in a new issue