diff --git a/Cargo.lock b/Cargo.lock index 9ec450c..b892812 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2598,6 +2598,7 @@ dependencies = [ "trx-core", "trx-frontend", "trx-protocol", + "uuid", ] [[package]] diff --git a/src/trx-client/trx-frontend/trx-frontend-http/Cargo.toml b/src/trx-client/trx-frontend/trx-frontend-http/Cargo.toml index dc58bbc..22dca54 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/Cargo.toml +++ b/src/trx-client/trx-frontend/trx-frontend-http/Cargo.toml @@ -25,3 +25,4 @@ rand = "0.8" hex = "0.4" pickledb = "0.5" dirs = "6" +uuid = { workspace = true } diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index c824683..d0c59d7 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -303,6 +303,7 @@ function applyCapabilities(caps) { sdrSquelchSupported = false; } updateSdrSquelchControlVisibility(); + if (typeof vchanApplyCapabilities === "function") vchanApplyCapabilities(caps); } const freqEl = document.getElementById("freq"); @@ -2738,6 +2739,12 @@ function connect() { es.addEventListener("ping", () => { lastEventAt = Date.now(); }); + es.addEventListener("session", evt => { + if (typeof vchanHandleSession === "function") vchanHandleSession(evt.data); + }); + es.addEventListener("channels", evt => { + if (typeof vchanHandleChannels === "function") vchanHandleChannels(evt.data); + }); es.onerror = () => { // Check if this is an auth error by looking at readyState if (es.readyState === EventSource.CLOSED) { diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index b0366fc..719a5f9 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -259,6 +259,10 @@