Revert "Remove the delayed thumbnail message for ChannelEdit"
This reverts commit a7e571c3b9
.
This commit is contained in:
parent
f5cce18a55
commit
7d9e8bffae
2 changed files with 23 additions and 13 deletions
|
@ -322,6 +322,7 @@ function ChannelForm(props: Props) {
|
||||||
uri={uri}
|
uri={uri}
|
||||||
thumbnailPreview={thumbnailPreview}
|
thumbnailPreview={thumbnailPreview}
|
||||||
allowGifs
|
allowGifs
|
||||||
|
showDelayedMessage={isUpload.thumbnail}
|
||||||
setThumbUploadError={setThumbError}
|
setThumbUploadError={setThumbError}
|
||||||
thumbUploadError={thumbError}
|
thumbUploadError={thumbError}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -20,8 +20,10 @@ type Props = {
|
||||||
claim: ?ChannelClaim,
|
claim: ?ChannelClaim,
|
||||||
doResolveUri: (string) => void,
|
doResolveUri: (string) => void,
|
||||||
isResolving: boolean,
|
isResolving: boolean,
|
||||||
|
showDelayedMessage?: boolean,
|
||||||
noLazyLoad?: boolean,
|
noLazyLoad?: boolean,
|
||||||
hideStakedIndicator?: boolean,
|
hideStakedIndicator?: boolean,
|
||||||
|
xsmall?: boolean,
|
||||||
noOptimization?: boolean,
|
noOptimization?: boolean,
|
||||||
setThumbUploadError: (boolean) => void,
|
setThumbUploadError: (boolean) => void,
|
||||||
ThumbUploadError: boolean,
|
ThumbUploadError: boolean,
|
||||||
|
@ -40,6 +42,7 @@ function ChannelThumbnail(props: Props) {
|
||||||
claim,
|
claim,
|
||||||
doResolveUri,
|
doResolveUri,
|
||||||
isResolving,
|
isResolving,
|
||||||
|
showDelayedMessage = false,
|
||||||
noLazyLoad,
|
noLazyLoad,
|
||||||
hideStakedIndicator = false,
|
hideStakedIndicator = false,
|
||||||
setThumbUploadError,
|
setThumbUploadError,
|
||||||
|
@ -88,19 +91,25 @@ function ChannelThumbnail(props: Props) {
|
||||||
'channel-thumbnail--resolving': isResolving,
|
'channel-thumbnail--resolving': isResolving,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<OptimizedImage
|
{showDelayedMessage ? (
|
||||||
alt={__('Channel profile picture')}
|
<div className="channel-thumbnail--waiting">
|
||||||
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
|
{__('This will be visible in a few minutes after you submit this form.')}
|
||||||
src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
|
</div>
|
||||||
loading={noLazyLoad ? undefined : 'lazy'}
|
) : (
|
||||||
onError={() => {
|
<OptimizedImage
|
||||||
if (setThumbUploadError) {
|
alt={__('Channel profile picture')}
|
||||||
setThumbUploadError(true);
|
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
|
||||||
} else {
|
src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
|
||||||
setThumbLoadError(true);
|
loading={noLazyLoad ? undefined : 'lazy'}
|
||||||
}
|
onError={() => {
|
||||||
}}
|
if (setThumbUploadError) {
|
||||||
/>
|
setThumbUploadError(true);
|
||||||
|
} else {
|
||||||
|
setThumbLoadError(true);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}
|
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue