mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
disable file input while awaiting publish add spinner to publishes in sidebar add spinner and Publishing title on Publish page add WebUploadList to Publishes add WebUploadItem - thumb - name - progress bar - abort button beforeunload prevent closing tab / navigation enforce and notify about publish size limit 6 outstanding flow complaints
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
// @flow
|
|
import React from 'react';
|
|
import Button from 'component/button';
|
|
import CardMedia from 'component/cardMedia';
|
|
type Props = {
|
|
params: UpdatePublishFormData,
|
|
progress: string,
|
|
xhr?: () => void,
|
|
};
|
|
|
|
export default function WebUploadItem(props: Props) {
|
|
const { params, progress, xhr } = props;
|
|
|
|
return (
|
|
<li className={'claim-preview'}>
|
|
<CardMedia thumbnail={params.thumbnail_url} />
|
|
<div className={'claim-preview-metadata'}>
|
|
<div className="claim-preview-info">
|
|
<div className="claim-preview-title">{params.title}</div>
|
|
{xhr && (
|
|
<div className="card__actions--inline">
|
|
<Button
|
|
button={'primary'}
|
|
onClick={() => {
|
|
xhr.abort();
|
|
}}
|
|
label={'abort'}
|
|
/>
|
|
</div>
|
|
)}
|
|
</div>
|
|
<h2>{params.name}</h2>
|
|
<div className={'claim-upload__progress--outer'}>
|
|
<div className={'claim-upload__progress--inner'} style={{ width: `${progress}%` }}>
|
|
Uploading...
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
);
|
|
}
|