Uploads Page: fix Repost tab when count is 0
## Issue
The page becomes blank without the filter header when Repost is selected + 0 results.
## Change
Grabbed and modified lbry-desktop's 390bb6df
This commit is contained in:
parent
e2a4490d79
commit
97dd01ed38
3 changed files with 28 additions and 13 deletions
|
@ -782,6 +782,7 @@
|
||||||
"You haven't uploaded anything yet. This is where you can find them when you do!": "You haven't uploaded anything yet. This is where you can find them when you do!",
|
"You haven't uploaded anything yet. This is where you can find them when you do!": "You haven't uploaded anything yet. This is where you can find them when you do!",
|
||||||
"You haven't uploaded anything with this channel yet!": "You haven't uploaded anything with this channel yet!",
|
"You haven't uploaded anything with this channel yet!": "You haven't uploaded anything with this channel yet!",
|
||||||
"You haven't uploaded anything": "You haven't uploaded anything",
|
"You haven't uploaded anything": "You haven't uploaded anything",
|
||||||
|
"You haven't reposted anything yet.": "You haven't reposted anything yet.",
|
||||||
"Upload something to start tracking your stats!": "Upload something to start tracking your stats!",
|
"Upload something to start tracking your stats!": "Upload something to start tracking your stats!",
|
||||||
"You haven't created a channel yet, let's fix that!": "You haven't created a channel yet, let's fix that!",
|
"You haven't created a channel yet, let's fix that!": "You haven't created a channel yet, let's fix that!",
|
||||||
"Upload Something": "Upload Something",
|
"Upload Something": "Upload Something",
|
||||||
|
@ -1322,6 +1323,7 @@
|
||||||
"Comment as": "Comment as",
|
"Comment as": "Comment as",
|
||||||
"Replying as": "Replying as",
|
"Replying as": "Replying as",
|
||||||
"No uploads": "No uploads",
|
"No uploads": "No uploads",
|
||||||
|
"No Reposts": "No Reposts",
|
||||||
"uploads": "uploads",
|
"uploads": "uploads",
|
||||||
"Staked LBRY Credits": "Staked LBRY Credits",
|
"Staked LBRY Credits": "Staked LBRY Credits",
|
||||||
"1 comment": "1 comment",
|
"1 comment": "1 comment",
|
||||||
|
|
|
@ -52,6 +52,7 @@ type Props = {
|
||||||
fypId?: string,
|
fypId?: string,
|
||||||
showNoSourceClaims?: boolean,
|
showNoSourceClaims?: boolean,
|
||||||
onClick?: (e: any, claim?: ?Claim, index?: number) => void,
|
onClick?: (e: any, claim?: ?Claim, index?: number) => void,
|
||||||
|
noEmpty?: boolean,
|
||||||
maxClaimRender?: number,
|
maxClaimRender?: number,
|
||||||
loadedCallback?: (number) => void,
|
loadedCallback?: (number) => void,
|
||||||
swipeLayout: boolean,
|
swipeLayout: boolean,
|
||||||
|
@ -91,6 +92,7 @@ export default function ClaimList(props: Props) {
|
||||||
fypId,
|
fypId,
|
||||||
showNoSourceClaims,
|
showNoSourceClaims,
|
||||||
onClick,
|
onClick,
|
||||||
|
noEmpty,
|
||||||
maxClaimRender,
|
maxClaimRender,
|
||||||
loadedCallback,
|
loadedCallback,
|
||||||
swipeLayout = false,
|
swipeLayout = false,
|
||||||
|
@ -227,7 +229,9 @@ export default function ClaimList(props: Props) {
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
{!timedOut && urisLength === 0 && !loading && <div className="empty main--empty">{empty || noResultMsg}</div>}
|
{!timedOut && urisLength === 0 && !loading && !noEmpty && (
|
||||||
|
<div className="empty main--empty">{empty || noResultMsg}</div>
|
||||||
|
)}
|
||||||
{timedOut && timedOutMessage && <div className="empty main--empty">{timedOutMessage}</div>}
|
{timedOut && timedOutMessage && <div className="empty main--empty">{timedOutMessage}</div>}
|
||||||
</section>
|
</section>
|
||||||
{loading && useLoadingSpinner && (
|
{loading && useLoadingSpinner && (
|
||||||
|
@ -322,7 +326,9 @@ export default function ClaimList(props: Props) {
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!timedOut && urisLength === 0 && !loading && <div className="empty empty--centered">{empty || noResultMsg}</div>}
|
{!timedOut && urisLength === 0 && !loading && !noEmpty && (
|
||||||
|
<div className="empty empty--centered">{empty || noResultMsg}</div>
|
||||||
|
)}
|
||||||
{!loading && timedOut && timedOutMessage && <div className="empty empty--centered">{timedOutMessage}</div>}
|
{!loading && timedOut && timedOutMessage && <div className="empty empty--centered">{timedOutMessage}</div>}
|
||||||
{loading && useLoadingSpinner && (
|
{loading && useLoadingSpinner && (
|
||||||
<div className="spinnerArea--centered">
|
<div className="spinnerArea--centered">
|
||||||
|
|
|
@ -73,9 +73,10 @@ function FileListPublished(props: Props) {
|
||||||
<Page>
|
<Page>
|
||||||
<div className="card-stack">
|
<div className="card-stack">
|
||||||
<WebUploadList />
|
<WebUploadList />
|
||||||
{!!(urls && urls.length) && (
|
{!!urls && (
|
||||||
<>
|
<>
|
||||||
<ClaimList
|
<ClaimList
|
||||||
|
noEmpty
|
||||||
header={
|
header={
|
||||||
<span>
|
<span>
|
||||||
<Button
|
<Button
|
||||||
|
@ -139,17 +140,23 @@ function FileListPublished(props: Props) {
|
||||||
{!fetching ? (
|
{!fetching ? (
|
||||||
<section className="main--empty">
|
<section className="main--empty">
|
||||||
<Yrbl
|
<Yrbl
|
||||||
title={__('No uploads')}
|
title={filterBy === FILTER_REPOSTS ? __('No Reposts') : __('No uploads')}
|
||||||
subtitle={__("You haven't uploaded anything yet. This is where you can find them when you do!")}
|
subtitle={
|
||||||
|
filterBy === FILTER_REPOSTS
|
||||||
|
? __("You haven't reposted anything yet.")
|
||||||
|
: __("You haven't uploaded anything yet. This is where you can find them when you do!")
|
||||||
|
}
|
||||||
actions={
|
actions={
|
||||||
<div className="section__actions">
|
filterBy !== FILTER_REPOSTS && (
|
||||||
<Button
|
<div className="section__actions">
|
||||||
button="primary"
|
<Button
|
||||||
navigate={`/$/${PAGES.UPLOAD}`}
|
button="primary"
|
||||||
label={__('Upload Something New')}
|
navigate={`/$/${PAGES.UPLOAD}`}
|
||||||
onClick={() => clearPublish()}
|
label={__('Upload Something New')}
|
||||||
/>
|
onClick={() => clearPublish()}
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Reference in a new issue