diff --git a/src/components/Dialog/HelpDialog.tsx b/src/components/Dialog/HelpDialog.tsx
index 4a401e97..87cb2dff 100644
--- a/src/components/Dialog/HelpDialog.tsx
+++ b/src/components/Dialog/HelpDialog.tsx
@@ -1,7 +1,44 @@
import type React from "react";
-import { Pane } from "evergreen-ui";
+import { CogIcon, Dialog, Text } from "evergreen-ui";
-export const HelpDialog = (): JSX.Element => {
- return ;
+import { TabbedContent, TabType } from "../layout/page/TabbedContent.js";
+
+export interface HelpDialogProps {
+ isOpen: boolean;
+ close: () => void;
+}
+
+export const HelpDialog = ({ isOpen, close }: HelpDialogProps): JSX.Element => {
+ const tabs: TabType[] = [
+ {
+ name: "Device Config",
+ icon: CogIcon,
+ element: () => (
+
+ Title
+
+ ),
+ },
+ {
+ name: "Device Config",
+ icon: CogIcon,
+ element: () => (
+
+ Title 2
+
+ ),
+ },
+ ];
+
+ return (
+
+ );
};
diff --git a/src/components/Dialog/RegionDialog.tsx b/src/components/Dialog/RegionDialog.tsx
new file mode 100644
index 00000000..250e4375
--- /dev/null
+++ b/src/components/Dialog/RegionDialog.tsx
@@ -0,0 +1,68 @@
+import type React from "react";
+import { useEffect, useState } from "react";
+
+import { Dialog, SelectField } from "evergreen-ui";
+import { useForm } from "react-hook-form";
+
+import { LoRaValidation } from "@app/validation/config/lora.js";
+import { useDevice } from "@core/providers/useDevice.js";
+import { renderOptions } from "@core/utils/selectEnumOptions.js";
+import { classValidatorResolver } from "@hookform/resolvers/class-validator";
+import { Protobuf } from "@meshtastic/meshtasticjs";
+
+import { Form } from "../form/Form.js";
+
+export interface RegionDialogProps {
+ isOpen: boolean;
+}
+
+export const RegionDialog = ({ isOpen }: RegionDialogProps): JSX.Element => {
+ const { config, connection } = useDevice();
+ const [loading, setLoading] = useState(false);
+ const {
+ register,
+ handleSubmit,
+ formState: { errors, isDirty },
+ reset,
+ } = useForm({
+ defaultValues: config.lora,
+ resolver: classValidatorResolver(LoRaValidation),
+ });
+
+ useEffect(() => {
+ reset(config.lora);
+ }, [reset, config.lora]);
+
+ const onSubmit = handleSubmit((data) => {
+ setLoading(true);
+ void connection?.setConfig(
+ {
+ payloadVariant: {
+ oneofKind: "lora",
+ lora: data,
+ },
+ },
+ async () => {
+ reset({ ...data });
+ setLoading(false);
+ await Promise.resolve();
+ }
+ );
+ });
+
+ return (
+
+ );
+};
diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx
index 83aea1eb..d23954ce 100644
--- a/src/components/layout/Header.tsx
+++ b/src/components/layout/Header.tsx
@@ -18,8 +18,9 @@ import {
} from "evergreen-ui";
import { FiGithub } from "react-icons/fi";
-import { useAppStore } from "@app/core/stores/appStore.js";
+import { HelpDialog } from "@components/Dialog/HelpDialog.js";
import { NewDevice } from "@components/SlideSheets/NewDevice.js";
+import { useAppStore } from "@core/stores/appStore.js";
import { useDeviceStore } from "@core/stores/deviceStore.js";
import { Hashicon } from "@emeraldpay/hashicon-react";
import { Types } from "@meshtastic/meshtasticjs";
@@ -27,6 +28,7 @@ import { Types } from "@meshtastic/meshtasticjs";
export const Header = (): JSX.Element => {
const { getDevices, removeDevice } = useDeviceStore();
const [newConnectionOpen, setNewConnectionOpen] = useState(false);
+ const [helpDialogOpen, setHelpDialogOpen] = useState(false);
const { selectedDevice, setSelectedDevice } = useAppStore();
return (
@@ -142,7 +144,18 @@ export const Header = (): JSX.Element => {
-
+ {
+ setHelpDialogOpen(true);
+ }}
+ />
+ {
+ setHelpDialogOpen(false);
+ }}
+ />