Jon Eugster 2 years ago
parent 64ad36dd4f
commit 92acdb7f85

@ -11,7 +11,7 @@ import { LeanMonaco, LeanMonacoEditor, LeanMonacoOptions } from 'lean4monaco'
import '../../css/editor.css' import '../../css/editor.css'
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { selectTypewriterMode } from '../../state/progress'; import { selectTypewriterMode } from '../../state/progress';
import { Typewriter } from './Typewriter'; import { TypewriterInterFace } from './Typewriter';
export function Editor() { export function Editor() {
let { t } = useTranslation() let { t } = useTranslation()
@ -98,7 +98,7 @@ export function Editor() {
<div ref={editorRef} id="editor" /> <div ref={editorRef} id="editor" />
<div ref={infoviewRef} id="infoview" /> <div ref={infoviewRef} id="infoview" />
</Split> </Split>
{typewriterMode && <Typewriter />} {typewriterMode && <TypewriterInterFace />}
</div> </div>
</MonacoEditorContext.Provider> </MonacoEditorContext.Provider>
} }

@ -378,7 +378,7 @@ export function TypewriterInterFace() {
<Command proof={proof} i={i} deleteProof={deleteProof(i)} /> <Command proof={proof} i={i} deleteProof={deleteProof(i)} />
<Errors errors={step.diags} typewriterMode={true} /> <Errors errors={step.diags} typewriterMode={true} />
</>} </>}
{mobile && i == 0 && props.data?.introduction && {/* {mobile && i == 0 && props.data?.introduction &&
<div className={`message information step-0${selectedStep === 0 ? ' selected' : ''}`} onClick={toggleSelectStep(0)}> <div className={`message information step-0${selectedStep === 0 ? ' selected' : ''}`} onClick={toggleSelectStep(0)}>
<Markdown>{props.data?.introduction}</Markdown> <Markdown>{props.data?.introduction}</Markdown>
</div> </div>
@ -386,7 +386,7 @@ export function TypewriterInterFace() {
{mobile && {mobile &&
<Hints key={`hints-${i}`} <Hints key={`hints-${i}`}
hints={filteredHints.map(hint => ({hint: hint, step: i}))} /> hints={filteredHints.map(hint => ({hint: hint, step: i}))} />
} } */}
{/* <GoalsTabs proofStep={step} last={i == proof?.steps.length - (lastStepErrors ? 2 : 1)} onClick={toggleSelectStep(i)} onGoalChange={i == proof?.steps.length - 1 - withErr ? (n) => setDisableInput(n > 0) : (n) => {}}/> */} {/* <GoalsTabs proofStep={step} last={i == proof?.steps.length - (lastStepErrors ? 2 : 1)} onClick={toggleSelectStep(i)} onGoalChange={i == proof?.steps.length - 1 - withErr ? (n) => setDisableInput(n > 0) : (n) => {}}/> */}
{!(isLastStepWithErrors(proof, i)) && {!(isLastStepWithErrors(proof, i)) &&
<GoalsTabs goals={step.goals} last={i == proof?.steps.length - (lastStepHasErrors(proof) ? 2 : 1)} onClick={toggleSelectStep(i)} onGoalChange={i == proof?.steps.length - (lastStepHasErrors(proof) ? 2 : 1) ? (n) => setDisableInput(n > 0) : (n) => {}}/> <GoalsTabs goals={step.goals} last={i == proof?.steps.length - (lastStepHasErrors(proof) ? 2 : 1)} onClick={toggleSelectStep(i)} onGoalChange={i == proof?.steps.length - (lastStepHasErrors(proof) ? 2 : 1) ? (n) => setDisableInput(n > 0) : (n) => {}}/>
@ -418,7 +418,7 @@ export function TypewriterInterFace() {
} }
{mobile && proof?.completed && {mobile && proof?.completed &&
<div className="button-row mobile"> <div className="button-row mobile">
{props.level >= props.worldSize ? {/* {props.level >= props.worldSize ?
<Button to={`/${gameId}`}> <Button to={`/${gameId}`}>
<FontAwesomeIcon icon={faHome} />&nbsp;{t("Home")} <FontAwesomeIcon icon={faHome} />&nbsp;{t("Home")}
</Button> </Button>
@ -426,7 +426,7 @@ export function TypewriterInterFace() {
<Button to={`/${gameId}/world/${props.world}/level/${props.level + 1}`}> <Button to={`/${gameId}/world/${props.world}/level/${props.level + 1}`}>
Next&nbsp;<FontAwesomeIcon icon={faArrowRight} /> Next&nbsp;<FontAwesomeIcon icon={faArrowRight} />
</Button> </Button>
} } */}
</div> </div>
} }
</> : <CircularProgress variant="determinate" value={100*(1 - 1.024 ** (- loadingProgress))} /> </> : <CircularProgress variant="determinate" value={100*(1 - 1.024 ** (- loadingProgress))} />

@ -12,7 +12,7 @@ import { WorldTreePanel } from './world_tree'
import i18next from 'i18next' import i18next from 'i18next'
import { ChatPanel } from './chat' import { ChatPanel } from './chat'
import { NewLevel } from './level' import { NewLevel } from './level'
import { GameHint, ProofState } from './infoview/rpc_api' import { GameHint, ProofState } from './editor/Defs'
import { useSelector } from 'react-redux' import { useSelector } from 'react-redux'
import { Diagnostic } from 'vscode-languageserver-types' import { Diagnostic } from 'vscode-languageserver-types'

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save