mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 18:02:49 +08:00
Client tree: own icons for TeamSpeak's built-in group icons
Built-in group icons (Server Admin, Channel Admin, ...) were plain coloured letter circles. Now a small person with the group's initial in a coloured badge, in the style of the mute icons. Own artwork, not a copy of the native client's icons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
de94859a16
commit
169d32a292
2 files changed
+12
-13
No files matched your search
+3
-10
@@ -2364,17 +2364,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ts-group-badge {
|
.ts-group-badge {
|
||||||
display: inline-flex;
|
display: block;
|
||||||
align-items: center;
|
width: 15px;
|
||||||
justify-content: center;
|
height: 15px;
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
border-radius: 50%;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 9px;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
color: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-poke-button {
|
.ts-poke-button {
|
||||||
|
|||||||
+9
-3
@@ -1443,9 +1443,15 @@ function GroupIcon({ group, images }: { group: GroupEntry; images: Record<string
|
|||||||
const base64 = group.iconId >= CUSTOM_ICON_ID_THRESHOLD ? images[`/icon_${group.iconId}`] : undefined;
|
const base64 = group.iconId >= CUSTOM_ICON_ID_THRESHOLD ? images[`/icon_${group.iconId}`] : undefined;
|
||||||
if (base64) return <img className="ts-group-icon" src={iconDataUrl(base64)} alt="" title={group.name} />;
|
if (base64) return <img className="ts-group-icon" src={iconDataUrl(base64)} alt="" title={group.name} />;
|
||||||
return (
|
return (
|
||||||
<span className="ts-group-badge" style={{ background: groupBadgeColor(group.iconId) }} title={group.name}>
|
<svg className="ts-group-badge" width="16" height="16" viewBox="0 0 16 16" role="img" aria-label={group.name}>
|
||||||
{group.name.trim().charAt(0).toUpperCase() || "?"}
|
<title>{group.name}</title>
|
||||||
</span>
|
<circle cx="6.5" cy="4.6" r="2.9" fill="#8b95a1" />
|
||||||
|
<path d="M1 14.6c0-3.3 2.4-5.6 5.5-5.6s5.5 2.3 5.5 5.6Z" fill="#8b95a1" />
|
||||||
|
<circle cx="11.6" cy="11.4" r="4.1" fill={groupBadgeColor(group.iconId)} stroke="var(--bg, #fff)" strokeWidth="0.9" />
|
||||||
|
<text x="11.6" y="13.95" textAnchor="middle" fontSize="7" fontWeight="700" fill="#fff" fontFamily="system-ui, sans-serif">
|
||||||
|
{group.name.trim().charAt(0).toUpperCase() || "?"}
|
||||||
|
</text>
|
||||||
|
</svg>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user