Apply placeholder images
https://lbryians.slack.com/archives/C81FGKR51/p1624278721203900?thread_ts=1624269131.202200&cid=C81FGKR51 The intrinsic size needs to be at least equal the final image's size. Stretching, SVGs, etc. doesn't count.
This commit is contained in:
parent
1745f08fb8
commit
6f4ce0a57c
4 changed files with 9 additions and 2 deletions
BIN
static/img/placeholderTx.gif
Normal file
BIN
static/img/placeholderTx.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -17,6 +17,8 @@ import FileWatchLaterLink from 'component/fileWatchLaterLink';
|
||||||
import ClaimRepostAuthor from 'component/claimRepostAuthor';
|
import ClaimRepostAuthor from 'component/claimRepostAuthor';
|
||||||
import ClaimMenuList from 'component/claimMenuList';
|
import ClaimMenuList from 'component/claimMenuList';
|
||||||
import CollectionPreviewOverlay from 'component/collectionPreviewOverlay';
|
import CollectionPreviewOverlay from 'component/collectionPreviewOverlay';
|
||||||
|
// $FlowFixMe cannot resolve ...
|
||||||
|
import PlaceholderTx from 'static/img/placeholderTx.gif';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
uri: string,
|
uri: string,
|
||||||
|
@ -37,7 +39,6 @@ type Props = {
|
||||||
}>,
|
}>,
|
||||||
blockedChannelUris: Array<string>,
|
blockedChannelUris: Array<string>,
|
||||||
getFile: (string) => void,
|
getFile: (string) => void,
|
||||||
placeholder: boolean,
|
|
||||||
streamingUrl: string,
|
streamingUrl: string,
|
||||||
isMature: boolean,
|
isMature: boolean,
|
||||||
showMature: boolean,
|
showMature: boolean,
|
||||||
|
@ -170,7 +171,9 @@ function ClaimPreviewTile(props: Props) {
|
||||||
if (placeholder || (!claim && isResolvingUri)) {
|
if (placeholder || (!claim && isResolvingUri)) {
|
||||||
return (
|
return (
|
||||||
<li className={classnames('claim-preview--tile', {})}>
|
<li className={classnames('claim-preview--tile', {})}>
|
||||||
<div className="placeholder media__thumb" />
|
<div className="placeholder media__thumb">
|
||||||
|
<img src={PlaceholderTx} alt="Placeholder" />
|
||||||
|
</div>
|
||||||
<div className="placeholder__wrapper">
|
<div className="placeholder__wrapper">
|
||||||
<div className="placeholder claim-tile__title" />
|
<div className="placeholder claim-tile__title" />
|
||||||
<div className="placeholder claim-tile__info" />
|
<div className="placeholder claim-tile__info" />
|
||||||
|
|
|
@ -23,6 +23,8 @@ import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
||||||
import ClaimMenuList from 'component/claimMenuList';
|
import ClaimMenuList from 'component/claimMenuList';
|
||||||
import Yrbl from 'component/yrbl';
|
import Yrbl from 'component/yrbl';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
|
// $FlowFixMe cannot resolve ...
|
||||||
|
import PlaceholderTx from 'static/img/placeholderTx.gif';
|
||||||
|
|
||||||
export const PAGE_VIEW_QUERY = `view`;
|
export const PAGE_VIEW_QUERY = `view`;
|
||||||
const CONTENT_PAGE = 'content';
|
const CONTENT_PAGE = 'content';
|
||||||
|
@ -217,6 +219,7 @@ function ChannelPage(props: Props) {
|
||||||
{/* TODO: add channel collections <ClaimCollectionAddButton uri={uri} fileAction /> */}
|
{/* TODO: add channel collections <ClaimCollectionAddButton uri={uri} fileAction /> */}
|
||||||
<ClaimMenuList uri={claim.permanent_url} channelUri={claim.permanent_url} inline isChannelPage />
|
<ClaimMenuList uri={claim.permanent_url} channelUri={claim.permanent_url} inline isChannelPage />
|
||||||
</div>
|
</div>
|
||||||
|
{cover && <img className={classnames('channel-cover__custom')} src={PlaceholderTx} />}
|
||||||
{cover && <img className={classnames('channel-cover__custom')} src={cover} />}
|
{cover && <img className={classnames('channel-cover__custom')} src={cover} />}
|
||||||
<div className="channel__primary-info">
|
<div className="channel__primary-info">
|
||||||
<ChannelThumbnail className="channel__thumbnail--channel-page" uri={uri} allowGifs hideStakedIndicator />
|
<ChannelThumbnail className="channel__thumbnail--channel-page" uri={uri} allowGifs hideStakedIndicator />
|
||||||
|
|
|
@ -14,6 +14,7 @@ const STATIC_ASSET_PATHS = [
|
||||||
'/public/img/gerbil-happy.png',
|
'/public/img/gerbil-happy.png',
|
||||||
'/public/img/gerbil-sad.png',
|
'/public/img/gerbil-sad.png',
|
||||||
'/public/img/placeholder.png',
|
'/public/img/placeholder.png',
|
||||||
|
'/public/img/placeholderTx.gif',
|
||||||
'/public/img/thumbnail-broken.png',
|
'/public/img/thumbnail-broken.png',
|
||||||
'/public/img/thumbnail-missing.png',
|
'/public/img/thumbnail-missing.png',
|
||||||
'/public/img/total-background.png',
|
'/public/img/total-background.png',
|
||||||
|
|
Loading…
Reference in a new issue