| ... | @@ -77,12 +77,10 @@ | ... | @@ -77,12 +77,10 @@ |
| 77 | const ua = navigator.userAgent; | 77 | const ua = navigator.userAgent; |
| 78 | if (/Win/i.test(ua)) return { os: "win", label: "Download for Windows" }; | 78 | if (/Win/i.test(ua)) return { os: "win", label: "Download for Windows" }; |
| 79 | if (/Mac/i.test(ua)) { | 79 | if (/Mac/i.test(ua)) { |
| 80 | const isArm = | | |
| 81 | /arm|aarch/i.test(navigator.platform ?? "") || ua.includes("ARM"); | | |
| 82 | return { | 80 | return { |
| 83 | os: "mac", | 81 | os: "mac", |
| 84 | label: `Download for macOS`, | 82 | label: `Download for macOS`, |
| 85 | arch: isArm ? "arm64" : "x64", | 83 | arch: "arm64", |
| 86 | }; | 84 | }; |
| 87 | } | 85 | } |
| 88 | if (/Linux/i.test(ua)) return { os: "linux", label: "Download for Linux" }; | 86 | if (/Linux/i.test(ua)) return { os: "linux", label: "Download for Linux" }; |