diff --git a/src/App/TopPanel.tsx b/src/App/TopPanel.tsx
index 3d0f076..cf4223d 100644
--- a/src/App/TopPanel.tsx
+++ b/src/App/TopPanel.tsx
@@ -18,9 +18,7 @@ import { formatTime } from "./util";
import { InsertMode } from "../VisualEditor/VisualEditor";
import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo";
import { About } from "./About";
-import { usePersistentState } from "@/util/persistent_state";
import { RountangleIcon, PseudoStateIcon, HistoryIcon } from "./Icons";
-import { ZOOM_MAX, ZOOM_MIN, ZOOM_STEP } from "@/VisualEditor/parameters";
import { EditHistory, TraceState } from "./App";
import { ZoomButtons } from "./TopPanel/ZoomButtons";
import { UndoRedoButtons } from "./TopPanel/UndoRedoButtons";
@@ -46,6 +44,18 @@ export type TopPanelProps = {
history: EditHistory,
}
+const ShortCutShowKeys = ~;
+
+const insertModes: [InsertMode, string, ReactElement, ReactElement][] = [
+ ["and", "AND-states", , A],
+ ["or", "OR-states", , O],
+ ["pseudo", "pseudo-states", , P],
+ ["shallow", "shallow history", , H],
+ ["deep", "deep history", , <>>],
+ ["transition", "transitions", , T],
+ ["text", "text", <> T >, X],
+];
+
export const TopPanel = memo(function TopPanel({trace, time, setTime, onUndo, onRedo, onInit, onClear, onBack, mode, setMode, setModal, zoom, setZoom, showKeys, setShowKeys, history}: TopPanelProps) {
const [displayTime, setDisplayTime] = useState("0.000");
const [timescale, setTimescale] = useState(1);
@@ -191,7 +201,7 @@ export const TopPanel = memo(function TopPanel({trace, time, setTime, onUndo, on
{/* shortcuts / about */}
-
~}>
+
@@ -212,15 +222,7 @@ export const TopPanel = memo(function TopPanel({trace, time, setTime, onUndo, on
{/* insert rountangle / arrow / ... */}
- {([
- ["and", "AND-states",
,
A],
- ["or", "OR-states",
,
O],
- ["pseudo", "pseudo-states",
,
P],
- ["shallow", "shallow history",
,
H],
- ["deep", "deep history",
, <>>],
- ["transition", "transitions",
,
T],
- ["text", "text", <> T >,
X],
- ] as [InsertMode, string, ReactElement, ReactElement][]).map(([m, hint, buttonTxt, keyInfo]) =>
+ {insertModes.map(([m, hint, buttonTxt, keyInfo]) =>