import PreviewThumb from './uploader-thumb'
import uploaderUtils from './uploader-utils'
import useUploaderController from './uploader-controller'
const { composeName, isVideoFile, fmt } = uploaderUtils
export default function UploaderView() {
const c = useUploaderController()
return (
<>
Signed in: {c.me?.username}
Destination: {c.destPath || '/(choose a library)'}
Choose content
{c.mobile ? (
<>
>
) : (
<>
>
)}
Review Files
{c.sel.length === 0 ? (
Select at least one file.
) : (
<>
{c.videosNeedingDesc > 0 ? (
{c.videosNeedingDesc} video(s) need a description
) : (
All videos have descriptions
)}
{c.sel.map((s, i) => (
{s.file.name}
โ {s.finalName}
{typeof s.progress === 'number' && }
{s.err && Error: {s.err}}
{c.duplicateNamesInSelection.has(s.finalName) && (
Duplicate name in this batch. Adjust description or date.
)}
{c.existingNames.has(s.finalName) && A file with this name already exists here.}
))}
>
)}
Select Destination
Manage a library & choose a destination.
{!c.lib ? (
Select a library to create subfolders and view contents.