diff --git a/dist/grbl/debug/index.html.gz b/dist/grbl/debug/index.html.gz index 37c8b09c0..daea53112 100644 Binary files a/dist/grbl/debug/index.html.gz and b/dist/grbl/debug/index.html.gz differ diff --git a/dist/grbl/languages/fr.json.gz b/dist/grbl/languages/fr.json.gz index ca6558b70..1e01ace88 100644 Binary files a/dist/grbl/languages/fr.json.gz and b/dist/grbl/languages/fr.json.gz differ diff --git a/dist/grbl/languages/zh_cn.json.gz b/dist/grbl/languages/zh_cn.json.gz index ff3adfe10..94343aef6 100644 Binary files a/dist/grbl/languages/zh_cn.json.gz and b/dist/grbl/languages/zh_cn.json.gz differ diff --git a/dist/grbl/production/index.html.gz b/dist/grbl/production/index.html.gz index 34e6ef519..467ac7b4d 100644 Binary files a/dist/grbl/production/index.html.gz and b/dist/grbl/production/index.html.gz differ diff --git a/dist/printer/debug/index.html.gz b/dist/printer/debug/index.html.gz index 315a54340..6f6d0d8de 100644 Binary files a/dist/printer/debug/index.html.gz and b/dist/printer/debug/index.html.gz differ diff --git a/dist/printer/languages/fr.json.gz b/dist/printer/languages/fr.json.gz index a2709b6aa..cf44e26f9 100644 Binary files a/dist/printer/languages/fr.json.gz and b/dist/printer/languages/fr.json.gz differ diff --git a/dist/printer/languages/zh_cn.json.gz b/dist/printer/languages/zh_cn.json.gz index ff3adfe10..94343aef6 100644 Binary files a/dist/printer/languages/zh_cn.json.gz and b/dist/printer/languages/zh_cn.json.gz differ diff --git a/dist/printer/production/index.html.gz b/dist/printer/production/index.html.gz index 966b53661..500dc6d98 100644 Binary files a/dist/printer/production/index.html.gz and b/dist/printer/production/index.html.gz differ diff --git a/src/components/settings/webui.js b/src/components/settings/webui.js index 0fd216a8b..8f54cc548 100644 --- a/src/components/settings/webui.js +++ b/src/components/settings/webui.js @@ -436,11 +436,11 @@ function loadConfigSuccess(responseText) { try { data = JSON.parse(responseText) applyConfig(data) - if (data.WebSocketIP && data.WebCommunication && data.WebSocketport) { + if (data.WebSocketIP && data.WebCommunication && data.WebSocketPort) { setupWebSocket( data.WebCommunication, document.location.hostname, - data.WebSocketport + data.WebSocketPort ) } } catch (e) { diff --git a/src/components/version.js b/src/components/version.js index 58c26768e..da3980e8d 100644 --- a/src/components/version.js +++ b/src/components/version.js @@ -19,4 +19,4 @@ */ import { h } from "preact" -export const Esp3dVersion = () => 3.0.0.86 +export const Esp3dVersion = () => 3.0.0.87 diff --git a/src/server/index.js b/src/server/index.js index 5506279a7..e8803f53f 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -897,7 +897,7 @@ app.get("/command", function (req, res) { Authentication: "Disabled", WebCommunication: "Synchronous", WebSocketIP: "localhost", - WebSocketport: "81", + WebSocketPort: "81", Hostname: "esp3d", WiFiMode: "STA", WebUpdate: "Enabled", diff --git a/src/server/indexgrbl.js b/src/server/indexgrbl.js index 7659f369c..f3b3e6e88 100644 --- a/src/server/indexgrbl.js +++ b/src/server/indexgrbl.js @@ -61,7 +61,7 @@ function sendStatus() { nbqueries++ } } -app.get("/command", function(req, res) { +app.get("/command", function (req, res) { var url = req.originalUrl console.log(url) if (url.indexOf("cmd=%3F") != -1) { @@ -132,7 +132,7 @@ app.get("/command", function(req, res) { Authentication: "Disabled", WebCommunication: "Synchronous", WebSocketIP: "localhost", - WebSocketport: "81", + WebSocketPort: "81", Hostname: "esp3d", WiFiMode: "STA", WebUpdate: "Enabled", @@ -314,20 +314,20 @@ app.get("/command", function(req, res) { V: "11", H: "channel", O: [ - { "1": "1" }, - { "2": "2" }, - { "3": "3" }, - { "4": "4" }, - { "5": "5" }, - { "6": "6" }, - { "7": "7" }, - { "8": "8" }, - { "9": "9" }, - { "10": "10" }, - { "11": "11" }, - { "12": "12" }, - { "13": "13" }, - { "14": "14" }, + { 1: "1" }, + { 2: "2" }, + { 3: "3" }, + { 4: "4" }, + { 5: "5" }, + { 6: "6" }, + { 7: "7" }, + { 8: "8" }, + { 9: "9" }, + { 10: "10" }, + { 11: "11" }, + { 12: "12" }, + { 13: "13" }, + { 14: "14" }, ], }, { @@ -479,7 +479,7 @@ function filesList(mypath) { let nb = 0 let totalused = getTotalSize(__dirname + "/public") let total = 1.31 * 1024 * 1024 - fs.readdirSync(__dirname + "/public" + mypath).forEach(fileelement => { + fs.readdirSync(__dirname + "/public" + mypath).forEach((fileelement) => { let fst = fs.statSync(__dirname + "/public" + mypath + fileelement) let fsize = -1 @@ -503,12 +503,12 @@ function filesList(mypath) { return res } -const getAllFiles = function(dirPath, arrayOfFiles) { +const getAllFiles = function (dirPath, arrayOfFiles) { let files = fs.readdirSync(dirPath) arrayOfFiles = arrayOfFiles || [] - files.forEach(function(file) { + files.forEach(function (file) { if (fs.statSync(dirPath + "/" + file).isDirectory()) { arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles) } else { @@ -519,23 +519,23 @@ const getAllFiles = function(dirPath, arrayOfFiles) { return arrayOfFiles } -const getTotalSize = function(directoryPath) { +const getTotalSize = function (directoryPath) { const arrayOfFiles = getAllFiles(directoryPath) let totalSize = 0 - arrayOfFiles.forEach(function(filePath) { + arrayOfFiles.forEach(function (filePath) { totalSize += fs.statSync(filePath).size }) return totalSize } -app.all("/updatefw", function(req, res) { +app.all("/updatefw", function (req, res) { res.send("ok") }) -app.all("/files", function(req, res) { +app.all("/files", function (req, res) { let mypath = req.query.path if (typeof mypath == "undefined") mypath = "/" if (!req.files || Object.keys(req.files).length === 0) { @@ -545,17 +545,18 @@ app.all("/files", function(req, res) { if (typeof myFile.length == "undefined") { console.log("one files") - myFile.mv(__dirname + "/public" + mypath + myFile.name, function(err) { + myFile.mv(__dirname + "/public" + mypath + myFile.name, function (err) { if (err) return res.status(500).send(err) }) } else { console.log(myFile.length + " files") for (let i = 0; i < myFile.length; i++) { - myFile[i].mv(__dirname + "/public/" + myFile[i].name, function( - err - ) { - if (err) return res.status(500).send(err) - }) + myFile[i].mv( + __dirname + "/public/" + myFile[i].name, + function (err) { + if (err) return res.status(500).send(err) + } + ) } } res.send(filesList(mypath)) @@ -565,7 +566,7 @@ app.listen(process.env.PORT || 8080, () => console.log(`Listening on port ${process.env.PORT || 8080}!`) ) -wss.on("connection", function(ws) { +wss.on("connection", function (ws) { console.log("New connection") ws.send(`currentID:${currentID}`) wss.clients.forEach(function each(client) { @@ -574,7 +575,7 @@ wss.on("connection", function(ws) { } }) currentID++ - ws.on("message", function(message) { + ws.on("message", function (message) { console.log("received: %s", message) }) })