Commit df7d18a
committed
feat(install): DMG → Applications install guidance end-to-end
Three changes fix the "user runs app directly from DMG → keychain
broken" funnel at three points:
1. Boot-time check (install-check.ts) — if `process.execPath` starts
with `/Volumes/`, show a blocking dialog before anything else loads.
Primary button opens the Applications folder and quits so the user
can drag-install cleanly. Escape hatch left for power users who
really want to run from the mount.
2. Custom DMG background + layout (build/dmg-background.{svg,png,@2x.png},
electron-builder.yml dmg: block) — replaces the default empty DMG
window with a branded 640×480 backdrop: headline "把 Open CoDesign
拖到「应用程序」", an arrow pointing right, and a footer warning about
the keychain consequence of double-clicking from the mount. Icon
positions pinned so drag-to-install is the obvious path.
3. Smart download on the website (SmartDownload.vue + theme/index.ts
registration, embedded in index.md and zh/index.md) — detects
UA + platform, picks the right .dmg / .exe / .AppImage, and renders
a prominent primary button with exact file name and size. All
platforms still reachable via a collapsible "Other platforms"
section. Includes an explicit install hint so users know to drag
to /Applications before launching.
Plus two UX polishes reported while reviewing the page:
- Hero image swapped from og.svg (social card shape) to logo-hero.png
(the transparent no-text logo variant) in both EN and zh index.md.
- Hide VitePress's default "#" header-anchor on marketing-home section
headings — the anchor is useful in docs, noise on landing.
The `apps/desktop/build/` directory is now un-gitignored so the DMG
background ships with the repo instead of being regenerated at every
build.
- apps/desktop/src/main/install-check.ts: boot-time DMG detection
- apps/desktop/src/main/index.ts: wire install-check into whenReady
- apps/desktop/electron-builder.yml: dmg window + icon layout
- apps/desktop/build/dmg-background.{svg,png,@2x.png}: branded backdrop
- website/.vitepress/theme/SmartDownload.vue: new component
- website/.vitepress/theme/index.ts: register SmartDownload globally
- website/.vitepress/theme/style.css: hide header-anchor in sections
- website/index.md + zh/index.md: hero image, SmartDownload embed
- website/public/logo-hero.png: transparent no-text logo for hero1 parent da29e23 commit df7d18a
13 files changed
Lines changed: 447 additions & 5 deletions
File tree
- apps/desktop
- build
- src/main
- website
- .vitepress/theme
- public
- zh
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
Loading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
28 | 48 | | |
29 | 49 | | |
30 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
789 | 795 | | |
790 | 796 | | |
791 | 797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments