Browse Source
Merge pull request #363 from danditomaso/add_empty_psk_size
Added empty value to pre-shared key size. Feature parity with IOS app
pull/369/head
Tom Fifield
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
26 additions and
25 deletions
-
src/components/PageComponents/Channel.tsx
-
src/components/UI/Generator.tsx
|
|
|
@ -91,7 +91,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { |
|
|
|
psk: pass, |
|
|
|
positionEnabled: |
|
|
|
channel?.settings?.moduleSettings?.positionPrecision !== |
|
|
|
undefined && |
|
|
|
undefined && |
|
|
|
channel?.settings?.moduleSettings?.positionPrecision > 0, |
|
|
|
preciseLocation: |
|
|
|
channel?.settings?.moduleSettings?.positionPrecision === 32, |
|
|
|
@ -124,8 +124,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { |
|
|
|
{ |
|
|
|
type: "passwordGenerator", |
|
|
|
name: "settings.psk", |
|
|
|
label: "pre-Shared Key", |
|
|
|
description: "256, 128, or 8 bit PSKs allowed", |
|
|
|
label: "Pre-Shared Key", |
|
|
|
description: "Supported PSK lengths: 256-bit, 128-bit, 8-bit, Empty (0-bit)", |
|
|
|
validationText: validationText, |
|
|
|
devicePSKBitCount: bitCount ?? 0, |
|
|
|
inputChange: inputChangeEvent, |
|
|
|
@ -177,29 +177,29 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { |
|
|
|
enumValue: |
|
|
|
config.display?.units === 0 |
|
|
|
? { |
|
|
|
"Within 23 km": 10, |
|
|
|
"Within 12 km": 11, |
|
|
|
"Within 5.8 km": 12, |
|
|
|
"Within 2.9 km": 13, |
|
|
|
"Within 1.5 km": 14, |
|
|
|
"Within 700 m": 15, |
|
|
|
"Within 350 m": 16, |
|
|
|
"Within 200 m": 17, |
|
|
|
"Within 90 m": 18, |
|
|
|
"Within 50 m": 19, |
|
|
|
} |
|
|
|
"Within 23 km": 10, |
|
|
|
"Within 12 km": 11, |
|
|
|
"Within 5.8 km": 12, |
|
|
|
"Within 2.9 km": 13, |
|
|
|
"Within 1.5 km": 14, |
|
|
|
"Within 700 m": 15, |
|
|
|
"Within 350 m": 16, |
|
|
|
"Within 200 m": 17, |
|
|
|
"Within 90 m": 18, |
|
|
|
"Within 50 m": 19, |
|
|
|
} |
|
|
|
: { |
|
|
|
"Within 15 miles": 10, |
|
|
|
"Within 7.3 miles": 11, |
|
|
|
"Within 3.6 miles": 12, |
|
|
|
"Within 1.8 miles": 13, |
|
|
|
"Within 0.9 miles": 14, |
|
|
|
"Within 0.5 miles": 15, |
|
|
|
"Within 0.2 miles": 16, |
|
|
|
"Within 600 feet": 17, |
|
|
|
"Within 300 feet": 18, |
|
|
|
"Within 150 feet": 19, |
|
|
|
}, |
|
|
|
"Within 15 miles": 10, |
|
|
|
"Within 7.3 miles": 11, |
|
|
|
"Within 3.6 miles": 12, |
|
|
|
"Within 1.8 miles": 13, |
|
|
|
"Within 0.9 miles": 14, |
|
|
|
"Within 0.5 miles": 15, |
|
|
|
"Within 0.2 miles": 16, |
|
|
|
"Within 600 feet": 17, |
|
|
|
"Within 300 feet": 18, |
|
|
|
"Within 150 feet": 19, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
@ -40,6 +40,7 @@ const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>( |
|
|
|
{ text: "256 bit", value: "32", key: "bit256" }, |
|
|
|
{ text: "128 bit", value: "16", key: "bit128" }, |
|
|
|
{ text: "8 bit", value: "1", key: "bit8" }, |
|
|
|
{ text: "Empty", value: "0", key: "empty" }, |
|
|
|
], |
|
|
|
selectChange, |
|
|
|
inputChange, |
|
|
|
|