Sacha Weatherstone
4 years ago
No known key found for this signature in database
GPG Key ID: 7AB2D7E206124B31
2 changed files with
25 additions and
0 deletions
-
src/components/PageComponents/Config/Display.tsx
-
src/validation/config/display.ts
|
|
|
@ -89,6 +89,25 @@ export const Display = (): JSX.Element => { |
|
|
|
/> |
|
|
|
)} |
|
|
|
/> |
|
|
|
<Controller |
|
|
|
name="flipScreen" |
|
|
|
control={control} |
|
|
|
render={({ field: { value, ...rest } }) => ( |
|
|
|
<Toggle |
|
|
|
label="Flip Screen" |
|
|
|
description="Description" |
|
|
|
checked={value} |
|
|
|
{...rest} |
|
|
|
/> |
|
|
|
)} |
|
|
|
/> |
|
|
|
<Select |
|
|
|
label="Display Units" |
|
|
|
description="This is a description." |
|
|
|
{...register("units", { valueAsNumber: true })} |
|
|
|
> |
|
|
|
{renderOptions(Protobuf.Config_DisplayConfig_DisplayUnits)} |
|
|
|
</Select> |
|
|
|
</Form> |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
@ -14,4 +14,10 @@ export class DisplayValidation implements Protobuf.Config_DisplayConfig { |
|
|
|
|
|
|
|
@IsBoolean() |
|
|
|
compassNorthTop: boolean; |
|
|
|
|
|
|
|
@IsBoolean() |
|
|
|
flipScreen: boolean; |
|
|
|
|
|
|
|
@IsEnum(Protobuf.Config_DisplayConfig_DisplayUnits) |
|
|
|
units: Protobuf.Config_DisplayConfig_DisplayUnits; |
|
|
|
} |
|
|
|
|