diff --git a/src/App/About.tsx b/src/App/About.tsx
index 104e114..61c1f51 100644
--- a/src/App/About.tsx
+++ b/src/App/About.tsx
@@ -1,11 +1,10 @@
import logo from "../../artwork/logo.svg";
export function About() {
- return
+ return

-
StateBuddy is a statechart editing, simulation, debugging and testing environment inspired by CouchEdit.
+
StateBuddy is an open source tool for Statechart editing, simulation, debugging and testing environment, inspired by CouchEdit.
It was originally created for teaching Statecharts to university students, but likely is a useful tool for other purposes as well.
-
StateBuddy is open source.
-
For commerical use, e‑mail me for permission.
+
Commercial use: e‑mail me for permission.
;
}
diff --git a/src/App/App.tsx b/src/App/App.tsx
index 47743f3..282fd09 100644
--- a/src/App/App.tsx
+++ b/src/App/App.tsx
@@ -152,7 +152,7 @@ export function App() {
onMouseDown={() => setModal(null)}
style={{width: '100%', height: '100%', position:'absolute', textAlign: 'center', backgroundColor: 'rgba(127,127,127,0.5)' }}>
+ style={{position: 'relative', top: '50%', transform: 'translateY(-50%)', textAlign: 'center', display: 'inline-block'}}>
e.stopPropagation()}>
{modal}
diff --git a/src/App/TextDialog.tsx b/src/App/TextDialog.tsx
index 110a789..4dfd45c 100644
--- a/src/App/TextDialog.tsx
+++ b/src/App/TextDialog.tsx
@@ -1,5 +1,7 @@
import { Dispatch, ReactElement, SetStateAction, useState } from "react";
+import { parse as parseLabel, SyntaxError } from "../statecharts/label_parser";
+
export function TextDialog(props: {setModal: Dispatch
>, text: string, done: (newText: string|undefined) => void}) {
const [text, setText] = useState(props.text);
function onKeyDown(e: KeyboardEvent) {
@@ -16,11 +18,21 @@ export function TextDialog(props: {setModal: Dispatch
-
+
+ let error = "";
+ try {
+ const parsed = parseLabel(text);
+ } catch (e) {
+ error = e.message;
+ }
+
+ return
+ Edit text label:
+
-
- Tip: Shift+Enter to insert newline.
-
- ;
+
{error}
+
Enter to confirm. Escape to cancel.
+
+ (Tip:
Shift+
Enter to insert newline.)
+
;
}
\ No newline at end of file