From d6fea0c6c2b9effba9e4b0f96c76f30e673f1311 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Thu, 27 Aug 2026 07:45:03 +0800 Subject: [PATCH] fix: simplify LoongArch download copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Linux download card now presents only the preview version, DEB format, size, and checksum. Preview index validation and fail-closed download behavior are unchanged. Release note: 官网龙芯下载信息现仅展示版本、包格式、大小与校验值。 --- sites/app.js | 6 ++---- sites/scripts/app.test.mjs | 12 ++++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sites/app.js b/sites/app.js index e62bffb1..4cc44a08 100644 --- a/sites/app.js +++ b/sites/app.js @@ -159,9 +159,7 @@ link.tabIndex = -1; link.classList.add("is-disabled"); setLinkText(link, "龙芯预览包暂不可用"); - meta.textContent = - "实验预览 · 仅 DEB · 索引尚未发布或校验失败;" + - "尚未完成真机验证。"; + meta.textContent = "实验预览 · 仅 DEB · 索引尚未发布或校验失败。"; }; const setLoongArchFormat = (formatSelect, selected) => { @@ -201,7 +199,7 @@ meta.textContent = `GoodBuddy ${verifiedLoongArchPreview.goodBuddyVersion} · ` + `${formatFileSize(verifiedLoongArchPreview.artifact.size)} · ` + - `实验预览 · 未完成龙芯真机验证 · SHA-256 ` + + `实验预览 · SHA-256 ` + `${verifiedLoongArchPreview.artifact.sha256.slice(0, 12)}…`; return; } diff --git a/sites/scripts/app.test.mjs b/sites/scripts/app.test.mjs index 6940241e..dbd169b7 100644 --- a/sites/scripts/app.test.mjs +++ b/sites/scripts/app.test.mjs @@ -275,9 +275,10 @@ test("enables only a validated LoongArch preview download", async () => { assert.equal(link.getAttribute("rel"), "noreferrer"); assert.equal(link.hasAttribute("aria-disabled"), false); assert.equal(link.classList.contains("is-disabled"), false); - assert.match(meta.textContent, /GoodBuddy 0\.11\.5/); - assert.match(meta.textContent, /178 MB/); - assert.match(meta.textContent, /未完成龙芯真机验证/); + assert.equal( + meta.textContent, + "GoodBuddy 0.11.5 · 178 MB · 实验预览 · SHA-256 aaaaaaaaaaaa…", + ); dom.window.close(); }); @@ -300,7 +301,10 @@ test("keeps the LoongArch preview disabled when its index is unavailable", async assert.equal(link.getAttribute("aria-disabled"), "true"); assert.equal(link.tabIndex, -1); assert.equal(link.classList.contains("is-disabled"), true); - assert.match(meta.textContent, /尚未发布或校验失败/); + assert.equal( + meta.textContent, + "实验预览 · 仅 DEB · 索引尚未发布或校验失败。", + ); arch.value = "x64"; arch.dispatchEvent(new window.Event("change"));