Fix MGRS font size, make info page tabbed

This commit is contained in:
Sacha Weatherstone
2022-10-08 21:54:04 +10:30
parent fadd4ea590
commit 3dce57a657
4 changed files with 123 additions and 16 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export const PositionWidget = ({ grid }: PositionWidgetProps): JSX.Element => {
</p>
</dt>
<dd className="ml-16 flex items-baseline">
<p className="text-2xl font-semibold text-gray-900">{grid}</p>
<p className="text-lg font-semibold text-gray-900">{grid}</p>
</dd>
</div>
);
+41 -9
View File
@@ -1,18 +1,50 @@
import type React from "react";
import JSONPretty from "react-json-pretty";
import { JSONTree } from "react-json-tree";
import {
TabbedContent,
TabType,
} from "@app/components/layout/page/TabbedContent.js";
import { useDevice } from "@core/providers/useDevice.js";
import { EyeIcon } from "@heroicons/react/24/outline";
export const InfoPage = (): JSX.Element => {
const { hardware, nodes } = useDevice();
const { channels, config, moduleConfig, hardware, nodes, waypoints } =
useDevice();
const myNode = nodes.find((n) => n.data.num === hardware.myNodeNum);
const tabs: TabType[] = [
{
name: "Channels",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={channels} />,
},
{
name: "Config",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={config} />,
},
{
name: "Module Config",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={moduleConfig} />,
},
{
name: "Hardware",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={hardware} />,
},
{
name: "Nodes",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={nodes} />,
},
{
name: "Waypoints",
icon: <EyeIcon className="h-4" />,
element: () => <JSONTree theme="monokai" data={waypoints} />,
},
];
return (
<div className="w-full overflow-y-auto">
<JSONPretty data={myNode} />
<JSONPretty data={hardware} />
</div>
);
return <TabbedContent tabs={tabs} />;
};