mirror of
https://github.com/zoriya/flood.git
synced 2026-06-06 03:56:42 +00:00
TorrentGeneralInfo: add "Last Activity" field
This commit is contained in:
@@ -132,6 +132,30 @@ const TorrentGeneralInfo: FC = observer(() => {
|
|||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr className="torrent-details__detail torrent-details__detail--dateActive">
|
||||||
|
<td className="torrent-details__detail__label">
|
||||||
|
<Trans id="torrents.details.general.date.active" />
|
||||||
|
</td>
|
||||||
|
<td className="torrent-details__detail__value">
|
||||||
|
{(() => {
|
||||||
|
if (torrent.dateActive === 0) {
|
||||||
|
return VALUE_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (torrent.dateActive === -1) {
|
||||||
|
return i18n._('torrents.details.general.date.active.now');
|
||||||
|
}
|
||||||
|
|
||||||
|
return i18n.date(new Date(torrent.dateActive * 1000), {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'long',
|
||||||
|
day: '2-digit',
|
||||||
|
hour: 'numeric',
|
||||||
|
minute: 'numeric',
|
||||||
|
});
|
||||||
|
})()}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr className="torrent-details__table__heading">
|
<tr className="torrent-details__table__heading">
|
||||||
<td className="torrent-details__table__heading--tertiary" colSpan={2}>
|
<td className="torrent-details__table__heading--tertiary" colSpan={2}>
|
||||||
<Trans id="torrents.details.general.heading.torrent" />
|
<Trans id="torrents.details.general.heading.torrent" />
|
||||||
|
|||||||
@@ -278,6 +278,8 @@
|
|||||||
"torrents.details.files.loading": "Loading file detail...",
|
"torrents.details.files.loading": "Loading file detail...",
|
||||||
"torrents.details.general.comment": "Comment",
|
"torrents.details.general.comment": "Comment",
|
||||||
"torrents.details.general.connected": "{connected} connected of {total}",
|
"torrents.details.general.connected": "{connected} connected of {total}",
|
||||||
|
"torrents.details.general.date.active": "Last Activity",
|
||||||
|
"torrents.details.general.date.active.now": "Now",
|
||||||
"torrents.details.general.date.added": "Added",
|
"torrents.details.general.date.added": "Added",
|
||||||
"torrents.details.general.date.created": "Created",
|
"torrents.details.general.date.created": "Created",
|
||||||
"torrents.details.general.date.finished": "Finished",
|
"torrents.details.general.date.finished": "Finished",
|
||||||
|
|||||||
Reference in New Issue
Block a user