Compare commits

...

4 Commits

Author SHA1 Message Date
wangjia 2a7eec02fb Merge pull request 'feat(web/client): iOS 下载/更新指向 TestFlight 公测链接' (#17) from worktree-fix-sysext-network-ent into main
Deploy Site / deploy-site (push) Failing after 11m29s
Reviewed-on: #17
2026-09-12 00:37:44 +00:00
wangjia a392d18a6a feat(web): iOS/iPad 下载卡合一 + 双按钮 + 正式版「?」气泡提示
- 三张 iOS/iPad 卡合成一张:测试版(TestFlight,实心可点)+ 正式版(App Store,描边禁用)双按钮。
- 「?」移入正式版按钮内,自定义 tooltip 气泡(走设计 token,上浮淡入+小箭头)替代原生 title,
  悬浮/聚焦显示「美区即将上线 · 需美区 Apple ID」;光标不再变问号。
- 新增 i18n 文案 dl.us_soon(6 语)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-11 16:33:16 +08:00
wangjia a913fe56fb feat(web): 下载区补 iPad + iOS 分测试版/正式版 + 需美区ID提示
按需求调整官网下载卡片:
- 补 iPad 卡片(tablet 图标,universal app→同 TestFlight 公测链接)。
- iOS/iPad 明确分「测试版」(TestFlight,可点)与「正式版」(App Store,
  敬请期待占位)——加 badge 标注(dl.beta/dl.stable i18n,6 语言)。
- 测试版卡加「?」悬浮提示「需美区 Apple ID」(dl.us_id i18n)。
- badge/「?」样式全走设计 token(--accent-subtle/--accent/--bg-subtle/
  --fg3),不硬编码颜色。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-11 09:02:43 +08:00
wangjia 18fb5177be feat(web/client): iOS 下载/更新指向 TestFlight 公测链接
公测公开链接 https://testflight.apple.com/join/6HFfw8Jc。
- 官网 Download:site.ts 加 downloads.ios + Download.astro iOS 按钮启用
  (原为禁用占位),点击直跳 TestFlight;ver 顺带改 iOS 15+(对齐最低版本)。
- 客户端自更新:清单模板 deploy/single-node/version.yaml 的
  download_urls.ios 从空填成 TF 链接 → 客户端「有更新」按钮直跳 TestFlight。
- pangolin1 现行 /etc/pangolin/version.yaml 已同步改(/version 已反映),
  现有用户即时生效。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-11 08:55:49 +08:00
4 changed files with 96 additions and 8 deletions
+2 -2
View File
@@ -10,7 +10,7 @@
# download_urls 目前是固定「仅保留最新一份」的稳定 URL(deploy-client.sh 每次
# 用同名文件覆盖),不是按版本变化的路径,因此这里不需要随发版改写。
# macos 自 client-v1.0.59 起由 build-macos 产出 pangolin-macos-x64.zip 并部署到
# /downloads,故填稳定直链;ios 走 TestFlight(无直接下载文件),保持留空
# /downloads,故填稳定直链;ios 走 TestFlight(无直接下载文件),填公测公开链接,客户端「有更新」按钮直接跳 TestFlight
version: "1.0.48"
build_number: 10048
force_update: false
@@ -19,5 +19,5 @@ download_urls:
android: "https://api.yanmeiai.com/downloads/pangolin-android.apk"
windows: "https://api.yanmeiai.com/downloads/pangolin-windows-x64-setup.exe"
macos: "https://api.yanmeiai.com/downloads/pangolin-macos-x64.zip"
ios: ""
ios: "https://testflight.apple.com/join/6HFfw8Jc"
changelog: []
+88 -6
View File
@@ -6,10 +6,18 @@ import { SITE } from '../config/site';
interface Props { t: T }
const { t } = Astro.props;
// href 缺省 = 本轮未接入下载iOS 走 TestFlight / Linux),按钮渲染为禁用态占位。
// Android + Windows + macOS 已由客户端 CI 产出真实产物并部署到 /downloads。
const plats: { icon: string; name: string; ver: string; href?: string }[] = [
{ icon: 'smartphone', name: 'iOS', ver: 'iOS 16+' },
// href 缺省 = 未接入下载 → 禁用「敬请期待」占位。
// iOS/iPad 合成一张卡、两个按钮:「测试版」(TestFlight 公开链接) 现已可装,
// 「正式版」(App Store) 禁用,按钮内带「?」——悬浮提示「美区即将上线,需美区 Apple ID」。
type Action = { label: string; href?: string; hint?: string };
const plats: { icon: string; name: string; ver: string; href?: string; badge?: string; note?: string; actions?: Action[] }[] = [
{
icon: 'smartphone', name: 'iOS / iPad', ver: 'iOS / iPadOS 15+',
actions: [
{ label: t('dl.beta'), href: SITE.downloads.ios },
{ label: t('dl.stable'), hint: `${t('dl.us_soon')} · ${t('dl.us_id')}` },
],
},
{ icon: 'smartphone', name: 'Android', ver: 'Android 9+', href: SITE.downloads.android },
{ icon: 'laptop', name: 'macOS', ver: 'macOS 12+', href: SITE.downloads.macos },
{ icon: 'monitor', name: 'Windows', ver: 'Win 10/11', href: SITE.downloads.windows },
@@ -27,9 +35,30 @@ const plats: { icon: string; name: string; ver: string; href?: string }[] = [
{plats.map((p) => (
<div class="dl">
<div class="ico"><Icon name={p.icon} /></div>
<div class="pn">{p.name}</div>
<div class="pn">
<span>{p.name}</span>
{p.badge && <span class="badge">{p.badge}</span>}
{p.note && <span class="q" title={p.note} tabindex="0" aria-label={p.note}>?</span>}
</div>
<div class="pv">{p.ver}</div>
{p.href ? (
{p.actions ? (
<div class="btns">
{p.actions.map((a) => (
a.href ? (
<a class="b2 beta" href={a.href}><span>{a.label}</span></a>
) : (
<span class="b2 disabled" aria-disabled="true">
<span>{a.label}</span>
{a.hint && (
<span class="q" tabindex="0" aria-label={a.hint}>
?<span class="tip" role="tooltip">{a.hint}</span>
</span>
)}
</span>
)
))}
</div>
) : p.href ? (
<a class="gb" href={p.href}><Icon name="download" /><span>{t('dl.get')}</span></a>
) : (
<span class="gb disabled" aria-disabled="true"><Icon name="download" /><span>{t('dl.soon')}</span></span>
@@ -39,3 +68,56 @@ const plats: { icon: string; name: string; ver: string; href?: string }[] = [
</div>
</div>
</section>
<style>
/* iOS/iPad 测试版徽标 + 「?需美区 Apple ID」提示;颜色全走设计 token,不硬编码。 */
.dl .pn { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; flex-wrap: wrap; }
.dl .badge {
font-size: 11px; font-weight: 700; line-height: 1;
padding: .22em .5em; border-radius: 999px;
background: var(--accent-subtle); color: var(--accent);
font-family: var(--font-mono); letter-spacing: .02em;
}
.dl .q {
position: relative;
display: inline-flex; align-items: center; justify-content: center;
width: 16px; height: 16px; border-radius: 50%;
font-size: 11px; font-weight: 700; cursor: default;
background: var(--bg-subtle); color: var(--fg3);
}
/* 自定义提示气泡:走设计 token,悬浮/聚焦「?」时上浮显示,带小箭头。 */
.dl .q .tip {
position: absolute; bottom: calc(100% + 9px); left: 50%;
transform: translateX(-50%) translateY(4px);
width: max-content; max-width: 210px; white-space: normal;
padding: 8px 11px; border-radius: var(--radius-md, 10px);
background: var(--fg1); color: var(--bg);
font-family: var(--font-sans); font-size: 12px; font-weight: 500;
line-height: 1.45; text-align: center; letter-spacing: 0;
box-shadow: var(--shadow-md, 0 6px 20px rgba(45,30,20,.18));
opacity: 0; visibility: hidden; pointer-events: none; z-index: 20;
transition: opacity var(--dur-base, .18s) var(--ease-out, ease),
transform var(--dur-base, .18s) var(--ease-out, ease),
visibility var(--dur-base, .18s);
}
.dl .q .tip::after {
content: ""; position: absolute; top: 100%; left: 50%;
transform: translateX(-50%);
border: 5px solid transparent; border-top-color: var(--fg1);
}
.dl .q:hover .tip, .dl .q:focus-visible .tip {
opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
/* iOS/iPad 单卡双按钮:测试版(实心 accent 可点)+ 正式版(描边禁用,内含「?」悬浮提示)。 */
.dl .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 2px; }
.dl .b2 {
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
padding: 8px 15px; border-radius: 999px; line-height: 1.15;
font-size: 13px; font-weight: 600; text-decoration: none;
border: 1px solid var(--accent); color: var(--accent);
}
.dl .b2.beta { background: var(--accent); color: var(--fg-on-accent); border-color: var(--accent); }
/* 禁用态:不导航(本就是 span)+ 默认光标,但不禁用指针事件——否则内含「?」的 title 悬浮失效。 */
.dl .b2.disabled { border-color: var(--border); color: var(--fg3); cursor: default; }
.dl .b2 .q { background: transparent; border: 1px solid var(--border); }
</style>
+2
View File
@@ -41,5 +41,7 @@ export const SITE = {
android: 'https://api.yanmeiai.com/downloads/pangolin-android.apk',
windows: 'https://api.yanmeiai.com/downloads/pangolin-windows-x64-setup.exe',
macos: 'https://api.yanmeiai.com/downloads/pangolin-macos-x64.zip',
// iOS 无直接下载文件 → TestFlight 公测公开链接(点按钮直接跳 TestFlight 安装/更新)。
ios: 'https://testflight.apple.com/join/6HFfw8Jc',
},
} as const;
+4
View File
@@ -137,6 +137,10 @@ export const STRINGS: Record<string, Record<Lang, string>> = {
'dl.sub': { zh: '一个账户,所有设备同步。下载即用,无需配置。', en: 'One account syncs every device. Download and go.', ja: '一つのアカウントで全デバイスを同期。ダウンロードしてすぐ使えます。', ko: '하나의 계정으로 모든 기기를 동기화. 내려받아 바로 사용.', ru: 'Один аккаунт синхронизирует все устройства. Скачал — и в путь.', es: 'Una cuenta sincroniza todos tus dispositivos. Descarga y listo.' },
'dl.get': { zh: '下载', en: 'Download', ja: 'ダウンロード', ko: '다운로드', ru: 'Скачать', es: 'Descargar' },
'dl.soon': { zh: '敬请期待', en: 'Coming soon', ja: '近日公開', ko: '출시 예정', ru: 'Скоро', es: 'Próximamente' },
'dl.beta': { zh: '测试版', en: 'Beta', ja: 'ベータ版', ko: '베타', ru: 'Бета', es: 'Beta' },
'dl.stable': { zh: '正式版', en: 'Stable', ja: '正式版', ko: '정식판', ru: 'Релиз', es: 'Estable' },
'dl.us_id': { zh: '需美区 Apple ID', en: 'Requires a US Apple ID', ja: '米国 Apple ID が必要', ko: '미국 Apple ID 필요', ru: 'Нужен Apple ID (США)', es: 'Requiere un Apple ID de EE. UU.' },
'dl.us_soon': { zh: '美区即将上线', en: 'Coming to US App Store', ja: '米国 App Store で近日公開', ko: '미국 App Store 출시 예정', ru: 'Скоро в App Store (США)', es: 'Pronto en App Store (EE. UU.)' },
'docs.eyebrow': { zh: '文档', en: 'Docs', ja: 'ドキュメント', ko: '문서', ru: 'Документация', es: 'Documentación' },
'docs.h': { zh: '需要帮助?都在这里', en: 'Need help? Its all here', ja: 'お困りですか?すべてここに', ko: '도움이 필요하세요? 모두 여기에', ru: 'Нужна помощь? Всё здесь', es: '¿Necesitas ayuda? Todo está aquí' },