From 8a0baa5bc96644bdccea733d8428f1c426198768 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 22 Jul 2023 15:01:48 -0400 Subject: [PATCH] Small tweaks - Update local webUI to refresh when joining server to clear modal - Updated client webUI page title - Re-added join modal to node page (client & server) - updated join modal to use node.nearbySystems --- Client/public/res/js/node.js | 4 ++-- Client/views/index.ejs | 6 ++++-- Client/views/partials/joinModal.ejs | 2 +- Server/public/res/js/node.js | 2 +- Server/views/node.ejs | 2 ++ Server/views/partials/joinModal.ejs | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Client/public/res/js/node.js b/Client/public/res/js/node.js index 7b8d45d..746de7b 100644 --- a/Client/public/res/js/node.js +++ b/Client/public/res/js/node.js @@ -253,8 +253,8 @@ function joinServer() { const responseObject = JSON.parse(Http.responseText) console.log(Http.status); console.log(responseObject); - createToast(`${responseObject.name} will join shortly`, { showNow: true }); - $("#joinModal").modal('toggle'); + createToast(`${responseObject.name} will join shortly`); + location.reload(); } } diff --git a/Client/views/index.ejs b/Client/views/index.ejs index 11a4460..84aa23d 100644 --- a/Client/views/index.ejs +++ b/Client/views/index.ejs @@ -3,7 +3,7 @@ - Bootstrap demo + '<%=node.name%>' - Configuration @@ -153,7 +153,9 @@ <% // new System Modal %> - <%- include("partials/modifySystemModal.ejs", {'system': "New System" , 'frequencies' : [], 'mode' : '' }) %> + <%- include("partials/modifySystemModal.ejs", {'system': "New System" , 'frequencies' : [], 'mode' : '' }) %> + <% // Join Server Modal %> + <%- include("partials/joinModal.ejs", {'node': node}) %> diff --git a/Client/views/partials/joinModal.ejs b/Client/views/partials/joinModal.ejs index d912911..1cc6feb 100644 --- a/Client/views/partials/joinModal.ejs +++ b/Client/views/partials/joinModal.ejs @@ -24,7 +24,7 @@
diff --git a/Server/public/res/js/node.js b/Server/public/res/js/node.js index 41e8f6c..2fe1e6a 100644 --- a/Server/public/res/js/node.js +++ b/Server/public/res/js/node.js @@ -256,7 +256,7 @@ function joinServer() { console.log(Http.status); console.log(responseObject); createToast(`${responseObject.name} will join shortly`, { showNow: true }); - $("#joinModal").modal('toggle'); + location.reload(); } } diff --git a/Server/views/node.ejs b/Server/views/node.ejs index e56ba5e..4d8c5d7 100644 --- a/Server/views/node.ejs +++ b/Server/views/node.ejs @@ -134,5 +134,7 @@ <% // new System Modal %> <%- include("partials/modifySystemModal.ejs", {'system': "New System", 'frequencies': [], 'mode': ''}) %> + <% // Join Server Modal %> + <%- include("partials/joinModal.ejs", {'node': node}) %> <%- include('partials/bodyEnd.ejs') %> <%- include('partials/htmlFooter.ejs') %> \ No newline at end of file diff --git a/Server/views/partials/joinModal.ejs b/Server/views/partials/joinModal.ejs index d912911..1cc6feb 100644 --- a/Server/views/partials/joinModal.ejs +++ b/Server/views/partials/joinModal.ejs @@ -24,7 +24,7 @@