diff --git a/client/src/components/LeftPanel.tsx b/client/src/components/LeftPanel.tsx
index 85662f5..b43b011 100644
--- a/client/src/components/LeftPanel.tsx
+++ b/client/src/components/LeftPanel.tsx
@@ -77,7 +77,7 @@ function LeftPanel({ spells, inventory, showSidePanel, setShowSidePanel }) {
-
+
{spells && spells.length > 0 &&
@@ -89,7 +89,7 @@ function LeftPanel({ spells, inventory, showSidePanel, setShowSidePanel }) {
-
+
{inventory && inventory.length > 0 &&
diff --git a/client/src/components/TacticState.tsx b/client/src/components/TacticState.tsx
index 3807fd3..086e530 100644
--- a/client/src/components/TacticState.tsx
+++ b/client/src/components/TacticState.tsx
@@ -9,6 +9,11 @@ import { MathJax } from "better-react-mathjax";
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import { Paper, Box, Typography, Alert, FormControlLabel, FormGroup, Switch, Collapse } from '@mui/material';
+import { Accordion, AccordionSummary, AccordionDetails, Divider } from '@mui/material';
+import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faArrowPointer } from '@fortawesome/free-solid-svg-icons'
// TODO: Dead variables (x✝) are not displayed correctly.
@@ -46,27 +51,82 @@ function Goal({ goal }) {
{hasHints &&
}
- label="Help"
+ label="More Help?"
/>}
- {hints.map((hint) => {hint.message})}
+ {hints.map((hint) => {hint.message})}
)
}
+/* Function to display a goal that is not the main goal. */
+function OtherGoal({ goal }) {
+
+ const hasObject = typeof goal.objects === "object" && goal.objects.length > 0
+ const hasAssumption = typeof goal.assumptions === "object" && goal.assumptions.length > 0
+
+ return (
+
+ }>
+ ⊢ {goal.goal}
+
+
+ {hasObject &&
+
+ Objects
+
+ {goal.objects.map((item) =>
+
+ {item.userName} :
+ {item.type}
+ )}
+
+ }
+ {hasAssumption &&
+
+ Assumptions
+
+ {goal.assumptions.map((item) =>
+
+ {item.userName} :
+ {item.type}
+ )}
+
+ }
+ Prove:
+ {goal.goal}
+
+ )
+}
+
function TacticState({ goals, diagnostics, completed }) {
const hasError = typeof diagnostics === "object" && diagnostics.length > 0
const hasGoal = goals !== null && goals.length > 0
const hasManyGoal = hasGoal && goals.length > 1
return (
- {goals === null && No goals at cursor position}
- {hasGoal && Main goal at cursor }
+ {hasGoal &&
+
+ Main Goal
+ (at )
+
+
+ }
+ {!(hasGoal || completed) &&
+
+ No goals
+ (at )
+ }
{completed && Level completed ! 🎉}
- {hasError &&
- {diagnostics.map(({severity, message}) => {message})}
+ {hasError &&
+
+ Lean says
+ {diagnostics.map(({severity, message}) =>
+ {message}
+ // TODO: When does Lean give severity=4? Had colour `gray` before. Make custom theme for that
+ )}
}
{hasManyGoal &&
- Other goals
- {goals.slice(1).map((goal, index) => )}
+ Further Goals
+ {goals.slice(1).map((goal, index) => )}
}
)