mirror of
https://github.com/luc-github/ESP3D-WEBUI.git
synced 2026-02-19 17:01:20 +01:00
Fix autorefresh ignored in extra content
Bump version Build package
This commit is contained in:
BIN
dist/CNC/GRBL/index.html.gz
vendored
BIN
dist/CNC/GRBL/index.html.gz
vendored
Binary file not shown.
BIN
dist/CNC/GRBLHal/index.html.gz
vendored
BIN
dist/CNC/GRBLHal/index.html.gz
vendored
Binary file not shown.
BIN
dist/Printer3D/Marlin-embedded/index.html.gz
vendored
BIN
dist/Printer3D/Marlin-embedded/index.html.gz
vendored
Binary file not shown.
BIN
dist/Printer3D/Marlin/index.html.gz
vendored
BIN
dist/Printer3D/Marlin/index.html.gz
vendored
Binary file not shown.
BIN
dist/Printer3D/Repetier/index.html.gz
vendored
BIN
dist/Printer3D/Repetier/index.html.gz
vendored
Binary file not shown.
BIN
dist/Printer3D/Smoothieware/index.html.gz
vendored
BIN
dist/Printer3D/Smoothieware/index.html.gz
vendored
Binary file not shown.
BIN
dist/SandTable/GRBL/index.html.gz
vendored
BIN
dist/SandTable/GRBL/index.html.gz
vendored
Binary file not shown.
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
import { h } from "preact"
|
||||
import { webUIbuild } from "../../targets"
|
||||
export const webUIversion = "3.0.0-2b1"
|
||||
export const webUIversion = "3.0.0-3b1"
|
||||
export const Esp3dVersion = () => (
|
||||
<span>
|
||||
{webUIversion}.{webUIbuild}
|
||||
|
||||
@@ -100,7 +100,7 @@ const ExtraContentItem = ({
|
||||
}
|
||||
|
||||
if (isPaused || !visibilityState[id] || (target=="panel" && !useUiContextFn.panels.isVisible(elementsCache.getRootfromId(id)))) {
|
||||
// console.log("Not loading content for " + id + " because it is paused or not visible")
|
||||
//console.log("Not loading content for " + id + " because it is paused or not visible")
|
||||
return
|
||||
}
|
||||
//console.log("Loading content for " + id)
|
||||
@@ -110,7 +110,8 @@ const ExtraContentItem = ({
|
||||
setIsLoading(false)
|
||||
isLoadedState[id] = true
|
||||
} else {
|
||||
if (isLoadedState[id]){
|
||||
if (isLoadedState[id] && !refreshIntervalRef.current){
|
||||
//console.log("Already loaded")
|
||||
return
|
||||
}
|
||||
setIsLoading(true)
|
||||
@@ -192,15 +193,15 @@ const ExtraContentItem = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (refreshtime > 0 && (type === "camera" || type === "image") && visibilityState[id] && !isPaused) {
|
||||
console.log("Updating refresh interval for " + id)
|
||||
//console.log("Updating refresh interval for " + id)
|
||||
if (!refreshIntervalRef.current){
|
||||
console.log("Starting refresh interval for " + id+ " with refreshtime " + refreshtime)
|
||||
//console.log("Starting refresh interval for " + id+ " with refreshtime " + refreshtime)
|
||||
refreshIntervalRef.current = setInterval(loadContent, refreshtime)
|
||||
}
|
||||
}
|
||||
return () => {
|
||||
if (refreshIntervalRef.current) {
|
||||
console.log("Stopping refresh interval for " + id)
|
||||
//console.log("Stopping refresh interval for " + id)
|
||||
clearInterval(refreshIntervalRef.current)
|
||||
refreshIntervalRef.current = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user