Commit cbcbafc 1 parent 7e66dc7 commit cbcbafc Copy full SHA for cbcbafc
File tree 4 files changed +16
-6
lines changed
4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export interface BaseFormBuilderProps<T> {
27
27
disabledBy ?: DisabledBy < T > [ ] ;
28
28
label : string ;
29
29
description ?: string ;
30
+ notes ?: string ;
30
31
validationText ?: string ;
31
32
properties ?: Record < string , unknown > ;
32
33
}
@@ -45,6 +46,7 @@ export interface DynamicFormProps<T extends FieldValues> {
45
46
fieldGroups : {
46
47
label : string ;
47
48
description : string ;
49
+ notes ?: string ;
48
50
valid ?: boolean ;
49
51
validationText ?: string ;
50
52
fields : FieldProps < T > [ ] ;
@@ -96,6 +98,7 @@ export function DynamicForm<T extends FieldValues>({
96
98
< div >
97
99
< H4 className = "font-medium" > { fieldGroup . label } </ H4 >
98
100
< Subtle > { fieldGroup . description } </ Subtle >
101
+ < Subtle className = "font-semibold" > { fieldGroup ?. notes } </ Subtle >
99
102
</ div >
100
103
101
104
{ fieldGroup . fields . map ( ( field ) => {
Original file line number Diff line number Diff line change @@ -70,7 +70,9 @@ export const Bluetooth = () => {
70
70
fieldGroups = { [
71
71
{
72
72
label : "Bluetooth Settings" ,
73
- description : "Settings for the Bluetooth module" ,
73
+ description : "Settings for the Bluetooth module " ,
74
+ notes :
75
+ "Note: Some devices (ESP32) cannot use both Bluetooth and WiFi at the same time." ,
74
76
fields : [
75
77
{
76
78
type : "toggle" ,
Original file line number Diff line number Diff line change 8
8
} from "@core/utils/ip.ts" ;
9
9
import { Protobuf } from "@meshtastic/core" ;
10
10
11
- export const Network = ( ) : JSX . Element => {
11
+ export const Network = ( ) => {
12
12
const { config, setWorkingConfig } = useDevice ( ) ;
13
13
14
14
const onSubmit = ( data : NetworkValidation ) => {
@@ -53,6 +53,8 @@ export const Network = (): JSX.Element => {
53
53
{
54
54
label : "WiFi Config" ,
55
55
description : "WiFi radio configuration" ,
56
+ notes :
57
+ "Note: Some devices (ESP32) cannot use both Bluetooth and WiFi at the same time." ,
56
58
fields : [
57
59
{
58
60
type : "toggle" ,
Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => {
18
18
setSerialPorts ( await navigator ?. serial . getPorts ( ) ) ;
19
19
} , [ ] ) ;
20
20
21
- navigator ?. serial ?. addEventListener ( "connect" , ( ) => {
21
+ navigator ?. serial ?. addEventListener ( "connect" , ( event ) => {
22
+ console . log ( event ) ;
23
+
22
24
updateSerialPortList ( ) ;
23
25
} ) ;
24
26
navigator ?. serial ?. addEventListener ( "disconnect" , ( ) => {
@@ -45,6 +47,8 @@ export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => {
45
47
< div className = "flex w-full flex-col gap-2 p-4" >
46
48
< div className = "flex h-48 flex-col gap-2 overflow-y-auto" >
47
49
{ serialPorts . map ( ( port , index ) => {
50
+ console . log ( port ) ;
51
+
48
52
const { usbProductId, usbVendorId } = port . getInfo ( ) ;
49
53
return (
50
54
< Button
@@ -55,9 +59,8 @@ export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => {
55
59
await onConnect ( port ) ;
56
60
} }
57
61
>
58
- { `# ${ index } - ${ usbVendorId ?? "UNK" } - ${
59
- usbProductId ?? "UNK"
60
- } `}
62
+ { `# ${ index } - ${ usbVendorId ?? "UNK" } - ${ usbProductId ?? "UNK"
63
+ } `}
61
64
</ Button >
62
65
) ;
63
66
} ) }
You can’t perform that action at this time.
0 commit comments