Config saving behaviour change

This commit is contained in:
Sacha Weatherstone
2022-12-31 17:14:11 +11:00
parent f7fe27d621
commit ec25ec60ee
18 changed files with 227 additions and 103 deletions

16
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}"
}
],
"runtimeArgs": ["--preserve-symlinks"]
}

View File

@@ -27,7 +27,7 @@
"@heroicons/react": "^2.0.13",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "^2.9.10",
"@meshtastic/meshtasticjs": "^0.9.1",
"@meshtastic/meshtasticjs": "^0.9.2",
"@tailwindcss/line-clamp": "^0.4.2",
"@tailwindcss/typography": "^0.5.8",
"@turf/turf": "^6.5.0",
@@ -45,7 +45,7 @@
"react": "^18.2.0",
"react-chartjs-2": "^5.1.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.41.2",
"react-hook-form": "^7.41.3",
"react-hot-toast": "^2.4.0",
"react-icons": "^4.7.1",
"react-json-tree": "^0.17.0",
@@ -67,7 +67,7 @@
"@typescript-eslint/parser": "^5.47.1",
"@vitejs/plugin-react": "^3.0.0",
"autoprefixer": "^10.4.13",
"eslint": "^8.30.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",

134
pnpm-lock.yaml generated
View File

@@ -6,7 +6,7 @@ specifiers:
'@heroicons/react': ^2.0.13
'@hookform/error-message': ^2.0.1
'@hookform/resolvers': ^2.9.10
'@meshtastic/meshtasticjs': ^0.9.1
'@meshtastic/meshtasticjs': ^0.9.2
'@tailwindcss/forms': ^0.5.3
'@tailwindcss/line-clamp': ^0.4.2
'@tailwindcss/typography': ^0.5.8
@@ -28,7 +28,7 @@ specifiers:
class-transformer: ^0.5.1
class-validator: ^0.14.0
date-fns: ^2.29.3
eslint: ^8.30.0
eslint: ^8.31.0
eslint-config-prettier: ^8.5.0
eslint-import-resolver-typescript: ^3.5.2
eslint-plugin-import: ^2.26.0
@@ -46,7 +46,7 @@ specifiers:
react: ^18.2.0
react-chartjs-2: ^5.1.0
react-dom: ^18.2.0
react-hook-form: ^7.41.2
react-hook-form: ^7.41.3
react-hot-toast: ^2.4.0
react-icons: ^4.7.1
react-json-tree: ^0.17.0
@@ -68,9 +68,9 @@ dependencies:
'@emeraldpay/hashicon-react': 0.5.2
'@headlessui/react': 1.7.7_biqbaboplfbrettd7655fr4n2y
'@heroicons/react': 2.0.13_react@18.2.0
'@hookform/error-message': 2.0.1_33unso2ocv5y5ix74fsplqd6ny
'@hookform/resolvers': 2.9.10_react-hook-form@7.41.2
'@meshtastic/meshtasticjs': 0.9.1
'@hookform/error-message': 2.0.1_7yhncxxycytkes3mwygyjxyp6u
'@hookform/resolvers': 2.9.10_react-hook-form@7.41.3
'@meshtastic/meshtasticjs': 0.9.2
'@tailwindcss/line-clamp': 0.4.2_tailwindcss@3.2.4
'@tailwindcss/typography': 0.5.8_tailwindcss@3.2.4
'@turf/turf': 6.5.0
@@ -88,7 +88,7 @@ dependencies:
react: 18.2.0
react-chartjs-2: 5.1.0_dxa6kz4w32vmgoazz4fv7vwm2e
react-dom: 18.2.0_react@18.2.0
react-hook-form: 7.41.2_react@18.2.0
react-hook-form: 7.41.3_react@18.2.0
react-hot-toast: 2.4.0_biqbaboplfbrettd7655fr4n2y
react-icons: 4.7.1_react@18.2.0
react-json-tree: 0.17.0_kzbn2opkn2327fwg5yzwzya5o4
@@ -106,16 +106,16 @@ devDependencies:
'@types/react-dom': 18.0.10
'@types/w3c-web-serial': 1.0.3
'@types/web-bluetooth': 0.0.16
'@typescript-eslint/eslint-plugin': 5.47.1_txmweb6yn7coi7nfrp22gpyqmy
'@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/eslint-plugin': 5.47.1_axni7f4fgvh6tlufnh6hwgsifq
'@typescript-eslint/parser': 5.47.1_iukboom6ndih5an6iafl45j2fe
'@vitejs/plugin-react': 3.0.0_vite@4.0.3
autoprefixer: 10.4.13_postcss@8.4.20
eslint: 8.30.0
eslint-config-prettier: 8.5.0_eslint@8.30.0
eslint-import-resolver-typescript: 3.5.2_2lbwmhbr7bncddqbzzpg77o75m
eslint-plugin-import: 2.26.0_wspzxxdxgd6sryq2cmxnia3diy
eslint-plugin-react: 7.31.11_eslint@8.30.0
eslint-plugin-react-hooks: 4.6.0_eslint@8.30.0
eslint: 8.31.0
eslint-config-prettier: 8.5.0_eslint@8.31.0
eslint-import-resolver-typescript: 3.5.2_ol7jqilc3wemtdbq3nzhywgxq4
eslint-plugin-import: 2.26.0_bpx4furzt4ibermwbsj75osuwi
eslint-plugin-react: 7.31.11_eslint@8.31.0
eslint-plugin-react-hooks: 4.6.0_eslint@8.31.0
gzipper: 7.2.0
postcss: 8.4.20
prettier: 2.8.1
@@ -125,7 +125,7 @@ devDependencies:
tar: 6.1.13
tslib: 2.4.1
typescript: 4.9.4
unimported: 1.24.0_eslint@8.30.0
unimported: 1.24.0_eslint@8.31.0
vite: 4.0.3_@types+node@18.11.18
vite-plugin-environment: 1.1.3_vite@4.0.3
vite-plugin-pwa: 0.14.0_vite@4.0.3
@@ -1525,8 +1525,8 @@ packages:
dev: true
optional: true
/@eslint/eslintrc/1.4.0:
resolution: {integrity: sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==}
/@eslint/eslintrc/1.4.1:
resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
@@ -1569,7 +1569,7 @@ packages:
react: 18.2.0
dev: false
/@hookform/error-message/2.0.1_33unso2ocv5y5ix74fsplqd6ny:
/@hookform/error-message/2.0.1_7yhncxxycytkes3mwygyjxyp6u:
resolution: {integrity: sha512-U410sAr92xgxT1idlu9WWOVjndxLdgPUHEB8Schr27C9eh7/xUnITWpCMF93s+lGiG++D4JnbSnrb5A21AdSNg==}
peerDependencies:
react: '>=16.8.0'
@@ -1578,15 +1578,15 @@ packages:
dependencies:
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
react-hook-form: 7.41.2_react@18.2.0
react-hook-form: 7.41.3_react@18.2.0
dev: false
/@hookform/resolvers/2.9.10_react-hook-form@7.41.2:
/@hookform/resolvers/2.9.10_react-hook-form@7.41.3:
resolution: {integrity: sha512-JIL1DgJIlH9yuxcNGtyhsWX/PgNltz+5Gr6+8SX9fhXc/hPbEIk6wPI82nhgvp3uUb6ZfAM5mqg/x7KR7NAb+A==}
peerDependencies:
react-hook-form: ^7.0.0
dependencies:
react-hook-form: 7.41.2_react@18.2.0
react-hook-form: 7.41.3_react@18.2.0
dev: false
/@humanwhocodes/config-array/0.11.8:
@@ -1710,8 +1710,8 @@ packages:
engines: {node: '>=6.0.0'}
dev: false
/@meshtastic/meshtasticjs/0.9.1:
resolution: {integrity: sha512-BYTqcH/ArIr82EpYW23Y2cwvkWoKgNJAdjU21L8SUt9HjuVUNzeJOxieASINqLEWLFbcnOf7G5owmN2rKCSkLA==}
/@meshtastic/meshtasticjs/0.9.2:
resolution: {integrity: sha512-rS/dK3RekRC9R930/RbNgdcktQ/XZv/bPpFZ6/6PJ61+8NjguN6SeNE3GP007TS5GSkp0zu3IgfOHn+pEL94KA==}
dependencies:
'@protobuf-ts/runtime': 2.8.2
glob: 8.0.3
@@ -3062,7 +3062,7 @@ packages:
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
dev: true
/@typescript-eslint/eslint-plugin/5.47.1_txmweb6yn7coi7nfrp22gpyqmy:
/@typescript-eslint/eslint-plugin/5.47.1_axni7f4fgvh6tlufnh6hwgsifq:
resolution: {integrity: sha512-r4RZ2Jl9kcQN7K/dcOT+J7NAimbiis4sSM9spvWimsBvDegMhKLA5vri2jG19PmIPbDjPeWzfUPQ2hjEzA4Nmg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -3073,12 +3073,12 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/parser': 5.47.1_iukboom6ndih5an6iafl45j2fe
'@typescript-eslint/scope-manager': 5.47.1
'@typescript-eslint/type-utils': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/utils': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/type-utils': 5.47.1_iukboom6ndih5an6iafl45j2fe
'@typescript-eslint/utils': 5.47.1_iukboom6ndih5an6iafl45j2fe
debug: 4.3.4
eslint: 8.30.0
eslint: 8.31.0
ignore: 5.2.4
natural-compare-lite: 1.4.0
regexpp: 3.2.0
@@ -3089,7 +3089,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.47.1_lzzuuodtsqwxnvqeq4g4likcqa:
/@typescript-eslint/parser/5.47.1_iukboom6ndih5an6iafl45j2fe:
resolution: {integrity: sha512-9Vb+KIv29r6GPu4EboWOnQM7T+UjpjXvjCPhNORlgm40a9Ia9bvaPJswvtae1gip2QEeVeGh6YquqAzEgoRAlw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -3103,7 +3103,7 @@ packages:
'@typescript-eslint/types': 5.47.1
'@typescript-eslint/typescript-estree': 5.47.1_typescript@4.9.4
debug: 4.3.4
eslint: 8.30.0
eslint: 8.31.0
typescript: 4.9.4
transitivePeerDependencies:
- supports-color
@@ -3117,7 +3117,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.47.1
dev: true
/@typescript-eslint/type-utils/5.47.1_lzzuuodtsqwxnvqeq4g4likcqa:
/@typescript-eslint/type-utils/5.47.1_iukboom6ndih5an6iafl45j2fe:
resolution: {integrity: sha512-/UKOeo8ee80A7/GJA427oIrBi/Gd4osk/3auBUg4Rn9EahFpevVV1mUK8hjyQD5lHPqX397x6CwOk5WGh1E/1w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -3128,9 +3128,9 @@ packages:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.47.1_typescript@4.9.4
'@typescript-eslint/utils': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/utils': 5.47.1_iukboom6ndih5an6iafl45j2fe
debug: 4.3.4
eslint: 8.30.0
eslint: 8.31.0
tsutils: 3.21.0_typescript@4.9.4
typescript: 4.9.4
transitivePeerDependencies:
@@ -3163,7 +3163,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.47.1_lzzuuodtsqwxnvqeq4g4likcqa:
/@typescript-eslint/utils/5.47.1_iukboom6ndih5an6iafl45j2fe:
resolution: {integrity: sha512-l90SdwqfmkuIVaREZ2ykEfCezepCLxzWMo5gVfcJsJCaT4jHT+QjgSkYhs5BMQmWqE9k3AtIfk4g211z/sTMVw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -3174,9 +3174,9 @@ packages:
'@typescript-eslint/scope-manager': 5.47.1
'@typescript-eslint/types': 5.47.1
'@typescript-eslint/typescript-estree': 5.47.1_typescript@4.9.4
eslint: 8.30.0
eslint: 8.31.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.30.0
eslint-utils: 3.0.0_eslint@8.31.0
semver: 7.3.8
transitivePeerDependencies:
- supports-color
@@ -4002,13 +4002,13 @@ packages:
engines: {node: '>=10'}
dev: true
/eslint-config-prettier/8.5.0_eslint@8.30.0:
/eslint-config-prettier/8.5.0_eslint@8.31.0:
resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
dependencies:
eslint: 8.30.0
eslint: 8.31.0
dev: true
/eslint-import-resolver-node/0.3.6:
@@ -4020,7 +4020,7 @@ packages:
- supports-color
dev: true
/eslint-import-resolver-typescript/3.5.2_2lbwmhbr7bncddqbzzpg77o75m:
/eslint-import-resolver-typescript/3.5.2_ol7jqilc3wemtdbq3nzhywgxq4:
resolution: {integrity: sha512-zX4ebnnyXiykjhcBvKIf5TNvt8K7yX6bllTRZ14MiurKPjDpCAZujlszTdB8pcNXhZcOf+god4s9SjQa5GnytQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@@ -4029,8 +4029,8 @@ packages:
dependencies:
debug: 4.3.4
enhanced-resolve: 5.12.0
eslint: 8.30.0
eslint-plugin-import: 2.26.0_wspzxxdxgd6sryq2cmxnia3diy
eslint: 8.31.0
eslint-plugin-import: 2.26.0_bpx4furzt4ibermwbsj75osuwi
get-tsconfig: 4.2.0
globby: 13.1.3
is-core-module: 2.11.0
@@ -4040,7 +4040,7 @@ packages:
- supports-color
dev: true
/eslint-module-utils/2.7.4_romg76skn5tvuutm5tcl5qm5vm:
/eslint-module-utils/2.7.4_of6uaipqaoaobv57tu2gvxhnhu:
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
engines: {node: '>=4'}
peerDependencies:
@@ -4061,16 +4061,16 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/parser': 5.47.1_iukboom6ndih5an6iafl45j2fe
debug: 3.2.7
eslint: 8.30.0
eslint: 8.31.0
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 3.5.2_2lbwmhbr7bncddqbzzpg77o75m
eslint-import-resolver-typescript: 3.5.2_ol7jqilc3wemtdbq3nzhywgxq4
transitivePeerDependencies:
- supports-color
dev: true
/eslint-plugin-import/2.26.0_wspzxxdxgd6sryq2cmxnia3diy:
/eslint-plugin-import/2.26.0_bpx4furzt4ibermwbsj75osuwi:
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
engines: {node: '>=4'}
peerDependencies:
@@ -4080,14 +4080,14 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/parser': 5.47.1_iukboom6ndih5an6iafl45j2fe
array-includes: 3.1.6
array.prototype.flat: 1.3.1
debug: 2.6.9
doctrine: 2.1.0
eslint: 8.30.0
eslint: 8.31.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.4_romg76skn5tvuutm5tcl5qm5vm
eslint-module-utils: 2.7.4_of6uaipqaoaobv57tu2gvxhnhu
has: 1.0.3
is-core-module: 2.11.0
is-glob: 4.0.3
@@ -4101,16 +4101,16 @@ packages:
- supports-color
dev: true
/eslint-plugin-react-hooks/4.6.0_eslint@8.30.0:
/eslint-plugin-react-hooks/4.6.0_eslint@8.31.0:
resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
engines: {node: '>=10'}
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
dependencies:
eslint: 8.30.0
eslint: 8.31.0
dev: true
/eslint-plugin-react/7.31.11_eslint@8.30.0:
/eslint-plugin-react/7.31.11_eslint@8.31.0:
resolution: {integrity: sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw==}
engines: {node: '>=4'}
peerDependencies:
@@ -4120,7 +4120,7 @@ packages:
array.prototype.flatmap: 1.3.1
array.prototype.tosorted: 1.1.1
doctrine: 2.1.0
eslint: 8.30.0
eslint: 8.31.0
estraverse: 5.3.0
jsx-ast-utils: 3.3.3
minimatch: 3.1.2
@@ -4150,13 +4150,13 @@ packages:
estraverse: 5.3.0
dev: true
/eslint-utils/3.0.0_eslint@8.30.0:
/eslint-utils/3.0.0_eslint@8.31.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
eslint: 8.30.0
eslint: 8.31.0
eslint-visitor-keys: 2.1.0
dev: true
@@ -4170,12 +4170,12 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/eslint/8.30.0:
resolution: {integrity: sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==}
/eslint/8.31.0:
resolution: {integrity: sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.4.0
'@eslint/eslintrc': 1.4.1
'@humanwhocodes/config-array': 0.11.8
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
@@ -4186,7 +4186,7 @@ packages:
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.1.1
eslint-utils: 3.0.0_eslint@8.30.0
eslint-utils: 3.0.0_eslint@8.31.0
eslint-visitor-keys: 3.3.0
espree: 9.4.1
esquery: 1.4.0
@@ -4957,8 +4957,8 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true
/json5/1.0.1:
resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==}
/json5/1.0.2:
resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
hasBin: true
dependencies:
minimist: 1.2.7
@@ -5719,8 +5719,8 @@ packages:
scheduler: 0.23.0
dev: false
/react-hook-form/7.41.2_react@18.2.0:
resolution: {integrity: sha512-Uz5kNlfkEZve0sr5y2LsxPDGN3eNDjjKb1XJgand1E5Ay0S3zWo8YcJQNGu88/Zs6JaFnrJqTXbSr6B2q7wllA==}
/react-hook-form/7.41.3_react@18.2.0:
resolution: {integrity: sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw==}
engines: {node: '>=12.22.0'}
peerDependencies:
react: ^16.8.0 || ^17 || ^18
@@ -6476,7 +6476,7 @@ packages:
resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==}
dependencies:
'@types/json5': 0.0.29
json5: 1.0.1
json5: 1.0.2
minimist: 1.2.7
strip-bom: 3.0.0
dev: true
@@ -6573,12 +6573,12 @@ packages:
engines: {node: '>=4'}
dev: true
/unimported/1.24.0_eslint@8.30.0:
/unimported/1.24.0_eslint@8.31.0:
resolution: {integrity: sha512-Hb/PMg3pjEZ+4LdHMH5GRDwryWnNsgCh8i8sefWAnWjol8uCFwrmp37wv+qbo2XFrYg7UM8u8xD+Dc30gwVBpg==}
engines: {node: '>=14.0.0'}
hasBin: true
dependencies:
'@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa
'@typescript-eslint/parser': 5.47.1_iukboom6ndih5an6iafl45j2fe
'@typescript-eslint/typescript-estree': 5.47.1_typescript@4.9.4
chalk: 4.1.2
debug: 4.3.4

View File

@@ -24,7 +24,7 @@ export interface SettingsPanelProps {
}
export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
const { connection } = useDevice();
const { connection, addChannel } = useDevice();
const [keySize, setKeySize] = useState<128 | 256>(256);
const [pskHidden, setPskHidden] = useState(true);
@@ -81,7 +81,20 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
addChannel({
config: {
index: channel.index,
role: channel.role,
settings: {
...data,
psk: toByteArray(data.psk ?? "")
}
},
lastInterraction: new Date(),
messages: []
})
),
{
loading: "Saving...",
success: "Saved Channel",

View File

@@ -15,7 +15,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const Bluetooth = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
@@ -44,7 +44,14 @@ export const Bluetooth = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "bluetooth",
bluetooth: data
}
})
),
{
loading: "Saving...",
success: "Saved Bluetooth Config, Restarting Node",

View File

@@ -15,7 +15,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const Device = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
handleSubmit,
@@ -43,7 +43,14 @@ export const Device = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "device",
device: data
}
})
),
{
loading: "Saving...",
success: "Saved Device Config, Restarting Node",

View File

@@ -15,7 +15,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const Display = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
handleSubmit,
@@ -43,7 +43,14 @@ export const Display = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "display",
display: data
}
})
),
{
loading: "Saving...",
success: "Saved Display Config, Restarting Node",

View File

@@ -16,7 +16,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const LoRa = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
@@ -51,7 +51,14 @@ export const LoRa = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "lora",
lora: data
}
})
),
{
loading: "Saving...",
success: "Saved LoRa Config, Restarting Node",

View File

@@ -17,7 +17,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const Network = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
handleSubmit,
@@ -65,7 +65,14 @@ export const Network = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "network",
network: data
}
})
),
{
loading: "Saving...",
success: "Saved Network Config, Restarting Node",

View File

@@ -15,7 +15,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const Position = (): JSX.Element => {
const { config, connection, nodes, hardware } = useDevice();
const { config, connection, nodes, hardware, setConfig } = useDevice();
const myNode = nodes.find((n) => n.data.num === hardware.myNodeNum);
@@ -86,7 +86,14 @@ export const Position = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "position",
position: data
}
})
),
{
loading: "Saving...",
success: "Saved Position Config, Restarting Node",

View File

@@ -13,7 +13,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const Power = (): JSX.Element => {
const { config, connection } = useDevice();
const { config, connection, setConfig } = useDevice();
const {
register,
handleSubmit,
@@ -41,7 +41,14 @@ export const Power = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setConfig({
payloadVariant: {
oneofKind: "power",
power: data
}
})
),
{
loading: "Saving...",
success: "Saved Power Config, Restarting Node",

View File

@@ -15,7 +15,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export const CannedMessage = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -49,7 +49,14 @@ export const CannedMessage = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "cannedMessage",
cannedMessage: data
}
})
),
{
loading: "Saving...",
success: "Saved Canned Message Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const ExternalNotification = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -39,7 +39,14 @@ export const ExternalNotification = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "externalNotification",
externalNotification: data
}
})
),
{
loading: "Saving...",
success: "Saved External Notification Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const MQTT = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -46,7 +46,14 @@ export const MQTT = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "mqtt",
mqtt: data
}
})
),
{
loading: "Saving...",
success: "Saved MQTT Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const RangeTest = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -40,7 +40,14 @@ export const RangeTest = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "rangeTest",
rangeTest: data
}
})
),
{
loading: "Saving...",
success: "Saved Range Test Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const Serial = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -40,7 +40,14 @@ export const Serial = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "serial",
serial: data
}
})
),
{
loading: "Saving...",
success: "Saved Serial Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const StoreForward = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -40,7 +40,14 @@ export const StoreForward = (): JSX.Element => {
}
}
})
.then(() => reset({ ...data })),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "storeForward",
storeForward: data
}
})
),
{
loading: "Saving...",
success: "Saved Store & Forward Config, Restarting Node",

View File

@@ -12,7 +12,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
export const Telemetry = (): JSX.Element => {
const { moduleConfig, connection } = useDevice();
const { moduleConfig, connection, setModuleConfig } = useDevice();
const {
register,
handleSubmit,
@@ -40,10 +40,14 @@ export const Telemetry = (): JSX.Element => {
}
}
})
.then(async () => {
reset({ ...data });
await Promise.resolve();
}),
.then(() =>
setModuleConfig({
payloadVariant: {
oneofKind: "telemetry",
telemetry: data
}
})
),
{
loading: "Saving...",
success: "Saved Telemetry Config, Restarting Node",