Display selected host with brackets in title bar
All checks were successful
Build and Release / build-and-release (push) Successful in 1m25s

- Change nftables port labels to lowercase 'wan tcp:' and 'wan udp:'
- Add brackets around selected host in title bar for clarity
This commit is contained in:
2025-12-04 18:47:30 +01:00
parent 2863526ec8
commit 41e1be451e
6 changed files with 23 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "cm-dashboard"
version = "0.1.256"
version = "0.1.257"
edition = "2021"
[dependencies]

View File

@@ -556,7 +556,14 @@ impl TuiApp {
));
if Some(host) == self.current_host.as_ref() {
// Selected host in bold background color against status background
// Selected host with brackets in bold background color against status background
host_spans.push(Span::styled(
"[",
Style::default()
.fg(Theme::background())
.bg(background_color)
.add_modifier(Modifier::BOLD),
));
host_spans.push(Span::styled(
host.clone(),
Style::default()
@@ -564,6 +571,13 @@ impl TuiApp {
.bg(background_color)
.add_modifier(Modifier::BOLD),
));
host_spans.push(Span::styled(
"]",
Style::default()
.fg(Theme::background())
.bg(background_color)
.add_modifier(Modifier::BOLD),
));
} else {
// Other hosts in normal background color against status background
host_spans.push(Span::styled(