From 182d7f146ed55ede1b9874cf7f3ad2fe05b17266 Mon Sep 17 00:00:00 2001 From: goesta Date: Wed, 20 Oct 2021 15:23:02 +0200 Subject: [PATCH 1/3] fix(websocket): close websocket before connecting (#383) --- src/plugins/webSocketClient.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/webSocketClient.ts b/src/plugins/webSocketClient.ts index 28a20ea3..5c76526f 100644 --- a/src/plugins/webSocketClient.ts +++ b/src/plugins/webSocketClient.ts @@ -33,6 +33,10 @@ export class WebSocketClient { connect(): void { this.store?.dispatch('socket/setData', { isConnecting: true }) + + if (this.instance) { + this.instance.close() + } this.instance = new WebSocket(this.url) this.instance.onopen = () => { From a02963cc88d16c9fd5bd1391430ae9a36b6878fd Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Wed, 20 Oct 2021 20:06:27 +0100 Subject: [PATCH 2/3] feat: adds optional confirmation dialogs for emergency stop and power device change (#384) Signed-off-by: Pedro Lamas --- src/components/TheTopCornerMenu.vue | 118 ++++++++++++------ src/components/TheTopbar.vue | 26 +++- .../settings/SettingsGeneralTab.vue | 24 ++++ src/locales/en.json | 17 +++ src/store/gui/index.ts | 2 + 5 files changed, 146 insertions(+), 41 deletions(-) diff --git a/src/components/TheTopCornerMenu.vue b/src/components/TheTopCornerMenu.vue index 3299ac6c..a84d60dc 100644 --- a/src/components/TheTopCornerMenu.vue +++ b/src/components/TheTopCornerMenu.vue @@ -5,46 +5,59 @@