From e56f758b11bc49386a17dc4d9e7f34c4b7654ee7 Mon Sep 17 00:00:00 2001 From: iiPython Date: Sat, 14 Dec 2024 14:01:10 -0600 Subject: [PATCH] clean up some leftovers --- nightwatch/web/js/flows/connection.js | 2 +- nightwatch/web/js/nightwatch.js | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/nightwatch/web/js/flows/connection.js b/nightwatch/web/js/flows/connection.js index 9d72c43..b5dc44f 100644 --- a/nightwatch/web/js/flows/connection.js +++ b/nightwatch/web/js/flows/connection.js @@ -80,7 +80,7 @@ export default class ConnectionManager { break; case "problem": - this.callbacks.on_problem({ type: "protocol", data }); + this.callbacks.on_problem({ type: "generic", data: data.message }); break; } } diff --git a/nightwatch/web/js/nightwatch.js b/nightwatch/web/js/nightwatch.js index a5aee2c..f46be44 100644 --- a/nightwatch/web/js/nightwatch.js +++ b/nightwatch/web/js/nightwatch.js @@ -51,10 +51,6 @@ const FILE_HANDLER = new FileHandler(); case "generic": main.innerHTML = data; break; - - case "protocol": - main.innerHTML = data.message; - break; } if (connection.websocket.readyState === WebSocket.OPEN) { connection.websocket.close(1000, "The client is terminating this connection due to protocol error."); @@ -207,7 +203,6 @@ const FILE_HANDLER = new FileHandler(); } } ); - window.connection = connection; // Handle loading spinner main.classList.add("loading");