Merge branch 'master' into refactor/use-deno
This commit is contained in:
@@ -1517,6 +1517,8 @@
|
|||||||
|
|
||||||
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||||
|
|
||||||
|
"regenerator-runtime": ["regenerator-runtime@0.14.1", "", {}, "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="],
|
||||||
|
|
||||||
"reflect.getprototypeof": ["reflect.getprototypeof@1.0.10", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.9", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.1", "which-builtin-type": "^1.2.1" } }, "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw=="],
|
"reflect.getprototypeof": ["reflect.getprototypeof@1.0.10", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.9", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.1", "which-builtin-type": "^1.2.1" } }, "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw=="],
|
||||||
|
|
||||||
"regenerate": ["regenerate@1.4.2", "", {}, "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="],
|
"regenerate": ["regenerate@1.4.2", "", {}, "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="],
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import ConfigPage from "@pages/Config/index.tsx";
|
|||||||
import MessagesPage from "@pages/Messages.tsx";
|
import MessagesPage from "@pages/Messages.tsx";
|
||||||
import NodesPage from "@pages/Nodes.tsx";
|
import NodesPage from "@pages/Nodes.tsx";
|
||||||
import { ErrorBoundary } from "react-error-boundary";
|
import { ErrorBoundary } from "react-error-boundary";
|
||||||
import { ErrorPage } from "./components/UI/ErrorPage.tsx";
|
import { ErrorPage } from "@components/UI/ErrorPage.tsx";
|
||||||
|
|
||||||
export const ErrorBoundaryWrapper = ({
|
export const ErrorBoundaryWrapper = ({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ import {
|
|||||||
type SubmitHandler,
|
type SubmitHandler,
|
||||||
useForm,
|
useForm,
|
||||||
} from "react-hook-form";
|
} from "react-hook-form";
|
||||||
import { Heading } from "../UI/Typography/Heading.tsx";
|
import { Heading } from "@components/UI/Typography/Heading.tsx";
|
||||||
|
|
||||||
|
|
||||||
interface DisabledBy<T> {
|
interface DisabledBy<T> {
|
||||||
fieldName: Path<T>;
|
fieldName: Path<T>;
|
||||||
|
|||||||
@@ -59,9 +59,8 @@ export const Serial = ({ closeDialog }: TabElementProps) => {
|
|||||||
await onConnect(port);
|
await onConnect(port);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`# ${index} - ${usbVendorId ?? "UNK"} - ${
|
{`# ${index} - ${usbVendorId ?? "UNK"} - ${usbProductId ?? "UNK"
|
||||||
usbProductId ?? "UNK"
|
}`}
|
||||||
}`}
|
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Spinner } from "@components/UI/Spinner.tsx";
|
|||||||
import { ErrorBoundary } from "react-error-boundary";
|
import { ErrorBoundary } from "react-error-boundary";
|
||||||
import { ErrorPage } from "@components/UI/ErrorPage.tsx";
|
import { ErrorPage } from "@components/UI/ErrorPage.tsx";
|
||||||
|
|
||||||
|
|
||||||
export interface PageLayoutProps {
|
export interface PageLayoutProps {
|
||||||
label: string;
|
label: string;
|
||||||
noPadding?: boolean;
|
noPadding?: boolean;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { Heading } from "./Typography/Heading.tsx";
|
|||||||
import { Link } from "./Typography/Link.tsx";
|
import { Link } from "./Typography/Link.tsx";
|
||||||
import { P } from "./Typography/P.tsx";
|
import { P } from "./Typography/P.tsx";
|
||||||
|
|
||||||
|
|
||||||
export function ErrorPage({ error }: { error: Error }) {
|
export function ErrorPage({ error }: { error: Error }) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export default function newGithubIssueUrl(
|
|||||||
|
|
||||||
function validateOptions(options: GithubIssueUrlOptions): ValidatedOptions {
|
function validateOptions(options: GithubIssueUrlOptions): ValidatedOptions {
|
||||||
const repoUrl = options.repoUrl ??
|
const repoUrl = options.repoUrl ??
|
||||||
|
|
||||||
(options.user && options.repo
|
(options.user && options.repo
|
||||||
? `https://github.com/${options.user}/${options.repo}`
|
? `https://github.com/${options.user}/${options.repo}`
|
||||||
: undefined);
|
: undefined);
|
||||||
|
|||||||
+25
-22
@@ -1,7 +1,7 @@
|
|||||||
import { LocationResponseDialog } from "@components/Dialog/LocationResponseDialog.tsx";
|
import { LocationResponseDialog } from "@app/components/Dialog/LocationResponseDialog.tsx";
|
||||||
import { NodeOptionsDialog } from "@components/Dialog/NodeOptionsDialog.tsx";
|
import { NodeOptionsDialog } from "@app/components/Dialog/NodeOptionsDialog.tsx";
|
||||||
import { TracerouteResponseDialog } from "@components/Dialog/TracerouteResponseDialog.tsx";
|
import { TracerouteResponseDialog } from "@app/components/Dialog/TracerouteResponseDialog.tsx";
|
||||||
import Footer from "@components/UI/Footer.tsx";
|
import Footer from "@app/components/UI/Footer.tsx";
|
||||||
import { Sidebar } from "@components/Sidebar.tsx";
|
import { Sidebar } from "@components/Sidebar.tsx";
|
||||||
import { Avatar } from "@components/UI/Avatar.tsx";
|
import { Avatar } from "@components/UI/Avatar.tsx";
|
||||||
import { Mono } from "@components/generic/Mono.tsx";
|
import { Mono } from "@components/generic/Mono.tsx";
|
||||||
@@ -11,7 +11,7 @@ import { useDevice } from "@core/stores/deviceStore.ts";
|
|||||||
import { Protobuf, type Types } from "@meshtastic/core";
|
import { Protobuf, type Types } from "@meshtastic/core";
|
||||||
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
|
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
|
||||||
import { LockIcon, LockOpenIcon } from "lucide-react";
|
import { LockIcon, LockOpenIcon } from "lucide-react";
|
||||||
import { type JSX, useCallback, useEffect, useState } from "react";
|
import { Fragment, type JSX, useCallback, useEffect, useState } from "react";
|
||||||
import { base16 } from "rfc4648";
|
import { base16 } from "rfc4648";
|
||||||
|
|
||||||
export interface DeleteNoteDialogProps {
|
export interface DeleteNoteDialogProps {
|
||||||
@@ -19,7 +19,7 @@ export interface DeleteNoteDialogProps {
|
|||||||
onOpenChange: (open: boolean) => void;
|
onOpenChange: (open: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NodesPage = () => {
|
const NodesPage = (): JSX.Element => {
|
||||||
const { nodes, hardware, connection } = useDevice();
|
const { nodes, hardware, connection } = useDevice();
|
||||||
const [selectedNode, setSelectedNode] = useState<
|
const [selectedNode, setSelectedNode] = useState<
|
||||||
Protobuf.Mesh.NodeInfo | undefined
|
Protobuf.Mesh.NodeInfo | undefined
|
||||||
@@ -108,9 +108,8 @@ const NodesPage = () => {
|
|||||||
{node.user?.shortName ??
|
{node.user?.shortName ??
|
||||||
(node.user?.macaddr
|
(node.user?.macaddr
|
||||||
? `${base16
|
? `${base16
|
||||||
.stringify(node.user?.macaddr.subarray(4, 6) ?? [])
|
.stringify(node.user?.macaddr.subarray(4, 6) ?? [])
|
||||||
.toLowerCase()
|
.toLowerCase()}`
|
||||||
}`
|
|
||||||
: `${numberToHexUnpadded(node.num).slice(-4)}`)}
|
: `${numberToHexUnpadded(node.num).slice(-4)}`)}
|
||||||
</h1>,
|
</h1>,
|
||||||
|
|
||||||
@@ -122,9 +121,8 @@ const NodesPage = () => {
|
|||||||
{node.user?.longName ??
|
{node.user?.longName ??
|
||||||
(node.user?.macaddr
|
(node.user?.macaddr
|
||||||
? `Meshtastic ${base16
|
? `Meshtastic ${base16
|
||||||
.stringify(node.user?.macaddr.subarray(4, 6) ?? [])
|
.stringify(node.user?.macaddr.subarray(4, 6) ?? [])
|
||||||
.toLowerCase()
|
.toLowerCase()}`
|
||||||
}`
|
|
||||||
: `!${numberToHexUnpadded(node.num)}`)}
|
: `!${numberToHexUnpadded(node.num)}`)}
|
||||||
</h1>,
|
</h1>,
|
||||||
|
|
||||||
@@ -138,9 +136,11 @@ const NodesPage = () => {
|
|||||||
?.join(":") ?? "UNK"}
|
?.join(":") ?? "UNK"}
|
||||||
</Mono>,
|
</Mono>,
|
||||||
<Mono className="px-4" key="lastHeard">
|
<Mono className="px-4" key="lastHeard">
|
||||||
{node.lastHeard === 0
|
{node.lastHeard === 0 ? (
|
||||||
? <p className="px-4">Never</p>
|
<p className="px-4">Never</p>
|
||||||
: <TimeAgo timestamp={node.lastHeard * 1000} />}
|
) : (
|
||||||
|
<TimeAgo timestamp={node.lastHeard * 1000} />
|
||||||
|
)}
|
||||||
</Mono>,
|
</Mono>,
|
||||||
<Mono key="snr">
|
<Mono key="snr">
|
||||||
{node.snr}db/
|
{node.snr}db/
|
||||||
@@ -148,16 +148,19 @@ const NodesPage = () => {
|
|||||||
{(node.snr + 10) * 5}raw
|
{(node.snr + 10) * 5}raw
|
||||||
</Mono>,
|
</Mono>,
|
||||||
<Mono key="pki">
|
<Mono key="pki">
|
||||||
{node.user?.publicKey && node.user?.publicKey.length > 0
|
{node.user?.publicKey && node.user?.publicKey.length > 0 ? (
|
||||||
? <LockIcon className="text-green-600 mx-auto" />
|
<LockIcon className="text-green-600 mx-auto" />
|
||||||
: <LockOpenIcon className="text-yellow-300 mx-auto" />}
|
) : (
|
||||||
|
<LockOpenIcon className="text-yellow-300 mx-auto" />
|
||||||
|
)}
|
||||||
</Mono>,
|
</Mono>,
|
||||||
<Mono key="hops">
|
<Mono key="hops">
|
||||||
{node?.lastHeard !== 0
|
{node.lastHeard !== 0
|
||||||
? node?.viaMqtt === false && node?.hopsAway === 0
|
? node.viaMqtt === false && node.hopsAway === 0
|
||||||
? "Direct"
|
? "Direct"
|
||||||
: `${node?.hopsAway?.toString()} ${node?.hopsAway > 1 ? "hops" : "hop"
|
: `${node.hopsAway?.toString()} ${
|
||||||
} away`
|
node.hopsAway > 1 ? "hops" : "hop"
|
||||||
|
} away`
|
||||||
: "-"}
|
: "-"}
|
||||||
{node.viaMqtt === true ? ", via MQTT" : ""}
|
{node.viaMqtt === true ? ", via MQTT" : ""}
|
||||||
</Mono>,
|
</Mono>,
|
||||||
|
|||||||
Reference in New Issue
Block a user