chore: fixes from deno linting/formatting
This commit is contained in:
+19
-19
@@ -10,11 +10,13 @@ import Footer from "@components/UI/Footer.tsx";
|
|||||||
import { useAppStore } from "@core/stores/appStore.ts";
|
import { useAppStore } from "@core/stores/appStore.ts";
|
||||||
import { useDeviceStore } from "@core/stores/deviceStore.ts";
|
import { useDeviceStore } from "@core/stores/deviceStore.ts";
|
||||||
import { Dashboard } from "@pages/Dashboard/index.tsx";
|
import { Dashboard } from "@pages/Dashboard/index.tsx";
|
||||||
|
import type { JSX } from "react";
|
||||||
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";
|
||||||
import { MapProvider } from "react-map-gl/maplibre";
|
import { MapProvider } from "react-map-gl/maplibre";
|
||||||
|
|
||||||
export const App = () => {
|
|
||||||
|
export const App = (): JSX.Element => {
|
||||||
const { getDevice } = useDeviceStore();
|
const { getDevice } = useDeviceStore();
|
||||||
const { selectedDevice, setConnectDialogOpen, connectDialogOpen } =
|
const { selectedDevice, setConnectDialogOpen, connectDialogOpen } =
|
||||||
useAppStore();
|
useAppStore();
|
||||||
@@ -35,23 +37,21 @@ export const App = () => {
|
|||||||
<div className="flex grow">
|
<div className="flex grow">
|
||||||
<DeviceSelector />
|
<DeviceSelector />
|
||||||
<div className="flex grow flex-col">
|
<div className="flex grow flex-col">
|
||||||
{device
|
{device ? (
|
||||||
? (
|
<div className="flex h-screen w-full">
|
||||||
<div className="flex h-screen">
|
<DialogManager />
|
||||||
<DialogManager />
|
<KeyBackupReminder />
|
||||||
<KeyBackupReminder />
|
<CommandPalette />
|
||||||
<CommandPalette />
|
<MapProvider>
|
||||||
<MapProvider>
|
<PageRouter />
|
||||||
<PageRouter />
|
</MapProvider>
|
||||||
</MapProvider>
|
</div>
|
||||||
</div>
|
) : (
|
||||||
)
|
<>
|
||||||
: (
|
<Dashboard />
|
||||||
<>
|
<Footer />
|
||||||
<Dashboard />
|
</>
|
||||||
<Footer />
|
)}
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+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";
|
import { ErrorPage } from "./components/UI/ErrorPage.tsx";
|
||||||
|
|
||||||
export const ErrorBoundaryWrapper = ({
|
export const ErrorBoundaryWrapper = ({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ export const DeviceSelector = () => {
|
|||||||
setCommandPaletteOpen,
|
setCommandPaletteOpen,
|
||||||
setConnectDialogOpen,
|
setConnectDialogOpen,
|
||||||
} = useAppStore();
|
} = useAppStore();
|
||||||
console.log(import.meta.env.VITE_COMMIT_HASH);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="flex flex-col justify-between border-r-[0.5px] border-slate-300 pt-2 dark:border-slate-700">
|
<nav className="flex flex-col justify-between border-r-[0.5px] border-slate-300 pt-2 dark:border-slate-700">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { Button } from "@components/UI/Button.tsx";
|
import { Button } from "@components/UI/Button.tsx";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { RemoveNodeDialog } from "@app/components/Dialog/RemoveNodeDialog.tsx";
|
import { RemoveNodeDialog } from "@components/Dialog/RemoveNodeDialog.tsx";
|
||||||
import { DeviceNameDialog } from "@components/Dialog/DeviceNameDialog.tsx";
|
import { DeviceNameDialog } from "@components/Dialog/DeviceNameDialog.tsx";
|
||||||
import { ImportDialog } from "@components/Dialog/ImportDialog.tsx";
|
import { ImportDialog } from "@components/Dialog/ImportDialog.tsx";
|
||||||
import { PkiBackupDialog } from "./PKIBackupDialog.tsx";
|
import { PkiBackupDialog } from "./PKIBackupDialog.tsx";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useAppStore } from "../../core/stores/appStore.ts";
|
import { useAppStore } from "../../core/stores/appStore.ts";
|
||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import { Button } from "@components/UI/Button.tsx";
|
import { Button } from "@components/UI/Button.tsx";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
type SubmitHandler,
|
type SubmitHandler,
|
||||||
useForm,
|
useForm,
|
||||||
} from "react-hook-form";
|
} from "react-hook-form";
|
||||||
import { Heading } from "../UI/Typography/Heading";
|
import { Heading } from "../UI/Typography/Heading.tsx";
|
||||||
|
|
||||||
interface DisabledBy<T> {
|
interface DisabledBy<T> {
|
||||||
fieldName: Path<T>;
|
fieldName: Path<T>;
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { PkiRegenerateDialog } from "../../../Dialog/PkiRegenerateDialog.tsx";
|
import { PkiRegenerateDialog } from "@components/Dialog/PkiRegenerateDialog.tsx";
|
||||||
import { DynamicForm } from "@app/components/Form/DynamicForm.tsx";
|
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
||||||
import { useAppStore } from "../../../../core/stores/appStore.ts";
|
import { useAppStore } from "@core/stores/appStore.ts";
|
||||||
import {
|
import {
|
||||||
getX25519PrivateKey,
|
getX25519PrivateKey,
|
||||||
getX25519PublicKey,
|
getX25519PublicKey,
|
||||||
} from "../../../../core/utils/x25519.ts";
|
} from "@core/utils/x25519.ts";
|
||||||
import type { SecurityValidation } from "@app/validation/config/security.tsx";
|
import type { SecurityValidation } from "@app/validation/config/security.ts";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { useDevice } from "@core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import { Protobuf } from "@meshtastic/core";
|
import { Protobuf } from "@meshtastic/core";
|
||||||
import { fromByteArray, toByteArray } from "base64-js";
|
import { fromByteArray, toByteArray } from "base64-js";
|
||||||
import { Eye, EyeOff } from "lucide-react";
|
import { Eye, EyeOff } from "lucide-react";
|
||||||
import { useReducer } from "react";
|
import { useReducer } from "react";
|
||||||
import { securityReducer } from "./securityReducer.tsx";
|
import { securityReducer } from "@components/PageComponents/Config/Security/securityReducer.tsx";
|
||||||
|
|
||||||
export const Security = () => {
|
export const Security = () => {
|
||||||
const { config, setWorkingConfig, setDialogOpen } = useDevice();
|
const { config, setWorkingConfig, setDialogOpen } = useDevice();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { TabElementProps } from "@app/components/Dialog/NewDeviceDialog.tsx";
|
import type { TabElementProps } from "@components/Dialog/NewDeviceDialog.tsx";
|
||||||
import { Button } from "@components/UI/Button.tsx";
|
import { Button } from "@components/UI/Button.tsx";
|
||||||
import { Input } from "@components/UI/Input.tsx";
|
import { Input } from "@components/UI/Input.tsx";
|
||||||
import { Label } from "@components/UI/Label.tsx";
|
import { Label } from "@components/UI/Label.tsx";
|
||||||
@@ -22,8 +22,8 @@ export const HTTP = ({ closeDialog }: TabElementProps) => {
|
|||||||
}>({
|
}>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
ip: ["client.meshtastic.org", "localhost"].includes(
|
ip: ["client.meshtastic.org", "localhost"].includes(
|
||||||
globalThis.location.hostname,
|
globalThis.location.hostname,
|
||||||
)
|
)
|
||||||
? "meshtastic.local"
|
? "meshtastic.local"
|
||||||
: globalThis.location.host,
|
: globalThis.location.host,
|
||||||
tls: location.protocol === "https:",
|
tls: location.protocol === "https:",
|
||||||
|
|||||||
@@ -59,8 +59,9 @@ export const Serial = ({ closeDialog }: TabElementProps) => {
|
|||||||
await onConnect(port);
|
await onConnect(port);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`# ${index} - ${usbVendorId ?? "UNK"} - ${usbProductId ?? "UNK"
|
{`# ${index} - ${usbVendorId ?? "UNK"} - ${
|
||||||
}`}
|
usbProductId ?? "UNK"
|
||||||
|
}`}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Separator } from "@app/components/UI/Seperator.tsx";
|
import { Separator } from "@components/UI/Seperator.tsx";
|
||||||
import { Heading } from "@app/components/UI/Typography/Heading.tsx";
|
import { Heading } from "@components/UI/Typography/Heading.tsx";
|
||||||
import { Subtle } from "@app/components/UI/Typography/Subtle.tsx";
|
import { Subtle } from "@components/UI/Typography/Subtle.tsx";
|
||||||
import { formatQuantity } from "@app/core/utils/string.ts";
|
import { formatQuantity } from "@core/utils/string.ts";
|
||||||
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";
|
||||||
import { TimeAgo } from "@components/generic/TimeAgo.tsx";
|
import { TimeAgo } from "@components/generic/TimeAgo.tsx";
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import {
|
import { type MessageWithState, useDevice } from "@core/stores/deviceStore.ts";
|
||||||
type MessageWithState,
|
|
||||||
useDevice,
|
|
||||||
} from "@app/core/stores/deviceStore.ts";
|
|
||||||
import { Message } from "@components/PageComponents/Messages/Message.tsx";
|
import { Message } from "@components/PageComponents/Messages/Message.tsx";
|
||||||
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
|
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
|
||||||
import type { Types } from "@meshtastic/core";
|
import type { Types } from "@meshtastic/core";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
type MessageWithState,
|
type MessageWithState,
|
||||||
useDeviceStore,
|
useDeviceStore,
|
||||||
} from "@app/core/stores/deviceStore.ts";
|
} from "@core/stores/deviceStore.ts";
|
||||||
import { cn } from "@core/utils/cn.ts";
|
import { cn } from "@core/utils/cn.ts";
|
||||||
import { Avatar } from "@components/UI/Avatar.tsx";
|
import { Avatar } from "@components/UI/Avatar.tsx";
|
||||||
import type { Protobuf } from "@meshtastic/core";
|
import type { Protobuf } from "@meshtastic/core";
|
||||||
@@ -44,13 +44,13 @@ const STATUS_TEXT_MAP: Record<MessageState, string> = {
|
|||||||
[MESSAGE_STATES.ACK]: "Message delivered",
|
[MESSAGE_STATES.ACK]: "Message delivered",
|
||||||
[MESSAGE_STATES.WAITING]: "Waiting for delivery",
|
[MESSAGE_STATES.WAITING]: "Waiting for delivery",
|
||||||
[MESSAGE_STATES.FAILED]: "Delivery failed",
|
[MESSAGE_STATES.FAILED]: "Delivery failed",
|
||||||
} as const;
|
};
|
||||||
|
|
||||||
const STATUS_ICON_MAP: Record<MessageState, LucideIcon> = {
|
const STATUS_ICON_MAP: Record<MessageState, LucideIcon> = {
|
||||||
[MESSAGE_STATES.ACK]: CheckCircle2,
|
[MESSAGE_STATES.ACK]: CheckCircle2,
|
||||||
[MESSAGE_STATES.WAITING]: CircleEllipsis,
|
[MESSAGE_STATES.WAITING]: CircleEllipsis,
|
||||||
[MESSAGE_STATES.FAILED]: AlertCircle,
|
[MESSAGE_STATES.FAILED]: AlertCircle,
|
||||||
} as const;
|
};
|
||||||
|
|
||||||
const getStatusText = (state: MessageState): string => STATUS_TEXT_MAP[state];
|
const getStatusText = (state: MessageState): string => STATUS_TEXT_MAP[state];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import type { Protobuf } from "@meshtastic/core";
|
import type { Protobuf } from "@meshtastic/core";
|
||||||
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
|
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.tsx";
|
import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.tsx";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.tsx";
|
import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.tsx";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import type { MqttValidation } from "@app/validation/moduleConfig/mqtt.tsx";
|
import type { MqttValidation } from "@app/validation/moduleConfig/mqtt.tsx";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.tsx";
|
import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.tsx";
|
||||||
import { create } from "@bufbuild/protobuf";
|
import { create } from "@bufbuild/protobuf";
|
||||||
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { cn } from "@app/core/utils/cn.ts";
|
import { cn } from "@core/utils/cn.ts";
|
||||||
import { AlignLeftIcon, type LucideIcon } from "lucide-react";
|
import { AlignLeftIcon, type LucideIcon } from "lucide-react";
|
||||||
import Footer from "@components/UI/Footer.tsx";
|
import Footer from "@components/UI/Footer.tsx";
|
||||||
import { Spinner } from "@components/UI/Spinner.tsx";
|
import { Spinner } from "@components/UI/Spinner.tsx";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import newGithubIssueUrl from "@app/core/utils/github";
|
import newGithubIssueUrl from "../../core/utils/github.ts";
|
||||||
import { ExternalLink } from "lucide-react";
|
import { ExternalLink } from "lucide-react";
|
||||||
import { Heading } from "./Typography/Heading";
|
import { Heading } from "./Typography/Heading.tsx";
|
||||||
import { Link } from "./Typography/Link";
|
import { Link } from "./Typography/Link.tsx";
|
||||||
import { P } from "./Typography/P";
|
import { P } from "./Typography/P.tsx";
|
||||||
|
|
||||||
export function ErrorPage({ error }: { error: Error }) {
|
export function ErrorPage({ error }: { error: Error }) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Heading } from "../Typography/Heading";
|
import { Heading } from "../Typography/Heading.tsx";
|
||||||
|
|
||||||
export interface SidebarSectionProps {
|
export interface SidebarSectionProps {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import type React from "react";
|
|||||||
|
|
||||||
const headingStyles = {
|
const headingStyles = {
|
||||||
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
|
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
|
||||||
h2: "scroll-m-20 border-b border-b-slate-200 pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0 dark:border-b-slate-700",
|
h2:
|
||||||
|
"scroll-m-20 border-b border-b-slate-200 pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0 dark:border-b-slate-700",
|
||||||
h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
|
h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
|
||||||
h4: "scroll-m-20 text-xl font-semibold tracking-tight",
|
h4: "scroll-m-20 text-xl font-semibold tracking-tight",
|
||||||
h5: "scroll-m-20 text-lg font-medium tracking-tight",
|
h5: "scroll-m-20 text-lg font-medium tracking-tight",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { cn } from "@app/core/utils/cn";
|
import { cn } from "@core/utils/cn.ts";
|
||||||
|
|
||||||
export interface PProps {
|
export interface PProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { cn } from "@app/core/utils/cn.ts";
|
import { cn } from "@core/utils/cn.ts";
|
||||||
|
|
||||||
export interface SubtleProps {
|
export interface SubtleProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ export default function newGithubIssueUrl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validateOptions(options: GithubIssueUrlOptions): ValidatedOptions {
|
function validateOptions(options: GithubIssueUrlOptions): ValidatedOptions {
|
||||||
const repoUrl =
|
const repoUrl = options.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);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
TabsContent,
|
TabsContent,
|
||||||
TabsList,
|
TabsList,
|
||||||
TabsTrigger,
|
TabsTrigger,
|
||||||
} from "@app/components/UI/Tabs.tsx";
|
} from "@components/UI/Tabs.tsx";
|
||||||
import { Channel } from "@components/PageComponents/Channel.tsx";
|
import { Channel } from "@components/PageComponents/Channel.tsx";
|
||||||
import { PageLayout } from "@components/PageLayout.tsx";
|
import { PageLayout } from "@components/PageLayout.tsx";
|
||||||
import { Sidebar } from "@components/Sidebar.tsx";
|
import { Sidebar } from "@components/Sidebar.tsx";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AmbientLighting } from "@app/components/PageComponents/ModuleConfig/AmbientLighting.tsx";
|
import { AmbientLighting } from "@components/PageComponents/ModuleConfig/AmbientLighting.tsx";
|
||||||
import { DetectionSensor } from "@app/components/PageComponents/ModuleConfig/DetectionSensor.tsx";
|
import { DetectionSensor } from "@components/PageComponents/ModuleConfig/DetectionSensor.tsx";
|
||||||
import { NeighborInfo } from "@app/components/PageComponents/ModuleConfig/NeighborInfo.tsx";
|
import { NeighborInfo } from "@components/PageComponents/ModuleConfig/NeighborInfo.tsx";
|
||||||
import { Audio } from "@components/PageComponents/ModuleConfig/Audio.tsx";
|
import { Audio } from "@components/PageComponents/ModuleConfig/Audio.tsx";
|
||||||
import { CannedMessage } from "@components/PageComponents/ModuleConfig/CannedMessage.tsx";
|
import { CannedMessage } from "@components/PageComponents/ModuleConfig/CannedMessage.tsx";
|
||||||
import { ExternalNotification } from "@components/PageComponents/ModuleConfig/ExternalNotification.tsx";
|
import { ExternalNotification } from "@components/PageComponents/ModuleConfig/ExternalNotification.tsx";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useAppStore } from "../../core/stores/appStore.ts";
|
import { useAppStore } from "../../core/stores/appStore.ts";
|
||||||
import { useDevice } from "@app/core/stores/deviceStore.ts";
|
import { useDevice } from "@core/stores/deviceStore.ts";
|
||||||
import { PageLayout } from "@components/PageLayout.tsx";
|
import { PageLayout } from "@components/PageLayout.tsx";
|
||||||
import { Sidebar } from "@components/Sidebar.tsx";
|
import { Sidebar } from "@components/Sidebar.tsx";
|
||||||
import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx";
|
import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Heading } from "../../components/UI/Typography/Heading.tsx";
|
import { Heading } from "@components/UI/Typography/Heading.tsx";
|
||||||
import { useAppStore } from "@app/core/stores/appStore.ts";
|
import { useAppStore } from "@core/stores/appStore.ts";
|
||||||
import { useDeviceStore } from "@app/core/stores/deviceStore.ts";
|
import { useDeviceStore } from "@core/stores/deviceStore.ts";
|
||||||
import { Button } from "@components/UI/Button.tsx";
|
import { Button } from "@components/UI/Button.tsx";
|
||||||
import { Separator } from "@components/UI/Seperator.tsx";
|
import { Separator } from "@components/UI/Seperator.tsx";
|
||||||
import { Subtle } from "@components/UI/Typography/Subtle.tsx";
|
import { Subtle } from "@components/UI/Typography/Subtle.tsx";
|
||||||
@@ -99,7 +99,7 @@ export const Dashboard = () => {
|
|||||||
<Heading as="h3">No Devices</Heading>
|
<Heading as="h3">No Devices</Heading>
|
||||||
<Subtle>Connect at least one device to get started</Subtle>
|
<Subtle>Connect at least one device to get started</Subtle>
|
||||||
<Button
|
<Button
|
||||||
className="gap-2"
|
className="gap-2 dark:bg-white dark:text-slate-900 dark:hover:text-slate-100"
|
||||||
variant="default"
|
variant="default"
|
||||||
onClick={() => setConnectDialogOpen(true)}
|
onClick={() => setConnectDialogOpen(true)}
|
||||||
>
|
>
|
||||||
|
|||||||
+7
-11
@@ -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 { Fragment, useCallback, useEffect, useState } from "react";
|
import { type JSX, useCallback, useEffect, useState } from "react";
|
||||||
import { base16 } from "rfc4648";
|
import { base16 } from "rfc4648";
|
||||||
|
|
||||||
export interface DeleteNoteDialogProps {
|
export interface DeleteNoteDialogProps {
|
||||||
@@ -138,11 +138,9 @@ 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/
|
||||||
@@ -150,11 +148,9 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user