merge addition of Lemma statements

This commit is contained in:
Jon Eugster
2022-12-12 20:54:31 +01:00
parent b2727eef89
commit 46848d8a93
43 changed files with 113 additions and 64 deletions
+5 -2
View File
@@ -58,8 +58,11 @@ function Level() {
<div ref={messagePanelRef} className="message-panel">
<MathJax><ReactMarkdown>{level?.data?.introduction}</ReactMarkdown></MathJax>
</div>
<div ref={codeviewRef} className="codeview">
</div>
<p><b>Aufgabe:</b></p>
<div><MathJax><ReactMarkdown>{level?.data?.descrText}</ReactMarkdown></MathJax></div>
<div className="statement"><code>{level?.data?.descrFormat}</code></div>
{/*NOTE(TODO): currently this looks bad, so I disabled it. Maybe have a drop-down for it of Syntax highlighting... */}
<div ref={codeviewRef} className="codeview"></div>
</Grid>
<Grid xs={4} className="info-panel">
+6 -5
View File
@@ -42,11 +42,12 @@ function Goal({ goal }) {
<Typography>Prove:</Typography>
<Typography color="primary" sx={{ ml: 2 }}>{goal.goal}</Typography>
{goal.messages.map((message) => <Alert severity="info" sx={{ mt: 1 }}><MathJax><ReactMarkdown>{message}</ReactMarkdown></MathJax></Alert>)}
<FormControlLabel
control={<Switch checked={showHints} onChange={handleHintsChange} />}
label="Help"
/>
{goal.hints.map((message) => <Collapse in={showHints}><Alert severity="warning" sx={{ mt: 1 }}><MathJax><ReactMarkdown>{message}</ReactMarkdown></MathJax></Alert></Collapse>)}
{hasHints &&
<FormControlLabel
control={<Switch checked={showHints} onChange={handleHintsChange} />}
label="Help"
/>}
{goal.hints.map((hint) => <Collapse in={showHints}><Alert severity="warning" sx={{ mt: 1 }}><MathJax><ReactMarkdown>{hint}</ReactMarkdown></MathJax></Alert></Collapse>)}
</Box>)
}
+1 -1
View File
@@ -92,7 +92,7 @@ function Welcome() {
</Typography>
</Box>
<Box textAlign='center' sx={{ m: 5 }}>
<Button component={RouterLink} to="/world/TestWorld/level/1" variant="contained">Start rescue mission</Button>
<Button component={RouterLink} to="/world/Logic/level/1" variant="contained">Start rescue mission</Button>
</Box>
<div ref={worldsRef} style={{"width": "100%","height": "50em"}} />
</div>
+3 -1
View File
@@ -14,7 +14,9 @@ interface LevelInfo {
introduction: null|string,
index: number,
tactics: any[],
lemmas: any[]
lemmas: any[],
descrText: null|string,
descrFormat: null|string,
}
const customBaseQuery = async (