diff --git a/app/src/components/Archive.js b/app/src/components/Archive.js index ac0c1d1c..e91207ab 100644 --- a/app/src/components/Archive.js +++ b/app/src/components/Archive.js @@ -25,6 +25,7 @@ import { FileIcon, findPosterPath, HelpHeader, + humanFileSize, isoDatetimeToString, mimetypeColor, PageContainer, @@ -70,7 +71,7 @@ function ArchivePage() { } - const {data} = archiveFile; + const {data, size} = archiveFile; const singlefileUrl = data.singlefile_path ? `/media/${encodeMediaPath(data.singlefile_path)}` : null; const screenshotUrl = data.screenshot_path ? `/media/${encodeMediaPath(data.screenshot_path)}` : null; @@ -167,6 +168,7 @@ function ArchivePage() {
{isoDatetimeToString(data.archive_datetime)}
{domainHeader} {urlHeader} +
{humanFileSize(size)}
{singlefileButton} {readabilityLink} @@ -452,6 +454,7 @@ function Archives() { actionIcon='search' searchStr={searchStr} onSubmit={setSearchStr} + placeholder='Search Archives...' />; return <> diff --git a/app/src/components/Common.js b/app/src/components/Common.js index d6ab0e1a..1c1d9817 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -208,10 +208,6 @@ const secondsToYears = 31536000; const secondsToDays = 86400; const secondsToHours = 3600; const secondsToMinutes = 60; -const msToYears = secondsToYears * 1000; -const msToDays = secondsToDays * 1000; -const msToHours = secondsToHours * 1000; -const msToMinutes = secondsToMinutes * 1000; export function secondsToFullDuration(seconds) { let s = ''; @@ -235,11 +231,6 @@ export function secondsToFullDuration(seconds) { return s; } -export function secondsToDate(seconds) { - let date = new Date(seconds * 1000); - return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; -} - export function secondsToTimestamp(seconds) { let d = new Date(seconds * 1000); const month = String(d.getMonth() + 1).padStart(2, '0'); diff --git a/app/src/components/Videos.js b/app/src/components/Videos.js index 223cbfff..6e72adaa 100644 --- a/app/src/components/Videos.js +++ b/app/src/components/Videos.js @@ -178,7 +178,12 @@ function VideosPage() { setPage, ); - const searchInput = ; + const searchInput = ; return <> {header} @@ -203,10 +208,8 @@ function VideosPage() { {viewButton} {limitDropdown} {tagQuerySelector} - - - - {searchInput} + + {searchInput} @@ -353,7 +356,7 @@ export function VideoRowCells({file}) { - {textEllipsis(video.title || video.stem || video.video_path)} + {textEllipsis(file.title || video.stem || video.video_path)}