diff --git a/package.json b/package.json index 2946c813..194cc62c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "description": "Meshtastic web client", "license": "GPL-3.0-only", "scripts": { - "build": "rsbuild build", + "build": "pnpm check && rsbuild build", "check": "biome check .", "check:fix": "pnpm check --write", "dev": "rsbuild dev --open", diff --git a/rsbuild.config.ts b/rsbuild.config.ts index 3191db5c..b9076c33 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -1,6 +1,6 @@ +import { execSync } from "node:child_process"; import { defineConfig } from "@rsbuild/core"; import { pluginReact } from "@rsbuild/plugin-react"; -import { execSync } from "node:child_process"; let hash = ""; diff --git a/src/App.tsx b/src/App.tsx index 8c15dc97..b512b628 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import { CommandPalette } from "@components/CommandPalette.tsx"; import { DeviceSelector } from "@components/DeviceSelector.tsx"; import { DialogManager } from "@components/Dialog/DialogManager"; import { NewDeviceDialog } from "@components/Dialog/NewDeviceDialog.tsx"; +import { KeyBackupReminder } from "@components/KeyBackupReminder"; import { Toaster } from "@components/Toaster.tsx"; import Footer from "@components/UI/Footer.tsx"; import { ThemeController } from "@components/generic/ThemeController.tsx"; @@ -11,7 +12,6 @@ import { useAppStore } from "@core/stores/appStore.ts"; import { useDeviceStore } from "@core/stores/deviceStore.ts"; import { Dashboard } from "@pages/Dashboard/index.tsx"; import { MapProvider } from "react-map-gl"; -import { KeyBackupReminder } from "@components/KeyBackupReminder"; export const App = (): JSX.Element => { const { getDevice } = useDeviceStore(); diff --git a/src/components/Dialog/DialogManager.tsx b/src/components/Dialog/DialogManager.tsx index afebdf5d..e1769751 100644 --- a/src/components/Dialog/DialogManager.tsx +++ b/src/components/Dialog/DialogManager.tsx @@ -1,11 +1,11 @@ import { RemoveNodeDialog } from "@app/components/Dialog/RemoveNodeDialog.tsx"; import { DeviceNameDialog } from "@components/Dialog/DeviceNameDialog.tsx"; import { ImportDialog } from "@components/Dialog/ImportDialog.tsx"; +import { PkiBackupDialog } from "@components/Dialog/PKIBackupDialog"; import { QRDialog } from "@components/Dialog/QRDialog.tsx"; import { RebootDialog } from "@components/Dialog/RebootDialog.tsx"; import { ShutdownDialog } from "@components/Dialog/ShutdownDialog.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { PkiBackupDialog } from "@components/Dialog/PKIBackupDialog"; export const DialogManager = (): JSX.Element => { const { channels, config, dialog, setDialogOpen } = useDevice(); diff --git a/src/components/Dialog/NewDeviceDialog.tsx b/src/components/Dialog/NewDeviceDialog.tsx index e3330cbf..c84bdfbb 100644 --- a/src/components/Dialog/NewDeviceDialog.tsx +++ b/src/components/Dialog/NewDeviceDialog.tsx @@ -11,7 +11,6 @@ import { DialogHeader, DialogTitle, } from "@components/UI/Dialog.tsx"; -import { AlertCircle, InfoIcon, } from "lucide-react"; import { Tabs, TabsContent, @@ -19,8 +18,9 @@ import { TabsTrigger, } from "@components/UI/Tabs.tsx"; import { Subtle } from "@components/UI/Typography/Subtle.tsx"; -import { Link } from "../UI/Typography/Link"; +import { AlertCircle, InfoIcon } from "lucide-react"; import { Fragment } from "react/jsx-runtime"; +import { Link } from "../UI/Typography/Link"; export interface TabElementProps { closeDialog: () => void; @@ -50,26 +50,25 @@ const links: { [key: string]: string } = { "https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts", }; -const listFormatter = new Intl.ListFormat('en', { - style: 'long', - type: 'conjunction' +const listFormatter = new Intl.ListFormat("en", { + style: "long", + type: "conjunction", }); const ErrorMessage = ({ missingFeatures }: FeatureErrorProps) => { if (missingFeatures.length === 0) return null; - const browserFeatures = missingFeatures.filter(feature => feature !== "Secure Context"); + const browserFeatures = missingFeatures.filter( + (feature) => feature !== "Secure Context", + ); const needsSecureContext = missingFeatures.includes("Secure Context"); const formatFeatureList = (features: string[]) => { const parts = listFormatter.formatToParts(features); return parts.map((part) => { - if (part.type === 'element') { + if (part.type === "element") { return ( - + {part.value} ); @@ -94,12 +93,8 @@ const ErrorMessage = ({ missingFeatures }: FeatureErrorProps) => { <> {browserFeatures.length > 0 && " Additionally, it"} {browserFeatures.length === 0 && "This application"} requires a{" "} - - secure context - - . Please connect using HTTPS or localhost. + secure context. + Please connect using HTTPS or localhost. > )}
@@ -146,10 +141,7 @@ export const NewDeviceDialog = ({