@ -48,7 +48,7 @@
"devDependencies": {
"@types/chrome": "^0.0.193",
"@types/geodesy": "^2.2.3",
"@types/node": "^18.6.3",
"@types/node": "^18.6.4",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/w3c-web-serial": "^1.0.2",
@ -51,14 +51,6 @@ export const User = (): JSX.Element => {
return (
<Form loading={loading} dirty={isDirty} onSubmit={onSubmit}>
{JSON.stringify(errors.antAzimuth?.message)}
{JSON.stringify(errors.antGainDbi?.message)}
{JSON.stringify(errors.hwModel?.message)}
{JSON.stringify(errors.id?.message)}
{JSON.stringify(errors.isLicensed?.message)}
{JSON.stringify(errors.longName?.message)}
{JSON.stringify(errors.shortName?.message)}
{JSON.stringify(errors.txPowerDbm?.message)}
<TextInputField
label="Device ID"
description="Preset unique identifier for this device."
@ -88,16 +80,12 @@ export const User = (): JSX.Element => {
.match(/.{1,2}/g)
?.join(":") ?? ""
}
readOnly
/>
<SelectField
label="Hardware"
description="This is a description."
disabled
isInvalid={!!errors.hwModel?.message}
validationMessage={errors.hwModel?.message}
{...register("hwModel", { valueAsNumber: true })}
// readOnly
value={myNode?.data.user?.hwModel}
>
{renderOptions(Protobuf.HardwareModel)}
</SelectField>
@ -1,8 +1,10 @@
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
import { IsBoolean, IsInt, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
import type { Protobuf } from "@meshtastic/meshtasticjs";
export class UserValidation implements Omit<Protobuf.User, "macaddr"> {
export class UserValidation
implements Omit<Protobuf.User, "macaddr" | "hwModel">
{
@Length(2, 30)
id: string;
@ -12,9 +14,6 @@ export class UserValidation implements Omit<Protobuf.User, "macaddr"> {
@Length(1, 4)
shortName: string;
@IsEnum(Protobuf.HardwareModel)
hwModel: Protobuf.HardwareModel;
@IsBoolean()
isLicensed: boolean;