1.3.3 + add easy way to tell the version

This commit is contained in:
KingKDot
2026-03-12 12:05:42 -05:00
parent ec72148160
commit 42cc7e29c7
10 changed files with 75 additions and 7 deletions
+30
View File
@@ -36,12 +36,41 @@ const bulkScreenshotBtn = document.getElementById("bulk-screenshot");
const bulkDisconnectBtn = document.getElementById("bulk-disconnect");
const bulkUninstallBtn = document.getElementById("bulk-uninstall");
const bulkClearBtn = document.getElementById("bulk-clear");
const serverVersionText = document.getElementById("server-version-text");
const selectedClients = new Set();
let lastNonOnlineStatus = "all";
let currentUser = null;
let contextCard = null;
let availableOsList = new Set();
function setServerVersionLabel(version) {
if (!serverVersionText) return;
serverVersionText.textContent = "Server version: ";
const value = document.createElement("span");
value.className = "server-version-number";
value.textContent = version;
serverVersionText.appendChild(value);
}
async function loadServerVersion() {
if (!serverVersionText) return;
try {
const res = await fetch("/api/version", { credentials: "include" });
if (!res.ok) {
serverVersionText.textContent = "Server version: unavailable";
return;
}
const payload = await res.json();
const version = typeof payload?.version === "string" && payload.version.trim()
? payload.version.trim()
: "unknown";
setServerVersionLabel(version);
} catch {
serverVersionText.textContent = "Server version: unavailable";
}
}
const setContext = (id) => {
contextCard = id;
};
@@ -108,6 +137,7 @@ function applyMenuSupportRules(clientId) {
}
async function loadCurrentUser() {
loadServerVersion();
try {
const res = await fetch("/api/auth/me");
if (res.ok) {