* feat(conn): add connection screen and logic * fixes from code review * force https * code review fixes * add http for self testing * enable deviceStore persistance * added translations * disabled feature flag * i18n updates * chore: add new folders to biome config (#910) * chore(i18n): New Crowdin Translations by GitHub Action (#908) Co-authored-by: Crowdin Bot <support+bot@crowdin.com> * fix: use correct deprecated GPS coordinate format enum (#917) The Config_DisplayConfig_GpsCoordinateFormat export doesn't exist in the protobufs package. The correct export is Config_DisplayConfig_DeprecatedGpsCoordinateFormat, which matches what's used in the validation schema. Added TODO comment explaining that this field is deprecated since protobufs 2.7.4 and should be migrated to DeviceUIConfig.gps_format when DeviceUI settings are implemented. * style: fix line wrapping for GPS coordinate format enum (#918) - Split long enum reference across multiple lines to improve code readability - Maintains consistent code formatting standards without changing functionality * fix(core): ensure core package works in browser (#923) * fix(core): ensure core package works in browser * style(core): revert new line removal * fix: add @serialport/bindings-cpp to onlyBuiltDependencies (#914) * feat(ui): Add UI library (#900) * feat: scaffold UI library * Update packages/ui/src/components/theme-provider.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add lock file * lint/formatting fixes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * formatting/linting fixes * fixed some paring logic * fixed connection issue with serial --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: Kamil Dzieniszewski <kamil.dzieniszewski@gmail.com> Co-authored-by: Azarattum <43073346+Azarattum@users.noreply.github.com> Co-authored-by: Ben Allfree <ben@benallfree.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
65 lines
2.2 KiB
TypeScript
65 lines
2.2 KiB
TypeScript
import { DeviceWrapper } from "@app/DeviceWrapper.tsx";
|
|
import { CommandPalette } from "@components/CommandPalette/index.tsx";
|
|
import { DialogManager } from "@components/Dialog/DialogManager.tsx";
|
|
import { KeyBackupReminder } from "@components/KeyBackupReminder.tsx";
|
|
import { Toaster } from "@components/Toaster.tsx";
|
|
import { ErrorPage } from "@components/UI/ErrorPage.tsx";
|
|
import Footer from "@components/UI/Footer.tsx";
|
|
import { useTheme } from "@core/hooks/useTheme.ts";
|
|
import { SidebarProvider, useAppStore, useDeviceStore } from "@core/stores";
|
|
import { Connections } from "@pages/Connections/index.tsx";
|
|
import { Outlet } from "@tanstack/react-router";
|
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
|
import { ErrorBoundary } from "react-error-boundary";
|
|
import { MapProvider } from "react-map-gl/maplibre";
|
|
|
|
export function App() {
|
|
useTheme();
|
|
|
|
const { getDevice } = useDeviceStore();
|
|
const { selectedDeviceId } = useAppStore();
|
|
|
|
const device = getDevice(selectedDeviceId);
|
|
|
|
return (
|
|
// <ThemeProvider defaultTheme="system" storageKey="theme">
|
|
<ErrorBoundary FallbackComponent={ErrorPage}>
|
|
{/* <NewDeviceDialog
|
|
open={connectDialogOpen}
|
|
onOpenChange={(open) => {
|
|
setConnectDialogOpen(open);
|
|
}}
|
|
/> */}
|
|
<Toaster />
|
|
<TanStackRouterDevtools position="bottom-right" />
|
|
<DeviceWrapper deviceId={selectedDeviceId}>
|
|
<div
|
|
className="flex h-screen flex-col bg-background-primary text-text-primary"
|
|
style={{ scrollbarWidth: "thin" }}
|
|
>
|
|
<SidebarProvider>
|
|
<div className="h-full flex flex-1 flex-col">
|
|
{device ? (
|
|
<div className="h-full flex w-full">
|
|
<DialogManager />
|
|
<KeyBackupReminder />
|
|
<CommandPalette />
|
|
<MapProvider>
|
|
<Outlet />
|
|
</MapProvider>
|
|
</div>
|
|
) : (
|
|
<>
|
|
<Connections />
|
|
<Footer />
|
|
</>
|
|
)}
|
|
</div>
|
|
</SidebarProvider>
|
|
</div>
|
|
</DeviceWrapper>
|
|
</ErrorBoundary>
|
|
// </ThemeProvider>
|
|
);
|
|
}
|