From fee01694636fd7e9cba782604727ce36d75d121a Mon Sep 17 00:00:00 2001 From: Moepchi Date: Mon, 10 Aug 2026 20:09:10 +0200 Subject: [PATCH] Right-align client row icons flush to the edge; add debug logging for group icon ids Status icons and group badges previously sat right after the name with no push-right, so they clustered close to it instead of at the row's right edge like the poke button already does. Wrapped them in a flex span with margin-left: auto to match. Also added temporary eprintln logging of each channel/server group's resolved icon_id, to check whether this server's groups actually have custom icons assigned (native TS3 doesn't show a badge for groups without one either) before assuming the icon feature itself is broken. --- connector/src/main.rs | 2 ++ web/src/App.css | 8 ++++++++ web/src/App.tsx | 16 +++++++++------- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/connector/src/main.rs b/connector/src/main.rs index 032bf9b..d7a0e07 100644 --- a/connector/src/main.rs +++ b/connector/src/main.rs @@ -1974,6 +1974,7 @@ async fn run(args: Args) -> Result<()> { .map(|g| GroupEntry { id: g.id.0, name: g.name.clone(), icon_id: g.icon.0 }) .collect(); entries.sort_by_key(|g| g.id); + eprintln!("DEBUG channel groups: {:?}", entries.iter().map(|g| (g.id, &g.name, g.icon_id)).collect::>()); emit(&Event::ChannelGroupList { entries }); pending_channel_group_list = false; } else if label == "Server group list" && pending_server_group_list { @@ -1984,6 +1985,7 @@ async fn run(args: Args) -> Result<()> { .map(|g| GroupEntry { id: g.id.0, name: g.name.clone(), icon_id: g.icon.0 }) .collect(); entries.sort_by_key(|g| g.id); + eprintln!("DEBUG server groups: {:?}", entries.iter().map(|g| (g.id, &g.name, g.icon_id)).collect::>()); emit(&Event::ServerGroupList { entries }); pending_server_group_list = false; } else if label == "Permission list" && pending_permission_list { diff --git a/web/src/App.css b/web/src/App.css index 6ce6af0..4d29cb2 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -543,6 +543,14 @@ background: color-mix(in srgb, #4caf50 15%, transparent); } +.ts-client-icons { + display: inline-flex; + align-items: center; + gap: 0.2rem; + margin-left: auto; + padding-right: 0.3rem; +} + .ts-status-icons { display: inline-flex; gap: 0.15rem; diff --git a/web/src/App.tsx b/web/src/App.tsx index 9219013..d15ef35 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -561,13 +561,15 @@ function ChannelTree({ {c.away && c.awayMessage && ( ({c.awayMessage}) )} - - {groupIconIds(c).map((iconId) => { - const base64 = groupIconImages[`/icon_${iconId}`]; - return base64 ? ( - - ) : null; - })} + + + {groupIconIds(c).map((iconId) => { + const base64 = groupIconImages[`/icon_${iconId}`]; + return base64 ? ( + + ) : null; + })} + {c.id !== ownClientId && (