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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-11-12 20:18:53 +00:00
1 parent bfe05a8b02
commit 5e76bd3bdf
1 file changed
+67 -33
+67 -33
View File
@@ -1309,15 +1309,30 @@ function ChannelIcon() {
} }
/** GTS2-style talk lamp: blue idle / green talking / muted mic. */ /** 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 = (
<>
<circle cx="10.35" cy="10.35" r="2.55" fill="#e53935" stroke="#1a1a1a" strokeWidth="0.55" />
<path d="M9.35 9.35l2 2M11.35 9.35l-2 2" stroke="#fff" strokeWidth="1.1" strokeLinecap="round" />
</>
);
/** 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({ function TalkLamp({
talking, talking,
inputMuted, inputMuted,
inputHardwareEnabled, inputHardwareEnabled,
outputMuted = false,
away = false,
commander = false, commander = false,
}: { }: {
talking: boolean; talking: boolean;
inputMuted: boolean; inputMuted: boolean;
inputHardwareEnabled: boolean; inputHardwareEnabled: boolean;
outputMuted?: boolean;
away?: boolean;
/** Channel commander: drawn as its own lamp when the design option asks for it. */ /** Channel commander: drawn as its own lamp when the design option asks for it. */
commander?: boolean; commander?: boolean;
}) { }) {
@@ -1326,37 +1341,54 @@ function TalkLamp({
const muted = inputMuted || !inputHardwareEnabled; const muted = inputMuted || !inputHardwareEnabled;
const asCommander = commander && tree.commanderLamp; const asCommander = commander && tree.commanderLamp;
const icon = (title: string, packIcon: string, paths: React.ReactNode) => (
<span className="ts-talk-lamp ts-talk-lamp-muted" title={title} aria-hidden="true" data-pack-icon={packIcon}>
<svg width="14" height="14" viewBox="0 0 14 14" focusable="false">
{paths}
</svg>
</span>
);
if (away) {
return icon(
t("tree.away"),
"away",
<path d="M8.6 1.6a5.4 5.4 0 1 0 3.8 9.2A4.4 4.4 0 0 1 8.6 1.6Z" fill="#8fa6c4" stroke="#5f7694" strokeWidth="0.6" />
);
}
if (outputMuted) {
return icon(
t("tree.soundMuted"),
"soundMuted",
<>
<path d="M1.6 5h2.3l3.2-2.7v8.6L3.9 8.2H1.6Z" fill="#9aa3ad" stroke="#8a939c" strokeWidth="0.5" strokeLinejoin="round" />
<path d="M8.6 4.6c.7.6 1 1.3 1 2s-.3 1.4-1 2" fill="none" stroke="#8a939c" strokeWidth="1.1" strokeLinecap="round" />
{OFF_BADGE}
</>
);
}
if (muted) { if (muted) {
return ( return icon(
<span t("tree.micMuted"),
className="ts-talk-lamp ts-talk-lamp-muted" inputMuted ? "micMuted" : "hardwareMicMuted",
title={t("tree.micMuted")} <>
aria-hidden="true" <path
data-pack-icon={inputMuted ? "micMuted" : "hardwareMicMuted"} d="M7 1.4c-1.15 0-2.05.9-2.05 2.05v3.1c0 1.15.9 2.05 2.05 2.05s2.05-.9 2.05-2.05v-3.1C9.05 2.3 8.15 1.4 7 1.4Z"
> fill="#9aa3ad"
<svg width="14" height="14" viewBox="0 0 14 14" focusable="false"> />
<path <path
d="M7 1.4c-1.15 0-2.05.9-2.05 2.05v3.1c0 1.15.9 2.05 2.05 2.05s2.05-.9 2.05-2.05v-3.1C9.05 2.3 8.15 1.4 7 1.4Z" d="M3.2 6.4v.4c0 2 1.7 3.55 3.8 3.55s3.8-1.55 3.8-3.55v-.4"
fill="#9aa3ad" fill="none"
/> stroke="#8a939c"
<path strokeWidth="1.15"
d="M3.2 6.4v.4c0 2 1.7 3.55 3.8 3.55s3.8-1.55 3.8-3.55v-.4" strokeLinecap="round"
fill="none" />
stroke="#8a939c" <path d="M7 10.35v2" stroke="#8a939c" strokeWidth="1.15" strokeLinecap="round" />
strokeWidth="1.15" <path d="M5.2 12.35h3.6" stroke="#8a939c" strokeWidth="1.15" strokeLinecap="round" />
strokeLinecap="round" {OFF_BADGE}
/> </>
<path d="M7 10.35v2" stroke="#8a939c" strokeWidth="1.15" strokeLinecap="round" />
<path d="M5.2 12.35h3.6" stroke="#8a939c" strokeWidth="1.15" strokeLinecap="round" />
<circle cx="10.35" cy="10.35" r="2.55" fill="#e53935" stroke="#1a1a1a" strokeWidth="0.55" />
<path
d="M9.35 9.35l2 2M11.35 9.35l-2 2"
stroke="#fff"
strokeWidth="1.1"
strokeLinecap="round"
/>
</svg>
</span>
); );
} }
@@ -1383,15 +1415,13 @@ function TalkLamp({
function ClientStatusIcons({ client }: { client: ClientInfo }) { function ClientStatusIcons({ client }: { client: ClientInfo }) {
const t = useT(); const t = useT();
const { tree } = useContext(DisplayPrefsContext); 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 ( return (
<span className="ts-status-icons"> <span className="ts-status-icons">
{client.isChannelCommander && !tree.commanderLamp && <span title={t("tree.channelCommander")}>⭐</span>} {client.isChannelCommander && !tree.commanderLamp && <span title={t("tree.channelCommander")}>⭐</span>}
{client.away && <span title={t("tree.away")} data-pack-icon="away">💤</span>}
{!client.inputMuted && client.inputHardwareEnabled && !client.hasTalkPower && ( {!client.inputMuted && client.inputHardwareEnabled && !client.hasTalkPower && (
<span title={t("tree.noTalkPower")}>🔒</span> <span title={t("tree.noTalkPower")}>🔒</span>
)} )}
{client.outputMuted && <span title={t("tree.soundMuted")} data-pack-icon="soundMuted">🔕</span>}
{client.isStreaming && <span title={t("tree.streaming")}>📺</span>} {client.isStreaming && <span title={t("tree.streaming")}>📺</span>}
</span> </span>
); );
@@ -1754,6 +1784,8 @@ function ChannelTree({
} }
inputMuted={c.inputMuted} inputMuted={c.inputMuted}
inputHardwareEnabled={c.inputHardwareEnabled} inputHardwareEnabled={c.inputHardwareEnabled}
outputMuted={c.outputMuted}
away={c.away}
commander={c.isChannelCommander} commander={c.isChannelCommander}
/> />
<span className="ts-client-status-leading"> <span className="ts-client-status-leading">
@@ -1970,6 +2002,8 @@ function InfoPanel({
talking={false} talking={false}
inputMuted={client.inputMuted} inputMuted={client.inputMuted}
inputHardwareEnabled={client.inputHardwareEnabled} inputHardwareEnabled={client.inputHardwareEnabled}
outputMuted={client.outputMuted}
away={client.away}
/> />
<span>{client.name}</span> <span>{client.name}</span>
</div> </div>