Skip to content

Commit

Permalink
upgrade frontend packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Oct 24, 2023
1 parent 3f3f012 commit c305150
Show file tree
Hide file tree
Showing 23 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"nx": "16.5.5",
"prettier": "^2.8.4",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"vitest": "^0.33.0"
}
}
20 changes: 10 additions & 10 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@
},
"dependencies": {
"@filedrop/types": "*",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.4",
"@types/react": "18.0.18",
"@types/react-dom": "18.0.4",
"@types/uuid": "^9.0.3",
"@vitejs/plugin-react": "^4.0.3",
"base64-js": "^1.5.1",
"clsx": "^2.0.0",
"eslint-config-react-app": "^7.0.1",
"filesize": "^10.0.8",
"filesize": "^10.1.0",
"fitool": "^1.0.3",
"i18not": "^0.1.2",
"imtool": "^1.2.1",
"matcrypt": "^1.3.0",
"mobx": "^6.10.0",
"mobx-react-lite": "^4.0.3",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"nanoanim": "^0.1.0",
"pwanow": "^0.0.1",
"qrcode.react": "^3.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"qrcode.react": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-expanding-textarea": "^2.3.6",
"react-i18not": "^0.1.1",
"react-icons": "^4.3.1",
"sass": "^1.51.0",
"react-icons": "^4.11.0",
"sass": "^1.69.4",
"typesocket": "^1.0.2",
"uuid": "^9.0.0",
"vite-plugin-info": "^0.4.1",
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18not';
import { IoCopy } from 'react-icons/io5/index.js';
import { IoCopy } from 'react-icons/io5';
import { clsx } from 'clsx';

import { useTimedState } from '../utils/hooks.js';
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
IoLogoGithub,
IoInformationCircle,
IoLogoTwitter,
} from 'react-icons/io5/index.js';
} from 'react-icons/io5';
import { Link } from 'wouter';
import { observer } from 'mobx-react-lite';

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from 'react';
import { IoClose } from 'react-icons/io5/index.js';
import { IoClose } from 'react-icons/io5';
import { useTranslation } from 'react-i18not';

import styles from './Modal.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/NetworkTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import clsx from 'clsx';
import { useTranslation } from 'react-i18not';
import { motion } from 'nanoanim';
import { IoAdd } from 'react-icons/io5/index.js';
import { IoAdd } from 'react-icons/io5';
import { ClientModel } from '@filedrop/types';

import styles from './NetworkTile.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/SecureStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18not';
import { observer } from 'mobx-react-lite';
import { IoCheckmarkCircle, IoWarning } from 'react-icons/io5/index.js';
import { IoCheckmarkCircle, IoWarning } from 'react-icons/io5';
import clsx from 'clsx';

import styles from './SecureStatus.module.scss';
Expand Down
6 changes: 1 addition & 5 deletions web/src/components/TargetTile.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react';
import clsx from 'clsx';
import {
IoLockClosed,
IoPhonePortrait,
IoHome,
} from 'react-icons/io5/index.js';
import { IoLockClosed, IoPhonePortrait, IoHome } from 'react-icons/io5';
import { ClientModel, DeviceType } from '@filedrop/types';
import { observer } from 'mobx-react-lite';

Expand Down
2 changes: 1 addition & 1 deletion web/src/modals/ClipboardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ClipboardModalProps {
export const ClipboardModal: React.FC<ClipboardModalProps> = observer(
({ files = [], dismissClipboard }) => {
const { t } = useTranslation();
const fileNames = files.map((file, i) => file.name).join(', ');
const fileNames = files.map(file => file.name).join(', ');
const clients = networkStore.clients;

const onSelect = (clientId: string) => {
Expand Down
11 changes: 2 additions & 9 deletions web/src/sections/Chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import { useTranslation } from 'react-i18not';
import { AnimatePresence, motion } from 'nanoanim';
import Textarea from 'react-expanding-textarea';
import { observer } from 'mobx-react-lite';
import {
IoSend,
IoChatbox,
IoGlobe,
IoClipboard,
} from 'react-icons/io5/index.js';
import { IoSend, IoChatbox, IoGlobe, IoClipboard } from 'react-icons/io5';
import clsx from 'clsx';

import styles from './index.module.scss';
Expand All @@ -19,8 +14,6 @@ import { applicationStore, chatStore } from '../../stores/index.js';
import { TargetTile } from '../../components/TargetTile.js';
import { NotificationCount } from '../../components/NotificationCount.js';

const TextareaComponent = Textarea as any;

export const ChatSection: React.FC = observer(() => {
const { t } = useTranslation();
const chat = chatStore.items;
Expand Down Expand Up @@ -126,7 +119,7 @@ export const ChatSection: React.FC = observer(() => {
)}
</React.Fragment>
<form onSubmit={onSubmit}>
<TextareaComponent
<Textarea
value={message}
onKeyDown={onKeyDown}
onChange={(e: React.ChangeEvent) =>
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/Connect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
import clsx from 'clsx';
import { QRCodeSVG } from 'qrcode.react';
import { useTranslation } from 'react-i18not';
import { IoSend } from 'react-icons/io5/index.js';
import { IoSend } from 'react-icons/io5';
import { useLocation } from 'wouter';
import { observer } from 'mobx-react-lite';

Expand Down
7 changes: 1 addition & 6 deletions web/src/sections/MobileTabs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React from 'react';
import {
IoQrCode,
IoChatbubbles,
IoHome,
IoSettings,
} from 'react-icons/io5/index.js';
import { IoQrCode, IoChatbubbles, IoHome, IoSettings } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';

import styles from './index.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/Network/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import clsx from 'clsx';
import { observer } from 'mobx-react-lite';
import { useTranslation } from 'react-i18not';
import { IoClipboard, IoCloseCircle } from 'react-icons/io5/index.js';
import { IoClipboard, IoCloseCircle } from 'react-icons/io5';

import styles from './index.module.scss';
import { Network } from '../../components/Network.js';
Expand Down
4 changes: 2 additions & 2 deletions web/src/sections/Transfers/Actions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { IoCheckmarkDone, IoCloseSharp } from 'react-icons/io5/index.js';
import { IoCheckmarkDone, IoCloseSharp } from 'react-icons/io5';
import { useTranslation } from 'react-i18not';

import styles from './Actions.module.scss';
Expand All @@ -14,7 +14,7 @@ export const Actions: React.FC<Props> = ({ transfers }) => {
const { t } = useTranslation();

if (transfers.length <= 1) {
return;
return null;
}

const acceptAll = () => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/Transfers/Total.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18not';
import { IoArrowDown, IoArrowUp } from 'react-icons/io5/index.js';
import { IoArrowDown, IoArrowUp } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';

import styles from './Total.module.scss';
Expand Down
6 changes: 1 addition & 5 deletions web/src/sections/Transfers/Transfer/TransferActions.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import React from 'react';
import {
IoCloseSharp,
IoCheckmark,
IoArrowDown,
} from 'react-icons/io5/index.js';
import { IoCloseSharp, IoCheckmark, IoArrowDown } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';
import { useTranslation } from 'react-i18not';

Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/Transfers/Transfer/TransferIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
FaFileAudio,
FaFileImage,
FaFileArchive,
} from 'react-icons/fa/index.js';
} from 'react-icons/fa';

import styles from './TransferIcon.module.scss';
import { fileType } from '../../../utils/file.js';
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/Transfers/Transfer/TransferTarget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
FaAngleDoubleUp,
FaHourglassHalf,
FaHourglassEnd,
} from 'react-icons/fa/index.js';
} from 'react-icons/fa';
import { observer } from 'mobx-react-lite';

import styles from './TransferTarget.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/YourTile/ClientName.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { useTranslation } from 'react-i18not';
import { IoPencil, IoCheckmark, IoCloseSharp } from 'react-icons/io5/index.js';
import { IoPencil, IoCheckmark, IoCloseSharp } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';

import styles from './ClientName.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion web/src/sections/YourTile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { observer } from 'mobx-react-lite';
import { useTranslation } from 'react-i18not';
import { IoQrCode, IoSettings } from 'react-icons/io5/index.js';
import { IoQrCode, IoSettings } from 'react-icons/io5';

import styles from './index.module.scss';
import { TargetTile } from '../../components/TargetTile.js';
Expand Down
2 changes: 1 addition & 1 deletion web/src/stores/ApplicationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ApplicationStore {
modal?: string = undefined;
showPaste = false;

constructor(private connection: Connection) {
constructor(connection: Connection) {
makeAutoObservable(this);

connection.on('message', message => this.onMessage(message as any));
Expand Down
22 changes: 13 additions & 9 deletions web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "ES2020"],
"allowJs": true,
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"downlevelIteration": true,
"noEmit": true,
"jsx": "react",
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"types": ["vite-plugin-info/client"]
},
Expand Down
Loading

0 comments on commit c305150

Please sign in to comment.