small improvements to the client

This commit is contained in:
Jon Eugster
2023-08-11 18:25:52 +02:00
parent d00a2337d4
commit 735f58be95
5 changed files with 24 additions and 14 deletions
@@ -64,7 +64,7 @@ config.autoClosingPairs = config.autoClosingPairs.map(
monaco.languages.setLanguageConfiguration('lean4cmd', config);
/** The input field */
export function CommandLine({proofPanelRef}: {proofPanelRef: React.MutableRefObject<HTMLDivElement>}) {
export function CommandLine({proofPanelRef, hidden}: {proofPanelRef: React.MutableRefObject<HTMLDivElement>, hidden?: boolean}) {
/** Reference to the hidden multi-line editor */
const editor = React.useContext(MonacoEditorContext)
@@ -311,7 +311,7 @@ export function CommandLine({proofPanelRef}: {proofPanelRef: React.MutableRefObj
runCommand()
}
return <div className="command-line">
return <div className={`command-line${hidden ? ' hidden' : ''}`}>
<form onSubmit={handleSubmit}>
<div className="command-line-input-wrapper">
<div ref={inputRef} className="command-line-input" />
+1 -1
View File
@@ -475,6 +475,6 @@ export function CommandLineInterface(props: { world: string, level: number, data
</>
: <CircularProgress />}
</div>
<CommandLine proofPanelRef={proofPanelRef} />
<CommandLine proofPanelRef={proofPanelRef} hidden={proof[proof.length - 1]?.goals.length == 0}/>
</div>
}