Prevent spam fetching littlefs contents
This commit is contained in:
+8
-8
@@ -23,7 +23,7 @@
|
|||||||
"@emeraldpay/hashicon-react": "^0.5.2",
|
"@emeraldpay/hashicon-react": "^0.5.2",
|
||||||
"@headlessui/react": "^1.7.3",
|
"@headlessui/react": "^1.7.3",
|
||||||
"@heroicons/react": "^2.0.12",
|
"@heroicons/react": "^2.0.12",
|
||||||
"@hookform/resolvers": "^2.9.9",
|
"@hookform/resolvers": "^2.9.10",
|
||||||
"@meshtastic/eslint-config": "^1.0.8",
|
"@meshtastic/eslint-config": "^1.0.8",
|
||||||
"@meshtastic/meshtasticjs": "^0.6.109",
|
"@meshtastic/meshtasticjs": "^0.6.109",
|
||||||
"@tailwindcss/line-clamp": "^0.4.2",
|
"@tailwindcss/line-clamp": "^0.4.2",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-chartjs-2": "^4.3.1",
|
"react-chartjs-2": "^4.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-hook-form": "^7.37.0",
|
"react-hook-form": "^7.38.0",
|
||||||
"react-hot-toast": "^2.4.0",
|
"react-hot-toast": "^2.4.0",
|
||||||
"react-icons": "^4.6.0",
|
"react-icons": "^4.6.0",
|
||||||
"react-json-pretty": "^2.2.0",
|
"react-json-pretty": "^2.2.0",
|
||||||
@@ -54,26 +54,26 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@types/chrome": "^0.0.197",
|
"@types/chrome": "^0.0.199",
|
||||||
"@types/geodesy": "^2.2.3",
|
"@types/geodesy": "^2.2.3",
|
||||||
"@types/node": "^18.11.0",
|
"@types/node": "^18.11.3",
|
||||||
"@types/react": "^18.0.21",
|
"@types/react": "^18.0.21",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"@types/w3c-web-serial": "^1.0.3",
|
"@types/w3c-web-serial": "^1.0.3",
|
||||||
"@types/web-bluetooth": "^0.0.15",
|
"@types/web-bluetooth": "^0.0.16",
|
||||||
"@vitejs/plugin-react": "^2.1.0",
|
"@vitejs/plugin-react": "^2.1.0",
|
||||||
"autoprefixer": "^10.4.12",
|
"autoprefixer": "^10.4.12",
|
||||||
"gzipper": "^7.1.0",
|
"gzipper": "^7.1.0",
|
||||||
"postcss": "^8.4.18",
|
"postcss": "^8.4.18",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"prettier-plugin-tailwindcss": "^0.1.13",
|
"prettier-plugin-tailwindcss": "^0.1.13",
|
||||||
"rollup-plugin-visualizer": "^5.8.2",
|
"rollup-plugin-visualizer": "^5.8.3",
|
||||||
"tailwindcss": "^3.1.8",
|
"tailwindcss": "^3.2.1",
|
||||||
"tar": "^6.1.11",
|
"tar": "^6.1.11",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unimported": "^1.22.0",
|
"unimported": "^1.22.0",
|
||||||
"vite": "^3.1.8",
|
"vite": "^3.1.8",
|
||||||
"vite-plugin-environment": "^1.1.2"
|
"vite-plugin-environment": "^1.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+267
-402
File diff suppressed because it is too large
Load Diff
@@ -10,11 +10,6 @@ import { randId } from "@core/utils/randId.js";
|
|||||||
import { PlusCircleIcon } from "@heroicons/react/24/outline";
|
import { PlusCircleIcon } from "@heroicons/react/24/outline";
|
||||||
import { ISerialConnection } from "@meshtastic/meshtasticjs";
|
import { ISerialConnection } from "@meshtastic/meshtasticjs";
|
||||||
|
|
||||||
interface USBID {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Serial = (): JSX.Element => {
|
export const Serial = (): JSX.Element => {
|
||||||
const [serialPorts, setSerialPorts] = useState<SerialPort[]>([]);
|
const [serialPorts, setSerialPorts] = useState<SerialPort[]>([]);
|
||||||
const { addDevice } = useDeviceStore();
|
const { addDevice } = useDeviceStore();
|
||||||
@@ -39,11 +34,13 @@ export const Serial = (): JSX.Element => {
|
|||||||
const device = addDevice(id);
|
const device = addDevice(id);
|
||||||
setSelectedDevice(id);
|
setSelectedDevice(id);
|
||||||
const connection = new ISerialConnection(id);
|
const connection = new ISerialConnection(id);
|
||||||
await connection.connect({
|
await connection
|
||||||
port,
|
.connect({
|
||||||
baudRate: undefined,
|
port,
|
||||||
concurrentLogOutput: true,
|
baudRate: undefined,
|
||||||
});
|
concurrentLogOutput: true,
|
||||||
|
})
|
||||||
|
.catch((e: Error) => console.log(`Unable to Connect: ${e.message}`));
|
||||||
device.addConnection(connection);
|
device.addConnection(connection);
|
||||||
subscribeAll(device, connection);
|
subscribeAll(device, connection);
|
||||||
};
|
};
|
||||||
@@ -59,8 +56,8 @@ export const Serial = (): JSX.Element => {
|
|||||||
void onConnect(port);
|
void onConnect(port);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`# ${index} - ${port.getInfo().usbVendorId} - ${
|
{`# ${index} - ${port.getInfo().usbVendorId ?? "UNK"} - ${
|
||||||
port.getInfo().usbProductId
|
port.getInfo().usbProductId ?? "UNK"
|
||||||
}`}
|
}`}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const FileBrowser = (): JSX.Element => {
|
|||||||
setData((await res.json()) as Files);
|
setData((await res.json()) as Files);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user