add spinner to web upload message and fix double card issue

This commit is contained in:
Sean Yesmunt 2020-09-16 16:12:47 -04:00
parent 23f218a568
commit 6b8a38b894
4 changed files with 45 additions and 45 deletions

View file

@ -3,6 +3,7 @@
import React from 'react';
import Lbry from 'lbry-redux';
import Button from 'component/button';
import Spinner from 'component/spinner';
type Props = {
reflectingInfo?: ReflectingUpdate,
@ -25,7 +26,11 @@ const PublishPending = (props: Props) => {
} else if (reflecting) {
return <span>{__('Uploading (%progress%%) ', { progress: progress })}</span>;
} else {
return <span>{__('Confirming')}</span>;
return (
<span>
{__('Confirming...')} <Spinner type="small" />
</span>
);
}
};

View file

@ -6,7 +6,6 @@ import Page from 'component/page';
import Button from 'component/button';
import YoutubeTransferStatus from 'component/youtubeTransferStatus';
import Spinner from 'component/spinner';
import Card from 'component/common/card';
import Yrbl from 'component/yrbl';
import * as PAGES from 'constants/pages';
@ -33,20 +32,18 @@ export default function ChannelsPage(props: Props) {
{hasYoutubeChannels && <YoutubeTransferStatus hideChannelLink />}
{channelUrls && Boolean(channelUrls.length) && (
<Card
title={__('Your channels')}
titleActions={
<>
<Button
button="secondary"
icon={ICONS.CHANNEL}
label={__('New Channel')}
navigate={`/$/${PAGES.CHANNEL_NEW}`}
/>
</>
<ClaimList
header={<h1 className="section__title">{__('Your channels')}</h1>}
headerAltControls={
<Button
button="secondary"
icon={ICONS.CHANNEL}
label={__('New Channel')}
navigate={`/$/${PAGES.CHANNEL_NEW}`}
/>
}
isBodyList
body={<ClaimList loading={fetchingChannels} uris={channelUrls} />}
loading={fetchingChannels}
uris={channelUrls}
/>
)}
</div>

View file

@ -9,7 +9,6 @@ import Paginate from 'component/common/paginate';
import { PAGE_PARAM, PAGE_SIZE_PARAM } from 'constants/claim';
import WebUploadList from 'component/webUploadList';
import Spinner from 'component/spinner';
import Card from 'component/common/card';
import Yrbl from 'component/yrbl';
type Props = {
@ -61,36 +60,35 @@ function FileListPublished(props: Props) {
<div className="card-stack">
<WebUploadList />
{!!(urls && urls.length) && (
<Card
title={__('Uploads')}
titleActions={
<div className="card__actions--inline">
{fetching && <Spinner type="small" />}
{!fetching && (
<>
<ClaimList
header={<h1 className="section__title">{__('Uploads')}</h1>}
headerAltControls={
<div className="card__actions--inline">
{fetching && <Spinner type="small" />}
{!fetching && (
<Button
button="alt"
label={__('Refresh')}
icon={ICONS.REFRESH}
onClick={() => fetchClaimListMine(params.page, params.page_size)}
/>
)}
<Button
button="alt"
label={__('Refresh')}
icon={ICONS.REFRESH}
onClick={() => fetchClaimListMine(params.page, params.page_size)}
icon={ICONS.PUBLISH}
button="secondary"
label={__('Upload')}
navigate={`/$/${PAGES.UPLOAD}`}
onClick={() => clearPublish()}
/>
)}
<Button
icon={ICONS.PUBLISH}
button="secondary"
label={__('Upload')}
navigate={`/$/${PAGES.UPLOAD}`}
onClick={() => clearPublish()}
/>
</div>
}
isBodyList
body={
<div>
<ClaimList loading={fetching} persistedStorageKey="claim-list-published" uris={urls} />
<Paginate totalPages={urlTotal > 0 ? Math.ceil(urlTotal / Number(pageSize)) : 1} />
</div>
}
/>
</div>
}
loading={fetching}
persistedStorageKey="claim-list-published"
uris={urls}
/>
<Paginate totalPages={urlTotal > 0 ? Math.ceil(urlTotal / Number(pageSize)) : 1} />
</>
)}
</div>
{!(urls && urls.length) && (

View file

@ -51,7 +51,7 @@
display: flex;
align-items: center;
margin-left: auto;
padding-top: var(--spacing-m);
// padding-top: var(--spacing-m);
& > * {
margin-left: var(--spacing-s);