@@ -35,7 +35,7 @@ import Layout from '../layouts/Layout.astro'
3535 <svg class =" w-5 h-5" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" stroke-width =" 2" ><path stroke-linecap =" round" stroke-linejoin =" round" d =" M19 14l-7 7m0 0l-7-7m7 7V3" /></svg >
3636 <span id =" primary-label" >Download for macOS</span >
3737 </a >
38- <p class =" mt-3 text-[12px] text-ink-faint" id =" primary-meta" >Apple Silicon & Intel · .dmg </p >
38+ <p class =" mt-3 text-[12px] text-ink-faint" id =" primary-meta" >Apple Silicon & Intel · .zip </p >
3939 </div >
4040
4141 <!-- Other platforms link -->
@@ -50,15 +50,15 @@ import Layout from '../layouts/Layout.astro'
5050 <div class =" grid sm:grid-cols-3 gap-4" >
5151 <a id =" link-mac" href =" #" class =" group rounded-xl border border-rule hover:border-teal/30 p-5 text-center transition-all" >
5252 <div class =" text-[14px] font-medium text-ink mb-1" >macOS</div >
53- <p class =" text-[11px] text-ink-faint" >Apple Silicon & Intel · .dmg </p >
53+ <p class =" text-[11px] text-ink-faint" >Apple Silicon & Intel · .zip </p >
5454 </a >
5555 <a id =" link-win" href =" #" class =" group rounded-xl border border-rule hover:border-teal/30 p-5 text-center transition-all" >
5656 <div class =" text-[14px] font-medium text-ink mb-1" >Windows</div >
57- <p class =" text-[11px] text-ink-faint" >Windows 10+ · .exe </p >
57+ <p class =" text-[11px] text-ink-faint" >Windows 10+ · .zip </p >
5858 </a >
5959 <a id =" link-linux" href =" #" class =" group rounded-xl border border-rule hover:border-teal/30 p-5 text-center transition-all" >
6060 <div class =" text-[14px] font-medium text-ink mb-1" >Linux</div >
61- <p class =" text-[11px] text-ink-faint" >AppImage & ; .deb </p >
61+ <p class =" text-[11px] text-ink-faint" >Linux x64 · ; .tar.gz </p >
6262 </a >
6363 </div >
6464 </div >
@@ -96,9 +96,9 @@ import Layout from '../layouts/Layout.astro'
9696 const RELEASE_API = `https://api.github.com/repos/${REPO}/releases/latest`;
9797
9898 const PLATFORMS = {
99- mac: { label: 'Download for macOS', meta: 'Apple Silicon & Intel \u00b7 .dmg', ext: '.dmg ' },
100- win: { label: 'Download for Windows', meta: 'Windows 10+ \u00b7 .exe', ext: '.exe ' },
101- linux: { label: 'Download for Linux', meta: 'AppImage', ext: '.AppImage ' },
99+ mac: { label: 'Download for macOS', meta: 'Apple Silicon & Intel \u00b7 .zip ' },
100+ win: { label: 'Download for Windows', meta: 'Windows 10+ \u00b7 .zip ' },
101+ linux: { label: 'Download for Linux', meta: 'Linux x64 \u00b7 .tar.gz ' },
102102 };
103103
104104 function detectOS() {
@@ -122,11 +122,15 @@ import Layout from '../layouts/Layout.astro'
122122 const release = await res.json();
123123 const assets = release.assets || [];
124124
125- const findAsset = (ext ) => assets.find(a => a.name.endsWith(ext ));
125+ const find = (pattern ) => assets.find(a => pattern.test( a.name));
126126
127- const macUrl = findAsset('.dmg')?.browser_download_url;
128- const winUrl = findAsset('.exe')?.browser_download_url;
129- const linuxUrl = findAsset('.AppImage')?.browser_download_url;
127+ // Match: Executor-arm64-mac.zip or Executor-x64-mac.zip based on Apple Silicon
128+ const isAppleSilicon = navigator.userAgent.includes('Mac') &&
129+ (navigator.userAgent.includes('ARM') || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 0);
130+ const macAsset = find(isAppleSilicon ? /Executor-arm64-mac\.zip$/ : /Executor-x64-mac\.zip$/);
131+ const macUrl = macAsset?.browser_download_url;
132+ const winUrl = find(/Executor-x64-win\.zip$/)?.browser_download_url;
133+ const linuxUrl = find(/Executor-x64-linux\.tar\.gz$/)?.browser_download_url;
130134
131135 const urls = { mac: macUrl, win: winUrl, linux: linuxUrl };
132136
@@ -139,8 +143,12 @@ import Layout from '../layouts/Layout.astro'
139143 if (macUrl) document.getElementById('link-mac').href = macUrl;
140144 if (winUrl) document.getElementById('link-win').href = winUrl;
141145 if (linuxUrl) document.getElementById('link-linux').href = linuxUrl;
146+ // If no asset found for user's OS, fall back to releases page
147+ if (!urls[userOS]) {
148+ document.getElementById('primary-btn').href = `https://github.com/${REPO}/releases/latest`;
149+ }
142150 } catch {
143- // Silent fail — buttons just won't have hrefs
151+ document.getElementById('primary-btn').href = `https://github.com/${REPO}/releases/latest`;
144152 }
145153 }
146154
0 commit comments