@@ -5,11 +5,13 @@ import { BroadcastStreamController, BroadcastGame } from 'src/types'
55interface BroadcastGameListProps {
66 broadcastController : BroadcastStreamController
77 onGameSelected ?: ( ) => void
8+ embedded ?: boolean
89}
910
1011export const BroadcastGameList : React . FC < BroadcastGameListProps > = ( {
1112 broadcastController,
1213 onGameSelected,
14+ embedded = false ,
1315} ) => {
1416 const [ selectedRoundId , setSelectedRoundId ] = useState < string > (
1517 broadcastController . currentRound ?. id || '' ,
@@ -61,12 +63,29 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
6163 }
6264
6365 return (
64- < div className = "flex h-full flex-col items-start justify-start overflow-hidden bg-background-1 md:rounded" >
65- < div className = "flex w-full flex-col items-start justify-start gap-2 border-b-2 border-white border-opacity-10 p-3" >
66+ < div
67+ className = {
68+ embedded
69+ ? 'flex h-full flex-col items-start justify-start overflow-hidden'
70+ : 'flex h-full flex-col items-start justify-start overflow-hidden rounded-md border border-glassBorder bg-glass backdrop-blur-md'
71+ }
72+ >
73+ < div
74+ className = {
75+ embedded
76+ ? 'flex w-full flex-col items-start justify-start gap-2 border-b border-glassBorder bg-transparent px-3 py-2'
77+ : 'flex w-full flex-col items-start justify-start gap-2 border-b border-glassBorder bg-transparent px-3 py-2'
78+ }
79+ >
6680 < div className = "w-full overflow-hidden" >
67- < h3 className = "truncate text-sm font-semibold text-primary" >
68- { broadcastController . currentBroadcast ?. tour . name ||
69- 'Live Broadcast' }
81+ < h3
82+ className = {
83+ embedded
84+ ? 'truncate text-sm font-semibold text-white/95'
85+ : 'truncate text-sm font-semibold text-white/95'
86+ }
87+ >
88+ { broadcastController . currentBroadcast ?. tour . name || 'Live Broadcast' }
7089 </ h3 >
7190 </ div >
7291
@@ -76,7 +95,7 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
7695 id = "round-selector"
7796 value = { selectedRoundId }
7897 onChange = { ( e ) => handleRoundChange ( e . target . value ) }
79- className = "w-full rounded bg-background-2 px-2 py-1 text-xs text-primary focus:outline-none focus:ring-1 focus:ring-human-4"
98+ className = "w-full rounded-md border border-glassBorder bg-glass px-2 py-1 text-xs text-white/90 backdrop-blur-sm focus:outline-none focus:ring-1 focus:ring-human-4"
8099 >
81100 { broadcastController . currentBroadcast . rounds . map ( ( round ) => (
82101 < option key = { round . id } value = { round . id } >
@@ -88,7 +107,7 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
88107
89108 { /* Connection Status */ }
90109 { broadcastController . broadcastState . error && (
91- < div className = "mb-2 rounded bg-red-500/20 p-2 text-xs text-red-400" >
110+ < div className = "mb-2 rounded-md border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-400 backdrop-blur-sm " >
92111 < div className = "flex items-center justify-between" >
93112 < span > Connection Error</ span >
94113 < button
@@ -102,9 +121,9 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
102121 ) }
103122
104123 { broadcastController . broadcastState . isConnecting && (
105- < div className = "mb-2 rounded bg-background-2 p-2 text-xs text-secondary" >
124+ < div className = "mb-2 rounded-md border border-glassBorder bg-glass p-2 text-xs text-secondary backdrop-blur-sm " >
106125 < div className = "flex items-center gap-2" >
107- < div className = "h-3 w-3 animate-spin rounded-full border-b border-white" > </ div >
126+ < div className = "h-3 w-3 animate-spin rounded-full border-b border-white/80 " > </ div >
108127 < span > Connecting...</ span >
109128 </ div >
110129 </ div >
@@ -136,22 +155,18 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
136155 return (
137156 < div
138157 key = { game . id }
139- className = { `group flex w-full items-center ${
158+ className = { `group flex w-full items-center transition-colors ${
140159 isSelected
141- ? 'bg-background-2 font-bold'
142- : index % 2 === 0
143- ? 'bg-background-1/30 hover:bg-background-2'
144- : 'bg-background-1/10 hover:bg-background-2'
160+ ? 'bg-white/10 font-semibold'
161+ : 'hover:bg-white/5'
145162 } `}
146163 >
147164 < div
148165 className = { `flex h-full w-9 items-center justify-center ${
149- isSelected
150- ? 'bg-background-3'
151- : 'bg-background-2 group-hover:bg-white/5'
166+ isSelected ? 'bg-white/10' : 'bg-transparent group-hover:bg-white/5'
152167 } `}
153168 >
154- < p className = "text-sm text-secondary " > { index + 1 } </ p >
169+ < p className = "text-sm text-white/70 " > { index + 1 } </ p >
155170 </ div >
156171 < button
157172 onClick = { ( ) => handleGameSelect ( game ) }
@@ -161,13 +176,13 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
161176 < div className = "flex flex-col items-start overflow-hidden" >
162177 < div className = "flex items-center gap-1" >
163178 < div className = "h-2 w-2 rounded-full bg-white" />
164- < span className = "overflow-hidden text-ellipsis whitespace-nowrap text-xs text-primary " >
179+ < span className = "overflow-hidden text-ellipsis whitespace-nowrap text-xs text-white/90 " >
165180 { formatPlayerName ( game . white , game . whiteElo ) }
166181 </ span >
167182 </ div >
168183 < div className = "mt-0.5 flex items-center gap-1" >
169184 < div className = "h-2 w-2 rounded-full border-[0.5px] bg-black" />
170- < span className = "overflow-hidden text-ellipsis whitespace-nowrap text-xs text-primary " >
185+ < span className = "overflow-hidden text-ellipsis whitespace-nowrap text-xs text-white/90 " >
171186 { formatPlayerName ( game . black , game . blackElo ) }
172187 </ span >
173188 </ div >
@@ -192,15 +207,21 @@ export const BroadcastGameList: React.FC<BroadcastGameListProps> = ({
192207 </ div >
193208
194209 { /* Footer with broadcast info */ }
195- < div className = "w-full border-t border-white border-opacity-10 p-2" >
196- < div className = "text-center text-xs text-secondary" >
210+ < div
211+ className = {
212+ embedded
213+ ? 'w-full border-t border-glassBorder p-2'
214+ : 'w-full border-t border-glassBorder p-2'
215+ }
216+ >
217+ < div className = "text-center text-xs text-white/70" >
197218 < p >
198219 Watch on{ ' ' }
199220 < a
200221 href = { broadcastController . currentBroadcast ?. tour . url }
201222 target = "_blank"
202223 rel = "noopener noreferrer"
203- className = "text-primary/60 underline hover:text-primary "
224+ className = "text-white/80 underline hover:text-white "
204225 >
205226 Lichess
206227 </ a >
0 commit comments