diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-09-26 03:29:51 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-09-26 16:11:32 +0200 |
commit | 3ba6f8fba9dbd6e479f4297a5a05b51273e461a3 (patch) | |
tree | 66c0d598fdcf93db51cf988547c4417bf80906a7 /subprojects/frontend/src/editor/EditorStore.ts | |
parent | fix(query-interpreter): functional dependencies (diff) | |
download | refinery-3ba6f8fba9dbd6e479f4297a5a05b51273e461a3.tar.gz refinery-3ba6f8fba9dbd6e479f4297a5a05b51273e461a3.tar.zst refinery-3ba6f8fba9dbd6e479f4297a5a05b51273e461a3.zip |
feat(frontend): save in URL fragment
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r-- | subprojects/frontend/src/editor/EditorStore.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts index 9508858d..87c4040e 100644 --- a/subprojects/frontend/src/editor/EditorStore.ts +++ b/subprojects/frontend/src/editor/EditorStore.ts | |||
@@ -74,7 +74,11 @@ export default class EditorStore { | |||
74 | 74 | ||
75 | selectedGeneratedModel: string | undefined; | 75 | selectedGeneratedModel: string | undefined; |
76 | 76 | ||
77 | constructor(initialValue: string, pwaStore: PWAStore) { | 77 | constructor( |
78 | initialValue: string, | ||
79 | pwaStore: PWAStore, | ||
80 | onUpdate: (text: string) => void, | ||
81 | ) { | ||
78 | this.id = nanoid(); | 82 | this.id = nanoid(); |
79 | this.state = createEditorState(initialValue, this); | 83 | this.state = createEditorState(initialValue, this); |
80 | this.delayedErrors = new EditorErrors(this); | 84 | this.delayedErrors = new EditorErrors(this); |
@@ -86,7 +90,7 @@ export default class EditorStore { | |||
86 | if (this.disposed) { | 90 | if (this.disposed) { |
87 | return; | 91 | return; |
88 | } | 92 | } |
89 | this.client = new LazyXtextClient(this, pwaStore); | 93 | this.client = new LazyXtextClient(this, pwaStore, onUpdate); |
90 | this.client.start(); | 94 | this.client.start(); |
91 | }); | 95 | }); |
92 | })().catch((error) => { | 96 | })().catch((error) => { |