xonecas.io
8058
Ir

irvc / commit 70069d8

show your own username in vc when you are joined

Jason Moiron2026-10-16 70069d80746bda7efab6098249089df51601da73 parent b5237d6

3 files changed

web/src/components/Sidebar.tsx+5−0
@@ -116,6 +116,7 @@ export default function Sidebar({
116116 channel={c}
117117 voice={voice}
118118 occupants={voiceRooms[String(c.id)] ?? []}
119+ self={username}
119120 deafened={deafened}
120121 onDeafen={onDeafen}
121122 openShare={openShare}
@@ -162,6 +163,7 @@ export default function Sidebar({
162163 {voice.channel?.type === "dm" && (
163164 <VoiceBar
164165 voice={voice}
166+ self={username}
165167 deafened={deafened}
166168 onDeafen={onDeafen}
167169 openShare={openShare}
@@ -268,6 +270,7 @@ function VoiceRow({
268270 channel,
269271 voice,
270272 occupants,
273+ self,
271274 deafened,
272275 onDeafen,
273276 openShare,
@@ -277,6 +280,7 @@ function VoiceRow({
277280 channel: Channel;
278281 voice: Voice;
279282 occupants: VoiceOccupant[];
283+ self: string;
280284 deafened: boolean;
281285 onDeafen: (value: boolean) => void;
282286 openShare?: string | null;
@@ -289,6 +293,7 @@ function VoiceRow({
289293 return (
290294 <VoiceBar
291295 voice={voice}
296+ self={self}
292297 deafened={deafened}
293298 onDeafen={onDeafen}
294299 openShare={openShare}
web/src/components/VoiceBar.tsx+10−1
@@ -36,6 +36,7 @@ const canShare = typeof navigator.mediaDevices?.getDisplayMedia === "function";
3636 // controls never depend on the sidebar being open.
3737 export default function VoiceBar({
3838 voice,
39+ self,
3940 deafened,
4041 onDeafen,
4142 openShare,
@@ -44,6 +45,7 @@ export default function VoiceBar({
4445 className,
4546 }: {
4647 voice: Voice;
48+ self: string;
4749 deafened: boolean;
4850 onDeafen: (value: boolean) => void;
4951 openShare?: string | null;
@@ -99,8 +101,15 @@ export default function VoiceBar({
99101 <span className="max-w-1/2 shrink-0 truncate text-xs text-faint">{status}</span>
100102 </div>
101103
102- {voice.status === "live" && (peers.length > 0 || shares.length > 0) && (
104+ {voice.status === "live" && (
103105 <ul className="mt-1 space-y-0.5">
106+ <li className="row py-1 text-sm">
107+ <Dot on={speaking.includes(self)} />
108+ <span className="flex-1 truncate" style={{ color: userColor(self) }}>
109+ {self}
110+ </span>
111+ <VoiceMarks muted={voice.muted} deafened={deafened} />
112+ </li>
104113 {peers.map((p) => {
105114 const them = occupants?.find((o) => o.name === p);
106115 return (
web/src/views/Chat.tsx+1−0
@@ -539,6 +539,7 @@ export default function Chat({ user, onLogout }: { user: User; onLogout: () => v
539539 <div className="shrink-0 px-2 pb-2 md:hidden">
540540 <VoiceBar
541541 voice={voice}
542+ self={user.username}
542543 deafened={settings.deafened}
543544 onDeafen={(v) => update({ deafened: v })}
544545 openShare={openShare}