@@ -16,12 +16,16 @@ import {
16
16
import editorThemes from '../../config/editorThemes' ;
17
17
import TaskDescriptionMarkdown from '../game/TaskDescriptionMarkdown' ;
18
18
19
+ const getUrl = ( id , isWinner ) => (
20
+ isWinner ? `/${ id } -win.png` : `/${ id } .png`
21
+ ) ;
22
+
19
23
const renderPlayerId = ( id , verticalAlign ) => (
20
24
< span style = { { marginLeft : '-0.2em' , verticalAlign } } > { id } </ span >
21
25
) ;
22
26
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 = "И" /> : < > </ >
25
29
) ;
26
30
27
31
function StreamFullPanel ( {
@@ -33,8 +37,9 @@ function StreamFullPanel({
33
37
descriptionFontSize,
34
38
outputTitleFontSize,
35
39
outputDataFontSize,
40
+ outputTitleWidth,
36
41
nameLineHeight,
37
- headerVerticalAlign ,
42
+ statusVerticalAlign ,
38
43
testBarMarginBottom,
39
44
testBarFontSize,
40
45
testBarHeight,
@@ -110,8 +115,8 @@ function StreamFullPanel({
110
115
< div className = "d-flexflex-column w-100 h-100 cb-stream-full-info" >
111
116
< div className = "d-flex w-100 justify-content-between py-3 px-4" style = { { height : '25%' , minHeight : '25%' , maxHeight : '25%' } } >
112
117
< 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 } } >
115
120
{ `${ ( game ?. task ?. id || 1 ) % 21 } /21 ЗАДАЧ` }
116
121
</ span >
117
122
</ div >
@@ -121,7 +126,7 @@ function StreamFullPanel({
121
126
</ div >
122
127
< div className = "d-flex flex-column pb-4 pl-3" style = { { width : '35%' , minWidth : '35%' , maxWidth : '35%' } } >
123
128
< 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 } } >
125
130
< span > Входные</ span >
126
131
< span > данные</ span >
127
132
</ div >
@@ -130,7 +135,7 @@ function StreamFullPanel({
130
135
</ div >
131
136
</ div >
132
137
< 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 } } >
134
139
< span > Ожидаемые</ span >
135
140
< span > данные</ span >
136
141
</ div >
@@ -155,12 +160,12 @@ function StreamFullPanel({
155
160
className = {
156
161
cn (
157
162
'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' ,
159
164
)
160
165
}
161
166
style = { imgStyle }
162
167
>
163
- { renderPlayerId ( leftEditor ?. playerId , headerVerticalAlign ) }
168
+ { renderPlayerId ( leftEditor ?. playerId , statusVerticalAlign ) }
164
169
</ div >
165
170
< div className = "cb-stream-player-clan h-100 position-relative mr-3" >
166
171
{ /* {player?.clanId && ( */ }
@@ -171,7 +176,7 @@ function StreamFullPanel({
171
176
className = { cn (
172
177
'd-flex flex-column cb-stream-name cb-stream-widget-text' ,
173
178
) }
174
- style = { { verticalAlign : headerVerticalAlign } }
179
+ style = { { verticalAlign : statusVerticalAlign } }
175
180
>
176
181
{ ( leftPlayer ?. name || 'Фамилия Имя' ) . split ( ' ' ) . map ( str => (
177
182
< div
@@ -228,12 +233,12 @@ function StreamFullPanel({
228
233
className = {
229
234
cn (
230
235
'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' ,
232
237
)
233
238
}
234
239
style = { imgStyle }
235
240
>
236
- { renderPlayerId ( rightEditor ?. playerId , headerVerticalAlign ) }
241
+ { renderPlayerId ( rightEditor ?. playerId , statusVerticalAlign ) }
237
242
</ div >
238
243
< div className = "cb-stream-player-clan h-100 position-relative mr-3" >
239
244
{ /* {player?.clanId && ( */ }
@@ -246,7 +251,7 @@ function StreamFullPanel({
246
251
'd-flex flex-column cb-stream-name cb-stream-widget-text' ,
247
252
)
248
253
}
249
- style = { { verticalAlign : headerVerticalAlign } }
254
+ style = { { verticalAlign : statusVerticalAlign } }
250
255
>
251
256
{ ( rightPlayer ?. name || 'Фамилия Имя' ) . split ( ' ' ) . map ( str => (
252
257
< div
0 commit comments