diff --git a/src/data/pricing.ts b/src/data/pricing.ts index 7820463..45a21f8 100644 --- a/src/data/pricing.ts +++ b/src/data/pricing.ts @@ -154,3 +154,21 @@ export const FREE_FEATURES: readonly string[] = [ 'Managing groups', 'Find My', ] as const; + +/** macOS releases the Swift server runs on. + * + * Names and numbers come from the server's own `docs/MACOS_COMPATIBILITY.md`. + * The floor is 14: `Package.swift` declares `.macOS(.v14)`, so there is nothing + * below it to offer. Note the numbering jumps 15 -> 26; Apple moved to + * year-based versions, and 16 through 25 do not exist. + */ +export interface MacOSRelease { + version: number; + name: string; +} + +export const MACOS_RELEASES: readonly MacOSRelease[] = [ + { version: 14, name: 'Sonoma' }, + { version: 15, name: 'Sequoia' }, + { version: 26, name: 'Tahoe' }, +] as const; diff --git a/src/pages/pricing/index.astro b/src/pages/pricing/index.astro index 36ac8ed..b012b0e 100644 --- a/src/pages/pricing/index.astro +++ b/src/pages/pricing/index.astro @@ -16,8 +16,13 @@ */ import BaseLayout from '@layouts/BaseLayout.astro'; import PageHeader from '@components/PageHeader.astro'; -import { PLANS, PRO_FEATURES, FREE_FEATURES } from '@data/pricing'; +import { PLANS, PRO_FEATURES, FREE_FEATURES, MACOS_RELEASES } from '@data/pricing'; import { LINKS } from '@data/site'; + +// Default the picker to the newest release, so the list opens on the full +// feature set. Derived from the data rather than hardcoded, so adding macOS 27 +// to MACOS_RELEASES moves the default automatically. +const newestMacOS = MACOS_RELEASES.reduce((a, b) => (b.version > a.version ? b : a)); --- +
+ + {/* + appearance-none plus our own chevron. The native arrow sits inside the + right padding, and on a rounded-full pill the 18.5px corner radius + curves in over it, so it reads as crammed against the edge. Drawing it + ourselves also makes it match the FAQ accordion's chevron and follow + the theme, which the native control does not. + */} +
+ + +
+

+ {PRO_FEATURES.filter((f) => f.macos <= newestMacOS.version).length} of { + PRO_FEATURES.length + } Pro features run on {newestMacOS.name} ({newestMacOS.version}). +

+
+