diff --git a/src/app/page.tsx b/src/app/page.tsx
index c065838..3e2b744 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -17,15 +17,17 @@ const Home = () => {
return (
<>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
>
);
};
diff --git a/src/components/Controller/Controller.tsx b/src/components/Controller/Controller.tsx
index 06b9d60..7054dbd 100644
--- a/src/components/Controller/Controller.tsx
+++ b/src/components/Controller/Controller.tsx
@@ -21,6 +21,7 @@ import {
getVersionLink,
getVersionType,
nightlyVersionFormat,
+ stableVersionFormat,
} from "@/utils/versionUtils";
import { FileBrowser, FileStructure } from "../FileBrowser/FileBrowser";
import HotkeyButton from "../HotkeyButton/HotkeyButton";
@@ -557,8 +558,10 @@ const Controller = () => {
closeModal={() => setFirmwarModalOpen(false)}
className="w-[40%]"
>
- {nightlyVersionFormat(deviceVersion) < 240114 &&
- getVersionType(deviceVersion) == "nightly" ? (
+ {(nightlyVersionFormat(deviceVersion) < 240114 &&
+ getVersionType(deviceVersion) == "nightly") ||
+ (stableVersionFormat(deviceVersion) < 200 &&
+ getVersionType(deviceVersion) == "stable") ? (
Sorry, your firmware version is too old to do this. Please manually
update to the latest nightly!
diff --git a/src/components/SerialLoader/SerialLoader.tsx b/src/components/SerialLoader/SerialLoader.tsx
index e710c6c..efa0f4c 100644
--- a/src/components/SerialLoader/SerialLoader.tsx
+++ b/src/components/SerialLoader/SerialLoader.tsx
@@ -62,13 +62,13 @@ const SerialLoader = ({ children }: PropsWithChildren) => {
};
const errorMessage = () => (
-
+
😔 Uh oh...
-
+
Looks like your browser doesn't support the{" "}
) => {
.
-
Please try switching to a supported browser.
-
(e.g.: Chrome, Edge, Opera...)
+
Please try switching to a browser that supports the API.
+
(e.g.: Chrome, Edge, Opera...)
);
diff --git a/src/components/SerialProvider/SerialProvider.tsx b/src/components/SerialProvider/SerialProvider.tsx
index ca10781..5df5cc5 100644
--- a/src/components/SerialProvider/SerialProvider.tsx
+++ b/src/components/SerialProvider/SerialProvider.tsx
@@ -268,6 +268,7 @@ const useWebSerial = ({
portState.current = "closed";
setIsOpen(false);
console.error("Could not open port");
+ throw new Error("Could not open port");
}
};
diff --git a/src/utils/versionUtils.tsx b/src/utils/versionUtils.tsx
index e39301f..99c0e6d 100644
--- a/src/utils/versionUtils.tsx
+++ b/src/utils/versionUtils.tsx
@@ -6,6 +6,11 @@ export const nightlyVersionFormat = (input: string): number => {
return number;
};
+export const stableVersionFormat = (input: string): number => {
+ const number = parseInt(input.replace(/\D/g, ""));
+ return number;
+};
+
const nightlyToDate = (input: string): string => {
const prefixRemoved = input.replace("n_", "");