Skip to content

Commit

Permalink
replace fa icons with io5
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Oct 26, 2023
1 parent 44fa796 commit 071a51b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 37 deletions.
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';
import { IoCheckmarkDone, IoClose } from 'react-icons/io5';
import { useTranslation } from 'react-i18not';

import styles from './Actions.module.scss';
Expand Down Expand Up @@ -39,7 +39,7 @@ export const Actions: React.FC<Props> = ({ transfers }) => {
</IconButton>
)}
<IconButton round onClick={cancelAll} title={t('cancelAll')}>
<IoCloseSharp />
<IoClose />
</IconButton>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions web/src/sections/Transfers/Transfer/TransferActions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { IoCloseSharp, IoCheckmark, IoArrowDown } from 'react-icons/io5';
import { IoClose, IoCheckmark, IoArrowDown } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';
import { useTranslation } from 'react-i18not';

Expand Down Expand Up @@ -51,7 +51,7 @@ export const TransferActions: React.FC<TransferProps> = observer(
className={styles.negative}
title={t('cancel')}
>
<IoCloseSharp />
<IoClose />
</IconButton>
</div>
);
Expand Down
27 changes: 13 additions & 14 deletions web/src/sections/Transfers/Transfer/TransferIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { useTranslation } from 'react-i18not';
import {
FaFile,
FaFileAlt,
FaFileVideo,
FaFileAudio,
FaFileImage,
FaFileArchive,
} from 'react-icons/fa';
IoDocument,
IoDocumentText,
IoFilm,
IoMusicalNotes,
IoImage,
IoArchive,
} from 'react-icons/io5';

import styles from './TransferIcon.module.scss';
import { fileType } from '../../../utils/file.js';
Expand All @@ -23,19 +23,18 @@ const typeIcon = (mime: string) => {

switch (type) {
case FileType.ARCHIVE:
return <FaFileArchive />;
return <IoArchive />;
case FileType.IMAGE:
return <FaFileImage />;
return <IoImage />;
case FileType.AUDIO:
return <FaFileAudio />;
return <IoMusicalNotes />;
case FileType.VIDEO:
return <FaFileVideo />;
return <IoFilm />;
case FileType.BINARY:
return <FaFileAlt />;
case FileType.TEXT:
return <FaFileAlt />;
return <IoDocumentText />;
default:
return <FaFile />;
return <IoDocument />;
}
};

Expand Down
34 changes: 17 additions & 17 deletions web/src/sections/Transfers/Transfer/TransferTarget.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { useTranslation } from 'react-i18not';
import {
FaTimes,
FaArrowDown,
FaArrowUp,
FaAngleDoubleDown,
FaCheck,
FaAngleDoubleUp,
FaHourglassHalf,
FaHourglassEnd,
} from 'react-icons/fa';
IoClose,
IoArrowDown,
IoArrowUp,
IoCaretUp,
IoCaretDown,
IoCheckmark,
IoHourglassOutline,
IoLink,
} from 'react-icons/io5';
import { observer } from 'mobx-react-lite';

import styles from './TransferTarget.module.scss';
Expand All @@ -26,23 +26,23 @@ interface TransferIconProps {
const stateIcon = (state: TransferState, receiving: boolean) => {
switch (state) {
case TransferState.INCOMING:
return <FaArrowDown />;
return <IoArrowDown />;
case TransferState.OUTGOING:
return <FaArrowUp />;
return <IoArrowUp />;
case TransferState.FAILED:
return <FaTimes />;
return <IoClose />;
case TransferState.IN_PROGRESS:
if (receiving) {
return <FaAngleDoubleDown />;
return <IoCaretDown />;
} else {
return <FaAngleDoubleUp />;
return <IoCaretUp />;
}
case TransferState.CONNECTING:
return <FaHourglassHalf />;
return <IoHourglassOutline />;
case TransferState.CONNECTED:
return <FaHourglassEnd />;
return <IoLink />;
case TransferState.COMPLETE:
return <FaCheck />;
return <IoCheckmark />;
}
};

Expand Down
4 changes: 2 additions & 2 deletions 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';
import { IoPencil, IoCheckmark, IoClose } from 'react-icons/io5';
import { observer } from 'mobx-react-lite';

import styles from './ClientName.module.scss';
Expand Down Expand Up @@ -57,7 +57,7 @@ export const ClientName: React.FC = observer(() => {
<IoCheckmark />
</IconButton>
<IconButton round onClick={onCancel} title={t('cancel')}>
<IoCloseSharp />
<IoClose />
</IconButton>
</div>
)}
Expand Down

0 comments on commit 071a51b

Please sign in to comment.