diff --git a/client/src/components/Level.tsx b/client/src/components/Level.tsx index 29f3e65..254f4ef 100644 --- a/client/src/components/Level.tsx +++ b/client/src/components/Level.tsx @@ -138,32 +138,15 @@ function Level() { // for each world. if (levelId == 0) { return <> -
-
- - - {gameInfo.data?.worlds.nodes[worldId].title && `World: ${gameInfo.data?.worlds.nodes[worldId].title}`} - -
-
- - {`Einführung`} - - - -
-
-
-
- - - {gameInfo.data?.worlds.nodes[worldId].introduction} - - +
+ +
+
+ + + {gameInfo.data?.worlds.nodes[worldId].introduction} + +
@@ -177,36 +160,11 @@ function Level() { } + const levelTitle = <>{levelId && `Level ${levelId}`}{level?.data?.title && `: ${level?.data?.title}`} return <>
-
-
- - - {gameInfo.data?.worlds.nodes[worldId].title && `World: ${gameInfo.data?.worlds.nodes[worldId].title}`} - -
-
- - {levelId && `Level ${levelId}`}{level?.data?.title && `: ${level?.data?.title}`} - - - -
- -
- -
- {/* -
- {level?.data?.introduction} -
- */} -
+ +
@@ -258,6 +216,31 @@ function Level() { export default Level +function LevelAppBar ({isLoading, levelId, worldId, levelTitle}) { + const gameInfo = useGetGameInfoQuery() + + return
+
+ + + {gameInfo.data?.worlds.nodes[worldId].title && `World: ${gameInfo.data?.worlds.nodes[worldId].title}`} + +
+
+ + {levelTitle} + + + +
+ +
+} + function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCode, onDidChangeContent) { const connection = React.useContext(ConnectionContext) diff --git a/client/src/components/level.css b/client/src/components/level.css index b95cf9c..94fce56 100644 --- a/client/src/components/level.css +++ b/client/src/components/level.css @@ -24,17 +24,11 @@ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); } -.side-panel, .exercise-panel, .doc-panel { +.inventory-panel, .exercise-panel, .doc-panel { height: 100%; overflow: auto; } -.side-panel { - display: flex; - flex-flow: column; - background-color: #e9f2fb; -} - .introduction-panel, .infoview, .exercise, .conclusion { padding-top: 1em; padding-left: 1em;