Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions website/app/download/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Metadata} from 'next';
import {OG_IMAGE} from '@/lib/site';
import Image from 'next/image';
import {Apple,Check,Download,Github,Laptop,Monitor,ShieldCheck,Terminal} from 'lucide-react';
import {Check,Download,Github,Laptop,Monitor,ShieldCheck,Terminal} from 'lucide-react';
import {Nav} from '@/components/Nav';
import {Footer} from '@/components/Footer';
import {checksums,installers,latestRelease,RELEASES_URL} from '@/lib/releases';
Expand All @@ -15,17 +15,24 @@ export const revalidate=300;
type Link={label:string;href?:string;size?:number};
const mb=(bytes?:number)=>bytes?` · ${(bytes/1048576).toFixed(0)} MB`:'';

/** The Apple mark (Simple Icons, CC0), drawn inline. */
const AppleMark=({size=20}:{size?:number})=><svg width={size} height={size} viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></svg>;

/** The four-square Windows mark, drawn inline. */
const WindowsMark=()=><svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M0 0h7.5v7.5H0zM8.5 0H16v7.5H8.5zM0 8.5h7.5V16H0zM8.5 8.5H16V16H8.5z"/></svg>;

function Platform({icon,name,detail,store,primary,others,requirements}:{icon:React.ReactNode;name:string;detail:string;store?:string;primary:Link;others:Link[];requirements:string[]}){
return <article className="download-card platform-card">
function Platform({icon,name,detail,store,mac,primary,others,requirements,tip}:{icon:React.ReactNode;name:string;detail:string;store?:string;mac?:{intel:Link};primary:Link;others:Link[];requirements:string[];tip?:React.ReactNode}){
return <article className={'download-card platform-card'+(mac?' mac-card':'')}>
{icon}<h2>{name}</h2><p>{detail}</p>
{store?<a className="primary store-button" href={store}><WindowsMark/><span><small>Get it from</small>Microsoft Store</span></a>
{mac?<div className="mac-buttons">
<a className="primary mac-button" href={primary.href||RELEASES_URL}><AppleMark size={24}/><span><small>Download for Mac</small>Apple silicon<em>M1 – M4{mb(primary.size)}</em></span></a>
<a className="mac-button intel" href={mac.intel.href||RELEASES_URL}><AppleMark size={18}/><span><small>Download for Mac</small>Intel processor<em>{mb(mac.intel.size).replace(' · ','')}</em></span></a>
</div>:store?<a className="primary store-button" href={store}><WindowsMark/><span><small>Get it from</small>Microsoft Store</span></a>
:<a className="primary" href={primary.href||RELEASES_URL}><Download/>{primary.href?primary.label+mb(primary.size):'See all downloads'}</a>}
{store&&<a className="alt-primary" href={primary.href||RELEASES_URL}><Download size={14}/>{primary.href?primary.label+mb(primary.size):'Direct download'}</a>}
<div className="alt-downloads">{others.filter(link=>link.href).map(link=><a key={link.label} href={link.href}>{link.label}{mb(link.size)}</a>)}</div>
<div className="requirements">{requirements.map(item=><span key={item}><Check/>{item}</span>)}</div>
{tip&&<p className="platform-tip">{tip}</p>}
</article>;
}

Expand All @@ -39,7 +46,8 @@ export default async function DownloadPage(){
<div className="page-head"><span>{release?`VERSION ${release.version}`:'PUBLIC PREVIEW'}</span><h1>Meet your new workspace.</h1><p>Veyra runs natively on Windows, macOS and Linux, and keeps itself up to date automatically.</p>{downloads>=SHOW_INSTALLS_FROM&&<p className="download-count"><Download size={14} aria-hidden="true"/>{compact(downloads)} downloads of Veyra Studio</p>}</div>
<div className="download-grid platforms">
<Platform icon={<Monitor className="platform"/>} name="Windows" detail="Windows 10 and 11 · 64-bit" store={MS_STORE_URL} primary={{label:'Download installer (.exe)',...asset(files.windows)}} others={[{label:'MSI package',...asset(files.windowsMsi)}]} requirements={['Windows 10 or newer','WebView2 (installed automatically)']}/>
<Platform icon={<Apple className="platform"/>} name="macOS" detail="Apple silicon and Intel" primary={{label:'Apple silicon (.dmg)',...asset(files.macArm)}} others={[{label:'Intel Mac (.dmg)',...asset(files.macIntel)}]} requirements={['macOS 11 or newer']}/>
<Platform icon={<span className="platform mac-logo"><AppleMark size={26}/></span>} name="macOS" detail="Apple silicon and Intel Macs" mac={{intel:{label:'Intel Mac (.dmg)',...asset(files.macIntel)}}} primary={{label:'Apple silicon (.dmg)',...asset(files.macArm)}} others={[]} requirements={['Notarized by Apple: opens without warnings','macOS 11 or newer']}
tip={<>Not sure which Mac you have? Open the <b>Apple menu → About This Mac</b>: <b>Chip: Apple M…</b> means Apple silicon, <b>Processor: Intel</b> means Intel.</>}/>
<Platform icon={<Terminal className="platform"/>} name="Linux" detail="64-bit distributions" primary={{label:'AppImage',...asset(files.appImage)}} others={[{label:'Debian / Ubuntu (.deb)',...asset(files.deb)},{label:'Fedora (.rpm)',...asset(files.rpm)}]} requirements={['WebKitGTK 4.1','glibc 2.35 or newer']}/>
</div>
<div className="download-grid">
Expand Down
14 changes: 14 additions & 0 deletions website/app/pages.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading