diff --git a/Dockerfile b/Dockerfile index 1400d2e..42568e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,14 @@ FROM python:3.11-slim WORKDIR /app COPY 05_scripts/requirements.txt . +RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir -r requirements.txt COPY 05_scripts/kobrax_moonraker_bridge.py . COPY 05_scripts/env_loader.py . COPY 05_scripts/kobrax_client.py . +COPY 05_scripts/anycubic_slicer.crt . +COPY 05_scripts/anycubic_slicer.key . EXPOSE 7125 diff --git a/VERSION b/VERSION index 9980174..16be39a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.1-beta7 +0.9.1-beta8 diff --git a/kobrax_moonraker_bridge.py b/kobrax_moonraker_bridge.py index 17c6cb1..60591e9 100644 --- a/kobrax_moonraker_bridge.py +++ b/kobrax_moonraker_bridge.py @@ -80,6 +80,7 @@ class KobraXBridge: "filename": "", "progress": 0.0, "print_duration": 0, + "remain_time": 0, "curr_layer": 0, "total_layers": 0, "printer_name": "Anycubic Kobra X", @@ -133,6 +134,8 @@ class KobraXBridge: self._state["progress"] = float(d["progress"]) / 100.0 if "print_time" in d: self._state["print_duration"] = int(d["print_time"]) * 60 + if "remain_time" in d: + self._state["remain_time"] = int(d["remain_time"]) * 60 if "curr_layer" in d: self._state["curr_layer"] = d["curr_layer"] if "total_layers" in d: @@ -249,6 +252,7 @@ class KobraXBridge: "filename": s["filename"], "print_duration": s["print_duration"], "total_duration": s["print_duration"], + "remain_time": s["remain_time"], "info": { "current_layer": s["curr_layer"], "total_layer": s["total_layers"], @@ -593,6 +597,12 @@ header{background:var(--card);border-bottom:1px solid var(--border); .theme-btn{background:none;border:1px solid var(--border);color:var(--txt2); border-radius:8px;padding:6px 10px;cursor:pointer;font-size:13px;transition:.15s} .theme-btn:hover{border-color:var(--accent);color:var(--accent)} +.conn-btn{border-radius:8px;padding:6px 12px;cursor:pointer;font-size:13px; + font-weight:600;border:none;transition:.15s} +.conn-btn.disconnected{background:var(--accent);color:#fff} +.conn-btn.disconnected:hover{opacity:.85} +.conn-btn.connected{background:transparent;border:1px solid var(--border);color:var(--txt2)} +.conn-btn.connected:hover{border-color:#e05;color:#e05} /* ── LAYOUT ── */ .layout{display:flex;flex:1;min-height:0} @@ -837,6 +847,7 @@ nav.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0; + @@ -944,6 +955,7 @@ nav.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;