From eeb1998743a300273df67f631a2fefb417aeca11 Mon Sep 17 00:00:00 2001 From: lahaina Date: Sat, 15 Jun 2024 17:48:38 +0900 Subject: [PATCH] Add not found page --- devices.js | 8 ++++++-- download.htm | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devices.js b/devices.js index 42da93b..cd639c9 100644 --- a/devices.js +++ b/devices.js @@ -33,8 +33,12 @@ const initDownloadPage = async () => { if (!codenameDisplay || !downloadLink || !recoveryLinkContainer) return; const params = new URLSearchParams(window.location.search); - const device = devices.find((device) => device.codename === params.get('device')); - if (!device) return; + const targetDevice = params.get('device'); + const device = devices.find((device) => device.codename === targetDevice); + if (!device) { + nameDisplay.innerText = 'Error: No such device found: ' + targetDevice; + return; + } const otaDetails = await getOtaDetails(device.codename); diff --git a/download.htm b/download.htm index c86e315..ee7ee4f 100644 --- a/download.htm +++ b/download.htm @@ -6,7 +6,7 @@
-

+

Loading...