aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorStore.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-06 22:32:04 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-08 01:24:50 +0200
commit5f8f4e6484faff23821ca7c009e309382fba914d (patch)
tree6d399fb90b4aa3527c30c502ba474cd83b5c94b2 /subprojects/frontend/src/editor/EditorStore.ts
parentfeat(frontend): handle page hide events (diff)
downloadrefinery-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.ts5
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';
16import { makeAutoObservable, observable } from 'mobx'; 16import { makeAutoObservable, observable } from 'mobx';
17import { nanoid } from 'nanoid'; 17import { nanoid } from 'nanoid';
18 18
19import type PWAStore from '../PWAStore';
19import getLogger from '../utils/getLogger'; 20import getLogger from '../utils/getLogger';
20import XtextClient from '../xtext/XtextClient'; 21import 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, {