From b990123256c3bd376a69014fa97e06db7513aa91 Mon Sep 17 00:00:00 2001 From: ajvpot <553597+ajvpot@users.noreply.github.com> Date: Sat, 2 Aug 2025 04:21:32 +0200 Subject: [PATCH] info modal --- src/components/Header.tsx | 52 +++++++++++++++++++---------- src/components/InfoModal.tsx | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 18 deletions(-) create mode 100644 src/components/InfoModal.tsx diff --git a/src/components/Header.tsx b/src/components/Header.tsx index b42262f..38930e7 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,8 +1,9 @@ "use client"; import Link from "next/link"; -import { Cog6ToothIcon } from "@heroicons/react/24/outline"; +import { Cog6ToothIcon, InformationCircleIcon } from "@heroicons/react/24/outline"; import { useConfig } from "./ConfigContext"; -import React from "react"; +import React, { useState } from "react"; +import InfoModal from "./InfoModal"; interface HeaderProps { configButtonRef?: React.Ref; @@ -10,22 +11,37 @@ interface HeaderProps { export default function Header({ configButtonRef }: HeaderProps) { const { openConfig, configButtonRef: contextButtonRef } = useConfig(); + const [infoModalOpen, setInfoModalOpen] = useState(false); + return ( -
- - -
+ <> +
+ +
+ + +
+
+ {infoModalOpen && setInfoModalOpen(false)} />} + ); } \ No newline at end of file diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx new file mode 100644 index 0000000..1b85a78 --- /dev/null +++ b/src/components/InfoModal.tsx @@ -0,0 +1,64 @@ +"use client"; +import React from "react"; + +interface InfoModalProps { + onClose: () => void; +} + +export default function InfoModal({ onClose }: InfoModalProps) { + return ( +
+
+ + +

About MeshExplorer

+ +
+
+

+ MeshExplorer is a web-based visualization tool for exploring and monitoring mesh networks. + It provides real-time mapping of network nodes, message tracking, and statistical analysis for MeshCore and Meshtastic networks. +

+
+ +
+

Getting Connected

+

+ To add your node to the network visualization, configure your device to publish data via MQTT. + Detailed connection instructions and configuration examples will be available here soon. +

+
+

+ MQTT connection guide coming soon... +

+
+
+ +
+

Contributing

+

+ MeshExplorer is open source and welcomes contributions from the community. +

+ + + + + View on GitHub + +
+
+
+
+ ); +} \ No newline at end of file