From b74218abab12e478f4e7be4472141f05d6fe0043 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Mon, 13 Nov 2023 14:22:11 -0500 Subject: [PATCH] Fix hard coded websocket address --- gui/src/js/event_sock.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/src/js/event_sock.js b/gui/src/js/event_sock.js index a2116de6..df97b038 100644 --- a/gui/src/js/event_sock.js +++ b/gui/src/js/event_sock.js @@ -5,8 +5,16 @@ import { } from "../js/eventHandler.js"; import { addDataToWaterfall } from "../js/waterfallHandler.js"; +// ----------------- init pinia stores ------------- +import { setActivePinia } from "pinia"; +import pinia from "../store/index"; +setActivePinia(pinia); + +import { useSettingsStore } from "../store/settingsStore.js"; +const settings = useSettingsStore(pinia); + function connect(endpoint, dispatcher) { - let socket = new WebSocket("ws://localhost:5000/" + endpoint); + let socket = new WebSocket("ws://" + settings.modem_host + ":" + settings.modem_port + "/" + endpoint); // handle opening socket.addEventListener("open", function (event) {