aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorStore.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-05 01:29:11 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-06 01:05:24 +0200
commiteb94326bb64552dbd7df62ae201ccca37f368467 (patch)
treeb810f0230ace058cac8a6343455ca60113925221 /subprojects/frontend/src/editor/EditorStore.ts
parentrefactor(frontend): more readable indentation (diff)
downloadrefinery-eb94326bb64552dbd7df62ae201ccca37f368467.tar.gz
refinery-eb94326bb64552dbd7df62ae201ccca37f368467.tar.zst
refinery-eb94326bb64552dbd7df62ae201ccca37f368467.zip
feat(frontend): show connection status
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index 4407376b..3ec33b2c 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -69,6 +69,26 @@ export default class EditorStore {
69 }); 69 });
70 } 70 }
71 71
72 get opened(): boolean {
73 return this.client.webSocketClient.opened;
74 }
75
76 get opening(): boolean {
77 return this.client.webSocketClient.opening;
78 }
79
80 get connectionErrors(): string[] {
81 return this.client.webSocketClient.errors;
82 }
83
84 connect(): void {
85 this.client.webSocketClient.connect();
86 }
87
88 disconnect(): void {
89 this.client.webSocketClient.disconnect();
90 }
91
72 setDarkMode(darkMode: boolean): void { 92 setDarkMode(darkMode: boolean): void {
73 log.debug('Update editor dark mode', darkMode); 93 log.debug('Update editor dark mode', darkMode);
74 this.dispatch({ 94 this.dispatch({