Browse Source

Add peers page

pull/43/head
Sacha Weatherstone 4 years ago
parent
commit
d23fe966aa
  1. 10
      package.json
  2. 222
      pnpm-lock.yaml
  3. 3
      src/PageRouter.tsx
  4. 6
      src/components/PageNav.tsx
  5. 1
      src/core/stores/deviceStore.ts
  6. 101
      src/pages/Peers.tsx

10
package.json

@ -22,7 +22,7 @@
"dependencies": {
"@emeraldpay/hashicon-react": "^0.5.2",
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.11",
"@heroicons/react": "^2.0.12",
"@hookform/resolvers": "^2.9.8",
"@meshtastic/eslint-config": "^1.0.8",
"@meshtastic/meshtasticjs": "^0.6.104",
@ -37,7 +37,7 @@
"maplibre-gl": "^2.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.36.1",
"react-hook-form": "^7.37.0",
"react-icons": "^4.4.0",
"react-json-pretty": "^2.2.0",
"react-map-gl": "^7.0.19",
@ -48,10 +48,10 @@
"devDependencies": {
"@types/chrome": "^0.0.197",
"@types/geodesy": "^2.2.3",
"@types/node": "^18.8.0",
"@types/node": "^18.8.3",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/w3c-web-serial": "^1.0.2",
"@types/w3c-web-serial": "^1.0.3",
"@types/web-bluetooth": "^0.0.15",
"@vitejs/plugin-react": "^2.1.0",
"autoprefixer": "^10.4.12",
@ -65,7 +65,7 @@
"tslib": "^2.4.0",
"typescript": "^4.8.4",
"unimported": "^1.22.0",
"vite": "^3.1.4",
"vite": "^3.1.6",
"vite-plugin-environment": "^1.1.2"
}
}

222
pnpm-lock.yaml

@ -3,7 +3,7 @@ lockfileVersion: 5.4
specifiers:
'@emeraldpay/hashicon-react': ^0.5.2
'@headlessui/react': ^1.7.3
'@heroicons/react': ^2.0.11
'@heroicons/react': ^2.0.12
'@hookform/resolvers': ^2.9.8
'@meshtastic/eslint-config': ^1.0.8
'@meshtastic/meshtasticjs': ^0.6.104
@ -11,10 +11,10 @@ specifiers:
'@tailwindcss/typography': ^0.5.7
'@types/chrome': ^0.0.197
'@types/geodesy': ^2.2.3
'@types/node': ^18.8.0
'@types/node': ^18.8.3
'@types/react': ^18.0.21
'@types/react-dom': ^18.0.6
'@types/w3c-web-serial': ^1.0.2
'@types/w3c-web-serial': ^1.0.3
'@types/web-bluetooth': ^0.0.15
'@vitejs/plugin-react': ^2.1.0
autoprefixer: ^10.4.12
@ -31,7 +31,7 @@ specifiers:
prettier-plugin-tailwindcss: ^0.1.13
react: ^18.2.0
react-dom: ^18.2.0
react-hook-form: ^7.36.1
react-hook-form: ^7.37.0
react-icons: ^4.4.0
react-json-pretty: ^2.2.0
react-map-gl: ^7.0.19
@ -43,15 +43,15 @@ specifiers:
tslib: ^2.4.0
typescript: ^4.8.4
unimported: ^1.22.0
vite: ^3.1.4
vite: ^3.1.6
vite-plugin-environment: ^1.1.2
zustand: 4.1.1
dependencies:
'@emeraldpay/hashicon-react': 0.5.2
'@headlessui/react': 1.7.3_biqbaboplfbrettd7655fr4n2y
'@heroicons/react': 2.0.11[email protected]
'@hookform/resolvers': 2.9[email protected]6.1
'@heroicons/react': 2.0.12[email protected]
'@hookform/resolvers': 2.9[email protected]7.0
'@meshtastic/eslint-config': 1.0.8
'@meshtastic/meshtasticjs': 0.6.104
'@tailwindcss/line-clamp': 0.4[email protected]
@ -65,7 +65,7 @@ dependencies:
maplibre-gl: 2.4.0
react: 18.2.0
react-dom: 18.2[email protected]
react-hook-form: 7.36.1[email protected]
react-hook-form: 7.37.0[email protected]
react-icons: 4.4[email protected]
react-json-pretty: 2.2.0_biqbaboplfbrettd7655fr4n2y
react-map-gl: 7.0.19_6eczaga5xxiwzxtfiyk6fioasq
@ -76,12 +76,12 @@ dependencies:
devDependencies:
'@types/chrome': 0.0.197
'@types/geodesy': 2.2.3
'@types/node': 18.8.0
'@types/node': 18.8.3
'@types/react': 18.0.21
'@types/react-dom': 18.0.6
'@types/w3c-web-serial': 1.0.2
'@types/w3c-web-serial': 1.0.3
'@types/web-bluetooth': 0.0.15
'@vitejs/plugin-react': 2.1[email protected].4
'@vitejs/plugin-react': 2.1[email protected].6
autoprefixer: 10.4[email protected]
gzipper: 7.1.0
postcss: 8.4.17
@ -93,8 +93,8 @@ devDependencies:
tslib: 2.4.0
typescript: 4.8.4
unimported: 1.22.0
vite: 3.1.4
vite-plugin-environment: 1.1[email protected].4
vite: 3.1.6
vite-plugin-environment: 1.1[email protected].6
packages:
@ -457,20 +457,20 @@ packages:
react-dom: 18.2[email protected]
dev: false
/@heroicons/react/2.0.11[email protected]:
resolution: {integrity: sha512-bASjOgSSaYj8HqXWsOqaBiB6ZLalE/g90WYGgZ5lPm4KCCG7wPXntY4kzHf5NrLh6UBAcnPwvbiw1Ne9GYfJtw==}
/@heroicons/react/2.0.12[email protected]:
resolution: {integrity: sha512-FZxKh3i9aKIDxyALTgIpSF2t6V6/eZfF5mRu41QlwkX3Oxzecdm1u6dpft6PQGxIBwO7TKYWaMAYYL8mp/EaOg==}
peerDependencies:
react: '>= 16'
dependencies:
react: 18.2.0
dev: false
/@hookform/resolvers/[email protected]6.1:
/@hookform/resolvers/[email protected]7.0:
resolution: {integrity: sha512-iVVjH0USq+1TqDdGkWe2M1x7Wn5OFPgVRo7CbWFsXTqqXqCaZtZcnzJu+UhljCWbthFWxWGXKLGYUDPZ04oVvQ==}
peerDependencies:
react-hook-form: ^7.0.0
dependencies:
react-hook-form: 7.36.1[email protected]
react-hook-form: 7.37.0[email protected]
dev: false
/@humanwhocodes/config-array/0.10.7:
@ -600,13 +600,13 @@ packages:
/@meshtastic/eslint-config/1.0.8:
resolution: {integrity: sha512-Jzwaf3TyYFGeFuxLRQA5Yj5Rmz097VleFQUkswXH9nvLO81JjJbHgJWbHQ6RpxC31q/2hWV03QdaH98swpYcQA==}
dependencies:
'@typescript-eslint/eslint-plugin': 5.38.1_c7qepppml3d4ahu5cnfwqe6ltq
'@typescript-eslint/parser': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/eslint-plugin': 5.39.0_xyciw6oqjoiiono4dhv3uhn5my
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
eslint: 8.24.0
eslint-config-prettier: 8.5[email protected]
eslint-import-resolver-typescript: 2.7.1_dg2pe6kqkrddxbf2funb723kue
eslint-plugin-eslint-comments: 3.2[email protected]
eslint-plugin-import: 2.26.0_omdi6dbgbvtcgh72g62wplyvle
eslint-plugin-import: 2.26.0_gcianqk2r5w7qn6wdun4jzyvom
eslint-plugin-react: 7.31[email protected]
eslint-plugin-react-hooks: 4.6[email protected]
prettier: 2.7.1
@ -847,8 +847,8 @@ packages:
'@types/pbf': 3.0.2
dev: false
/@types/node/18.8.0:
resolution: {integrity: sha512-u+h43R6U8xXDt2vzUaVP3VwjjLyOJk6uEciZS8OSyziUQGOwmk+l+4drxcsDboHXwyTaqS1INebghmWMRxq3LA==}
/@types/node/18.8.3:
resolution: {integrity: sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==}
dev: true
/@types/normalize-package-data/2.4.1:
@ -881,16 +881,16 @@ packages:
resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==}
dev: true
/@types/w3c-web-serial/1.0.2:
resolution: {integrity: sha512-Ftx4BtLxgAnel7V7GbHylCYjSq827A+jeEE3SnTS7huCGUN0pSwUn+CchTCT9TkZj9w+NVMUq4Bk2R0GvUNmAQ==}
/@types/w3c-web-serial/1.0.3:
resolution: {integrity: sha512-R4J/OjqKAUFQoXVIkaUTfzb/sl6hLh/ZhDTfowJTRMa7LhgEmI/jXV4zsL1u8HpNa853BxwNmDIr0pauizzwSQ==}
dev: true
/@types/web-bluetooth/0.0.15:
resolution: {integrity: sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==}
dev: true
/@typescript-eslint/eslint-plugin/5.38.1_c7qepppml3d4ahu5cnfwqe6ltq:
resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==}
/@typescript-eslint/eslint-plugin/5.39.0_xyciw6oqjoiiono4dhv3uhn5my:
resolution: {integrity: sha512-xVfKOkBm5iWMNGKQ2fwX5GVgBuHmZBO1tCRwXmY5oAIsPscfwm2UADDuNB8ZVYCtpQvJK4xpjrK7jEhcJ0zY9A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@ -900,23 +900,23 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/scope-manager': 5.38.1
'@typescript-eslint/type-utils': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/utils': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/scope-manager': 5.39.0
'@typescript-eslint/type-utils': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/utils': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
debug: 4.3.4
eslint: 8.24.0
ignore: 5.2.0
regexpp: 3.2.0
semver: 7.3.7
semver: 7.3.8
tsutils: 3.21[email protected]
typescript: 4.8.4
transitivePeerDependencies:
- supports-color
dev: false
/@typescript-eslint/parser/5.38.1_3rubbgt5ekhqrcgx4uwls3neim:
resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==}
/@typescript-eslint/parser/5.39.0_3rubbgt5ekhqrcgx4uwls3neim:
resolution: {integrity: sha512-PhxLjrZnHShe431sBAGHaNe6BDdxAASDySgsBCGxcBecVCi8NQWxQZMcizNA4g0pN51bBAn/FUfkWG3SDVcGlA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -925,9 +925,9 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.38.1
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/typescript-estree': 5.38.1[email protected]
'@typescript-eslint/scope-manager': 5.39.0
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/typescript-estree': 5.39.0[email protected]
debug: 4.3.4
eslint: 7.32.0
typescript: 4.8.4
@ -935,8 +935,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.38.1_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==}
/@typescript-eslint/parser/5.39.0_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-PhxLjrZnHShe431sBAGHaNe6BDdxAASDySgsBCGxcBecVCi8NQWxQZMcizNA4g0pN51bBAn/FUfkWG3SDVcGlA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -945,9 +945,9 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.38.1
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/typescript-estree': 5.38.1[email protected]
'@typescript-eslint/scope-manager': 5.39.0
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/typescript-estree': 5.39.0[email protected]
debug: 4.3.4
eslint: 8.24.0
typescript: 4.8.4
@ -955,15 +955,15 @@ packages:
- supports-color
dev: false
/@typescript-eslint/scope-manager/5.38.1:
resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==}
/@typescript-eslint/scope-manager/5.39.0:
resolution: {integrity: sha512-/I13vAqmG3dyqMVSZPjsbuNQlYS082Y7OMkwhCfLXYsmlI0ca4nkL7wJ/4gjX70LD4P8Hnw1JywUVVAwepURBw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/visitor-keys': 5.38.1
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/visitor-keys': 5.39.0
/@typescript-eslint/type-utils/5.38.1_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==}
/@typescript-eslint/type-utils/5.39.0_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-KJHJkOothljQWzR3t/GunL0TPKY+fGJtnpl+pX+sJ0YiKTz3q2Zr87SGTmFqsCMFrLt5E0+o+S6eQY0FAXj9uA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@ -972,8 +972,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.38.1[email protected]
'@typescript-eslint/utils': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/typescript-estree': 5.39.0[email protected]
'@typescript-eslint/utils': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
debug: 4.3.4
eslint: 8.24.0
tsutils: 3.21[email protected]
@ -982,12 +982,12 @@ packages:
- supports-color
dev: false
/@typescript-eslint/types/5.38.1:
resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==}
/@typescript-eslint/types/5.39.0:
resolution: {integrity: sha512-gQMZrnfEBFXK38hYqt8Lkwt8f4U6yq+2H5VDSgP/qiTzC8Nw8JO3OuSUOQ2qW37S/dlwdkHDntkZM6SQhKyPhw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
/@typescript-eslint/typescript-estree/5.38.1[email protected]:
resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==}
/@typescript-eslint/typescript-estree/5.39.0[email protected]:
resolution: {integrity: sha512-qLFQP0f398sdnogJoLtd43pUgB18Q50QSA+BTE5h3sUxySzbWDpTSdgt4UyxNSozY/oDK2ta6HVAzvGgq8JYnA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@ -995,27 +995,27 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/visitor-keys': 5.38.1
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/visitor-keys': 5.39.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.7
semver: 7.3.8
tsutils: 3.21[email protected]
typescript: 4.8.4
transitivePeerDependencies:
- supports-color
/@typescript-eslint/utils/5.38.1_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==}
/@typescript-eslint/utils/5.39.0_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-+DnY5jkpOpgj+EBtYPyHRjXampJfC0yUZZzfzLuUWVZvCuKqSdJVC8UhdWipIw7VKNTfwfAPiOWzYkAwuIhiAg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@typescript-eslint/scope-manager': 5.38.1
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/typescript-estree': 5.38.1[email protected]
'@typescript-eslint/scope-manager': 5.39.0
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/typescript-estree': 5.39.0[email protected]
eslint: 8.24.0
eslint-scope: 5.1.1
eslint-utils: 3.0[email protected]
@ -1024,14 +1024,14 @@ packages:
- typescript
dev: false
/@typescript-eslint/visitor-keys/5.38.1:
resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==}
/@typescript-eslint/visitor-keys/5.39.0:
resolution: {integrity: sha512-yyE3RPwOG+XJBLrhvsxAidUgybJVQ/hG8BhiJo0k8JSAYfk/CshVcxf0HwP4Jt7WZZ6vLmxdo1p6EyN3tzFTkg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.38.1
'@typescript-eslint/types': 5.39.0
eslint-visitor-keys: 3.3.0
/@vitejs/plugin-react/[email protected].4:
/@vitejs/plugin-react/[email protected].6:
resolution: {integrity: sha512-am6rPyyU3LzUYne3Gd9oj9c4Rzbq5hQnuGXSMT6Gujq45Il/+bunwq3lrB7wghLkiF45ygMwft37vgJ/NE8IAA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -1042,9 +1042,9 @@ packages:
'@babel/plugin-transform-react-jsx-development': 7.18.6_@[email protected]
'@babel/plugin-transform-react-jsx-self': 7.18.6_@[email protected]
'@babel/plugin-transform-react-jsx-source': 7.18.6_@[email protected]
magic-string: 0.26.5
magic-string: 0.26.6
react-refresh: 0.14.0
vite: 3.1.4
vite: 3.1.6
transitivePeerDependencies:
- supports-color
dev: true
@ -1152,7 +1152,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
get-intrinsic: 1.1.3
is-string: 1.0.7
dev: false
@ -1167,7 +1167,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
es-shim-unscopables: 1.0.0
dev: false
@ -1177,7 +1177,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
es-shim-unscopables: 1.0.0
dev: false
@ -1194,7 +1194,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.4
caniuse-lite: 1.0.30001414
caniuse-lite: 1.0.30001416
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@ -1242,10 +1242,10 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001414
electron-to-chromium: 1.4.270
caniuse-lite: 1.0.30001416
electron-to-chromium: 1.4.275
node-releases: 2.0.6
update-browserslist-db: 1.0.9[email protected]
update-browserslist-db: 1.0.10[email protected]
dev: true
/buffer-from/1.1.2:
@ -1273,8 +1273,8 @@ packages:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
engines: {node: '>= 6'}
/caniuse-lite/1.0.30001414:
resolution: {integrity: sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==}
/caniuse-lite/1.0.30001416:
resolution: {integrity: sha512-06wzzdAkCPZO+Qm4e/eNghZBDfVNDsCgw33T27OwBH9unE9S478OYw//Q2L7Npf/zBzs7rjZOszIFQkwQKAEqA==}
dev: true
/chalk/2.4.2:
@ -1543,8 +1543,8 @@ packages:
resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==}
dev: false
/electron-to-chromium/1.4.270:
resolution: {integrity: sha512-KNhIzgLiJmDDC444dj9vEOpZEgsV96ult9Iff98Vanumn+ShJHd5se8aX6KeVxdc0YQeqdrezBZv89rleDbvSg==}
/electron-to-chromium/1.4.275:
resolution: {integrity: sha512-aJeQQ+Hl9Jyyzv4chBqYJwmVRY46N5i2BEX5Cuyk/5gFCUZ5F3i7Hnba6snZftWla7Gglwc5pIgcd+E7cW+rPg==}
dev: true
/emoji-regex/8.0.0:
@ -1574,8 +1574,8 @@ packages:
is-arrayish: 0.2.1
dev: true
/es-abstract/1.20.3:
resolution: {integrity: sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==}
/es-abstract/1.20.4:
resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
@ -1880,7 +1880,7 @@ packages:
dependencies:
debug: 4.3.4
eslint: 8.24.0
eslint-plugin-import: 2.26.0_omdi6dbgbvtcgh72g62wplyvle
eslint-plugin-import: 2.26.0_gcianqk2r5w7qn6wdun4jzyvom
glob: 7.2.3
is-glob: 4.0.3
resolve: 1.22.1
@ -1889,7 +1889,7 @@ packages:
- supports-color
dev: false
/eslint-module-utils/2.7.4_zjisor2jfvmx4xetucss53axpa:
/eslint-module-utils/2.7.4_u3o3cbxhjcofsya2eebinaptmi:
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
engines: {node: '>=4'}
peerDependencies:
@ -1910,7 +1910,7 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
debug: 3.2.7
eslint: 8.24.0
eslint-import-resolver-node: 0.3.6
@ -1930,7 +1930,7 @@ packages:
ignore: 5.2.0
dev: false
/eslint-plugin-import/2.26.0_omdi6dbgbvtcgh72g62wplyvle:
/eslint-plugin-import/2.26.0_gcianqk2r5w7qn6wdun4jzyvom:
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
engines: {node: '>=4'}
peerDependencies:
@ -1940,14 +1940,14 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 5.38.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
array-includes: 3.1.5
array.prototype.flat: 1.3.0
debug: 2.6.9
doctrine: 2.1.0
eslint: 8.24.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.4_zjisor2jfvmx4xetucss53axpa
eslint-module-utils: 2.7.4_u3o3cbxhjcofsya2eebinaptmi
has: 1.0.3
is-core-module: 2.10.0
is-glob: 4.0.3
@ -2077,7 +2077,7 @@ packages:
optionator: 0.9.1
progress: 2.0.3
regexpp: 3.2.0
semver: 7.3.7
semver: 7.3.8
strip-ansi: 6.0.1
strip-json-comments: 3.1.1
table: 6.8.0
@ -2296,7 +2296,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
functions-have-names: 1.2.3
/functional-red-black-tree/1.0.1:
@ -2625,7 +2625,7 @@ packages:
dependencies:
available-typed-arrays: 1.0.5
call-bind: 1.0.2
es-abstract: 1.20.3
es-abstract: 1.20.4
for-each: 0.3.3
has-tostringtag: 1.0.0
dev: true
@ -2822,8 +2822,8 @@ packages:
dependencies:
yallist: 4.0.0
/magic-string/0.26.5:
resolution: {integrity: sha512-yXUIYOOQnEHKHOftp5shMWpB9ImfgfDJpapa38j/qMtTj5QHWucvxP4lUtuRmHT9vAzvtpHkWKXW9xBwimXeNg==}
/magic-string/0.26.6:
resolution: {integrity: sha512-6d+3bFybzyQFJYSoRsl9ZC0wheze8M1LrQC7tNMRqXR4izUTDOLMd9BtSuExK9iAukFh+s5K0WAhc/dlQ+HKYA==}
engines: {node: '>=12'}
dependencies:
sourcemap-codec: 1.4.8
@ -3002,7 +3002,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
dev: false
/object.fromentries/2.0.5:
@ -3011,14 +3011,14 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
dev: false
/object.hasown/1.1.1:
resolution: {integrity: sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==}
dependencies:
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
dev: false
/object.values/1.1.5:
@ -3027,7 +3027,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
dev: false
/once/1.4.0:
@ -3330,8 +3330,8 @@ packages:
scheduler: 0.23.0
dev: false
/react-hook-form/7.36.1[email protected]:
resolution: {integrity: sha512-EbYYkCG2p8ywe7ikOH2l02lAFMrrrslZi1I8fqd8ifDGNAkhomHZQzQsP6ksvzrWBKntRe8b5L5L7Zsd+Gm02Q==}
/react-hook-form/7.37.0[email protected]:
resolution: {integrity: sha512-6NFTxsnw+EXSpNNvLr5nFMjPdYKRryQcelTHg7zwBB6vAzfPIcZq4AExP4heVlwdzntepQgwiOQW4z7Mr99Lsg==}
engines: {node: '>=12.22.0'}
peerDependencies:
react: ^16.8.0 || ^17 || ^18
@ -3586,8 +3586,8 @@ packages:
resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
hasBin: true
/semver/7.3.7:
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
/semver/7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@ -3725,7 +3725,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
get-intrinsic: 1.1.3
has-symbols: 1.0.3
internal-slot: 1.0.3
@ -3738,14 +3738,14 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
/string.prototype.trimstart/1.0.5:
resolution: {integrity: sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
es-abstract: 1.20.3
es-abstract: 1.20.4
/string_decoder/1.1.1:
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
@ -3964,8 +3964,8 @@ packages:
engines: {node: '>=14.0.0'}
hasBin: true
dependencies:
'@typescript-eslint/parser': 5.38.1_3rubbgt5ekhqrcgx4uwls3neim
'@typescript-eslint/typescript-estree': 5.38.1[email protected]
'@typescript-eslint/parser': 5.39.0_3rubbgt5ekhqrcgx4uwls3neim
'@typescript-eslint/typescript-estree': 5.39.0[email protected]
chalk: 4.1.2
debug: 4.3.4
eslint: 7.32.0
@ -3984,8 +3984,8 @@ packages:
- supports-color
dev: true
/update-browserslist-db/1.0.9[email protected]:
resolution: {integrity: sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==}
/update-browserslist-db/1.0.10[email protected]:
resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
@ -4037,16 +4037,16 @@ packages:
engines: {node: '>= 0.10'}
dev: false
/vite-plugin-environment/[email protected].4:
/vite-plugin-environment/[email protected].6:
resolution: {integrity: sha512-WFgM/ibceOEIuficZVaLcmJvcMZiyTkGzeS8+pzfByGYRdewqil7LSLDV1DwJfFQIx/YzcW9YRSWQG7cJ2XT1w==}
peerDependencies:
vite: '>= 2.7'
dependencies:
vite: 3.1.4
vite: 3.1.6
dev: true
/vite/3.1.4:
resolution: {integrity: sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==}
/vite/3.1.6:
resolution: {integrity: sha512-qMXIwnehvvcK5XfJiXQUiTxoYAEMKhM+jqCY6ZSTKFBKu1hJnAKEzP3AOcnTerI0cMZYAaJ4wpW1wiXLMDt4mA==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -4114,7 +4114,7 @@ packages:
dependencies:
available-typed-arrays: 1.0.5
call-bind: 1.0.2
es-abstract: 1.20.3
es-abstract: 1.20.4
for-each: 0.3.3
has-tostringtag: 1.0.0
is-typed-array: 1.1.9

3
src/PageRouter.tsx

@ -8,6 +8,8 @@ import { InfoPage } from "@pages/Info.js";
import { MapPage } from "@pages/Map.js";
import { MessagesPage } from "@pages/Messages.js";
import { PeersPage } from "./pages/Peers.js";
export const PageRouter = (): JSX.Element => {
const { activePage } = useDevice();
return (
@ -17,6 +19,7 @@ export const PageRouter = (): JSX.Element => {
{activePage === "extensions" && <ExtensionsPage />}
{activePage === "config" && <ConfigPage />}
{activePage === "channels" && <ChannelsPage />}
{activePage === "peers" && <PeersPage />}
{activePage === "info" && <InfoPage />}
</>
);

6
src/components/PageNav.tsx

@ -9,6 +9,7 @@ import {
InboxIcon,
MapIcon,
Square3Stack3DIcon,
UsersIcon,
} from "@heroicons/react/24/outline";
export const PageNav = (): JSX.Element => {
@ -46,6 +47,11 @@ export const PageNav = (): JSX.Element => {
icon: <Square3Stack3DIcon />,
page: "channels",
},
{
name: "Peers",
icon: <UsersIcon />,
page: "peers",
},
{
name: "Info",
icon: <IdentificationIcon />,

1
src/core/stores/deviceStore.ts

@ -11,6 +11,7 @@ export type Page =
| "extensions"
| "config"
| "channels"
| "peers"
| "info";
export interface MessageWithAck extends Types.MessagePacket {

101
src/pages/Peers.tsx

@ -0,0 +1,101 @@
import type React from "react";
import { base16 } from "rfc4648";
import { IconButton } from "@app/components/IconButton.js";
import { Mono } from "@app/components/Mono.js";
import { useDevice } from "@core/providers/useDevice.js";
import { Hashicon } from "@emeraldpay/hashicon-react";
import { EllipsisHorizontalIcon } from "@heroicons/react/24/outline";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const PeersPage = (): JSX.Element => {
const { hardware, nodes } = useDevice();
return (
<div className="w-full overflow-y-auto">
<div className="overflow-hidden ring-1 ring-black ring-opacity-5">
<table className="min-w-full divide-y divide-gray-300">
<thead className="bg-gray-50">
<tr>
<th
scope="col"
className="py-3.5 pr-3 pl-6 text-left text-sm font-semibold text-gray-900"
>
Name
</th>
<th
scope="col"
className="py-3.5 text-left text-sm font-semibold text-gray-900"
>
Model
</th>
<th
scope="col"
className="py-3.5 text-left text-sm font-semibold text-gray-900"
>
MAC Address
</th>
<th
scope="col"
className="py-3.5 text-left text-sm font-semibold text-gray-900"
>
Last Heard
</th>
<th
scope="col"
className="py-3.5 text-left text-sm font-semibold text-gray-900"
>
SNR
</th>
<th scope="col" className="relative py-3.5 pl-3 pr-4 sm:pr-6">
<span className="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody className="bg-white">
{nodes.map((node, index) => (
<tr
key={index}
className={index % 2 === 0 ? undefined : "bg-gray-50"}
>
<td className="flex gap-2 whitespace-nowrap py-2 pr-3 pl-6 text-sm font-medium text-gray-900">
<Hashicon size={24} value={node.data.num.toString()} />
<span className="my-auto">{node.data.user?.longName}</span>
</td>
<td className="whitespace-nowrap py-2 text-sm text-gray-500">
<span className="rounded-md bg-slate-200 p-1">
<Mono>
{Protobuf.HardwareModel[node.data.user?.hwModel ?? 0]}
</Mono>
</span>
</td>
<td className="whitespace-nowrap py-2 text-sm text-gray-500">
<Mono>
{base16
.stringify(node.data.user?.macaddr ?? [])
.match(/.{1,2}/g)
?.join(":") ?? ""}
</Mono>
</td>
<td className="whitespace-nowrap py-2 text-sm text-gray-500">
{new Date(node.data.lastHeard).toLocaleTimeString()}
</td>
<td className="whitespace-nowrap py-2 text-sm text-gray-500">
<Mono>{node.data.snr}db</Mono>
</td>
<td className="relative whitespace-nowrap pl-3 pr-4 text-right text-sm font-medium">
<IconButton
size="sm"
variant="secondary"
icon={<EllipsisHorizontalIcon className="h-4" />}
/>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
);
};
Loading…
Cancel
Save