From 40920f389507b7bb002610951f930b7630acf07c Mon Sep 17 00:00:00 2001 From: FrozenAtlas Date: Wed, 10 May 2023 20:13:05 -0500 Subject: [PATCH 1/2] updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f768078..730c0ed 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ To use this module, add it to the modules array in the `config/config.js` file: | `maxStreamHeight` | *Optional* Maximum height for stream display in pixels. If set to 0, the stream's actual height is used
*Default:* `0` (stream's height) | `streamUrl` | *Optional* Set a custom url for accessing the MJPEG camera stream. By default it uses: `url:8080/?action=stream`. | `showTemps` | *Optional* Whether or not so show temperature info
*Default:* `true` +| `showDetails` | *Optional* Shows details such as: File name, Elapsed time, Remaining time, and Print percentage.
*Default:* `true`. Set to `false` to hide the details. | `showDetailsWhenOffline` | *Optional* Whether or not to hide the printer details when the printer is offline (file name, time, temps) | `interactive` | *Optional* Allow interactive control of the printer: choose files to print and upload new files.
*Default:* `true`. Set to `false` to hide the drop downs, if you don't use the Mirror to control anything. | `debugMode` | *Optional* Prints all messages received from the printer socket to the console log, for debugging only and developing more features. From bf97cbdff9fbe313a28902e36e550328bff880d2 Mon Sep 17 00:00:00 2001 From: FrozenAtlas Date: Wed, 10 May 2023 20:20:24 -0500 Subject: [PATCH 2/2] added show details config --- octomirror-module.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/octomirror-module.js b/octomirror-module.js index 19a1151..6aa6f84 100644 --- a/octomirror-module.js +++ b/octomirror-module.js @@ -17,6 +17,7 @@ Module.register("octomirror-module", { maxStreamWidth: 0, maxStreamHeight: 0, showTemps: true, + showDetails: true, showDetailsWhenOffline: true, interactive: true, // Set to false to hide the file drop down and only show the stream. debugMode: false, // Set to true to log all messages from OctoPrint Socket @@ -76,7 +77,8 @@ Module.register("octomirror-module", { } else { infoWrapper.innerHTML = `${this.config.printerName}
`; } - infoWrapper.innerHTML += `${this.translate("STATE")}: + if (this.config.showDetails) { + infoWrapper.innerHTML += `${this.translate("STATE")}:
${this.translate("FILE")}: N/A @@ -85,6 +87,7 @@ Module.register("octomirror-module", { | ${this.translate("REMAINING")}: N/A | ${this.translate("PERCENT")}: N/A
`; + } if (this.config.showTemps) { infoWrapper.innerHTML += ` @@ -227,7 +230,7 @@ Module.register("octomirror-module", { { $("#opState")[0].textContent = data.state.text; } - + var icon = $("#opStateIcon")[0]; if (data.state.flags.printing) { icon.innerHTML = ``;