feat: Add Download Page#105
Conversation
✅ Deploy Preview for zmk-studio ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/zmk.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>ZMK Studio - Download</title> |
There was a problem hiding this comment.
thought: not required but it'd be nice to have when sharing the app link.
| <meta charset="UTF-8" /> | |
| <link rel="icon" type="image/svg+xml" href="/zmk.svg" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>ZMK Studio - Download</title> | |
| <title>Download ZMK Studio</title> | |
| <meta name="description" content="ZMK Studio provides runtime update functionality to ZMK powered devices, allowing users to change their keymap layers without flashing new firmware to their keyboards."> | |
| <meta property="og:title" content="Download ZMK Studio"> | |
| <meta property="og:description" content="ZMK Studio provides runtime update functionality to ZMK powered devices, allowing users to change their keymap layers without flashing new firmware to their keyboards."> | |
| <meta property="og:image" content="https://zmk.studio/zmk.svg"> | |
| <meta property="og:url" content="https://zmk.studio/download"> | |
| <meta property="og:site_name" content="Download ZMK Studio"> | |
| <meta property="og:type" content="website"> | |
| <meta name="twitter:card" content="summary_large_image"> | |
| <meta name="twitter:title" content="Download ZMK Studio"> | |
| <meta name="twitter:description" content="ZMK Studio provides runtime update functionality to ZMK powered devices, allowing users to change their keymap layers without flashing new firmware to their keyboards."> | |
| <meta name="twitter:image" content="https://zmk.studio/zmk.svg"> |
There was a problem hiding this comment.
Fair, I think we should do it as a follow-up since index.html is lacking this as well.
petejohanson
left a comment
There was a problem hiding this comment.
Thanks for working on this. A couple discussion points.
src/DownloadPage.tsx
Outdated
| setShowAll(true); | ||
| } | ||
|
|
||
| fetch("https://api.github.com/repos/zmkfirmware/zmk-studio/releases/latest") |
There was a problem hiding this comment.
Do we need to worry about GH rate limiting folks? Any reason not to build this in during build to avoid fetching from the API constantly?
There was a problem hiding this comment.
I had originally done this for simplicity. I saw another popular app do the same thing, but I can't find it now. I've refactored this to run a generation script before dev/build. Seems to work well.
Adds a download page to make the GitHub releases page for the app a little easier to use. This page gets the latest GitHub release, detects the current platform, and gives the download options in a clean way. Also shows all download options if the OS can't be detected.