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 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 reposted anything yet.": "You haven't reposted anything yet.",
|
||||
"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!",
|
||||
"Upload Something": "Upload Something",
|
||||
|
@ -1322,6 +1323,7 @@
|
|||
"Comment as": "Comment as",
|
||||
"Replying as": "Replying as",
|
||||
"No uploads": "No uploads",
|
||||
"No Reposts": "No Reposts",
|
||||
"uploads": "uploads",
|
||||
"Staked LBRY Credits": "Staked LBRY Credits",
|
||||
"1 comment": "1 comment",
|
||||
|
|
|
@ -52,6 +52,7 @@ type Props = {
|
|||
fypId?: string,
|
||||
showNoSourceClaims?: boolean,
|
||||
onClick?: (e: any, claim?: ?Claim, index?: number) => void,
|
||||
noEmpty?: boolean,
|
||||
maxClaimRender?: number,
|
||||
loadedCallback?: (number) => void,
|
||||
swipeLayout: boolean,
|
||||
|
@ -91,6 +92,7 @@ export default function ClaimList(props: Props) {
|
|||
fypId,
|
||||
showNoSourceClaims,
|
||||
onClick,
|
||||
noEmpty,
|
||||
maxClaimRender,
|
||||
loadedCallback,
|
||||
swipeLayout = false,
|
||||
|
@ -227,7 +229,9 @@ export default function ClaimList(props: Props) {
|
|||
/>
|
||||
</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>}
|
||||
</section>
|
||||
{loading && useLoadingSpinner && (
|
||||
|
@ -322,7 +326,9 @@ export default function ClaimList(props: Props) {
|
|||
</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 && useLoadingSpinner && (
|
||||
<div className="spinnerArea--centered">
|
||||
|
|
|
@ -73,9 +73,10 @@ function FileListPublished(props: Props) {
|
|||
<Page>
|
||||
<div className="card-stack">
|
||||
<WebUploadList />
|
||||
{!!(urls && urls.length) && (
|
||||
{!!urls && (
|
||||
<>
|
||||
<ClaimList
|
||||
noEmpty
|
||||
header={
|
||||
<span>
|
||||
<Button
|
||||
|
@ -139,17 +140,23 @@ function FileListPublished(props: Props) {
|
|||
{!fetching ? (
|
||||
<section className="main--empty">
|
||||
<Yrbl
|
||||
title={__('No uploads')}
|
||||
subtitle={__("You haven't uploaded anything yet. This is where you can find them when you do!")}
|
||||
title={filterBy === FILTER_REPOSTS ? __('No Reposts') : __('No uploads')}
|
||||
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={
|
||||
<div className="section__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
navigate={`/$/${PAGES.UPLOAD}`}
|
||||
label={__('Upload Something New')}
|
||||
onClick={() => clearPublish()}
|
||||
/>
|
||||
</div>
|
||||
filterBy !== FILTER_REPOSTS && (
|
||||
<div className="section__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
navigate={`/$/${PAGES.UPLOAD}`}
|
||||
label={__('Upload Something New')}
|
||||
onClick={() => clearPublish()}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</section>
|
||||
|
|
Loading…
Reference in a new issue