|
|
|
@ -140,17 +140,17 @@ function ChatPanel({lastLevel}) {
|
|
|
|
// TODO: Should not use index as key.
|
|
|
|
// TODO: Should not use index as key.
|
|
|
|
return <Hints key={`hints-${i}`}
|
|
|
|
return <Hints key={`hints-${i}`}
|
|
|
|
hints={step.hints} showHidden={showHelp.has(i)} step={i}
|
|
|
|
hints={step.hints} showHidden={showHelp.has(i)} step={i}
|
|
|
|
selected={selectedStep} toggleSelection={toggleSelection(i)}/>
|
|
|
|
selected={selectedStep} toggleSelection={toggleSelection(i)} lastLevel={i == proof.length - 1}/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
<DeletedHints hints={deletedChat}/>
|
|
|
|
<DeletedHints hints={deletedChat}/>
|
|
|
|
{completed &&
|
|
|
|
{completed &&
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className={`message information step-${k}${selectedStep == k ? ' selected' : ''}`} onClick={toggleSelection(k)}>
|
|
|
|
<div className={`message information recent step-${k}${selectedStep == k ? ' selected' : ''}`} onClick={toggleSelection(k)}>
|
|
|
|
Level completed! 🎉
|
|
|
|
Level completed! 🎉
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{level?.data?.conclusion?.trim() &&
|
|
|
|
{level?.data?.conclusion?.trim() &&
|
|
|
|
<div className={`message information step-${k}${selectedStep == k ? ' selected' : ''}`} onClick={toggleSelection(k)}>
|
|
|
|
<div className={`message information recent step-${k}${selectedStep == k ? ' selected' : ''}`} onClick={toggleSelection(k)}>
|
|
|
|
<Markdown>{level?.data?.conclusion}</Markdown>
|
|
|
|
<Markdown>{level?.data?.conclusion}</Markdown>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -439,6 +439,7 @@ function LevelAppBar({isLoading, levelTitle, toggleImpressum, pageNumber = undef
|
|
|
|
return <div className="app-bar" style={isLoading ? {display: "none"} : null} >
|
|
|
|
return <div className="app-bar" style={isLoading ? {display: "none"} : null} >
|
|
|
|
{mobile ?
|
|
|
|
{mobile ?
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
|
|
|
|
{/* MOBILE VERSION */}
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<span className="app-bar-title">
|
|
|
|
<span className="app-bar-title">
|
|
|
|
{levelTitle}
|
|
|
|
{levelTitle}
|
|
|
|
@ -492,6 +493,7 @@ function LevelAppBar({isLoading, levelTitle, toggleImpressum, pageNumber = undef
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
:
|
|
|
|
:
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
|
|
|
|
{/* DESKTOP VERSION */}
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Button to={`/${gameId}`} inverted="true" title="back to world selection" id="home-btn">
|
|
|
|
<Button to={`/${gameId}`} inverted="true" title="back to world selection" id="home-btn">
|
|
|
|
<FontAwesomeIcon icon={faHome} />
|
|
|
|
<FontAwesomeIcon icon={faHome} />
|
|
|
|
@ -514,13 +516,17 @@ function LevelAppBar({isLoading, levelTitle, toggleImpressum, pageNumber = undef
|
|
|
|
<FontAwesomeIcon icon={faArrowLeft} /> Previous
|
|
|
|
<FontAwesomeIcon icon={faArrowLeft} /> Previous
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</>}
|
|
|
|
</>}
|
|
|
|
{levelId < gameInfo.data?.worldSize[worldId] &&
|
|
|
|
{levelId < gameInfo.data?.worldSize[worldId] ?
|
|
|
|
<Button inverted="true"
|
|
|
|
<Button inverted="true"
|
|
|
|
to={`/${gameId}/world/${worldId}/level/${levelId + 1}`} title="next level"
|
|
|
|
to={`/${gameId}/world/${worldId}/level/${levelId + 1}`} title="next level"
|
|
|
|
disabled={difficulty >= 2 && !(completed || levelId == 0)}
|
|
|
|
disabled={difficulty >= 2 && !(completed || levelId == 0)}
|
|
|
|
onClick={() => setNavOpen(false)}>
|
|
|
|
onClick={() => setNavOpen(false)}>
|
|
|
|
<FontAwesomeIcon icon={faArrowRight} /> {levelId ? "Next" : "Start"}
|
|
|
|
<FontAwesomeIcon icon={faArrowRight} /> {levelId ? "Next" : "Start"}
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
<Button to={`/${gameId}`} inverted="true" title="back to world selection" id="home-btn">
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faHome} /> Leave World
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<Button disabled={levelId <= 0} inverted="true" to=""
|
|
|
|
<Button disabled={levelId <= 0} inverted="true" to=""
|
|
|
|
onClick={(ev) => { setCommandLineMode(!commandLineMode); setNavOpen(false) }}
|
|
|
|
onClick={(ev) => { setCommandLineMode(!commandLineMode); setNavOpen(false) }}
|
|
|
|
|