bump dependencies + proper toolbar line breaks
This commit is contained in:
parent
4a89ccd5d1
commit
9bab65167b
6 changed files with 349 additions and 308 deletions
|
|
@ -54,6 +54,7 @@ footer a {
|
|||
border-radius: 5px;
|
||||
padding: 0 6px 0 6px;
|
||||
margin: 0 4px 0 4px;
|
||||
/* display: inline-block; */
|
||||
}
|
||||
|
||||
.command.highlighted {
|
||||
|
|
|
|||
|
|
@ -169,35 +169,45 @@ export function App() {
|
|||
return (
|
||||
<>
|
||||
<header>
|
||||
<button disabled={appState.history.length===1} onClick={onUndo}>Undo ({appState.history.length-1}) <kbd>Ctrl</kbd>+<kbd>Z</kbd></button>
|
||||
<button disabled={appState.future.length===0} onClick={onRedo}>Redo ({appState.future.length}) <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd></button>
|
||||
<button onClick={onCopy}>Copy <kbd>Ctrl</kbd>+<kbd>C</kbd></button>
|
||||
<button onClick={onPaste}>Paste <kbd>Ctrl</kbd>+<kbd>V</kbd></button>
|
||||
{
|
||||
actionShortcuts.map(([_, keys, descr], i) =>
|
||||
<span key={i} className={'command' + (highlighted[i] ? (' highlighted') : '')}>
|
||||
{keys.map((key, j) => <kbd key={j}>{key}</kbd>)}
|
||||
|
||||
{descr}
|
||||
</span>)
|
||||
}
|
||||
<select onChange={onSelectExample} value={-1}>
|
||||
<option value={-1}>load example...</option>
|
||||
{
|
||||
examples.map(([name], i) => {
|
||||
return <option key={i} value={i}>{name}</option>;
|
||||
})
|
||||
}
|
||||
</select>
|
||||
<button className="factoryReset" onClick={factoryReset}>
|
||||
FACTORY RESET
|
||||
</button>
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
checked={syntacticSugar}
|
||||
onChange={e => setSyntacticSugar(e.target.checked)}/>
|
||||
syntactic sugar
|
||||
</label>
|
||||
<span className="line">
|
||||
<button disabled={appState.history.length===1} onClick={onUndo}>Undo ({appState.history.length-1}) <kbd>Ctrl</kbd>+<kbd>Z</kbd></button>
|
||||
<button disabled={appState.future.length===0} onClick={onRedo}>Redo ({appState.future.length}) <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd></button>
|
||||
<button onClick={onCopy}>Copy <kbd>Ctrl</kbd>+<kbd>C</kbd></button>
|
||||
<button onClick={onPaste}>Paste <kbd>Ctrl</kbd>+<kbd>V</kbd></button>
|
||||
</span>
|
||||
<span className="line">
|
||||
<span className="line">
|
||||
{
|
||||
actionShortcuts.map(([_, keys, descr], i) =>
|
||||
<span key={i} className={'command' + (highlighted[i] ? (' highlighted') : '')}>
|
||||
{keys.map((key, j) => <kbd key={j}>{key}</kbd>)}
|
||||
|
||||
{descr}
|
||||
</span>)
|
||||
}
|
||||
</span>
|
||||
<span className="line">
|
||||
<select onChange={onSelectExample} value={-1}>
|
||||
<option value={-1}>load example...</option>
|
||||
{
|
||||
examples.map(([name], i) => {
|
||||
return <option key={i} value={i}>{name}</option>;
|
||||
})
|
||||
}
|
||||
</select>
|
||||
<button className="factoryReset" onClick={factoryReset}>
|
||||
FACTORY RESET
|
||||
</button>
|
||||
<span className="line">
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
checked={syntacticSugar}
|
||||
onChange={e => setSyntacticSugar(e.target.checked)}/>
|
||||
syntactic sugar
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<main onKeyDown={onKeyDown}>
|
||||
|
|
@ -224,7 +234,7 @@ export function App() {
|
|||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="https://deemz.org/git/joeri/dope2-webapp">Source code</a>
|
||||
<a href="https://deemz.org/git/research/dope2-webapp">Source code</a>
|
||||
</footer>
|
||||
</>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { Type as TypeBlock, TypeInfoBlock } from "../other/Type";
|
|||
import type { ExprBlockState, State2Props } from "./ExprBlock";
|
||||
|
||||
import "./InputBlock.css";
|
||||
import { evalExpr } from "../../eval/eval";
|
||||
|
||||
interface Literal {
|
||||
kind: "literal";
|
||||
|
|
|
|||
|
|
@ -37,4 +37,8 @@ kbd {
|
|||
::selection {
|
||||
color: white;
|
||||
background: dodgerblue;
|
||||
}
|
||||
|
||||
span.line {
|
||||
display: inline-block;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue