|
|
|
@ -336,28 +336,24 @@ function PlayableLevel({worldId, levelId}) {
|
|
|
|
|
|
|
|
|
|
|
|
export default Level
|
|
|
|
export default Level
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** The site with the introduction text of a world */
|
|
|
|
function Introduction({worldId}) {
|
|
|
|
function Introduction({worldId}) {
|
|
|
|
const gameId = React.useContext(GameIdContext)
|
|
|
|
const gameId = React.useContext(GameIdContext)
|
|
|
|
const gameInfo = useGetGameInfoQuery({game: gameId})
|
|
|
|
const gameInfo = useGetGameInfoQuery({game: gameId})
|
|
|
|
|
|
|
|
|
|
|
|
return <>
|
|
|
|
return <>
|
|
|
|
<div style={gameInfo.isLoading ? null : {display: "none"}} className="app-content loading"><CircularProgress /></div>
|
|
|
|
<div style={gameInfo.isLoading ? null : {display: "none"}} className="app-content loading"><CircularProgress /></div>
|
|
|
|
<LevelAppBar isLoading={gameInfo.isLoading} levelTitle="Einführung" worldId={worldId} levelId={0} />
|
|
|
|
<LevelAppBar isLoading={gameInfo.isLoading} levelTitle="Introduction" worldId={worldId} levelId={0} />
|
|
|
|
<div style={gameInfo.isLoading ? {display: "none"} : null} className="exercise-panel">
|
|
|
|
<div style={gameInfo.isLoading ? {display: "none"} : null} className="introduction-panel">
|
|
|
|
<div className="introduction-panel">
|
|
|
|
<Markdown>
|
|
|
|
<div className="message information">
|
|
|
|
{gameInfo.data?.worlds.nodes[worldId].introduction}
|
|
|
|
<Markdown>
|
|
|
|
</Markdown>
|
|
|
|
{gameInfo.data?.worlds.nodes[worldId].introduction}
|
|
|
|
{gameInfo.data?.worldSize[worldId] == 0 ?
|
|
|
|
</Markdown>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="conclusion">
|
|
|
|
|
|
|
|
{0 == gameInfo.data?.worldSize[worldId] ?
|
|
|
|
|
|
|
|
<Button to={`/${gameId}`}><FontAwesomeIcon icon={faHome} /></Button> :
|
|
|
|
<Button to={`/${gameId}`}><FontAwesomeIcon icon={faHome} /></Button> :
|
|
|
|
<Button to={`/${gameId}/world/${worldId}/level/1`}>
|
|
|
|
<Button to={`/${gameId}/world/${worldId}/level/1`}>
|
|
|
|
Start <FontAwesomeIcon icon={faArrowRight} />
|
|
|
|
Start <FontAwesomeIcon icon={faArrowRight} />
|
|
|
|
</Button>}
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|