fix: download cases
Build and Publish Container / Publish Linux container (push) Successful in 3m53s
Build and Publish Container / Publish Linux container (push) Successful in 3m53s
This commit is contained in:
@@ -106,6 +106,8 @@ function renderServiceState(data) {
|
||||
const label = element.querySelector("span:last-child");
|
||||
const total = Number(data.totals?.total_mods || 0);
|
||||
const ready = Number(data.totals?.ready_mods || 0);
|
||||
const skipped = Number(data.totals?.skipped_mods || 0);
|
||||
const resolved = ready + skipped;
|
||||
element.className = "service-state";
|
||||
|
||||
const progress = data.scheduler?.progress || {};
|
||||
@@ -127,7 +129,7 @@ function renderServiceState(data) {
|
||||
} else if (!data.steamcmd_available) {
|
||||
element.classList.add("failed");
|
||||
label.textContent = "Downloads unavailable";
|
||||
} else if (ready < total) {
|
||||
} else if (resolved < total) {
|
||||
element.classList.add("working");
|
||||
label.textContent = "Preparing RML";
|
||||
} else {
|
||||
@@ -164,6 +166,8 @@ function renderDashboard(data) {
|
||||
const totals = data.totals || {};
|
||||
const total = Number(totals.total_mods || 0);
|
||||
const ready = Number(totals.ready_mods || 0);
|
||||
const skipped = Number(totals.skipped_mods || 0);
|
||||
const resolved = ready + skipped;
|
||||
const counts = Object.fromEntries(
|
||||
(data.collections || []).map(collection => [String(collection.name).toLowerCase(), Number(collection.item_count || 0)])
|
||||
);
|
||||
@@ -183,13 +187,13 @@ function renderDashboard(data) {
|
||||
: (data.scheduler?.running ? "Updating now" : formatRelativeDate(updatedAt));
|
||||
$("#last-updated").title = formatDate(updatedAt);
|
||||
|
||||
state.rmlReady = total > 0 && ready === total && !data.scheduler?.running;
|
||||
state.rmlReady = total > 0 && resolved === total && !data.scheduler?.running;
|
||||
const nextRefresh = data.scheduler?.next_refresh_at;
|
||||
if (initialDownload) {
|
||||
const completed = Number(progress.completed_mods || 0).toLocaleString();
|
||||
const target = Number(progress.total_mods || 0).toLocaleString();
|
||||
$("#update-detail").textContent = progress.total_mods
|
||||
? `First-time download: ${completed} of ${target} mods. Hourly checks begin after it finishes.`
|
||||
? `First-time setup: ${completed} of ${target} entries resolved · ${ready.toLocaleString()} mods ready. Hourly checks begin after it finishes.`
|
||||
: "Preparing the first-time Workshop download. Hourly checks are paused.";
|
||||
} else if (data.scheduler?.running) {
|
||||
$("#update-detail").textContent = "The hourly Workshop refresh is currently running.";
|
||||
|
||||
Reference in New Issue
Block a user