Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Oct 10, 2024
1 parent 64ad36d commit 92acdb7
Show file tree
Hide file tree
Showing 4 changed files with 480 additions and 594 deletions.
4 changes: 2 additions & 2 deletions client/src/components/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LeanMonaco, LeanMonacoEditor, LeanMonacoOptions } from 'lean4monaco'
import '../../css/editor.css'
import { useSelector } from 'react-redux';
import { selectTypewriterMode } from '../../state/progress';
import { Typewriter } from './Typewriter';
import { TypewriterInterFace } from './Typewriter';

export function Editor() {
let { t } = useTranslation()
Expand Down Expand Up @@ -98,7 +98,7 @@ export function Editor() {
<div ref={editorRef} id="editor" />
<div ref={infoviewRef} id="infoview" />
</Split>
{typewriterMode && <Typewriter />}
{typewriterMode && <TypewriterInterFace />}
</div>
</MonacoEditorContext.Provider>
}
8 changes: 4 additions & 4 deletions client/src/components/editor/Typewriter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ export function TypewriterInterFace() {
<Command proof={proof} i={i} deleteProof={deleteProof(i)} />
<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)}>
<Markdown>{props.data?.introduction}</Markdown>
</div>
}
{mobile &&
<Hints key={`hints-${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) => {}}/> */}
{!(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) => {}}/>
Expand Down Expand Up @@ -418,15 +418,15 @@ export function TypewriterInterFace() {
}
{mobile && proof?.completed &&
<div className="button-row mobile">
{props.level >= props.worldSize ?
{/* {props.level >= props.worldSize ?
<Button to={`/${gameId}`}>
<FontAwesomeIcon icon={faHome} />&nbsp;{t("Home")}
</Button>
:
<Button to={`/${gameId}/world/${props.world}/level/${props.level + 1}`}>
Next&nbsp;<FontAwesomeIcon icon={faArrowRight} />
</Button>
}
} */}
</div>
}
</> : <CircularProgress variant="determinate" value={100*(1 - 1.024 ** (- loadingProgress))} />
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { WorldTreePanel } from './world_tree'
import i18next from 'i18next'
import { ChatPanel } from './chat'
import { NewLevel } from './level'
import { GameHint, ProofState } from './infoview/rpc_api'
import { GameHint, ProofState } from './editor/Defs'
import { useSelector } from 'react-redux'
import { Diagnostic } from 'vscode-languageserver-types'

Expand Down
Loading

0 comments on commit 92acdb7

Please sign in to comment.