Add back file download link

This commit is contained in:
saltrafael 2021-08-02 12:03:55 -03:00 committed by jessopb
parent cc7d2803bc
commit 4f0c6030e1
3 changed files with 22 additions and 25 deletions

View file

@ -362,23 +362,21 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
{!pending ? ( {!pending ? (
<NavLink aria-hidden tabIndex={-1} {...navLinkProps}> <NavLink aria-hidden tabIndex={-1} {...navLinkProps}>
<FileThumbnail thumbnail={thumbnailUrl}> <FileThumbnail thumbnail={thumbnailUrl}>
{/* @if TARGET='app' */} <div className="claim-preview__hover-actions">
{claim && !isCollection && ( {isPlayable && (
<div className="claim-preview__hover-actions"> <FileWatchLaterLink focusable={false} uri={uri} />
)}
{/* @if TARGET='app' */}
{claim && !isCollection && (
<FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton hideDownloadStatus /> <FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton hideDownloadStatus />
</div> )}
)} {/* @endif */}
{/* @endif */} </div>
{!isLivestream && ( {!isLivestream && (
<div className="claim-preview__file-property-overlay"> <div className="claim-preview__file-property-overlay">
<PreviewOverlayProperties uri={uri} small={type === 'small'} properties={liveProperty} /> <PreviewOverlayProperties uri={uri} small={type === 'small'} properties={liveProperty} />
</div> </div>
)} )}
{isPlayable && (
<div className="claim-preview__hover-actions">
<FileWatchLaterLink focusable={false} uri={uri} />
</div>
)}
</FileThumbnail> </FileThumbnail>
</NavLink> </NavLink>
) : ( ) : (

View file

@ -208,19 +208,16 @@ function ClaimPreviewTile(props: Props) {
<FileThumbnail thumbnail={thumbnailUrl} allowGifs> <FileThumbnail thumbnail={thumbnailUrl} allowGifs>
{!isChannel && ( {!isChannel && (
<React.Fragment> <React.Fragment>
{/* @if TARGET='app' */} <div className="claim-preview__hover-actions">
{isStream && ( {isPlayable && (
<div className="claim-preview__hover-actions">
<FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton />
</div>
)}
{/* @endif */}
{isPlayable && (
<div className="claim-preview__hover-actions">
<FileWatchLaterLink focusable={false} uri={uri} /> <FileWatchLaterLink focusable={false} uri={uri} />
</div> )}
)} {/* @if TARGET='app' */}
{isStream && (
<FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton />
)}
{/* @endif */}
</div>
<div className="claim-preview__file-property-overlay"> <div className="claim-preview__file-property-overlay">
<PreviewOverlayProperties uri={uri} properties={liveProperty || properties} /> <PreviewOverlayProperties uri={uri} properties={liveProperty || properties} />

View file

@ -669,12 +669,13 @@
.claim-preview__hover-actions { .claim-preview__hover-actions {
display: none; display: none;
position: absolute; position: relative;
float: right;
top: var(--spacing-xxs); top: var(--spacing-xxs);
right: var(--spacing-xxs); right: var(--spacing-xxs);
& > * { & > * {
color: var(--color-black); color: var(--color-text);
background-color: var(--color-black); background-color: var(--color-black);
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: var(--spacing-xxs); padding: var(--spacing-xxs);
@ -685,6 +686,7 @@
} }
.button--file-action { .button--file-action {
display: block;
margin: 0 0; margin: 0 0;
padding: var(--spacing-xxs) var(--spacing-xxs); padding: var(--spacing-xxs) var(--spacing-xxs);
height: unset; height: unset;