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.
This commit is contained in:
Moepchi committed 2026-08-10 20:09:10 +02:00
1 parent b7ef6f78e7
commit fee0169463
3 files changed
+19 -7

No files matched your search

+2
View File
@@ -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::<Vec<_>>());
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::<Vec<_>>());
emit(&Event::ServerGroupList { entries });
pending_server_group_list = false;
} else if label == "Permission list" && pending_permission_list {
+8
View File
@@ -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;
+9 -7
View File
@@ -561,13 +561,15 @@ function ChannelTree({
{c.away && c.awayMessage && (
<span className="ts-client-away-message">({c.awayMessage})</span>
)}
<ClientStatusIcons client={c} />
{groupIconIds(c).map((iconId) => {
const base64 = groupIconImages[`/icon_${iconId}`];
return base64 ? (
<img key={iconId} className="ts-group-icon" src={iconDataUrl(base64)} alt="" />
) : null;
})}
<span className="ts-client-icons">
<ClientStatusIcons client={c} />
{groupIconIds(c).map((iconId) => {
const base64 = groupIconImages[`/icon_${iconId}`];
return base64 ? (
<img key={iconId} className="ts-group-icon" src={iconDataUrl(base64)} alt="" />
) : null;
})}
</span>
{c.id !== ownClientId && (
<button
className="ts-poke-button"