From 2d6eb2a8b896bad4efaf5b2d850c7ca791cbed9d Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 5 Sep 2021 12:59:53 +0200 Subject: [PATCH] More Client Reorg --- Platform/Client/httpInterface.js | 2 +- Platform/Client/webSocketsInterface.js | 4 ++-- Platform/UI/Data-Files/{src => }/DailyFiles.js | 0 Platform/UI/Data-Files/{src => }/FileCloud.js | 0 Platform/UI/Data-Files/{src => }/FileCursor.js | 0 Platform/UI/Data-Files/{src => }/FileSequence.js | 0 Platform/UI/Data-Files/{src => }/FileStorage.js | 0 Platform/UI/Data-Files/{src => }/MarketFiles.js | 0 Platform/UI/Data-Files/{src => }/SingleFile.js | 0 Projects/Foundations/SA/Utilities/HttpResponses.js | 2 +- 10 files changed, 4 insertions(+), 4 deletions(-) rename Platform/UI/Data-Files/{src => }/DailyFiles.js (100%) rename Platform/UI/Data-Files/{src => }/FileCloud.js (100%) rename Platform/UI/Data-Files/{src => }/FileCursor.js (100%) rename Platform/UI/Data-Files/{src => }/FileSequence.js (100%) rename Platform/UI/Data-Files/{src => }/FileStorage.js (100%) rename Platform/UI/Data-Files/{src => }/MarketFiles.js (100%) rename Platform/UI/Data-Files/{src => }/SingleFile.js (100%) diff --git a/Platform/Client/httpInterface.js b/Platform/Client/httpInterface.js index b7f5e2296..5b3368fb8 100644 --- a/Platform/Client/httpInterface.js +++ b/Platform/Client/httpInterface.js @@ -1192,7 +1192,7 @@ exports.newHttpInterface = function newHttpInterface() { break case 'Files': { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/Data-Files/src/' + requestPath[2], httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/Data-Files/' + requestPath[2], httpResponse) } break case 'Fonts': diff --git a/Platform/Client/webSocketsInterface.js b/Platform/Client/webSocketsInterface.js index 79bb3a216..aaabd15d2 100644 --- a/Platform/Client/webSocketsInterface.js +++ b/Platform/Client/webSocketsInterface.js @@ -42,8 +42,8 @@ if (LOG_INFO === true) { console.log('Message Received: ' + message.substring(0, 1000)) } - - let messageArray = message.split('|*|') + + let messageArray = message.toString().split('|*|') let origin = messageArray[0] let nonce = messageArray[1] diff --git a/Platform/UI/Data-Files/src/DailyFiles.js b/Platform/UI/Data-Files/DailyFiles.js similarity index 100% rename from Platform/UI/Data-Files/src/DailyFiles.js rename to Platform/UI/Data-Files/DailyFiles.js diff --git a/Platform/UI/Data-Files/src/FileCloud.js b/Platform/UI/Data-Files/FileCloud.js similarity index 100% rename from Platform/UI/Data-Files/src/FileCloud.js rename to Platform/UI/Data-Files/FileCloud.js diff --git a/Platform/UI/Data-Files/src/FileCursor.js b/Platform/UI/Data-Files/FileCursor.js similarity index 100% rename from Platform/UI/Data-Files/src/FileCursor.js rename to Platform/UI/Data-Files/FileCursor.js diff --git a/Platform/UI/Data-Files/src/FileSequence.js b/Platform/UI/Data-Files/FileSequence.js similarity index 100% rename from Platform/UI/Data-Files/src/FileSequence.js rename to Platform/UI/Data-Files/FileSequence.js diff --git a/Platform/UI/Data-Files/src/FileStorage.js b/Platform/UI/Data-Files/FileStorage.js similarity index 100% rename from Platform/UI/Data-Files/src/FileStorage.js rename to Platform/UI/Data-Files/FileStorage.js diff --git a/Platform/UI/Data-Files/src/MarketFiles.js b/Platform/UI/Data-Files/MarketFiles.js similarity index 100% rename from Platform/UI/Data-Files/src/MarketFiles.js rename to Platform/UI/Data-Files/MarketFiles.js diff --git a/Platform/UI/Data-Files/src/SingleFile.js b/Platform/UI/Data-Files/SingleFile.js similarity index 100% rename from Platform/UI/Data-Files/src/SingleFile.js rename to Platform/UI/Data-Files/SingleFile.js diff --git a/Projects/Foundations/SA/Utilities/HttpResponses.js b/Projects/Foundations/SA/Utilities/HttpResponses.js index e804240f3..b12f7c458 100644 --- a/Projects/Foundations/SA/Utilities/HttpResponses.js +++ b/Projects/Foundations/SA/Utilities/HttpResponses.js @@ -182,7 +182,7 @@ exports.newFoundationsUtilitiesHttpResponses = function () { let fs = SA.nodeModules.fs let fileName = pathToApp + '/WebServer/index.html' - console.log(fileName) + fs.readFile(fileName, onFileRead) function onFileRead(err, file) {