diff --git a/src/index.tsx b/src/index.tsx index d0708893..8673da63 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,6 @@ import '@meshtastic/components/dist/style.css'; import '@app/index.css'; +import 'react-json-pretty/themes/monikai.css'; import '@core/translation'; import React from 'react'; diff --git a/src/pages/Nodes/NodeCard.tsx b/src/pages/Nodes/NodeCard.tsx index 7d20cc06..61be705c 100644 --- a/src/pages/Nodes/NodeCard.tsx +++ b/src/pages/Nodes/NodeCard.tsx @@ -14,13 +14,15 @@ import { MdSdStorage, MdSignalCellularAlt, } from 'react-icons/md'; +import JSONPretty from 'react-json-pretty'; import TimeAgo from 'timeago-react'; +import { Modal } from '@components/generic/Modal'; import { Marker } from '@components/Map/Marker'; import type { Node } from '@core/slices/meshtasticSlice'; import { Disclosure } from '@headlessui/react'; import { useMapbox } from '@hooks/useMapbox'; -import { IconButton } from '@meshtastic/components'; +import { Card, IconButton } from '@meshtastic/components'; import { Protobuf } from '@meshtastic/meshtasticjs'; type PositionConfidence = 'high' | 'low' | 'none'; @@ -34,6 +36,7 @@ export interface NodeCardProps { export const NodeCard = ({ node, myNodeInfo }: NodeCardProps): JSX.Element => { const [snrAverage, setSnrAverage] = React.useState(0); const [satsAverage, setSatsAverage] = React.useState(0); + const [showDebug, setShowDebug] = React.useState(false); const { map } = useMapbox(); React.useEffect(() => { @@ -83,6 +86,18 @@ export const NodeCard = ({ node, myNodeInfo }: NodeCardProps): JSX.Element => { return ( <> + { + setShowDebug(false); + }} + > + + + + + + {node.currentPosition && ( { {Protobuf.HardwareModel[node.user?.hwModel ?? 0]} - } /> + { + setShowDebug(true); + }} + icon={} + />