Switch to Vite and prune dependencies
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
|
||||
export const About = (): JSX.Element => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import React from 'react';
|
||||
|
||||
import { FiHash } from 'react-icons/fi';
|
||||
|
||||
import { Select } from '@app/components/generic/form/Select.jsx';
|
||||
import { Message } from '@components/chat/Message';
|
||||
import { MessageBar } from '@components/chat/MessageBar';
|
||||
import { Select } from '@components/generic/form/Select';
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
import { useAppSelector } from '../hooks/redux';
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
|
||||
import Avatar from 'boring-avatars';
|
||||
|
||||
import { PageLayout } from '@app/components/templates/PageLayout.jsx';
|
||||
import { useAppSelector } from '@app/hooks/redux';
|
||||
import { PageLayout } from '@components/templates/PageLayout';
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
import { Node } from './Node';
|
||||
|
||||
+5
-120
@@ -2,17 +2,15 @@ import 'react-json-pretty/themes/acai.css';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import moment from 'moment';
|
||||
import { FiMenu, FiTerminal } from 'react-icons/fi';
|
||||
import JSONPretty from 'react-json-pretty';
|
||||
import TimeAgo from 'react-timeago';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Chart } from '@app/components/generic/Chart';
|
||||
import { Checkbox } from '@app/components/generic/form/Checkbox';
|
||||
import { Input } from '@app/components/generic/form/Input';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import { StatCard } from '@app/components/generic/StatCard';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Checkbox } from '@components/generic/form/Checkbox';
|
||||
import { Input } from '@components/generic/form/Input';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { StatCard } from '@components/generic/StatCard';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
import type { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
@@ -44,119 +42,6 @@ export const Node = ({ navOpen, setNavOpen, node }: NodeProps): JSX.Element => {
|
||||
/>
|
||||
<StatCard title="SNR" value={node.snr.toString()} />
|
||||
</div>
|
||||
<Chart
|
||||
title={`${node.user?.longName ?? 'UNK'}`}
|
||||
description="Airtime"
|
||||
hasMultipleSeries={true}
|
||||
series={[
|
||||
{
|
||||
name: 'Series 1',
|
||||
data: [
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(1).toDate(),
|
||||
y: 4884,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(4).toDate(),
|
||||
y: 5351,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(7).toDate(),
|
||||
y: 5293,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(10).toDate(),
|
||||
y: 4908,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(13).toDate(),
|
||||
y: 5027,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(16).toDate(),
|
||||
y: 4837,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(19).toDate(),
|
||||
y: 4484,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(22).toDate(),
|
||||
y: 4071,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(25).toDate(),
|
||||
y: 4124,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(28).toDate(),
|
||||
y: 4563,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(11, 'months').day(1).toDate(),
|
||||
y: 3820,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(11, 'months').day(4).toDate(),
|
||||
y: 3968,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Series 2',
|
||||
data: [
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(1).toDate(),
|
||||
y: 4332,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(4).toDate(),
|
||||
y: 6642,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(7).toDate(),
|
||||
y: 5531,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(10).toDate(),
|
||||
y: 2231,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(13).toDate(),
|
||||
y: 5532,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(16).toDate(),
|
||||
y: 3352,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(19).toDate(),
|
||||
y: 6633,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(22).toDate(),
|
||||
y: 1442,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(25).toDate(),
|
||||
y: 4332,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(12, 'months').day(28).toDate(),
|
||||
y: 6332,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(11, 'months').day(1).toDate(),
|
||||
y: 5334,
|
||||
},
|
||||
{
|
||||
x: moment().subtract(11, 'months').day(4).toDate(),
|
||||
y: 5253,
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<Card
|
||||
title="Position"
|
||||
description={new Date(node.lastHeard * 1000).toLocaleString()}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
|
||||
export const NotFound = (): JSX.Element => {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
|
||||
import { DefaultExtensionType, defaultStyles, FileIcon } from 'react-file-icon';
|
||||
// import { DefaultExtensionType, defaultStyles, FileIcon } from 'react-file-icon';
|
||||
import { FiMenu, FiTrash, FiUploadCloud } from 'react-icons/fi';
|
||||
import useSWR from 'swr';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import fetcher from '@app/core/utils/fetcher.js';
|
||||
import fetcher from '@app/core/utils/fetcher';
|
||||
import { useAppSelector } from '@app/hooks/redux';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
|
||||
export interface RangeTestProps {
|
||||
@@ -42,7 +42,7 @@ export const Files = ({ navOpen, setNavOpen }: RangeTestProps): JSX.Element => {
|
||||
? hostOverride
|
||||
: import.meta.env.NODE_ENV === 'production'
|
||||
? window.location.hostname
|
||||
: (import.meta.env.SNOWPACK_PUBLIC_DEVICE_IP as string) ??
|
||||
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
||||
'http://meshtastic.local';
|
||||
|
||||
const { data } = useSWR<IFiles>(
|
||||
@@ -91,7 +91,7 @@ export const Files = ({ navOpen, setNavOpen }: RangeTestProps): JSX.Element => {
|
||||
>
|
||||
<div className="flex p-2 max-h-12">
|
||||
<div className="flex w-12">
|
||||
<FileIcon
|
||||
{/* <FileIcon
|
||||
extension={
|
||||
(file.nameModified ?? file.name).split('.')[
|
||||
(file.nameModified ?? file.name).split('.').length -
|
||||
@@ -104,7 +104,7 @@ export const Files = ({ navOpen, setNavOpen }: RangeTestProps): JSX.Element => {
|
||||
1
|
||||
] as DefaultExtensionType
|
||||
]}
|
||||
/>
|
||||
/> */}
|
||||
</div>
|
||||
<a
|
||||
href={`http://${connectionURL}/${file.name.replace(
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import { FiFileText, FiRss } from 'react-icons/fi';
|
||||
|
||||
import { PageLayout } from '@app/components/templates/PageLayout.jsx';
|
||||
import { PageLayout } from '@components/templates/PageLayout';
|
||||
|
||||
import { Files } from './Files';
|
||||
import { RangeTest } from './RangeTest';
|
||||
|
||||
@@ -4,13 +4,13 @@ import { useForm } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FiMenu, FiSave } from 'react-icons/fi';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Checkbox } from '@app/components/generic/form/Checkbox';
|
||||
import { Input } from '@app/components/generic/form/Input.jsx';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import { connection } from '@app/core/connection.js';
|
||||
import { connection } from '@app/core/connection';
|
||||
import { useAppSelector } from '@app/hooks/redux';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Checkbox } from '@components/generic/form/Checkbox';
|
||||
import { Input } from '@components/generic/form/Input';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
import type { RadioConfig_UserPreferences } from '@meshtastic/meshtasticjs/dist/generated';
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import { useTranslation } from 'react-i18next';
|
||||
import { FiCode, FiMenu, FiSave } from 'react-icons/fi';
|
||||
import JSONPretty from 'react-json-pretty';
|
||||
|
||||
import { Channel } from '@app/components/Channel.jsx';
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Cover } from '@app/components/generic/Cover.jsx';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import { connection } from '@app/core/connection.js';
|
||||
import { useAppSelector } from '@app/hooks/redux.js';
|
||||
import { connection } from '@app/core/connection';
|
||||
import { useAppSelector } from '@app/hooks/redux';
|
||||
import { Channel } from '@components/Channel';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Cover } from '@components/generic/Cover';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
|
||||
export interface ChannelsProps {
|
||||
|
||||
@@ -4,14 +4,14 @@ import { useForm } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FiCheck, FiMenu, FiSave } from 'react-icons/fi';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Checkbox } from '@app/components/generic/form/Checkbox';
|
||||
import { Input } from '@app/components/generic/form/Input';
|
||||
import { Select } from '@app/components/generic/form/Select';
|
||||
import { IconButton } from '@app/components/generic/IconButton';
|
||||
import { connection, setConnection } from '@app/core/connection';
|
||||
import { useAppDispatch, useAppSelector } from '@app/hooks/redux';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Checkbox } from '@components/generic/form/Checkbox';
|
||||
import { Input } from '@components/generic/form/Input';
|
||||
import { Select } from '@components/generic/form/Select';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
import {
|
||||
IBLEConnection,
|
||||
@@ -111,7 +111,7 @@ export const Connection = ({
|
||||
? hostOverride
|
||||
: import.meta.env.NODE_ENV === 'production'
|
||||
? window.location.hostname
|
||||
: (import.meta.env.SNOWPACK_PUBLIC_DEVICE_IP as string) ??
|
||||
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
||||
'http://meshtastic.local';
|
||||
|
||||
const ble = new IBLEConnection();
|
||||
|
||||
@@ -5,16 +5,16 @@ import { useTranslation } from 'react-i18next';
|
||||
import { FiCode, FiMenu, FiSave } from 'react-icons/fi';
|
||||
import JSONPretty from 'react-json-pretty';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Cover } from '@app/components/generic/Cover.jsx';
|
||||
import { Checkbox } from '@app/components/generic/form/Checkbox';
|
||||
import { Select } from '@app/components/generic/form/Select.jsx';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import { connection } from '@app/core/connection';
|
||||
import { addUser } from '@app/core/slices/meshtasticSlice.js';
|
||||
import { addUser } from '@app/core/slices/meshtasticSlice';
|
||||
import { useAppDispatch, useAppSelector } from '@app/hooks/redux';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Cover } from '@components/generic/Cover';
|
||||
import { Checkbox } from '@components/generic/form/Checkbox';
|
||||
import { Input } from '@components/generic/form/Input';
|
||||
import { Select } from '@components/generic/form/Select';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
FiSmartphone,
|
||||
} from 'react-icons/fi';
|
||||
|
||||
import { PageLayout } from '@app/components/templates/PageLayout.jsx';
|
||||
import { PageLayout } from '@components/templates/PageLayout';
|
||||
|
||||
import { Channels } from './Channels';
|
||||
import { Connection } from './Connection';
|
||||
|
||||
@@ -3,10 +3,10 @@ import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FiMenu, FiSave } from 'react-icons/fi';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Select } from '@app/components/generic/form/Select';
|
||||
import i18n from '@app/core/translation';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Select } from '@components/generic/form/Select';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
|
||||
export interface InterfaceProps {
|
||||
|
||||
@@ -5,15 +5,15 @@ import { useTranslation } from 'react-i18next';
|
||||
import { FiCode, FiMenu, FiSave, FiXCircle } from 'react-icons/fi';
|
||||
import JSONPretty from 'react-json-pretty';
|
||||
|
||||
import { Card } from '@app/components/generic/Card';
|
||||
import { Cover } from '@app/components/generic/Cover.jsx';
|
||||
import { Checkbox } from '@app/components/generic/form/Checkbox';
|
||||
import { Select } from '@app/components/generic/form/Select.jsx';
|
||||
import { IconButton } from '@app/components/generic/IconButton.jsx';
|
||||
import { connection } from '@app/core/connection';
|
||||
import { useAppSelector } from '@app/hooks/redux';
|
||||
import { Button } from '@components/generic/Button';
|
||||
import { Card } from '@components/generic/Card';
|
||||
import { Cover } from '@components/generic/Cover';
|
||||
import { Checkbox } from '@components/generic/form/Checkbox';
|
||||
import { Input } from '@components/generic/form/Input';
|
||||
import { Select } from '@components/generic/form/Select';
|
||||
import { IconButton } from '@components/generic/IconButton';
|
||||
import { PrimaryTemplate } from '@components/templates/PrimaryTemplate';
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user