diff --git a/client/src/javascript/components/torrent-list/SortDropdown.tsx b/client/src/javascript/components/torrent-list/SortDropdown.tsx index 37c44fab..e613ca8a 100644 --- a/client/src/javascript/components/torrent-list/SortDropdown.tsx +++ b/client/src/javascript/components/torrent-list/SortDropdown.tsx @@ -21,6 +21,7 @@ const SORT_PROPERTIES = [ 'upTotal', 'sizeBytes', 'dateAdded', + 'dateFinished', ] as const; interface SortDropdownProps { diff --git a/client/src/javascript/components/torrent-list/TorrentListCell.tsx b/client/src/javascript/components/torrent-list/TorrentListCell.tsx index 51f891dc..5776b326 100644 --- a/client/src/javascript/components/torrent-list/TorrentListCell.tsx +++ b/client/src/javascript/components/torrent-list/TorrentListCell.tsx @@ -5,6 +5,7 @@ import {observer} from 'mobx-react'; import {Trans, useLingui} from '@lingui/react'; import { + CalendarFinished, CalendarCreated, Calendar, CheckmarkThick, @@ -40,6 +41,7 @@ const ICONS: Partial> = { hash: , dateAdded: , dateCreated: , + dateFinished: , isPrivate: , message: , percentComplete: , @@ -116,6 +118,8 @@ const DefaultTorrentListCellContent: FC = observer( return ; case 'dateCreated': return ; + case 'dateFinished': + return ; case 'downRate': return ; case 'upRate': diff --git a/client/src/javascript/constants/SortDirections.ts b/client/src/javascript/constants/SortDirections.ts index a3337759..f85d6534 100644 --- a/client/src/javascript/constants/SortDirections.ts +++ b/client/src/javascript/constants/SortDirections.ts @@ -2,6 +2,7 @@ const SortDirections: Record = { dateAdded: 'desc', + dateFinished: 'desc', downRate: 'desc', downTotal: 'desc', upRate: 'desc', diff --git a/client/src/javascript/constants/TorrentListColumns.ts b/client/src/javascript/constants/TorrentListColumns.ts index cd515f2d..05ffa113 100644 --- a/client/src/javascript/constants/TorrentListColumns.ts +++ b/client/src/javascript/constants/TorrentListColumns.ts @@ -1,5 +1,6 @@ const TorrentListColumns = { dateAdded: 'torrents.properties.date.added', + dateFinished: 'torrents.properties.date.finished', downRate: 'torrents.properties.download.speed', downTotal: 'torrents.properties.download.total', eta: 'torrents.properties.eta', diff --git a/client/src/javascript/i18n/strings/en.json b/client/src/javascript/i18n/strings/en.json index d380c8de..9b7c4220 100644 --- a/client/src/javascript/i18n/strings/en.json +++ b/client/src/javascript/i18n/strings/en.json @@ -346,6 +346,7 @@ "torrents.properties.comment": "Comment", "torrents.properties.date.added": "Added", "torrents.properties.date.created": "Created", + "torrents.properties.date.finished": "Finished", "torrents.properties.directory": "Location", "torrents.properties.download.speed": "Download Speed", "torrents.properties.download.total": "Downloaded", diff --git a/client/src/javascript/ui/icons/CalendarFinished.tsx b/client/src/javascript/ui/icons/CalendarFinished.tsx new file mode 100644 index 00000000..cc5295e5 --- /dev/null +++ b/client/src/javascript/ui/icons/CalendarFinished.tsx @@ -0,0 +1,18 @@ +import classnames from 'classnames'; +import {FC, memo} from 'react'; + +interface CalendarFinishedProps { + className?: string; +} + +const CalendarFinished: FC = memo(({className}: CalendarFinishedProps) => ( + + + +)); + +CalendarFinished.defaultProps = { + className: undefined, +}; + +export default CalendarFinished; diff --git a/client/src/javascript/ui/icons/index.tsx b/client/src/javascript/ui/icons/index.tsx index 2f02c95c..e3f34a5c 100644 --- a/client/src/javascript/ui/icons/index.tsx +++ b/client/src/javascript/ui/icons/index.tsx @@ -3,6 +3,7 @@ export {default as Add} from './Add'; export {default as AddMini} from './AddMini'; export {default as All} from './All'; export {default as Arrow} from './Arrow'; +export {default as CalendarFinished} from './CalendarFinished'; export {default as CalendarCreated} from './CalendarCreated'; export {default as Calendar} from './Calendar'; export {default as Checkmark} from './Checkmark'; diff --git a/shared/constants/defaultFloodSettings.ts b/shared/constants/defaultFloodSettings.ts index e08dab22..0c4e0603 100644 --- a/shared/constants/defaultFloodSettings.ts +++ b/shared/constants/defaultFloodSettings.ts @@ -20,6 +20,7 @@ const defaultFloodSettings: Readonly = { {id: 'seeds', visible: true}, {id: 'dateAdded', visible: true}, {id: 'dateCreated', visible: false}, + {id: 'dateFinished', visible: false}, {id: 'directory', visible: false}, {id: 'hash', visible: false}, {id: 'isPrivate', visible: false}, @@ -41,6 +42,7 @@ const defaultFloodSettings: Readonly = { seeds: 100, dateAdded: 100, dateCreated: 100, + dateFinished: 100, directory: 100, hash: 100, isPrivate: 100,