diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..c4497798 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "design"] + path = design + url = https://github.com/meshtastic/meshtastic-design/ +[submodule "public/design"] + path = public/design + url = https://github.com/meshtastic/meshtastic-design/ diff --git a/package.json b/package.json index 746429d6..a9032954 100644 --- a/package.json +++ b/package.json @@ -7,24 +7,33 @@ "lint": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"" }, "dependencies": { + "@meshtastic/meshtasticjs": "^0.6.5", + "@snowpack/plugin-webpack": "^2.3.1", + "country-flag-icons": "^1.2.9", "react": "^17.0.0", - "react-dom": "^17.0.0" + "react-dom": "^17.0.0", + "react-icons": "^4.2.0" }, "devDependencies": { "@snowpack/plugin-dotenv": "^2.0.5", + "@snowpack/plugin-postcss": "^1.2.2", "@snowpack/plugin-react-refresh": "^2.4.0", "@snowpack/plugin-typescript": "^1.2.0", "@snowpack/web-test-runner-plugin": "^0.2.0", "@testing-library/react": "^11.0.0", "@types/chai": "^4.2.13", + "@types/country-flag-icons": "^1.2.0", "@types/mocha": "^8.2.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/snowpack-env": "^2.3.2", "@web/test-runner": "^0.12.0", + "autoprefixer": "^10.2.5", "chai": "^4.2.0", + "postcss": "^8.2.9", "prettier": "^2.0.5", "snowpack": "^3.0.1", + "tailwindcss": "^2.1.1", "typescript": "^4.0.0" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000..33ad091d --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/public/design b/public/design new file mode 160000 index 00000000..d0339f02 --- /dev/null +++ b/public/design @@ -0,0 +1 @@ +Subproject commit d0339f0297c629f1bd6873b4abccfecb98443538 diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index bcd5dfd6..00000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/index.html b/public/index.html index 4d6c2549..74694306 100644 --- a/public/index.html +++ b/public/index.html @@ -2,9 +2,12 @@
- + - +
- Edit src/App.tsx and save to reload.
-
- Page has been open for {count} seconds.
-
- - Learn React - -
--
+Bandwidth:
+
+ {channel.settings?.bandwidth}
+
+ Channel Number:
+
+ {channel.settings?.channelNum}
+
+ Coding Rate:
+
+ {channel.settings?.codingRate}
+
+ ID:
+
+ {channel.settings?.id}
+
+ Modem Config:
+
+ {channel.settings?.modemConfig
+ ? Protobuf.ChannelSettings_ModemConfig[
+ channel.settings.modemConfig
+ ]
+ : null}
+
+ Name:
+
+ {channel.settings?.name}
+
+ PSK:
+
+ {channel.settings?.psk.toLocaleString()}
+
+ Spread Factor:
+
+ {channel.settings?.spreadFactor}
+
+ Tx Power:
+
+ {channel.settings?.txPower}
+
+ Uplink:
+
+ {channel.settings?.uplinkEnabled
+ ? 'true'
+ : 'false'}
+
+ Downlink:
+
+ {channel.settings?.downlinkEnabled
+ ? 'true'
+ : 'false'}
+
+ + SNR:{' '} + {node.packet?.rxSnr ? node.packet.rxSnr : 'Unknown'} +
++ RSSI:{' '} + {node.packet?.rxRssi ? node.packet.rxRssi : 'Unknown'} +
++ Last heard:{' '} + {node.data?.lastHeard ? node.data.lastHeard : 'Unknown'} +
++ Loc:{' '} + {node.data?.position + ? `alt: ${node.data?.position.altitude}, lat: ${node.data?.position.latitudeI}, lng: ${node.data?.position.longitudeI}, time: ${node.data?.position.time}, batt: ${node.data?.position.batteryLevel}` + : 'Unknown'} +
+ + } + /> + } + /> + )) + ) : ( +