From fc279c20ffad2dc6089c8b0d897cd9c3b30f3ece Mon Sep 17 00:00:00 2001 From: "jif2.zhang" Date: Mon, 14 Sep 2026 10:05:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E4=B8=8B=E8=BD=BD=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=8A=E7=A7=BB;=20=E4=BF=AE=E5=A4=8D=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=81=AE=E6=8C=A1=E7=89=88=E6=9C=AC=E6=96=87=E5=AD=97?= =?UTF-8?q?=E4=B8=8E=20APK=20=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Landing: 下载模块移到 hero 之后 (特色/统计之前) - 按钮 display:inline-block + width:auto + margin-bottom, 不再全宽压住版本文字 - android-build.yml: 配置中心 key 改用后缀匹配 (r2/CF_API_TOKEN), 此前按精确名 CF_API_TOKEN 匹配导致 fetch 步骤报缺密钥 → android 构建从未跑, 桶里没有任何 widget/ 对象, APK 下载 404/为空 --- .gitea/workflows/android-build.yml | 10 ++++++++-- src/pages/Landing.tsx | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/android-build.yml b/.gitea/workflows/android-build.yml index f6bc391..e12467a 100644 --- a/.gitea/workflows/android-build.yml +++ b/.gitea/workflows/android-build.yml @@ -145,6 +145,10 @@ jobs: "CFG_PROJECT_R2": ("CF_API_TOKEN", "CF_R2_PUBLIC_URL"), } wanted = {} + # 兼容 key 带分组前缀 (如 CommonExternalService 下是 r2/CF_API_TOKEN) + def match(cfg_key, token): + return cfg_key == token or cfg_key.rsplit("/", 1)[-1] == token + for pid_env, keys in wanted_keys.items(): pid = os.environ[pid_env] req = urllib.request.Request(f"{url}/api/projects/{pid}/configs") @@ -153,8 +157,10 @@ jobs: with urllib.request.urlopen(req, timeout=20) as r: data = json.load(r).get("data", []) for cfg in data: - if cfg.get("key") in keys: - wanted[cfg["key"]] = cfg.get("value", "") + cfg_key = cfg.get("key", "") + for wanted_key in keys: + if match(cfg_key, wanted_key): + wanted[wanted_key] = cfg.get("value", "") with open(os.environ["GITHUB_ENV"], "a", encoding="utf-8") as f: for k, v in wanted.items(): f.write(f"{k}={v}\n") diff --git a/src/pages/Landing.tsx b/src/pages/Landing.tsx index 474f919..7846f60 100644 --- a/src/pages/Landing.tsx +++ b/src/pages/Landing.tsx @@ -30,7 +30,7 @@ function DownloadSection() { ⬇️ 下载 APK -

+

版本 {APP_VERSION} · Android 8.0+ · 约 30 MB

@@ -105,6 +105,8 @@ export default function Landing() {
+ +
{FEATURES.map((f) => ( @@ -128,8 +130,6 @@ export default function Landing() {
- -

技术栈

跨平台桌面 + 移动端, AI 就绪。

@@ -166,7 +166,7 @@ const styles: Record = { hero: { textAlign: "center", padding: "64px 0 48px" }, heroTitle: { fontSize: 40, fontWeight: 800, lineHeight: 1.3, letterSpacing: -0.5 }, heroSub: { fontSize: 16, color: "var(--text-secondary)", lineHeight: 1.8, maxWidth: 560, margin: "18px auto 0" }, - heroBtn: { padding: "12px 24px", fontSize: 15 }, + heroBtn: { display: "inline-block", width: "auto", padding: "12px 24px", fontSize: 15 }, section: { padding: "40px 0 12px" }, sectionTitle: { fontSize: 24, fontWeight: 700, textAlign: "center" }, sectionSub: { fontSize: 14, color: "var(--text-secondary)", textAlign: "center", margin: "8px 0 22px" }, @@ -181,7 +181,7 @@ const styles: Record = { maxWidth: 480, margin: "0 auto", }, - downloadBtn: { padding: "14px 32px", fontSize: 16 }, + downloadBtn: { display: "inline-block", width: "auto", marginBottom: 12, padding: "14px 32px", fontSize: 16 }, qrWrap: { display: "inline-flex", padding: 10,