Skip to content

Commit

Permalink
Fix typo in status panel that make it crash
Browse files Browse the repository at this point in the history
Add sanity check if extension has no body
  • Loading branch information
luc-github committed Aug 15, 2024
1 parent 72742a9 commit 16ce347
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 4 deletions.
Binary file modified dist/CNC/GRBL/index.html.gz
Binary file not shown.
Binary file modified dist/CNC/GRBLHal/index.html.gz
Binary file not shown.
Binary file modified dist/Plotter/HP-GL/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin-embedded/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Repetier/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Smoothieware/index.html.gz
Binary file not shown.
Binary file modified dist/SandTable/GRBL/index.html.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/App/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import { h } from "preact"
import { webUIbuild } from "../../targets"
export const webUIversion = "3.0.0-a73"
export const webUIversion = "3.0.0-a74"
export const Esp3dVersion = () => (
<span>
{webUIversion}.{webUIbuild}
Expand Down
6 changes: 5 additions & 1 deletion src/components/ExtraContent/extraContentItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ const ExtraContentItem = ({
}, [id, loadContent])

useEffect(() => {
console.log("Updating refresh interval for " + id)
if (refreshtime > 0 && (type === "camera" || type === "image") && visibilityState[id] && !isPaused) {
console.log("Updating refresh interval for " + id)
if (!refreshIntervalRef.current){
console.log("Starting refresh interval for " + id+ " with refreshtime " + refreshtime)
refreshIntervalRef.current = setInterval(loadContent, refreshtime)
Expand Down Expand Up @@ -207,6 +207,10 @@ const ExtraContentItem = ({

const doc = iframeElement.contentWindow.document
const body = doc.querySelector("body")
if (!body){
console.error("body not found")
return
}
body.classList.add("body-extension")
const css = document.querySelectorAll("style")
css.forEach((csstag) => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Panels/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ const StatusControls = () => {
</div>
)}
{status.printState.printing &&
status.printState.progress !=
"NaN"(
status.printState.progress != "NaN" && (
<Fragment>
<div class="extra-control-value">
{status.printState.progress}%
Expand Down

0 comments on commit 16ce347

Please sign in to comment.