diff --git a/website/src/i18n.tsx b/website/src/i18n.tsx index e61029f..6d0712e 100644 --- a/website/src/i18n.tsx +++ b/website/src/i18n.tsx @@ -241,9 +241,9 @@ const zh = { githubBtn: "GitHub 下载", mirrorBtn: "镜像下载", items: [ - { id: "windows", name: "Windows", ready: true, note: ".msi 与 .exe 安装包,系统托盘常驻" }, - { id: "macos", name: "macOS", ready: false, note: "GitHub Actions 已能构建 .dmg,待官方适配" }, - { id: "linux", name: "Linux", ready: false, note: ".AppImage / .deb / .rpm 构建中" }, + { id: "windows", name: "Windows", ready: true, note: ".msi 安装包,系统托盘常驻" }, + { id: "macos", name: "macOS", ready: true, note: ".dmg 安装包(Apple Silicon),未签名需右键打开" }, + { id: "linux", name: "Linux", ready: true, note: ".deb / .AppImage / .rpm 三格式" }, ], }, cta: { @@ -505,9 +505,9 @@ const en: Dict = { githubBtn: "Download from GitHub", mirrorBtn: "China mirror", items: [ - { id: "windows", name: "Windows", ready: true, note: ".msi and .exe installers, lives in the system tray" }, - { id: "macos", name: "macOS", ready: false, note: "GitHub Actions already builds .dmg, official support pending" }, - { id: "linux", name: "Linux", ready: false, note: ".AppImage / .deb / .rpm builds in progress" }, + { id: "windows", name: "Windows", ready: true, note: ".msi installer, lives in the system tray" }, + { id: "macos", name: "macOS", ready: true, note: ".dmg installer (Apple Silicon), unsigned - right-click to open" }, + { id: "linux", name: "Linux", ready: true, note: ".deb / .AppImage / .rpm" }, ], }, cta: { diff --git a/website/src/sections/Download.tsx b/website/src/sections/Download.tsx index 820faae..0f7f63a 100644 --- a/website/src/sections/Download.tsx +++ b/website/src/sections/Download.tsx @@ -8,8 +8,27 @@ const icons: Record = { linux: LinuxLogo, }; -const GITHUB_RELEASES = "https://github.com/billowliu2/KimiSwitch/releases"; +const VERSION = "0.6.8"; +const GITHUB = "https://github.com/billowliu2/KimiSwitch"; const MIRROR_RELEASES = "https://git.codingplan.site/admin/KimiCodeSwitch/releases"; +const dl = (file: string) => `${GITHUB}/releases/download/v${VERSION}/${file}`; + +/** Per-platform download assets for the current release (names match the CI + * release workflow, e.g. Kimi.Switch_0.6.8_x64_en-US.msi). */ +const assets: Record = { + windows: [ + { label: "MSI", href: dl("Kimi.Switch_0.6.8_x64_en-US.msi") }, + { label: "镜像", href: MIRROR_RELEASES }, + ], + macos: [ + { label: "Apple Silicon (.dmg)", href: dl("Kimi.Switch_0.6.8_aarch64.dmg") }, + ], + linux: [ + { label: ".deb", href: dl("Kimi.Switch_0.6.8_amd64.deb") }, + { label: ".AppImage", href: dl("Kimi.Switch_0.6.8_amd64.AppImage") }, + { label: ".rpm", href: dl("Kimi.Switch-0.6.8-1.x86_64.rpm") }, + ], +}; export default function Download() { const { t } = useLang(); @@ -22,44 +41,32 @@ export default function Download() {
{t.download.items.map((p) => { const Icon = icons[p.id] ?? WindowsLogo; + const links = assets[p.id] ?? []; return (
- - {p.ready ? t.download.ready : t.download.wip} + + {t.download.ready}

{p.name}

{p.note}

- {p.ready && ( -
+ - )} + ))} +
); })}