update deps, fix build

This commit is contained in:
Sacha Weatherstone
2024-01-24 22:01:28 +10:00
parent 72bfd44b1f
commit f997faa072
7 changed files with 546 additions and 529 deletions
@@ -47,6 +47,12 @@ export const LoRa = (): JSX.Element => {
label: "Channel Number",
description: "LoRa channel number",
},
{
type: "toggle",
name: "ignoreMqtt",
label: "Ignore MQTT",
description: "Don't forward MQTT messages over the mesh",
},
],
},
{
+1 -1
View File
@@ -106,7 +106,7 @@ export const useDeviceStore = create<DeviceState>((set, get) => ({
produce<DeviceState>((draft) => {
draft.devices.set(id, {
id,
status: Types.DeviceStatusEnum.DEVICE_DISCONNECTED,
status: Types.DeviceStatusEnum.DeviceDisconnected,
channels: new Map(),
config: new Protobuf.LocalOnly.LocalConfig(),
moduleConfig: new Protobuf.LocalOnly.LocalModuleConfig(),
+3 -2
View File
@@ -8,7 +8,8 @@ import { Channel } from "@components/PageComponents/Channel.js";
import { PageLayout } from "@components/PageLayout.js";
import { Sidebar } from "@components/Sidebar.js";
import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/js";
import { Types } from "@meshtastic/js";
import type { Protobuf } from "@meshtastic/js";
import { ImportIcon, QrCodeIcon } from "lucide-react";
import { useState } from "react";
@@ -22,7 +23,7 @@ export const getChannelName = (channel: Protobuf.Channel.Channel) =>
export const ChannelsPage = (): JSX.Element => {
const { channels, setDialogOpen } = useDevice();
const [activeChannel, setActiveChannel] = useState<Types.ChannelNumber>(
Types.ChannelNumber.PRIMARY,
Types.ChannelNumber.Primary,
);
const currentChannel = channels.get(activeChannel);
+2 -2
View File
@@ -15,7 +15,7 @@ export const MessagesPage = (): JSX.Element => {
const [chatType, setChatType] =
useState<Types.PacketDestination>("broadcast");
const [activeChat, setActiveChat] = useState<number>(
Types.ChannelNumber.PRIMARY,
Types.ChannelNumber.Primary,
);
const filteredNodes = Array.from(nodes.values()).filter(
(n) => n.num !== hardware.myNodeNum,
@@ -91,7 +91,7 @@ export const MessagesPage = (): JSX.Element => {
key={node.num}
to={activeChat}
messages={messages.direct.get(node.num)}
channel={Types.ChannelNumber.PRIMARY}
channel={Types.ChannelNumber.Primary}
/>
),
)}
+3
View File
@@ -56,4 +56,7 @@ export class LoRaValidation
@IsArray()
ignoreIncoming: number[];
@IsBoolean()
ignoreMqtt: boolean;
}