diff --git a/client/src/components/level.css b/client/src/components/level.css index 5fd0b15..bd1d8ce 100644 --- a/client/src/components/level.css +++ b/client/src/components/level.css @@ -301,3 +301,7 @@ td code { .menu.dropdown .svg-inline--fa { width: 1.8rem; } + +.nav-btns .btn { + margin-left: .5em; +} diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index 4ff357a..82b72e1 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -26,7 +26,7 @@ import { EditorConnection, EditorEvents } from '../../../node_modules/lean4-info import { EventEmitter } from '../../../node_modules/lean4-infoview/src/infoview/event'; import type { Location } from 'vscode-languageserver-protocol'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faBars, faCode, faPencilSquare, faXmark, faHome, faCircleInfo, faArrowRight, faArrowLeft, faShield, faRotateLeft } from '@fortawesome/free-solid-svg-icons' +import { faBars, faBook, faCode, faPencilSquare, faXmark, faHome, faCircleInfo, faArrowRight, faArrowLeft, faShield, faRotateLeft } from '@fortawesome/free-solid-svg-icons' import { styled, useTheme, Theme, CSSObject } from '@mui/material/styles'; import { GameIdContext } from '../app'; @@ -45,6 +45,7 @@ import { GameHint } from './infoview/rpc_api'; import { Impressum } from './privacy_policy'; import { store } from '../state/store'; import { useWindowDimensions } from '../window_width'; +import { ArrowLeft } from '@mui/icons-material'; function Level() { @@ -307,20 +308,33 @@ function PlayableLevel({worldId, levelId}) { + worldId={worldId} levelId={levelId} toggleImpressum={toggleImpressum} + pageNumber={pageNumber} setPageNumber={setPageNumber}/> {mobile? -
-
- - -
- -
-
-
- {impressum ? : null} + // TODO: This is copied from the `Split` component below... + <> +
+
+ + +
+ +
+
+
+ {impressum ? : null} +
+
+
+ {!level.isLoading && + <>{inventoryDoc ? + + : + + } + }
-
+ :
@@ -436,7 +450,7 @@ function Introduction({worldId}) { } /** The top-navigation bar */ -function LevelAppBar({isLoading, levelId, worldId, levelTitle, toggleImpressum}) { +function LevelAppBar({isLoading, levelId, worldId, levelTitle, toggleImpressum, pageNumber = undefined, setPageNumber = undefined}) { const gameId = React.useContext(GameIdContext) const gameInfo = useGetGameInfoQuery({game: gameId}) @@ -462,9 +476,22 @@ function LevelAppBar({isLoading, levelId, worldId, levelTitle, toggleImpressum}) {levelTitle}
- +
+ {pageNumber == 0 ? + + : pageNumber == 1 && + + } + +
{levelId < gameInfo.data?.worldSize[worldId] &&
@@ -237,7 +237,7 @@ function Welcome() {