Skip to content

Commit 041cd6d

Browse files
committed
feat(site): add direct macOS and Windows desktop download buttons
Link both buttons straight to the published v0.1.0 release assets so they download without an intermediate GitHub page, and add the platform glyphs.
1 parent b8d8fe7 commit 041cd6d

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": patch
3+
---
4+
5+
Add a Windows download button to the site and point both desktop download buttons directly at the published installer assets.

apps/desktop/tests/packaging-config.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,24 @@ describe('desktop packaging configuration', () => {
5858
expect(desktopPackage.build.productName).toBe('Pythinker')
5959
})
6060

61+
it('keeps desktop download URLs derived from their published release version', () => {
62+
const siteSource = readFileSync(resolve(repositoryRoot, 'apps/site/src/App.vue'), 'utf8')
63+
const desktopVersionMatch = siteSource.match(/const DESKTOP_VERSION = '([^']+)'/)
64+
65+
expect(desktopVersionMatch).not.toBeNull()
66+
expect(desktopVersionMatch![1]).not.toBe('')
67+
expect(siteSource).not.toContain('Pythinker-0.1.0-arm64.dmg')
68+
expect(siteSource).not.toContain('Pythinker-0.1.0-x64-Setup.exe')
69+
expect(siteSource).toContain('Pythinker-${DESKTOP_VERSION}-arm64.dmg')
70+
expect(siteSource).toContain('Pythinker-${DESKTOP_VERSION}-x64-Setup.exe')
71+
expect(siteSource).toContain('releases/download/v${DESKTOP_VERSION}')
72+
expect(siteSource).not.toContain('releases/download/v0.1.0')
73+
74+
const desktopShowcaseMatch = siteSource.match(/<section id="desktop"[\s\S]*?<\/section>/)
75+
expect(desktopShowcaseMatch).not.toBeNull()
76+
expect(desktopShowcaseMatch![0]).toContain('/brand/windows11.svg')
77+
})
78+
6179
it('maps the staged Host node_modules directory as the copy root', () => {
6280
expect(desktopPackage.build.extraResources).toEqual(expect.arrayContaining([
6381
{ from: 'resources', to: 'desktop-resources' },

apps/site/src/App.vue

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ import PythinkerMascot from './components/PythinkerMascot.vue';
77
88
const version = __PYTHINKER_VERSION__;
99
10+
/**
11+
* Desktop release currently published on GitHub. This tracks the published
12+
* release, not apps/desktop/package.json — the manifest is bumped by changesets
13+
* ahead of the build that produces these assets. Bump this only after the
14+
* matching desktop release is public.
15+
*/
16+
const DESKTOP_VERSION = '0.1.0';
17+
const DESKTOP_RELEASE_BASE = `https://github.com/PyModel/pythinker-code/releases/download/v${DESKTOP_VERSION}`;
18+
const desktopDownloads = {
19+
mac: `${DESKTOP_RELEASE_BASE}/Pythinker-${DESKTOP_VERSION}-arm64.dmg`,
20+
windows: `${DESKTOP_RELEASE_BASE}/Pythinker-${DESKTOP_VERSION}-x64-Setup.exe`,
21+
};
22+
1023
const installRows = [
1124
['macOS / Linux', 'curl -fsSL https://code.pythinker.com/pythinker-code/install.sh | bash', '/brand/apple.svg'],
1225
['Windows (PowerShell)', 'irm https://code.pythinker.com/pythinker-code/install.ps1 | iex', '/brand/windows11.svg'],
@@ -268,10 +281,17 @@ onUnmounted(() => {
268281
<div class="desktop-showcase-copy reveal">
269282
<p class="eyebrow">Desktop app</p>
270283
<h2 id="desktop-title" class="display-md">Pythinker Desktop</h2>
271-
<p class="desktop-showcase-lead">The agent in a native macOS app, with sidebar sessions, live activity, and auto-updates.</p>
284+
<p class="desktop-showcase-lead">The agent in native macOS and Windows apps, with sidebar sessions, live activity, and auto-updates.</p>
272285
<div class="desktop-showcase-actions">
273-
<a class="button button-primary" href="https://github.com/PyModel/pythinker-code/releases/latest" target="_blank" rel="noopener">Download for macOS</a>
274-
<span class="desktop-showcase-note">Auto-updates included · Apple Silicon</span>
286+
<a class="button button-primary" :href="desktopDownloads.mac" rel="noopener">
287+
<img src="/brand/apple.svg" alt="" aria-hidden="true" class="button-platform-icon" />
288+
Download for macOS
289+
</a>
290+
<a class="button button-secondary" :href="desktopDownloads.windows" rel="noopener">
291+
<img src="/brand/windows11.svg" alt="" aria-hidden="true" class="button-platform-icon" />
292+
Download for Windows
293+
</a>
294+
<span class="desktop-showcase-note">Auto-updates included · Apple Silicon and Windows x64</span>
275295
</div>
276296
</div>
277297
</section>
@@ -805,6 +825,19 @@ onUnmounted(() => {
805825
gap: 16px;
806826
}
807827
828+
.button-platform-icon {
829+
width: 16px;
830+
height: 16px;
831+
}
832+
833+
.desktop-showcase-actions .button {
834+
gap: 8px;
835+
}
836+
837+
.desktop-showcase-actions .button-primary .button-platform-icon {
838+
filter: brightness(0) invert(1);
839+
}
840+
808841
.desktop-showcase-note {
809842
color: var(--ink-subtle);
810843
font-size: 13px;

0 commit comments

Comments
 (0)