@@ -9,7 +9,15 @@ import {
99
1010import TaskDescriptionMarkdown from '../game/TaskDescriptionMarkdown' ;
1111
12- function StreamTaskInfoPanel ( { game, orientation, roomMachineState } ) {
12+ function StreamTaskInfoPanel ( {
13+ game,
14+ orientation,
15+ roomMachineState,
16+ fontSize,
17+ codeFontSize,
18+ setFontSize,
19+ setCodeFontSize,
20+ } ) {
1321 const outputSelector = orientation === 'left' ? leftExecutionOutputSelector : rightExecutionOutputSelector ;
1422 const playerSelector = orientation === 'left' ? firstPlayerSelector : secondPlayerSelector ;
1523
@@ -23,33 +31,45 @@ function StreamTaskInfoPanel({ game, orientation, roomMachineState }) {
2331 const result = assert ?. result || assert ?. value ;
2432
2533 return (
26- < div className = "d-flex flex-column justify-content-between col-4" >
34+ < div className = "d-flex cb-stream-widget flex-column justify-content-between col-4" >
2735 < div className = "d-flex pt-4 justify-content-between" >
28- < div className = "cb-stream-tasks-stats" >
29- < span > 3/8 ЗАДАЧ</ span >
36+ < div className = "cb-stream-tasks-stats cb-stream-widget-text " >
37+ < span style = { { fontSize } } > 3/8 ЗАДАЧ</ span >
3038 </ div >
3139 { /* <div> */ }
3240 { /* <span>3 / 8 Задача</span> */ }
3341 { /* </div> */ }
34- < div className = "d-flex align-items-center cb-stream-name" >
35- < span > { upperCase ( player ?. name || 'Башкевич Илья' ) } </ span >
42+ < div className = "d-flex flex-column align-items-center cb-stream-name cb-stream-widget-text" >
43+ { ( player ?. name || 'Фамилия Имя' ) . split ( ' ' ) . map ( str => (
44+ < span style = { { fontSize } } > { upperCase ( str || 'Test' ) } </ span >
45+ ) ) }
3646 </ div >
3747 </ div >
38- < div className = "cb-stream-task-description h-100 py-5" >
48+ < div className = "cb-stream-task-description h-100 py-5" style = { { fontSize } } >
3949 < TaskDescriptionMarkdown description = { game ?. task ?. descriptionRu } />
4050 </ div >
41- < div className = "d-flex flex-column pb-4" >
42- < div className = "d-flex cb-stream-output mt-2 mb-1" >
43- < div className = "d-flex align-items-center cb-stream-output-title" > Входные данные</ div >
44- < div className = "cb-stream-output-data align-content-around" > { args } </ div >
51+ < div className = "d-flex flex-column" >
52+ < div className = "d-flex flex-row bg-gray" >
53+ Font Sise
54+ < button type = "button" className = "btn btn-sm" onClick = { ( ) => setFontSize ( fontSize + 1 ) } > +</ button >
55+ < button type = "button" className = "btn btn-sm" onClick = { ( ) => setFontSize ( fontSize - 1 ) } > -</ button >
56+ Code Font Size
57+ < button type = "button" className = "btn btn-sm" onClick = { ( ) => setCodeFontSize ( codeFontSize + 1 ) } > +</ button >
58+ < button type = "button" className = "btn btn-sm" onClick = { ( ) => setCodeFontSize ( codeFontSize - 1 ) } > -</ button >
4559 </ div >
46- < div className = "d-flex cb-stream-output mb-1" >
47- < div className = "d-flex align-items-center cb-stream-output-title" > Ожидаемый результат</ div >
48- < div className = "cb-stream-output-data align-content-around" > { expected } </ div >
49- </ div >
50- < div className = "d-flex cb-stream-output mt-1 mb-2" >
51- < div className = "d-flex align-items-center cb-stream-output-title" > Полученный результат</ div >
52- < div className = "cb-stream-output-data align-content-around" > { result } </ div >
60+ < div className = "d-flex flex-column pb-4 cb-stream-widget-text" style = { { fontSize } } >
61+ < div className = "d-flex cb-stream-output mt-2 mb-1" >
62+ < div className = "d-flex align-items-center cb-stream-output-title" > Входные данные</ div >
63+ < div className = "cb-stream-output-data align-content-around" > { args } </ div >
64+ </ div >
65+ < div className = "d-flex cb-stream-output mb-1" >
66+ < div className = "d-flex align-items-center cb-stream-output-title" > Ожидаемый результат</ div >
67+ < div className = "cb-stream-output-data align-content-around" > { expected } </ div >
68+ </ div >
69+ < div className = "d-flex cb-stream-output mt-1 mb-2" >
70+ < div className = "d-flex align-items-center cb-stream-output-title" > Полученный результат</ div >
71+ < div className = "cb-stream-output-data align-content-around" > { result } </ div >
72+ </ div >
5373 </ div >
5474 </ div >
5575 </ div >
0 commit comments