Browse Source

readd device num to serial page (#727)

pull/728/head
Dan Ditomaso 11 months ago
committed by GitHub
parent
commit
09d6556abd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      packages/web/package.json
  2. 3
      packages/web/src/components/PageComponents/Connect/Serial.tsx

8
packages/web/package.json

@ -14,14 +14,14 @@
"homepage": "https://meshtastic.org",
"scripts": {
"build": "bunx --bun vite build",
"build": "vite build",
"build:analyze": "BUNDLE_ANALYZE=true bun run build",
"check": "biome check src/",
"check:fix": "biome check --write src/",
"dev": "bunx --bun vite",
"test": "bunx --bun vitest",
"dev": "vite",
"test": "vitest",
"ts:check": "bun run tsc --noEmit",
"preview": "bunx --bun vite preview",
"preview": "vite preview",
"generate:routes": "bun @tanstack/router-cli generate --outDir src/ routes --rootRoutePath /",
"package": "gzipper c -i html,js,css,png,ico,svg,json,webmanifest,txt dist dist/output && tar -cvf dist/build.tar -C ./dist/output/ ."
},

3
packages/web/src/components/PageComponents/Connect/Serial.tsx

@ -52,7 +52,7 @@ export const Serial = ({ closeDialog }: TabElementProps) => {
disabled={connectionInProgress}
>
<div className="flex h-48 flex-col gap-2 overflow-y-auto">
{serialPorts.map((port) => {
{serialPorts.map((port, idx) => {
const { usbProductId, usbVendorId } = port.getInfo();
const vendor = usbVendorId ?? t("unknown.shortName");
const product = usbProductId ?? t("unknown.shortName");
@ -70,6 +70,7 @@ export const Serial = ({ closeDialog }: TabElementProps) => {
{t("newDeviceDialog.serialConnection.deviceIdentifier", {
vendorId: vendor,
productId: product,
index: idx,
})}
</Button>
);

Loading…
Cancel
Save