diff --git a/backend/routes/admin.py b/backend/routes/admin.py index facd4d2..141b82d 100644 --- a/backend/routes/admin.py +++ b/backend/routes/admin.py @@ -569,6 +569,18 @@ async def system_info(user=Depends(require_admin)): except (OSError, AttributeError): pass + # SW-Cache-Version aus sw.js lesen + sw_version = "?" + try: + import re as _re + static_dir = os.getenv("STATIC_DIR", "/app/static") + sw_content = open(os.path.join(static_dir, "sw.js")).readline() + m = _re.search(r"'(by-v\d+)'", sw_content) + if m: + sw_version = m.group(1) + except Exception: + pass + return { "db_size_mb": round(db_size_mb, 2), "media_size_mb": round(media_size_mb, 2), @@ -576,6 +588,7 @@ async def system_info(user=Depends(require_admin)): "python_version": sys.version.split()[0], "disk_total_gb": round(disk_total_gb, 2), "disk_free_gb": round(disk_free_gb, 2), + "sw_version": sw_version, } diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 187591e..d053796 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '417'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '418'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/admin.js b/backend/static/js/pages/admin.js index 3d74055..a9c68c5 100644 --- a/backend/static/js/pages/admin.js +++ b/backend/static/js/pages/admin.js @@ -1064,8 +1064,11 @@ window.Page_admin = (() => { ${diskPct}% · ${diskUsedGb.toFixed(1)} / ${s.disk_total_gb.toFixed(1)} GB -