Merge pull request #2658 from lbryio/fix_link

Fix claim preview on description (markdown)
This commit is contained in:
Sean Yesmunt 2019-07-29 10:14:08 -04:00 committed by GitHub
commit 6c5cb8963b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 9 deletions

View file

@ -76,6 +76,7 @@ function ClaimPreview(props: Props) {
}
const isChannel = isValid ? parseURI(uri).isChannel : false;
const signingChannel = claim && claim.signing_channel;
let shouldHide =
placeholder !== 'loading' && ((abandoned && !showPublishLink) || (!claimIsMine && obscureNsfw && nsfw));

View file

@ -30,18 +30,18 @@ class PreviewLink extends React.PureComponent<Props> {
return (
<span className={'preview-link'} role="button" onClick={this.handleClick}>
<span className={'file-list__item'}>
<span className={'claim-preview'}>
<span style={thumbnailStyle} className={'preview-link__thumbnail media__thumb'} />
<span className={'file-list__item-metadata'}>
<span className={'file-list__item-info'}>
<span className={'file-list__item-title'}>
<span className={'claim-preview-metadata'}>
<span className={'claim-preview-info'}>
<span className={'claim-preview-title'}>
<TruncatedText text={title} lines={1} />
</span>
</span>
<span className={'preview-link__description media__subtitle'}>
<span className={'media__subtitle'}>
<UriIndicator uri={uri} link />
</span>
<span className={'file-list__item-properties'}>
<span className={'claim-preview-properties'}>
<span className={'preview-link__description media__subtitle'}>
<TruncatedText lines={2} showTooltip={false}>
<MarkdownPreview content={description} promptLinks strip />

View file

@ -98,8 +98,17 @@
border-left: 0.5rem solid $lbry-teal-5;
display: block;
align-items: center;
width: 40rem;
word-break: break-all;
overflow: hidden;
.claim-preview {
border: 0;
background: transparent;
}
.media__subtitle {
display: block;
}
}
.preview-link__thumbnail {
@ -107,6 +116,6 @@
}
.preview-link__description {
display: block;
margin-top: var(--spacing-small);
}
}

View file

@ -639,4 +639,4 @@
"File Size": "File Size",
"You deposited 1 LBC as a support!": "You deposited 1 LBC as a support!",
"Refreshed!": "Refreshed!"
}
}