Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/progress tasks#104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 2 commits intomasterfromfeature/progress-tasks
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletionweb-app/src/containers/Tutorial/LevelPage/Level.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,6 +78,9 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
throw new Error('No Stage steps found')
}

// @ts-ignore
const currentStep = level.steps.indexOf(s => s.status === 'ACTIVE') + 1

return (
<div css={styles.page}>
<div css={styles.header}>
Expand DownExpand Up@@ -120,10 +123,14 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
{level.title}
</span>
<span>
{level.status === 'COMPLETE'&& (
{level.status === 'COMPLETE'? (
<Button type="primary" onClick={onContinue}>
Continue
</Button>
) : (
<span>
{currentStep} of {level.steps.length} tasks
</span>
)}
</span>
</div>
Expand Down
25 changes: 22 additions & 3 deletionsweb-app/stories/Level.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,13 @@ storiesOf('Level', module)
],
}
return (
<Level level={level} onContinue={action('onContinue')} onLoadSolution={action('onLoadSolution')} processes={[]} />
<Level
level={level}
onContinue={action('onContinue')}
onLoadSolution={action('onLoadSolution')}
processes={[]}
testStatus={null}
/>
)
})
.add('Level 2', () => {
Expand DownExpand Up@@ -129,6 +135,7 @@ storiesOf('Level', module)
description: 'Installing dependencies',
},
]}
testStatus={null}
/>
)
})
Expand DownExpand Up@@ -201,7 +208,13 @@ storiesOf('Level', module)
],
}
return (
<Level level={level} onContinue={action('onContinue')} onLoadSolution={action('onLoadSolution')} processes={[]} />
<Level
level={level}
onContinue={action('onContinue')}
onLoadSolution={action('onLoadSolution')}
processes={[]}
testStatus={null}
/>
)
})
.add('FakeBook API L2', () => {
Expand DownExpand Up@@ -267,6 +280,12 @@ storiesOf('Level', module)
],
}
return (
<Level level={level} onContinue={action('onContinue')} onLoadSolution={action('onLoadSolution')} processes={[]} />
<Level
level={level}
onContinue={action('onContinue')}
onLoadSolution={action('onLoadSolution')}
processes={[]}
testStatus={null}
/>
)
})

[8]ページ先頭

©2009-2025 Movatter.jp