File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
web-app/src/containers/Tutorial Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ interface Props {
88 content : string
99 status : T . ProgressStatus
1010 subtasks : { name : string ; pass : boolean } [ ] | null
11+ displayAll : boolean
1112}
1213
1314const styles = {
@@ -40,7 +41,7 @@ const styles = {
4041}
4142
4243const Step = ( props : Props ) => {
43- const showStep = props . status !== 'INCOMPLETE'
44+ const showStep = props . displayAll || props . status !== 'INCOMPLETE'
4445 if ( ! showStep ) {
4546 return null
4647 }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import Hints from './Hints'
66
77interface Props {
88 steps : TT . Step [ ]
9+ displayAll : boolean
910}
1011
1112const styles = {
@@ -27,7 +28,13 @@ const Steps = (props: Props) => {
2728 }
2829 return (
2930 < div key = { step . id } >
30- < Step key = { step . id } status = { step . status || 'INCOMPLETE' } content = { step . content } subtasks = { step . subtasks } />
31+ < Step
32+ key = { step . id }
33+ status = { step . status || 'INCOMPLETE' }
34+ displayAll = { props . displayAll }
35+ content = { step . content }
36+ subtasks = { step . subtasks }
37+ />
3138 < Hints hints = { step . hints || [ ] } />
3239 </ div >
3340 )
Original file line number Diff line number Diff line change @@ -19,12 +19,16 @@ const styles = {
1919 icon : 'warning' ,
2020 color : '#ff9300' ,
2121 } ,
22+ incomplete : {
23+ icon : 'lock' ,
24+ color : 'lightgrey' ,
25+ } ,
2226}
2327
2428const TestStatusIcon = ( props : Props ) => {
2529 // @ts -ignore
2630 const style : { icon : string ; color : string } = styles [ props . status . toLowerCase ( ) ]
27- return < Icon type = "success-filling" size = { props . size } style = { { color : style . color } } />
31+ return < Icon type = { style . icon } size = { props . size } style = { { color : style . color } } />
2832}
2933
3034export default TestStatusIcon
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const ReviewPage = (props: Props) => {
3535 < div key = { level . id } >
3636 < div >
3737 < Content title = { level . title } content = { level . content } />
38- < Steps steps = { level . steps } />
38+ < Steps steps = { level . steps } displayAll />
3939 </ div >
4040 { /* divider */ }
4141 { index < props . levels . length - 1 ? < hr /> : null }
You can’t perform that action at this time.
0 commit comments