Weitere Goals
diff --git a/client/src/components/infoview/main.tsx b/client/src/components/infoview/main.tsx
index c8a9363..9a21fab 100644
--- a/client/src/components/infoview/main.tsx
+++ b/client/src/components/infoview/main.tsx
@@ -29,7 +29,7 @@ import { ChatContext, PageContext, PreferencesContext, MonacoEditorContext, Proo
import { Typewriter, getInteractiveDiagsAt, hasErrors, hasInteractiveErrors } from './typewriter';
import { InteractiveDiagnostic } from '@leanprover/infoview/*';
import { CircularProgress } from '@mui/material';
-import { GameHint, InteractiveGoalsWithHints, ProofState } from './rpc_api';
+import { GameHint, InteractiveGoalWithHints, InteractiveGoalsWithHints, ProofState } from './rpc_api';
import { store } from '../../state/store';
import { DocumentPosition } from '../../../../node_modules/lean4-infoview/src/infoview/util';
import { DiagnosticSeverity } from 'vscode-languageclient';
@@ -340,17 +340,17 @@ function Command({ proof, i, deleteProof }: { proof: ProofState, i: number, dele
// }, fastIsEqual)
/** The tabs of goals that lean has after the command of this step has been processed */
-function GoalsTabs({ proofStep, last, onClick, onGoalChange=(n)=>{}}: { proofStep: InteractiveGoalsWithHints, last : boolean, onClick? : any, onGoalChange?: (n?: number) => void }) {
+export function GoalsTabs({ goals, last, onClick, onGoalChange=(n)=>{}}: { goals: InteractiveGoalWithHints[], last : boolean, onClick? : any, onGoalChange?: (n?: number) => void }) {
let { t } = useTranslation()
const [selectedGoal, setSelectedGoal] = React.useState
(0)
- if (proofStep.goals.length == 0) {
+ if (goals.length == 0) {
return <>>
}
return
- {proofStep.goals.map((goal, i) => (
+ {goals.map((goal, i) => (
// TODO: Should not use index as key.
{ onGoalChange(i); setSelectedGoal(i); ev.stopPropagation() }}>
{i ? t("Goal") + ` ${i + 1}` : t("Active Goal")}
@@ -358,7 +358,7 @@ function GoalsTabs({ proofStep, last, onClick, onGoalChange=(n)=>{}}: { proofSte
))}
-
+
}
@@ -570,7 +570,7 @@ export function TypewriterInterface({props}) {
}
{/*
setDisableInput(n > 0) : (n) => {}}/> */}
{!(isLastStepWithErrors(proof, i)) &&
- setDisableInput(n > 0) : (n) => {}}/>
+ setDisableInput(n > 0) : (n) => {}}/>
}
{mobile && i == proof?.steps.length - 1 &&
diff --git a/client/src/css/infoview.css b/client/src/css/infoview.css
index 62811c0..dc1a5ec 100644
--- a/client/src/css/infoview.css
+++ b/client/src/css/infoview.css
@@ -91,8 +91,8 @@
flex-direction: row;
}
-.goals-section div {
- flex-grow: 1;
+.goal-tabs {
+ width: 100%;
}
#current-proof, #main-assumptions {