From e6797dab22dabfbcafd9ab3cce947d5c842858f8 Mon Sep 17 00:00:00 2001 From: michaelliunsky <103762450+michaelliunsky@users.noreply.github.com> Date: Fri, 16 Oct 2026 18:34:03 +0800 Subject: [PATCH] fix(webui): drop the zero timestamp from the quota catalog line An unset catalog timestamp is the Go zero time; format it as a "not ready" placeholder instead of rendering 0001-01-01. --- webui/js/pages/model-quotas.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webui/js/pages/model-quotas.js b/webui/js/pages/model-quotas.js index 1f0b908..7f94fc2 100644 --- a/webui/js/pages/model-quotas.js +++ b/webui/js/pages/model-quotas.js @@ -78,7 +78,11 @@ function render() { const models = allModels.filter((model) => model.id.toLowerCase().includes(query)); $("#quota-model-count").textContent = `${models.length} / ${allModels.length}`; const catalog = data.catalog; - $("#quota-catalog-status").textContent = `${catalog?.stale ? "模型目录暂未更新,显示缓存 · " : ""}目录更新时间:${localTime(catalog?.updated_at)}`; + const catalogUpdated = + catalog?.updated_at && !catalog.updated_at.startsWith("0001-") + ? localTime(catalog.updated_at) + : "尚未就绪"; + $("#quota-catalog-status").textContent = `${catalog?.stale ? "模型目录暂未更新,显示缓存 · " : ""}目录更新时间:${catalogUpdated}`; const host = $("#quota-models"); host.replaceChildren(); for (const model of models) {