fix(web): 下载模块上移; 修复按钮遮挡版本文字与 APK 为空
Android Build & Publish / build-android (push) Failing after 6s
Docker Build and Push / build-image (push) Successful in 2m9s

- 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/为空
This commit is contained in:
jif2.zhang
2026-09-14 10:05:11 +08:00
parent b2db988834
commit fc279c20ff
2 changed files with 13 additions and 7 deletions
+8 -2
View File
@@ -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")
+5 -5
View File
@@ -30,7 +30,7 @@ function DownloadSection() {
<a className="btn btn-primary" href={APK_URL} download="wardrobe.apk" style={styles.downloadBtn}>
⬇️ 下载 APK
</a>
<p style={{ fontSize: 12, color: "var(--text-tertiary)", marginTop: 10 }}>
<p style={{ fontSize: 12, color: "var(--text-tertiary)", marginTop: 0, lineHeight: 1.6 }}>
版本 {APP_VERSION} · Android 8.0+ · 约 30 MB
</p>
<div style={{ marginTop: 20 }}>
@@ -105,6 +105,8 @@ export default function Landing() {
</div>
</section>
<DownloadSection />
<section style={styles.section}>
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))", gap: 16 }}>
{FEATURES.map((f) => (
@@ -128,8 +130,6 @@ export default function Landing() {
</div>
</section>
<DownloadSection />
<section style={styles.section}>
<h2 style={styles.sectionTitle}>技术栈</h2>
<p style={styles.sectionSub}>跨平台桌面 + 移动端, AI 就绪。</p>
@@ -166,7 +166,7 @@ const styles: Record<string, React.CSSProperties> = {
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<string, React.CSSProperties> = {
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,