@@ -16,12 +16,16 @@ import {
1616import editorThemes from '../../config/editorThemes' ;
1717import TaskDescriptionMarkdown from '../game/TaskDescriptionMarkdown' ;
1818
19+ const getUrl = ( id , isWinner ) => (
20+ isWinner ? `/${ id } -win.png` : `/${ id } .png`
21+ ) ;
22+
1923const renderPlayerId = ( id , verticalAlign ) => (
2024 < span style = { { marginLeft : '-0.2em' , verticalAlign } } > { id } </ span >
2125) ;
2226
23- const renderImg = ( id , imgStyle ) => (
24- id ? < img style = { imgStyle } src = { `/assets/images/clans/${ id || 1 } .png ` } alt = "И" /> : < > </ >
27+ const renderImg = ( id , imgStyle , isWinner = false ) => (
28+ id ? < img style = { imgStyle } src = { `/assets/images/clans/${ getUrl ( id || 1 , isWinner ) } ` } alt = "И" /> : < > </ >
2529) ;
2630
2731function StreamFullPanel ( {
@@ -33,8 +37,9 @@ function StreamFullPanel({
3337 descriptionFontSize,
3438 outputTitleFontSize,
3539 outputDataFontSize,
40+ outputTitleWidth,
3641 nameLineHeight,
37- headerVerticalAlign ,
42+ statusVerticalAlign ,
3843 testBarMarginBottom,
3944 testBarFontSize,
4045 testBarHeight,
@@ -110,8 +115,8 @@ function StreamFullPanel({
110115 < div className = "d-flexflex-column w-100 h-100 cb-stream-full-info" >
111116 < div className = "d-flex w-100 justify-content-between py-3 px-4" style = { { height : '25%' , minHeight : '25%' , maxHeight : '25%' } } >
112117 < div >
113- < div className = "cb-stream-tasks-stats cb-stream-full-task-stats cb-stream-widget-text italic " >
114- < span style = { { verticalAlign : headerVerticalAlign , fontSize : taskHeaderFontSize } } >
118+ < div className = "cb-stream-tasks-stats cb-stream-full-task-stats cb-stream-widget-text" >
119+ < span style = { { verticalAlign : statusVerticalAlign , fontSize : taskHeaderFontSize } } >
115120 { `${ ( game ?. task ?. id || 1 ) % 21 } /21 ЗАДАЧ` }
116121 </ span >
117122 </ div >
@@ -121,7 +126,7 @@ function StreamFullPanel({
121126 </ div >
122127 < div className = "d-flex flex-column pb-4 pl-3" style = { { width : '35%' , minWidth : '35%' , maxWidth : '35%' } } >
123128 < div className = "d-flex cb-stream-full-output mt-2 mb-1" >
124- < div className = "d-flex flex-column cb-stream-output-title" style = { { width : '33%' , fontSize : outputTitleFontSize } } >
129+ < div className = "d-flex flex-column cb-stream-output-title" style = { { width : outputTitleWidth , fontSize : outputTitleFontSize } } >
125130 < span > Входные</ span >
126131 < span > данные</ span >
127132 </ div >
@@ -130,7 +135,7 @@ function StreamFullPanel({
130135 </ div >
131136 </ div >
132137 < div className = "d-flex cb-stream-full-output mt-2 mb-1" >
133- < div className = "d-flex flex-column cb-stream-output-title" style = { { width : '33%' , fontSize : outputTitleFontSize } } >
138+ < div className = "d-flex flex-column cb-stream-output-title" style = { { width : outputTitleWidth , fontSize : outputTitleFontSize } } >
134139 < span > Ожидаемые</ span >
135140 < span > данные</ span >
136141 </ div >
@@ -155,12 +160,12 @@ function StreamFullPanel({
155160 className = {
156161 cn (
157162 'd-flex position-relative align-items-center justify-content-center' ,
158- 'cb-stream-player-number cb-stream-widget-text italic ' ,
163+ 'cb-stream-player-number cb-stream-widget-text' ,
159164 )
160165 }
161166 style = { imgStyle }
162167 >
163- { renderPlayerId ( leftEditor ?. playerId , headerVerticalAlign ) }
168+ { renderPlayerId ( leftEditor ?. playerId , statusVerticalAlign ) }
164169 </ div >
165170 < div className = "cb-stream-player-clan h-100 position-relative mr-3" >
166171 { /* {player?.clanId && ( */ }
@@ -171,7 +176,7 @@ function StreamFullPanel({
171176 className = { cn (
172177 'd-flex flex-column cb-stream-name cb-stream-widget-text' ,
173178 ) }
174- style = { { verticalAlign : headerVerticalAlign } }
179+ style = { { verticalAlign : statusVerticalAlign } }
175180 >
176181 { ( leftPlayer ?. name || 'Фамилия Имя' ) . split ( ' ' ) . map ( str => (
177182 < div
@@ -228,12 +233,12 @@ function StreamFullPanel({
228233 className = {
229234 cn (
230235 'd-flex position-relative align-items-center justify-content-center' ,
231- 'cb-stream-player-number cb-stream-widget-text italic ' ,
236+ 'cb-stream-player-number cb-stream-widget-text' ,
232237 )
233238 }
234239 style = { imgStyle }
235240 >
236- { renderPlayerId ( rightEditor ?. playerId , headerVerticalAlign ) }
241+ { renderPlayerId ( rightEditor ?. playerId , statusVerticalAlign ) }
237242 </ div >
238243 < div className = "cb-stream-player-clan h-100 position-relative mr-3" >
239244 { /* {player?.clanId && ( */ }
@@ -246,7 +251,7 @@ function StreamFullPanel({
246251 'd-flex flex-column cb-stream-name cb-stream-widget-text' ,
247252 )
248253 }
249- style = { { verticalAlign : headerVerticalAlign } }
254+ style = { { verticalAlign : statusVerticalAlign } }
250255 >
251256 { ( rightPlayer ?. name || 'Фамилия Имя' ) . split ( ' ' ) . map ( str => (
252257 < div
0 commit comments