diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-09-05 01:29:11 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-09-06 01:05:24 +0200 |
commit | eb94326bb64552dbd7df62ae201ccca37f368467 (patch) | |
tree | b810f0230ace058cac8a6343455ca60113925221 /subprojects/frontend/src/editor/EditorStore.ts | |
parent | refactor(frontend): more readable indentation (diff) | |
download | refinery-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.ts | 20 |
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({ |