pull/118/head
Jon Eugster 3 years ago
parent e67db092d5
commit 2fed94a2bb

@ -29,7 +29,7 @@ import { useStore } from 'react-redux';
import { EditorContext, ConfigContext, ProgressContext, VersionContext } from '../../../node_modules/lean4-infoview/src/infoview/contexts';
import { EditorConnection, EditorEvents } from '../../../node_modules/lean4-infoview/src/infoview/editorConnection';
import { EventEmitter } from '../../../node_modules/lean4-infoview/src/infoview/event';
import { EditorInterface, ReducedInterface } from './infoview/main'
import { EditorInterface, CommandLineInterface } from './infoview/main'
import type { Location } from 'vscode-languageserver-protocol';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
@ -280,7 +280,7 @@ function PlayableLevel({worldId, levelId}) {
{ // TODO: Is there any possibility that the editor connection takes a while
// and we should show a circular progress here?
commandLineMode && editorConnection &&
<ReducedInterface world={worldId} level={levelId}/>
<CommandLineInterface world={worldId} level={levelId}/>
}
</div>
</MonacoEditorContext.Provider>

@ -22,7 +22,8 @@ import { levelCompleted, selectCompleted } from '../../state/progress';
import { GameIdContext } from '../../App';
import { InputModeContext } from '../Level';
// TODO: This is only used in `EditorInterface`
// while `CommandLineInterface` has this copy-pasted in.
export function Main(props: {world: string, level: number}) {
const ec = React.useContext(EditorContext);
const gameId = React.useContext(GameIdContext)
@ -116,7 +117,7 @@ export function EditorInterface({data, codeviewRef, hidden, worldId, levelId, ed
</div>
}
export function ReducedInterface(props: {world: string, level: number}) {
export function CommandLineInterface(props: {world: string, level: number}) {
const ec = React.useContext(EditorContext);
const gameId = React.useContext(GameIdContext)

Loading…
Cancel
Save