diff options
author | 2022-09-06 22:32:04 +0200 | |
---|---|---|
committer | 2022-09-08 01:24:50 +0200 | |
commit | 5f8f4e6484faff23821ca7c009e309382fba914d (patch) | |
tree | 6d399fb90b4aa3527c30c502ba474cd83b5c94b2 /subprojects/frontend/src/editor/EditorStore.ts | |
parent | feat(frontend): handle page hide events (diff) | |
download | refinery-5f8f4e6484faff23821ca7c009e309382fba914d.tar.gz refinery-5f8f4e6484faff23821ca7c009e309382fba914d.tar.zst refinery-5f8f4e6484faff23821ca7c009e309382fba914d.zip |
feat(frontend): check for updates periodically
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r-- | subprojects/frontend/src/editor/EditorStore.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts index ecbe6ef8..c74e732f 100644 --- a/subprojects/frontend/src/editor/EditorStore.ts +++ b/subprojects/frontend/src/editor/EditorStore.ts | |||
@@ -16,6 +16,7 @@ import { type Command, EditorView } from '@codemirror/view'; | |||
16 | import { makeAutoObservable, observable } from 'mobx'; | 16 | import { makeAutoObservable, observable } from 'mobx'; |
17 | import { nanoid } from 'nanoid'; | 17 | import { nanoid } from 'nanoid'; |
18 | 18 | ||
19 | import type PWAStore from '../PWAStore'; | ||
19 | import getLogger from '../utils/getLogger'; | 20 | import getLogger from '../utils/getLogger'; |
20 | import XtextClient from '../xtext/XtextClient'; | 21 | import XtextClient from '../xtext/XtextClient'; |
21 | 22 | ||
@@ -51,10 +52,10 @@ export default class EditorStore { | |||
51 | 52 | ||
52 | infoCount = 0; | 53 | infoCount = 0; |
53 | 54 | ||
54 | constructor(initialValue: string) { | 55 | constructor(initialValue: string, pwaStore: PWAStore) { |
55 | this.id = nanoid(); | 56 | this.id = nanoid(); |
56 | this.state = createEditorState(initialValue, this); | 57 | this.state = createEditorState(initialValue, this); |
57 | this.client = new XtextClient(this); | 58 | this.client = new XtextClient(this, pwaStore); |
58 | this.searchPanel = new SearchPanelStore(this); | 59 | this.searchPanel = new SearchPanelStore(this); |
59 | this.lintPanel = new LintPanelStore(this); | 60 | this.lintPanel = new LintPanelStore(this); |
60 | makeAutoObservable<EditorStore, 'client'>(this, { | 61 | makeAutoObservable<EditorStore, 'client'>(this, { |