diff --git a/site/e2e/text.spec.ts b/site/e2e/text.spec.ts index 17cd21a..3dbbfd8 100644 --- a/site/e2e/text.spec.ts +++ b/site/e2e/text.spec.ts @@ -3,7 +3,7 @@ import { TEXT, type Key, type Lang } from "../src/text.ts"; const REPO = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice"; const APPS = ["ElyDoc", "ElyTable", "ElyShow", "ElyPDF", "ElyTree", "ElyMark"]; -const RELEASES = `${REPO}/releases/latest`; +const RELEASES = `${REPO}/releases/tag/v0.1.3`; test.use({ reducedMotion: "reduce" }); @@ -84,8 +84,9 @@ test.describe("English locale", () => { for (const i of APPS.keys()) await expect(page.locator(".tour .get").nth(i)).toHaveAttribute("href", RELEASES); await expect(page.locator("#download a")).toHaveCount(1); await expect(page.locator("#download [data-t=get]")).toHaveAttribute("href", RELEASES); - await expect(page.locator(".hero > a")).toHaveText("Source"); - await expect(page.locator(".hero > a")).toHaveAttribute("href", REPO); + await expect(page.locator(".hero .links a").last()).toHaveText("Source"); + await expect(page.locator(".hero .links a").last()).toHaveAttribute("href", REPO); + await expect(page.locator(".hero [data-t=get]")).toHaveAttribute("href", RELEASES); const files = await page.locator("a[href]").evaluateAll((as) => as.map((a) => (a as HTMLAnchorElement).href).filter((h) => /\.(dmg|tar\.gz|zip|exe|AppImage)$/.test(h)), ); diff --git a/site/src/main.ts b/site/src/main.ts index b02dd87..b20d2ae 100644 --- a/site/src/main.ts +++ b/site/src/main.ts @@ -21,7 +21,12 @@ title.textContent = "Ely Office"; const source = document.createElement("a"); source.href = REPO; source.textContent = "Source"; -hero.append(title, said("p", "tagline"), said("p", "platforms"), source); +const download = said("a", "get"); +download.href = RELEASES; +const links = document.createElement("div"); +links.className = "links"; +links.append(download, source); +hero.append(title, said("p", "tagline"), said("p", "platforms"), links); const { section, host, svg } = tour(hero); rhythm(host, svg); diff --git a/site/src/release.ts b/site/src/release.ts index d991c01..4babcb5 100644 --- a/site/src/release.ts +++ b/site/src/release.ts @@ -1,3 +1,3 @@ -// The published release; downloads live on its release page. +// This version's release page holds every download. export const VERSION = "0.1.3"; -export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/latest"; +export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/tag/v0.1.3"; diff --git a/site/src/style.css b/site/src/style.css index c4f0114..c4ec1c7 100644 --- a/site/src/style.css +++ b/site/src/style.css @@ -60,6 +60,11 @@ button:focus-visible { font-size: 1.0625rem; } +.hero .links { + display: flex; + gap: 1.5rem; +} + .stage { display: block; max-width: 100%; diff --git a/site/src/text.ts b/site/src/text.ts index 3635254..565c69c 100644 --- a/site/src/text.ts +++ b/site/src/text.ts @@ -13,7 +13,7 @@ const en = { open: "Open source, under the AGPL.", local: "Your files stay in your folders.", download: "Download", - platforms: "Out now for macOS. Windows and Linux are coming soon.", + platforms: "Out now for macOS, Windows and Linux.", needs: "macOS 14 or later, Apple silicon.", unsigned: "Not notarized. If macOS blocks the app, open System Settings › Privacy & Security and click Open Anyway.", get: "Download", @@ -49,7 +49,7 @@ const zh: typeof en = { open: "开源,AGPL 许可。", local: "文件留在你自己的文件夹里。", download: "下载", - platforms: "macOS 版已发布。Windows 与 Linux 版即将推出。", + platforms: "macOS、Windows 与 Linux 版已发布。", needs: "macOS 14 或更新,Apple 芯片。", unsigned: "未经公证。macOS 拦下应用时,打开“系统设置 › 隐私与安全性”,点“仍要打开”。", get: "前往下载",