完善1.2.2

This commit is contained in:
lubeilin
2023-09-03 20:58:48 +08:00
parent a943f5bffc
commit 954f0d2d05
7 changed files with 57 additions and 29 deletions
+4
View File
@@ -125,6 +125,7 @@ pub fn console_device_list_all(mut list: Vec<DeviceItem>) {
("NAT Type".to_string(), Style::new()),
("Public Ips".to_string(), Style::new()),
("Local Ip".to_string(), Style::new()),
("IPv6".to_string(), Style::new()),
]);
for item in list {
if &item.status == "Online" {
@@ -138,6 +139,7 @@ pub fn console_device_list_all(mut list: Vec<DeviceItem>) {
(item.nat_type, Style::new().green()),
(item.public_ips, Style::new().green()),
(item.local_ip, Style::new().green()),
(item.ipv6, Style::new().green()),
]);
} else {
out_list.push(vec![
@@ -149,6 +151,7 @@ pub fn console_device_list_all(mut list: Vec<DeviceItem>) {
(item.nat_type, Style::new().yellow()),
(item.public_ips, Style::new().yellow()),
(item.local_ip, Style::new().yellow()),
(item.ipv6, Style::new().yellow()),
]);
}
} else {
@@ -161,6 +164,7 @@ pub fn console_device_list_all(mut list: Vec<DeviceItem>) {
("".to_string(), Style::new().color256(102)),
("".to_string(), Style::new().color256(102)),
("".to_string(), Style::new().color256(102)),
("".to_string(), Style::new().color256(102)),
]);
}
}