diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-07-14 02:11:15 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-07-14 02:14:39 -0400 |
| commit | 1636983d1f20df496e130955f239e30f7dd67fea (patch) | |
| tree | c2769caff107f2c72016eef351c3627b26c64e80 /static/js/web-install.js | |
| parent | 37ef8d15027fb00d672ebbed028e93f3741f7189 (diff) | |
add supported device check for web install fetch
Diffstat (limited to 'static/js/web-install.js')
| -rw-r--r-- | static/js/web-install.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/static/js/web-install.js b/static/js/web-install.js index 838dd6d6..07b89b4e 100644 --- a/static/js/web-install.js +++ b/static/js/web-install.js @@ -140,8 +140,13 @@ async function unlockBootloader(setProgress) { return "Bootloader unlocked."; } +const supportedDevices = ["redfin", "bramble", "sunfish", "coral", "flame", "bonito", "sargo", "crosshatch", "blueline"]; + async function getLatestRelease() { let product = await device.getVariable("product"); + if (!supportedDevices.includes(product)) { + throw new Error(`device model (${product}) is not supported by the GrapheneOS web installer`); + } let metadataResp = await fetch(`${RELEASES_URL}/${product}-stable`); let metadata = await metadataResp.text(); |
