diff --git a/src/patchdl_websrv.c b/src/patchdl_websrv.c index c37beae..18b6855 100644 --- a/src/patchdl_websrv.c +++ b/src/patchdl_websrv.c @@ -6,6 +6,7 @@ #include "patchdl_net.h" #include "patchdl_resolve.h" #include "patchdl_verxml.h" +#include "patchdl_version.h" #include #include @@ -585,8 +586,9 @@ build_status_json(void) { "\"dns_guard\":\"Active\"," "\"resolver\":\"Internal allowlist\"," "\"free_space_mb\":%lld," - "\"download_dir\":\"/data/patchdl (internal)\"}", - g_fw.str, g_fw.bin, data_free_mb()); + "\"download_dir\":\"/data/patchdl (internal)\"," + "\"version\":\"%s\"}", + g_fw.str, g_fw.bin, data_free_mb(), PATCHDL_VERSION); return out; } diff --git a/web/app.js b/web/app.js index c60d975..40bc39e 100644 --- a/web/app.js +++ b/web/app.js @@ -127,6 +127,7 @@ function bindElements() { connPlus: document.getElementById("connPlus"), refreshBtn: document.getElementById("refreshBtn"), updateAllBtn: document.getElementById("updateAllBtn"), + brandVersion: document.getElementById("brandVersion"), saveBtn: document.getElementById("saveBtn"), clearLogBtn: document.getElementById("clearLogBtn"), toast: document.getElementById("toast"), @@ -240,6 +241,8 @@ function renderStatus() { els.downloadDirValue.textContent = state.status.download_dir || state.config.download_dir || "Download target"; if (els.railFw) els.railFw.textContent = `FW ${state.status.firmware || "--"}`; if (els.railSpace) els.railSpace.textContent = `${space} free`; + if (els.brandVersion) + els.brandVersion.textContent = state.status.version ? `v${state.status.version}` : "v--"; } const CONN_MIN = 1, CONN_MAX = 16; diff --git a/web/index.html b/web/index.html index d4f864a..b9c0926 100644 --- a/web/index.html +++ b/web/index.html @@ -39,7 +39,7 @@
PD
PatchDL - by Knutwurst · v0.0.3 + by Knutwurst · --