Merge pull request #2658 from lbryio/fix_link
Fix claim preview on description (markdown)
This commit is contained in:
commit
6c5cb8963b
4 changed files with 19 additions and 9 deletions
|
@ -76,6 +76,7 @@ function ClaimPreview(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
||||||
|
const signingChannel = claim && claim.signing_channel;
|
||||||
let shouldHide =
|
let shouldHide =
|
||||||
placeholder !== 'loading' && ((abandoned && !showPublishLink) || (!claimIsMine && obscureNsfw && nsfw));
|
placeholder !== 'loading' && ((abandoned && !showPublishLink) || (!claimIsMine && obscureNsfw && nsfw));
|
||||||
|
|
||||||
|
|
|
@ -30,18 +30,18 @@ class PreviewLink extends React.PureComponent<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={'preview-link'} role="button" onClick={this.handleClick}>
|
<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 style={thumbnailStyle} className={'preview-link__thumbnail media__thumb'} />
|
||||||
<span className={'file-list__item-metadata'}>
|
<span className={'claim-preview-metadata'}>
|
||||||
<span className={'file-list__item-info'}>
|
<span className={'claim-preview-info'}>
|
||||||
<span className={'file-list__item-title'}>
|
<span className={'claim-preview-title'}>
|
||||||
<TruncatedText text={title} lines={1} />
|
<TruncatedText text={title} lines={1} />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span className={'preview-link__description media__subtitle'}>
|
<span className={'media__subtitle'}>
|
||||||
<UriIndicator uri={uri} link />
|
<UriIndicator uri={uri} link />
|
||||||
</span>
|
</span>
|
||||||
<span className={'file-list__item-properties'}>
|
<span className={'claim-preview-properties'}>
|
||||||
<span className={'preview-link__description media__subtitle'}>
|
<span className={'preview-link__description media__subtitle'}>
|
||||||
<TruncatedText lines={2} showTooltip={false}>
|
<TruncatedText lines={2} showTooltip={false}>
|
||||||
<MarkdownPreview content={description} promptLinks strip />
|
<MarkdownPreview content={description} promptLinks strip />
|
||||||
|
|
|
@ -98,8 +98,17 @@
|
||||||
border-left: 0.5rem solid $lbry-teal-5;
|
border-left: 0.5rem solid $lbry-teal-5;
|
||||||
display: block;
|
display: block;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 40rem;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.claim-preview {
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.media__subtitle {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-link__thumbnail {
|
.preview-link__thumbnail {
|
||||||
|
@ -107,6 +116,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-link__description {
|
.preview-link__description {
|
||||||
display: block;
|
margin-top: var(--spacing-small);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue