xonecas.io
8058
Ir

irvc / commit 33d61b1

chore: some alignment issues

xonecas2026-10-12 33d61b13b5c22aa0481105ff5df43ef408bde09b parent 0142753

4 files changed

web/src/components/Dot.tsx+6−0
@@ -0,0 +1,6 @@
1+import { cn } from "cn";
2+
3+// Dim until active (speaking / online), then lights up.
4+export default function Dot({ on }: { on: boolean }) {
5+ return <span className={cn("h-2 w-2 rounded-full transition-colors", on ? "bg-gold" : "bg-sepia/25")} />;
6+}
web/src/components/Sidebar.tsx+11−14
@@ -190,7 +190,7 @@ function VoiceChannel({
190190 <div className="flex items-center gap-2 px-2 py-1.5 text-sm text-sepia/70">
191191 <Volume2 size={14} />
192192 <span className="flex-1 truncate">{channel.name}</span>
193- {active && (
193+ {active ? (
194194 <>
195195 <Button
196196 size="icon-xs"
@@ -204,6 +204,15 @@ function VoiceChannel({
204204 <PhoneOff />
205205 </Button>
206206 </>
207+ ) : (
208+ <Button
209+ size="xs"
210+ variant="ghost"
211+ className="text-xs text-sepia/50"
212+ onClick={() => voice.join(channel)}
213+ >
214+ join
215+ </Button>
207216 )}
208217 </div>
209218 {active && (
@@ -217,22 +226,10 @@ function VoiceChannel({
217226 )}
218227 </div>
219228 )}
220- {!active && (
221- <div className="px-2 pt-0.5">
222- <Button
223- size="xs"
224- variant="ghost"
225- className="text-xs text-sepia/50"
226- onClick={() => voice.join(channel)}
227- >
228- join
229- </Button>
230- </div>
231- )}
232229 {!active && occupants.length > 0 && (
233230 <div className="flex flex-col gap-0.5 pb-0.5 pl-3.5 pr-2">
234231 {occupants.map((name) => (
235- <span key={name} className="truncate text-xs text-sepia/70">
232+ <span key={name} className="truncate text-sm text-sepia/70">
236233 {name}
237234 </span>
238235 ))}
web/src/components/UserList.tsx+2−1
@@ -1,4 +1,5 @@
11 import type { UserSummary } from "../lib/types";
2+import Dot from "./Dot";
23
34 export default function UserList({ users, online }: { users: UserSummary[]; online: Set<string> }) {
45 const sorted = [...users].sort(
@@ -18,7 +19,7 @@ export default function UserList({ users, online }: { users: UserSummary[]; onli
1819 isOnline ? "text-sepia" : "text-sepia/35"
1920 }`}
2021 >
21- <span className={`h-2 w-2 rounded-full ${isOnline ? "bg-gold" : "bg-sepia/25"}`} />
22+ <Dot on={isOnline} />
2223 {u.username}
2324 </li>
2425 );
web/src/components/VoicePeers.tsx+3−11
@@ -1,7 +1,7 @@
11 import { useEffect, useState } from "react";
22 import { MicOff, Volume2, VolumeX } from "lucide-react";
3-import { cn } from "cn";
43 import { Button } from "@/components/ui/button";
4+import Dot from "./Dot";
55 import type { Voice } from "../lib/voice";
66
77 const storageKey = "irvc.peerVolumes";
@@ -45,7 +45,7 @@ export default function VoicePeers({ voice, username }: { voice: Voice; username
4545
4646 return (
4747 <>
48- <div className="flex items-center gap-1.5 text-xs text-sepia/70">
48+ <div className="flex items-center gap-1.5 text-sm text-sepia/70">
4949 <Dot on={speaking.includes(username)} />
5050 {username} <span className="text-sepia/40">(you)</span>
5151 {selfMuted && <MicOff size={10} className="text-sepia/50" />}
@@ -54,7 +54,7 @@ export default function VoicePeers({ voice, username }: { voice: Voice; username
5454 <div key={p}>
5555 <button
5656 onClick={() => setOpen((o) => (o === p ? null : p))}
57- className="flex w-full items-center gap-1.5 text-left text-xs text-sepia/70 hover:text-sepia"
57+ className="flex w-full items-center gap-1.5 text-left text-sm text-sepia/70 hover:text-sepia"
5858 >
5959 <Dot on={speaking.includes(p)} />
6060 {p}
@@ -88,11 +88,3 @@ export default function VoicePeers({ voice, username }: { voice: Voice; username
8888 );
8989 }
9090
91-// The dot stays dim until the participant is speaking, then lights up.
92-function Dot({ on }: { on: boolean }) {
93- return (
94- <span
95- className={cn("h-1.5 w-1.5 rounded-full transition-colors", on ? "bg-gold" : "bg-sepia/25")}
96- />
97- );
98-}