From 5e76bd3bdf360423e4922ea76d0bcbfad099b428 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Thu, 12 Nov 2026 20:18:53 +0000 Subject: [PATCH] Client tree: away and sound mute replace the talk dot, like the native client Sound mute is a crossed-out speaker instead of a bell, away a moon. Order as in TeamSpeak: away, sound muted, mic muted, talking/idle. Icon pack ids stay the same. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- web/src/App.tsx | 100 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 33 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 90cdf1c..f6d4198 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1309,15 +1309,30 @@ function ChannelIcon() { } /** GTS2-style talk lamp: blue idle / green talking / muted mic. */ +/** Red "off" badge in the lamp's bottom-right corner, shared by the mute icons. */ +const OFF_BADGE = ( + <> + + + +); + +/** The status slot in front of a client's name. Like the native client, away + * and mute replace the talk dot instead of being listed after the name. + * Order as in TeamSpeak: away, sound muted, mic muted, talking/idle. */ function TalkLamp({ talking, inputMuted, inputHardwareEnabled, + outputMuted = false, + away = false, commander = false, }: { talking: boolean; inputMuted: boolean; inputHardwareEnabled: boolean; + outputMuted?: boolean; + away?: boolean; /** Channel commander: drawn as its own lamp when the design option asks for it. */ commander?: boolean; }) { @@ -1326,37 +1341,54 @@ function TalkLamp({ const muted = inputMuted || !inputHardwareEnabled; const asCommander = commander && tree.commanderLamp; + const icon = (title: string, packIcon: string, paths: React.ReactNode) => ( + + ); + + if (away) { + return icon( + t("tree.away"), + "away", + + ); + } + + if (outputMuted) { + return icon( + t("tree.soundMuted"), + "soundMuted", + <> + + + {OFF_BADGE} + + ); + } + if (muted) { - return ( - + return icon( + t("tree.micMuted"), + inputMuted ? "micMuted" : "hardwareMicMuted", + <> + + + + + {OFF_BADGE} + ); } @@ -1383,15 +1415,13 @@ function TalkLamp({ function ClientStatusIcons({ client }: { client: ClientInfo }) { const t = useT(); const { tree } = useContext(DisplayPrefsContext); - // Mute is shown on the TalkLamp; keep secondary flags here. + // Away and mute are shown on the TalkLamp; keep secondary flags here. return ( {client.isChannelCommander && !tree.commanderLamp && ⭐} - {client.away && 💤} {!client.inputMuted && client.inputHardwareEnabled && !client.hasTalkPower && ( 🔒 )} - {client.outputMuted && 🔕} {client.isStreaming && 📺} ); @@ -1754,6 +1784,8 @@ function ChannelTree({ } inputMuted={c.inputMuted} inputHardwareEnabled={c.inputHardwareEnabled} + outputMuted={c.outputMuted} + away={c.away} commander={c.isChannelCommander} /> @@ -1970,6 +2002,8 @@ function InfoPanel({ talking={false} inputMuted={client.inputMuted} inputHardwareEnabled={client.inputHardwareEnabled} + outputMuted={client.outputMuted} + away={client.away} /> {client.name}