From 1290a8f324bbc5131c40aa1b07414c66e210b91b Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 11:59:56 -0500 Subject: [PATCH] Major progress on #20. Promised-based websocket command structure is completed. All functionality needs to be placed into individual classes and any new functions get added to the server. Will create entire thin client using this method. --- app/data/cfg.json | 2 +- app/lib/client/index.js | 227 +++++++++++++++++++++++++++++++++++- app/lib/client/index.js.map | 2 +- app/lib/delay/index.d.ts | 8 ++ app/lib/server/index.js | 72 ++++++++++-- app/lib/server/index.js.map | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- app/server.html | 3 + app/src/lib/client/index.ts | 135 +++++++++++++-------- data/cfg.json | 2 +- package-lock.json | 4 +- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/server/index.ts | 85 ++++++++++++-- 15 files changed, 465 insertions(+), 85 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index de49d0d..b2ca107 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.9", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/lib/client/index.js b/app/lib/client/index.js index 719c9a0..00ab183 100644 --- a/app/lib/client/index.js +++ b/app/lib/client/index.js @@ -1,3 +1,12 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; /*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */ //@ts-ignore !function (A, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.NoSleep = e() : A.NoSleep = e(); }(this, (function () { return function (A) { var e = {}; function B(g) { if (e[g]) @@ -24,11 +33,8 @@ "use strict"; A.exports = { webm: "data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eB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meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE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AHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw" }; }]); })); -const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); -webSocket.onmessage = (event) => { - const data = JSON.parse(event.data); - console.log(data); -}; +const ws = new WebSocket('ws://localhost:{{PORT}}/'); +let imgTmp; function preventSleep() { //@ts-ignore var noSleep = new NoSleep(); @@ -38,6 +44,217 @@ function preventSleep() { noSleep.enable(); }, false); } +function setImage(src) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + imgTmp = new Image(); + let img = document.getElementById('img'); + let body = document.querySelector('body'); + if (body.classList.contains('meter')) { + body.classList.remove('meter'); + } + imgTmp.onload = function () { + img.style.backgroundImage = `url('${src}')`; + return resolve(src); + }; + imgTmp.src = src; + })); + }); +} +function onImage(arg) { + return __awaiter(this, void 0, void 0, function* () { + return setImage(arg.image); + }); +} +function onMeter(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('meter'); + const body = document.querySelector('body'); + body.className = ''; + body.classList.add('meter'); + }); +} +function onBlank(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('blank'); + const body = document.querySelector('body'); + body.className = ''; + body.classList.add('blank'); + }); +} +function onFocus(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('focus'); + const can = document.getElementById('can'); + const dpr = window.devicePixelRatio || 1; + let ctx; + if (!can.classList.contains('show')) { + can.classList.add('show'); + } + can.width = window.innerWidth * dpr; + can.height = window.innerHeight * dpr; + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerHeight}px`; + ctx = can.getContext('2d'); + ctx.scale(dpr, dpr); + try { + yield drawFocus(can, ctx); + } + catch (err) { + alert(JSON.stringify(err)); + } + }); +} +function drawFocus(can, ctx) { + return __awaiter(this, void 0, void 0, function* () { + const count = 20; + const half = Math.round(count / 2); + const dpr = window.devicePixelRatio || 1; + const w = can.width / dpr; + const h = can.height / dpr; + const longest = w >= h ? w * 1.5 : h * 1.5; + const opp = Math.tan(360 / (count * 32)) * longest / 10; + for (let i = 0; i < count; i++) { + ctx.beginPath(); + ctx.moveTo(w / 2, h / 2); + ctx.lineTo((w / 2) + opp, longest); + ctx.lineTo((w / 2) - opp, longest); + ctx.fill(); + ctx.translate(w / 2, h / 2); + ctx.rotate((360 / count) * Math.PI / 180); + ctx.translate(-w / 2, -h / 2); + } + }); +} +function onField(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('field guide'); + const can = document.getElementById('can'); + const dpr = window.devicePixelRatio || 1; + const screen = window.outerWidth / window.outerHeight; + let ctx; + if (!can.classList.contains('show')) { + can.classList.add('show'); + } + if (arg.ratio) { + if (arg.ratio < screen) { + can.width = (window.innerHeight * arg.ratio) * dpr; + can.height = window.innerHeight * dpr; + } + else { + can.width = window.innerWidth * dpr; + can.height = (window.innerWidth / arg.ratio) * dpr; + } + } + else { + can.width = window.innerWidth * dpr; + can.height = window.innerHeight * dpr; + } + if (arg.ratio) { + if (arg.ratio < screen) { + can.style.width = `${window.innerHeight * arg.ratio}px`; + can.style.height = `${window.innerHeight}px`; + } + else { + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerWidth / arg.ratio}px`; + } + } + else { + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerHeight}px`; + } + ctx = can.getContext('2d'); + ctx.scale(dpr, dpr); + try { + yield drawField(can, ctx); + } + catch (err) { + alert(JSON.stringify(err)); + } + }); +} +// draw a field guide +function drawField(can, ctx) { + return __awaiter(this, void 0, void 0, function* () { + const count = 20; + const half = Math.round(count / 2); + const dpr = window.devicePixelRatio || 1; + const w = can.width / dpr; + const h = can.height / dpr; + const wsec = w / count; + const hsec = h / count; + const spacer = 12; + const fontSize = 18; + ctx.lineWidth = 2; + ctx.moveTo(w / 2, 0); + ctx.lineTo(w / 2, h); + ctx.stroke(); + ctx.moveTo(0, h / 2); + ctx.lineTo(w, h / 2); + ctx.stroke(); + for (let i = 0; i < count; i++) { + ctx.moveTo(wsec * i, hsec * i); + ctx.lineTo(wsec * i, h - (hsec * i)); + ctx.stroke(); + ctx.moveTo(wsec * i, hsec * i); + ctx.lineTo(w - (wsec * i), hsec * i); + ctx.stroke(); + } + ctx.lineWidth = 1; + ctx.font = `${fontSize}px Arial`; + for (let i = 0; i < half; i++) { + //left count + ctx.fillText(`${(half - i)}`, (wsec * i) + spacer, (h / 2) - spacer); + //right count + ctx.fillText(`${(half - i)}`, (w - (wsec * i)) - (spacer * 2), (h / 2) + (spacer * 2)); + //up count + ctx.fillText(`${(half - i)}`, (w / 2) + spacer, (hsec * i) + spacer + (fontSize / 2)); + //down count + ctx.fillText(`${(half - i)}`, (w / 2) - (spacer * 2), (h - (hsec * i)) - spacer); + } + }); +} +//keep connection alive +function onPing(arg) { + return __awaiter(this, void 0, void 0, function* () { + //console.log('ping') + return true; + }); +} +function send(obj) { + if (ws) { + ws.send(JSON.stringify(obj)); + } +} +let actions = { + mcopy: (arg) => __awaiter(this, void 0, void 0, function* () { console.log('Connected'); return true; }), + image: onImage, + field: onField, + meter: onMeter, + focus: onFocus, + ping: onPing +}; +ws.onmessage = (event) => __awaiter(this, void 0, void 0, function* () { + const req = JSON.parse(event.data); + let res; + if (typeof actions[req.action] !== 'undefined') { + try { + yield actions[req.action](req); + } + catch (err) { + console.error(err); + } + res = { + action: req.action, + id: req.id + }; + send(res); + } +}); +ws.onclose = (event) => __awaiter(this, void 0, void 0, function* () { + console.log('Connection closed'); +}); (function main() { preventSleep(); })(); diff --git a/app/lib/client/index.js.map b/app/lib/client/index.js.map index a469822..e52b8e1 100644 --- a/app/lib/client/index.js.map +++ b/app/lib/client/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/client/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,YAAY;AACZ,CAAC,UAAS,CAAC,EAAC,CAAC,IAAE,QAAQ,IAAE,OAAO,OAAO,IAAE,QAAQ,IAAE,OAAO,MAAM,CAAA,CAAC,CAAA,MAAM,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAC,CAAA,UAAU,IAAE,OAAO,MAAM,IAAE,MAAM,CAAC,GAAG,CAAA,CAAC,CAAA,MAAM,CAAC,EAAE,EAAC,CAAC,CAAC,CAAA,CAAC,CAAA,QAAQ,IAAE,OAAO,OAAO,CAAA,CAAC,CAAA,OAAO,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAC,CAAA,CAAC,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAA,CAAC,CAAC,IAAI,EAAC,CAAC,cAAW,OAAO,UAAS,CAAC,IAAE,IAAI,CAAC,GAAC,EAAE,CAAC,CAAA,SAAS,CAAC,CAAC,CAAC,IAAE,IAAG,CAAC,CAAC,CAAC,CAAC;IAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA,IAAI,CAAC,GAAC,CAA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,CAAC,CAAA;IAChF,KAAK,EAAG,OAAO;IACf,KAAK,EAAG,OAAO;IACf,KAAK,EAAG,OAAO;IACf,KAAK,EAAG,OAAO;IACf,IAAI,EAAG,MAAM;CACf,CAAA;AAED,EAAE,CAAC,SAAS,GAAG,CAAO,KAAW,EAAE,EAAE;IAClC,MAAM,GAAG,GAAkB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClD,IAAI,GAAmB,CAAC;IAExB,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW,EAAE;QAC7C,IAAI;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAA;SAChC;QAAC,OAAO,GAAG,EAAE;YACX,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;SACpB;QACD,GAAG,GAAG;YACH,MAAM,EAAG,GAAG,CAAC,MAAM;YACnB,EAAE,EAAG,GAAG,CAAC,EAAE;SACb,CAAA;QACD,IAAI,CAAC,GAAG,CAAC,CAAA;KACX;AACJ,CAAC,CAAA,CAAA;AAED,EAAE,CAAC,OAAO,GAAG,CAAO,KAAW,EAAE,EAAE;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAClC,CAAC,CAAA,CAAC;AAEF,CAAC,SAAS,IAAI;IACX,YAAY,EAAE,CAAC;AAClB,CAAC,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index e69de29..62d586e 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -0,0 +1,8 @@ +/** + * Delay in an async/await function + * + * @param {integer} ms Milliseconds to delay for + * + * @returns {Promise} Promise to resolve after timeout + **/ +declare function delay(ms: number): Promise; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index eeeea01..5f6b1e8 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -7,6 +7,7 @@ const ws_1 = require("ws"); const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); const mime_1 = __importDefault(require("mime")); +const uuid_1 = require("uuid"); const Log = require("log"); class Server { constructor() { @@ -25,6 +26,8 @@ class Server { this.port = 9900; this.wsPort = 9901; this.proxy = {}; + this.queue = {}; + this.intervalPeriod = 10000; //10 sec this.init(); } async init() { @@ -57,18 +60,28 @@ class Server { this.log.error(err); return; } - this.wss.on('connection', (ws) => { - this.log.info(`Client connected to WebSocketServer`); - console.dir(ws); - ws.send('mcopy'); - }); + this.wss.on('connection', async function (ws) { + ws.on("message", function (data) { + let obj = JSON.parse(data); + this.log.info(data); + if (obj.id && this.queue[obj.id]) { + this.queue[obj.id](obj); + delete this.queue[obj.id]; + } + }.bind(this)); + ws.on('close', function () { + this.log.info('Client disconnected'); + }.bind(this)); + await this.cmd(ws, 'mcopy'); + this.log.info('Client connected'); + }.bind(this)); + this.log.info(`Websocket server started!`); this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`); } async startHttp() { return new Promise(function (resolve, reject) { this.httpd = this.http.listen(this.port, function () { - this.isActive = true; - this.log.info(`Server started!`); + this.log.info(`HTTP server started!`); this.log.info(`URL [ http://localhost:${this.port} ]`); return resolve(true); }.bind(this)); @@ -77,16 +90,24 @@ class Server { async start() { await this.startHttp(); await this.startWss(); + this.interval = setInterval(async function () { + await this.cmdAll('ping'); + }.bind(this), this.intervalPeriod); + this.isActive = true; } - async stop() { + async stopHttp() { return new Promise(function (resolve, reject) { return this.httpd.close(function () { - this.isActive = false; - this.log.info(`Server stopped :(`); + this.log.info(`HTTP server stopped :(`); return resolve(false); }.bind(this)); }.bind(this)); } + async stop() { + await this.stopHttp(); + clearInterval(this.interval); + this.isActive = false; + } index(req, res, next) { const html = this.template('index', { PORT: `${this.port}` }); this.log.info('GET /'); @@ -122,12 +143,43 @@ class Server { }.bind(this)); } addProxy(key, filePath) { + //wipe every time + this.proxy = {}; this.proxy[key] = { path: filePath, mime: mime_1.default.getType(filePath) }; this.log.info(`Added proxy image [${key}]`); } + async cmdAll(action, options = {}) { + const cmds = []; + if (this.isActive && this.wss.clients.size > 0) { + this.wss.clients.forEach(function (ws) { + cmds.push(this.cmd(ws, action, options)); + }.bind(this)); + return await Promise.all(cmds); + } + return false; + } + /** + * WSS + **/ + async cmd(ws, action, options = {}) { + const id = uuid_1.v4(); + let obj = { + id, action + }; + let str; + obj = Object.assign(obj, options); + str = JSON.stringify(obj); + ws.send(str); + return new Promise(function (resolve, reject) { + this.queue[id] = function (obj) { + return resolve(obj); + }; + //setTimeout() ? + }.bind(this)); + } } module.exports = function () { return new Server(); diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index c17759c..5a2f86e 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,gDAAuB;AACvB,2BAA2B;AAsB3B,MAAM,MAAM;IAqBX;QApBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAIO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QACtB,UAAK,GAAqB,EAAE,CAAA;QAGnC,IAAI,CAAC,IAAI,EAAE,CAAA;IAEZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAAM,IAAI,CAAC,KA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GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAc;gBAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;YACzC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;YACb,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;SAC9B;QACD,OAAO,KAAK,CAAA;IACb,CAAC;IAED;;QAEI;IAEG,KAAK,CAAC,GAAG,CAAE,EAAc,EAAE,MAAe,EAAE,UAAgB,EAAE;QACpE,MAAM,EAAE,GAAY,SAAM,EAAE,CAAA;QAC5B,IAAI,GAAG,GAAG;YACT,EAAE,EAAE,MAAM;SACV,CAAA;QACD,IAAI,GAAY,CAAA;QAEhB,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QACzB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index a4b7642..c2e6a8a 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.9", + "version": "1.7.10", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 0dbd52c..3693c34 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.9", + "version": "1.7.10", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/app/server.html b/app/server.html index df36fa2..d89e6ca 100644 --- a/app/server.html +++ b/app/server.html @@ -3,6 +3,9 @@