diff --git a/landing/src/app/download/[platform]/route.ts b/landing/src/app/download/[platform]/route.ts index 6c007c17..46140ce8 100644 --- a/landing/src/app/download/[platform]/route.ts +++ b/landing/src/app/download/[platform]/route.ts @@ -11,7 +11,6 @@ const PLATFORM_ALIAS: Record = { 'mac-arm': 'macArm', 'mac-intel': 'macIntel', windows: 'windows', - linux: 'linux', }; export async function GET( @@ -19,6 +18,10 @@ export async function GET( { params }: { params: Promise<{ platform: string }> }, ) { const { platform } = await params; + // No prebuilt Linux binary yet — send straight to the build-from-source page. + if (platform === 'linux') { + return NextResponse.redirect(new URL('/linux-install', request.url), 307); + } const normalized = PLATFORM_ALIAS[platform]; const target = new URL('/download', request.url); if (normalized) target.searchParams.set('platform', normalized); diff --git a/landing/src/app/download/page.tsx b/landing/src/app/download/page.tsx index 087b9d4d..d7f0a8f7 100644 --- a/landing/src/app/download/page.tsx +++ b/landing/src/app/download/page.tsx @@ -29,7 +29,7 @@ const PLATFORMS: PlatformMeta[] = [ { key: 'macArm', label: 'macOS', description: 'Apple Silicon', icon: AppleIcon }, { key: 'macIntel', label: 'macOS', description: 'Intel (x64)', icon: AppleIcon }, { key: 'windows', label: 'Windows', description: '64-bit (MSI)', icon: WindowsIcon }, - { key: 'linux', label: 'Linux', description: 'AppImage', icon: LinuxIcon }, + { key: 'linux', label: 'Linux', description: 'Build from source', icon: LinuxIcon }, ]; function detectPlatform(): Platform | null { @@ -67,7 +67,15 @@ export default function DownloadPage() { useEffect(() => { const fromQuery = parseQueryPlatform(window.location.search); - setPlatform(fromQuery ?? detectPlatform()); + const resolved = fromQuery ?? detectPlatform(); + // No prebuilt Linux binary yet — send Linux users to the build-from-source + // instructions instead of sitting on /download trying to trigger a + // download that doesn't exist. + if (resolved === 'linux') { + window.location.replace('/linux-install'); + return; + } + setPlatform(resolved); }, []); useEffect(() => { @@ -179,22 +187,24 @@ export default function DownloadPage() {
{PLATFORMS.map((meta) => { - const url = links?.[meta.key]; + const isLinux = meta.key === 'linux'; + const url = isLinux ? '/linux-install' : links?.[meta.key]; const isActive = meta.key === platform; + const disabled = !isLinux && !url; return ( { - if (!url) e.preventDefault(); + if (disabled) e.preventDefault(); }} className={`flex items-center rounded-xl border px-5 py-4 transition-all group ${ isActive ? 'border-accent/40 bg-accent/5 hover:border-accent/60' : 'border-border bg-card/40 hover:border-accent/30 hover:bg-card' - } ${!url ? 'opacity-50 cursor-not-allowed' : ''}`} + } ${disabled ? 'opacity-50 cursor-not-allowed' : ''}`} >