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 {
8
8
content: string
9
9
status: T.ProgressStatus
10
10
subtasks: { name: string; pass: boolean }[] | null
11
+ displayAll: boolean
11
12
}
12
13
13
14
const styles = {
@@ -40,7 +41,7 @@ const styles = {
40
41
}
41
42
42
43
const Step = (props: Props) => {
43
- const showStep = props.status !== 'INCOMPLETE'
44
+ const showStep = props.displayAll || props. status !== 'INCOMPLETE'
44
45
if (!showStep) {
45
46
return null
46
47
}
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import Hints from './Hints'
6
6
7
7
interface Props {
8
8
steps: TT.Step[]
9
+ displayAll: boolean
9
10
}
10
11
11
12
const styles = {
@@ -27,7 +28,13 @@ const Steps = (props: Props) => {
27
28
}
28
29
return (
29
30
<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
+ />
31
38
<Hints hints={step.hints || []} />
32
39
</div>
33
40
)
Original file line number Diff line number Diff line change @@ -19,12 +19,16 @@ const styles = {
19
19
icon: 'warning',
20
20
color: '#ff9300',
21
21
},
22
+ incomplete: {
23
+ icon: 'lock',
24
+ color: 'lightgrey',
25
+ },
22
26
}
23
27
24
28
const TestStatusIcon = (props: Props) => {
25
29
// @ts-ignore
26
30
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 }} />
28
32
}
29
33
30
34
export default TestStatusIcon
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const ReviewPage = (props: Props) => {
35
35
<div key={level.id}>
36
36
<div>
37
37
<Content title={level.title} content={level.content} />
38
- <Steps steps={level.steps} />
38
+ <Steps steps={level.steps} displayAll />
39
39
</div>
40
40
{/* divider */}
41
41
{index < props.levels.length - 1 ? <hr /> : null}
You can’t perform that action at this time.
0 commit comments