discover page vertical jumping fix
This commit is contained in:
parent
25098bfab8
commit
a7195d12e1
3 changed files with 26 additions and 5 deletions
|
@ -23,6 +23,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
|||
* Fixed unconfirmed published files missing channel name
|
||||
* Fixed old files from updated published claims appearing in downloaded list
|
||||
* Fixed inappropriate text showing on searches
|
||||
* Stop discover page from pushing jumping vertically while loading
|
||||
* Restored feedback on claim amounts
|
||||
|
||||
### Deprecated
|
||||
|
|
|
@ -48,13 +48,20 @@ class DiscoverPage extends React.PureComponent {
|
|||
const failedToLoad =
|
||||
!fetchingFeaturedUris &&
|
||||
(featuredUris === undefined ||
|
||||
(featuredUris !== undefined && Object.keys(featuredUris).length === 0));
|
||||
(featuredUris !== undefined && Object.keys(featuredUris).length === 0)),
|
||||
hasContent =
|
||||
typeof featuredUris === "object" && Object.keys(featuredUris).length;
|
||||
|
||||
return (
|
||||
<main>
|
||||
{fetchingFeaturedUris &&
|
||||
<BusyMessage message={__("Fetching content")} />}
|
||||
{typeof featuredUris === "object" &&
|
||||
<main
|
||||
className={
|
||||
hasContent && fetchingFeaturedUris ? "main--refreshing" : null
|
||||
}
|
||||
>
|
||||
{!hasContent &&
|
||||
fetchingFeaturedUris &&
|
||||
<BusyMessage message={__("Fetching content")} style={busyStyle} />}
|
||||
{hasContent &&
|
||||
Object.keys(featuredUris).map(
|
||||
category =>
|
||||
featuredUris[category].length
|
||||
|
|
|
@ -47,6 +47,19 @@ body
|
|||
width: $width-page-constrained;
|
||||
}
|
||||
}
|
||||
main.main--refreshing {
|
||||
&:before {
|
||||
$width: 30px;
|
||||
position: absolute;
|
||||
background: url('../img/busy.gif') no-repeat center center;
|
||||
width: $width;
|
||||
height: $spacing-vertical;
|
||||
content: "";
|
||||
left: 50%;
|
||||
margin-left: -1 / 2 * $width;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-fixed-width {
|
||||
/* This borrowed is from a component of Font Awesome we're not using, maybe add it? */
|
||||
|
|
Loading…
Reference in a new issue