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

Fixes#405

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 3 commits intomasterfromfixes
Jul 25, 2020
Merged

Fixes#405

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: 9 additions & 0 deletionssrc/services/context/state/Position.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,6 +42,15 @@ class Position {

// get step
const currentLevel: TT.Level = levels[lastLevelIndex]
if (!currentLevel) {
// tutorial complete but not reached completed view
const finalLevel = levels[levels.length - 1]
return {
levelId: finalLevel.id,
stepId: finalLevel.steps.length ? finalLevel.steps[finalLevel.steps.length - 1].id : null,
complete: true,
}
}
let currentStepId: string | null
if (!currentLevel.steps.length) {
// no steps available for level
Expand Down
4 changes: 2 additions & 2 deletionsweb-app/src/components/Error/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,9 +14,9 @@ const styles = {
alignItems: 'center' as 'center',
border: `0.5rem solid ${theme['$color-error-2']}`,
padding: '1rem',
width: '100%',
width: '100vw',
maxWidth: '100%',
height: '100%',
height: '100vh',
}),
content: (theme: Theme) => ({
textAlign: 'center' as 'center',
Expand Down
4 changes: 2 additions & 2 deletionsweb-app/src/containers/Loading/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,8 +16,8 @@ const styles = {
flexDirection: 'column' as 'column',
alignItems: 'center' as 'center',
justifyContent: 'center' as 'center',
height: '100%',
width: '100%',
height: '100vh',
width: '100vw',
},
processes: {
padding: '0 1rem',
Expand Down
4 changes: 2 additions & 2 deletionsweb-app/src/services/state/actions/context.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {

constnextPosition:T.Position={
levelId:level.id,
stepId:level.steps[0].id,
stepId:level.steps.length ?level.steps[0].id :null,
}

returnnextPosition
Expand DownExpand Up@@ -163,7 +163,7 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {
constnextLevel=levels[levelIndex+1]
constnextPosition={
levelId:nextLevel.id,
stepId:nextLevel.steps[0].id,
stepId:nextLevel.steps.length ?nextLevel.steps[0].id :null,
}
return{type:'NEXT_LEVEL',payload:nextPosition}
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp