update imports & dependencies
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type React from "react";
|
||||
|
||||
import { DeviceContext } from "./core/providers/useDevice.js";
|
||||
import type { Device } from "./core/stores/deviceStore.js";
|
||||
import { DeviceContext } from "@core/providers/useDevice.js";
|
||||
import type { Device } from "@core/stores/deviceStore.js";
|
||||
|
||||
export interface DeviceProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
+6
-7
@@ -1,13 +1,12 @@
|
||||
import type React from "react";
|
||||
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
|
||||
import { ChannelsPage } from "./pages/Channels/index.js";
|
||||
import { ConfigPage } from "./pages/Config/index.js";
|
||||
import { ExtensionsPage } from "./pages/Extensions/Index.js";
|
||||
import { InfoPage } from "./pages/Info/index.js";
|
||||
import { MapPage } from "./pages/Map/index.js";
|
||||
import { MessagesPage } from "./pages/Messages/index.js";
|
||||
import { ChannelsPage } from "@pages/Channels/index.js";
|
||||
import { ConfigPage } from "@pages/Config/index.js";
|
||||
import { ExtensionsPage } from "@pages/Extensions/Index.js";
|
||||
import { InfoPage } from "@pages/Info/index.js";
|
||||
import { MapPage } from "@pages/Map/index.js";
|
||||
import { MessagesPage } from "@pages/Messages/index.js";
|
||||
|
||||
export const PageRouter = (): JSX.Element => {
|
||||
const { activePage } = useDevice();
|
||||
|
||||
@@ -39,7 +39,6 @@ export const Progress = (): JSX.Element => {
|
||||
hardware.myNodeNum,
|
||||
setReady,
|
||||
]);
|
||||
|
||||
return (
|
||||
<Pane
|
||||
display="flex"
|
||||
|
||||
@@ -12,10 +12,10 @@ import {
|
||||
} from "evergreen-ui";
|
||||
import { FiBluetooth, FiTerminal, FiWifi } from "react-icons/fi";
|
||||
|
||||
import type { TabType } from "../layout/page/TabbedContent.js";
|
||||
import { BLE } from "./tabs/connect/BLE.js";
|
||||
import { HTTP } from "./tabs/connect/HTTP.js";
|
||||
import { Serial } from "./tabs/connect/Serial.js";
|
||||
import type { TabType } from "@components/layout/page/TabbedContent.js";
|
||||
import { BLE } from "@components/SlideSheets/tabs/connect/BLE.js";
|
||||
import { HTTP } from "@components/SlideSheets/tabs/connect/HTTP.js";
|
||||
import { Serial } from "@components/SlideSheets/tabs/connect/Serial.js";
|
||||
|
||||
export interface NewDeviceProps {
|
||||
open: boolean;
|
||||
|
||||
@@ -3,16 +3,15 @@ import { useEffect, useState } from "react";
|
||||
|
||||
import { GeolocationIcon, Pane, PropertyIcon, SideSheet } from "evergreen-ui";
|
||||
|
||||
import { SlideSheetTabbedContent } from "@components/layout/page/SlideSheetTabbedContent.js";
|
||||
import type { TabType } from "@components/layout/page/TabbedContent.js";
|
||||
import { Location } from "@components/SlideSheets/tabs/nodes/Location.js";
|
||||
import { Overview } from "@components/SlideSheets/tabs/nodes/Overview.js";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import type { Node } from "@core/stores/deviceStore.js";
|
||||
import { Hashicon } from "@emeraldpay/hashicon-react";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
import { SlideSheetTabbedContent } from "../layout/page/SlideSheetTabbedContent.js";
|
||||
import type { TabType } from "../layout/page/TabbedContent.js";
|
||||
import { Location } from "./tabs/nodes/Location.js";
|
||||
import { Overview } from "./tabs/nodes/Overview.js";
|
||||
|
||||
export const PeerInfo = () => {
|
||||
const { peerInfoOpen, activePeer, setPeerInfoOpen, nodes } = useDevice();
|
||||
const [node, setNode] = useState<Node | undefined>();
|
||||
|
||||
@@ -4,14 +4,13 @@ import { useCallback, useEffect, useState } from "react";
|
||||
import { Button, majorScale, Pane } from "evergreen-ui";
|
||||
import { FiPlusCircle } from "react-icons/fi";
|
||||
|
||||
import { useAppStore } from "@app/core/stores/appStore.js";
|
||||
import { useDeviceStore } from "@app/core/stores/deviceStore.js";
|
||||
import { subscribeAll } from "@app/core/subscriptions.js";
|
||||
import { randId } from "@app/core/utils/randId.js";
|
||||
import type { CloseProps } from "@components/SlideSheets/NewDevice.js";
|
||||
import { useAppStore } from "@core/stores/appStore.js";
|
||||
import { useDeviceStore } from "@core/stores/deviceStore.js";
|
||||
import { subscribeAll } from "@core/subscriptions.js";
|
||||
import { randId } from "@core/utils/randId.js";
|
||||
import { Constants, IBLEConnection } from "@meshtastic/meshtasticjs";
|
||||
|
||||
import type { CloseProps } from "../../NewDevice.js";
|
||||
|
||||
export const BLE = ({ close }: CloseProps): JSX.Element => {
|
||||
const [bleDevices, setBleDevices] = useState<BluetoothDevice[]>([]);
|
||||
const { addDevice } = useDeviceStore();
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Button, majorScale, Pane, TextInputField } from "evergreen-ui";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { FiPlusCircle } from "react-icons/fi";
|
||||
|
||||
import { useAppStore } from "@app/core/stores/appStore.js";
|
||||
import { useDeviceStore } from "@app/core/stores/deviceStore.js";
|
||||
import { subscribeAll } from "@app/core/subscriptions.js";
|
||||
import { randId } from "@app/core/utils/randId.js";
|
||||
import { useAppStore } from "@core/stores/appStore.js";
|
||||
import { useDeviceStore } from "@core/stores/deviceStore.js";
|
||||
import { subscribeAll } from "@core/subscriptions.js";
|
||||
import { randId } from "@core/utils/randId.js";
|
||||
import { IHTTPConnection } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export interface HTTPProps {
|
||||
|
||||
@@ -4,14 +4,13 @@ import { useCallback, useEffect, useState } from "react";
|
||||
import { Button, majorScale, Pane } from "evergreen-ui";
|
||||
import { FiPlusCircle } from "react-icons/fi";
|
||||
|
||||
import { useAppStore } from "@app/core/stores/appStore.js";
|
||||
import { subscribeAll } from "@app/core/subscriptions.js";
|
||||
import type { CloseProps } from "@components/SlideSheets/NewDevice.js";
|
||||
import { useAppStore } from "@core/stores/appStore.js";
|
||||
import { useDeviceStore } from "@core/stores/deviceStore.js";
|
||||
import { subscribeAll } from "@core/subscriptions.js";
|
||||
import { randId } from "@core/utils/randId.js";
|
||||
import { ISerialConnection } from "@meshtastic/meshtasticjs";
|
||||
|
||||
import type { CloseProps } from "../../NewDevice.js";
|
||||
|
||||
interface USBID {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type React from "react";
|
||||
import { Pane } from "evergreen-ui";
|
||||
import JSONPretty from "react-json-pretty";
|
||||
|
||||
import type { Node } from "@app/core/stores/deviceStore.js";
|
||||
import type { Node } from "@core/stores/deviceStore.js";
|
||||
|
||||
export interface LocationProps {
|
||||
node?: Node;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type React from "react";
|
||||
import { Pane } from "evergreen-ui";
|
||||
import JSONPretty from "react-json-pretty";
|
||||
|
||||
import type { Node } from "@app/core/stores/deviceStore.js";
|
||||
import type { Node } from "@core/stores/deviceStore.js";
|
||||
|
||||
export interface OverviewProps {
|
||||
node?: Node;
|
||||
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
} from "evergreen-ui";
|
||||
import { FiBluetooth, FiTerminal, FiWifi } from "react-icons/fi";
|
||||
|
||||
import { toMGRS } from "@app/core/utils/toMGRS.js";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { toMGRS } from "@core/utils/toMGRS.js";
|
||||
import { Hashicon } from "@emeraldpay/hashicon-react";
|
||||
import { Types } from "@meshtastic/meshtasticjs";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
Tablist,
|
||||
} from "evergreen-ui";
|
||||
|
||||
import { PeersDialog } from "@app/components/Dialog/PeersDialog.js";
|
||||
import { PeersDialog } from "@components/Dialog/PeersDialog.js";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import type { Page } from "@core/stores/deviceStore.js";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
import type { Device } from "../stores/deviceStore.js";
|
||||
import type { Device } from "@core/stores/deviceStore.js";
|
||||
|
||||
export const DeviceContext = createContext<Device | undefined>(undefined);
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Device } from "@core/stores/deviceStore.js";
|
||||
import {
|
||||
IConnection,
|
||||
Protobuf,
|
||||
@@ -5,8 +6,6 @@ import {
|
||||
Types,
|
||||
} from "@meshtastic/meshtasticjs";
|
||||
|
||||
import type { Device } from "./stores/deviceStore.js";
|
||||
|
||||
export const subscribeAll = (device: Device, connection: IConnection) => {
|
||||
SettingsManager.debugMode = Protobuf.LogRecord_Level.TRACE;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { StrictMode } from "react";
|
||||
import { enableMapSet } from "immer";
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import { App } from "@app/App";
|
||||
import { App } from "@app/App.js";
|
||||
|
||||
const container = document.getElementById("root") as HTMLElement;
|
||||
const root = createRoot(container);
|
||||
|
||||
@@ -4,12 +4,11 @@ import { useState } from "react";
|
||||
import { Button, LayerIcon, LayerOutlineIcon, Tooltip } from "evergreen-ui";
|
||||
import { IoQrCodeOutline } from "react-icons/io5";
|
||||
|
||||
import { QRDialog } from "@app/components/Dialog/QRDialog.js";
|
||||
import { QRDialog } from "@components/Dialog/QRDialog.js";
|
||||
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
import { Channel } from "./Channel.js";
|
||||
import { Channel } from "@pages/Channels/Channel.js";
|
||||
|
||||
export const ChannelsPage = (): JSX.Element => {
|
||||
const { channels, config } = useDevice();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useState } from "react";
|
||||
|
||||
import { Pane, Tab, Tablist } from "evergreen-ui";
|
||||
|
||||
import { ExternalNotification } from "@app/components/PageComponents/ModuleConfig/ExternalNotification.js";
|
||||
import { ExternalNotification } from "@components/PageComponents/ModuleConfig/ExternalNotification.js";
|
||||
import { MQTT } from "@components/PageComponents/ModuleConfig/MQTT.js";
|
||||
import { Serial } from "@components/PageComponents/ModuleConfig/Serial.js";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useState } from "react";
|
||||
|
||||
import { Pane, Tab, Tablist } from "evergreen-ui";
|
||||
|
||||
import { Bluetooth } from "@app/components/PageComponents/Config/Bluetooth.js";
|
||||
import { Bluetooth } from "@components/PageComponents/Config/Bluetooth.js";
|
||||
import { Device } from "@components/PageComponents/Config/Device.js";
|
||||
import { Display } from "@components/PageComponents/Config/Display.js";
|
||||
import { LoRa } from "@components/PageComponents/Config/LoRa.js";
|
||||
|
||||
@@ -3,8 +3,8 @@ import { useState } from "react";
|
||||
|
||||
import { Pane, Tab, Tablist } from "evergreen-ui";
|
||||
|
||||
import { ExternalNotification } from "@app/components/PageComponents/ModuleConfig/ExternalNotification.js";
|
||||
import { CannedMessage } from "@components/PageComponents/ModuleConfig/CannedMessage";
|
||||
import { ExternalNotification } from "@components/PageComponents/ModuleConfig/ExternalNotification.js";
|
||||
import { MQTT } from "@components/PageComponents/ModuleConfig/MQTT.js";
|
||||
import { RangeTest } from "@components/PageComponents/ModuleConfig/RangeTest.js";
|
||||
import { Serial } from "@components/PageComponents/ModuleConfig/Serial.js";
|
||||
|
||||
@@ -3,10 +3,9 @@ import type React from "react";
|
||||
import { ApplicationsIcon, CogIcon, CubeIcon } from "evergreen-ui";
|
||||
|
||||
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
|
||||
|
||||
import { AppConfig } from "./AppConfig.js";
|
||||
import { DeviceConfig } from "./DeviceConfig.js";
|
||||
import { ModuleConfig } from "./ModuleConfig.js";
|
||||
import { AppConfig } from "@pages/Config/AppConfig.js";
|
||||
import { DeviceConfig } from "@pages/Config/DeviceConfig.js";
|
||||
import { ModuleConfig } from "@pages/Config/ModuleConfig.js";
|
||||
|
||||
export const ConfigPage = (): JSX.Element => {
|
||||
const tabs: TabType[] = [
|
||||
|
||||
@@ -4,10 +4,9 @@ import { DocumentIcon, GanttChartIcon, RainIcon } from "evergreen-ui";
|
||||
|
||||
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { Environment } from "@pages/Extensions/Environment.js";
|
||||
import { FileBrowser } from "@pages/Extensions/FileBrowser";
|
||||
|
||||
import { Environment } from "./Environment.js";
|
||||
|
||||
export const ExtensionsPage = (): JSX.Element => {
|
||||
const { hardware } = useDevice();
|
||||
|
||||
|
||||
@@ -14,9 +14,8 @@ import {
|
||||
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import type { Channel } from "@core/stores/deviceStore.js";
|
||||
|
||||
import { Message } from "./Message.js";
|
||||
import { NewLocationMessage } from "./NewLocationMessage.js";
|
||||
import { Message } from "@pages/Messages/Message.js";
|
||||
import { NewLocationMessage } from "@pages/Messages/NewLocationMessage.js";
|
||||
|
||||
export interface ChannelChatProps {
|
||||
channel: Channel;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Text,
|
||||
} from "evergreen-ui";
|
||||
|
||||
import { toMGRS } from "@app/core/utils/toMGRS.js";
|
||||
import { toMGRS } from "@core/utils/toMGRS.js";
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export interface LocationMessageProps {
|
||||
|
||||
@@ -13,8 +13,7 @@ import {
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { Hashicon } from "@emeraldpay/hashicon-react";
|
||||
import type { Protobuf, Types } from "@meshtastic/meshtasticjs";
|
||||
|
||||
import { LocationMessage } from "./LocationMessage.js";
|
||||
import { LocationMessage } from "@pages/Messages/LocationMessage.js";
|
||||
|
||||
export interface MessageProps {
|
||||
lastMsgSameUser: boolean;
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
TextInputField,
|
||||
} from "evergreen-ui";
|
||||
|
||||
import { renderOptions } from "@app/core/utils/selectEnumOptions.js";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { renderOptions } from "@core/utils/selectEnumOptions.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
enum LocationType {
|
||||
|
||||
Reference in New Issue
Block a user