properer merge

This commit is contained in:
Jeremy Kauffman 2018-11-07 17:21:35 -05:00
parent 7bcaa5081b
commit b33c7b93a9
2 changed files with 115 additions and 110 deletions

View file

@ -71,8 +71,8 @@ class AssetDisplay extends React.Component {
}
})()
}
<AssetTitle />
</div>
<AssetTitle />
</div>
);
}

View file

@ -6,6 +6,7 @@ import Row from '@components/Row';
import SpaceBetween from '@components/SpaceBetween';
import AssetShareButtons from '@components/AssetShareButtons';
import ClickToCopy from '@components/ClickToCopy';
import HorizontalSplit from '@components/HorizontalSplit';
import siteConfig from '@config/siteConfig.json';
const { details: { host } } = siteConfig;
@ -28,125 +29,129 @@ class AssetInfo extends React.Component {
channelCanonicalUrl = `${createCanonicalLink({channel})}`;
}
return (
<div>
{channelName && (
<Row>
<RowLabeled
label={
<Label value={'Channel:'} />
}
content={
<span className='text'>
<Link to={channelCanonicalUrl}>{channelName}</Link>
</span>
}
/>
</Row>
)}
{claimViews ? (
<Row>
<RowLabeled
label={
<Label value={'Views:'} />
}
content={
<span className='text'>
{claimViews}
</span>
}
/>
</Row>
) : null}
<Row>
<RowLabeled
label={
<Label value={'Share:'} />
}
content={
<AssetShareButtons
name={name}
assetUrl={assetCanonicalUrl}
/>
}
/>
</Row>
<Row>
<RowLabeled
label={
<Label value={'Link:'} />
}
content={
<ClickToCopy
id={'short-link'}
value={assetCanonicalUrl}
/>
}
/>
</Row>
<Row>
<RowLabeled
label={
<Label value={'Embed:'} />
}
content={
<div>
{(contentType === 'video/mp4') ? (
<ClickToCopy
id={'embed-text-video'}
value={`<iframe src="${host}/video-embed${canonicalUrl}" allowfullscreen="true" style="border:0" /></iframe>`}
<div className='asset-information-wrap'>
<HorizontalSplit
leftSide={
description && (
<Row>
<p>{description}</p>
</Row>
)
}
rightSide={
<div>
{channelName && (
<Row>
<RowLabeled
label={
<Label value={'Channel:'} />
}
content={
<span className='text'>
<Link to={channelCanonicalUrl}>{channelName}</Link>
</span>
}
/>
) : (
<ClickToCopy
id={'embed-text-image'}
value={`<img src="${assetCanonicalUrl}.${fileExt}"/>`}
</Row>
)}
{claimViews ? (
<Row>
<RowLabeled
label={
<Label value={'Views:'} />
}
content={
<span className='text'>
{claimViews}
</span>
}
/>
)}
</div>
}
/>
</Row>
</Row>
) : null}
<Row>
<SpaceBetween>
<a
className='link--primary'
href={`${assetCanonicalUrl}.${fileExt}`}
>
Direct Link
</a>
<a
className={'link--primary'}
href={`${assetCanonicalUrl}.${fileExt}`}
download={name}
>
Download
</a>
<a
className={'link--primary'}
target='_blank'
href='https://lbry.io/dmca'
>
Report
</a>
</SpaceBetween>
</Row>
<Row>
<RowLabeled
label={
<Label value={'Share:'} />
}
content={
<AssetShareButtons
name={name}
assetUrl={assetCanonicalUrl}
/>
}
/>
</Row>
{description && (
<Row>
<p>{description}</p>
</Row>
)}
<Row>
<RowLabeled
label={
<Label value={'Link:'} />
}
content={
<ClickToCopy
id={'short-link'}
value={assetCanonicalUrl}
/>
}
/>
</Row>
<Row>
<RowLabeled
label={
<Label value={'Embed:'} />
}
content={
<div>
{(contentType === 'video/mp4') ? (
<ClickToCopy
id={'embed-text-video'}
value={`<iframe src="${host}/video-embed${canonicalUrl}" allowfullscreen="true" style="border:0" /></iframe>`}
/>
) : (
<ClickToCopy
id={'embed-text-image'}
value={`<img src="${assetCanonicalUrl}.${fileExt}"/>`}
/>
)}
</div>
}
/>
</Row>
<Row>
<SpaceBetween>
<a
className='link--primary'
href={`${assetCanonicalUrl}.${fileExt}`}
>
Direct Link
</a>
<a
className={'link--primary'}
href={`${assetCanonicalUrl}.${fileExt}`}
download={name}
>
Download
</a>
<a
className={'link--primary'}
target='_blank'
href='https://lbry.io/dmca'
>
Report
</a>
</SpaceBetween>
</Row>
</div>
} />
<Row>
<p>
Hosted via the <a className={'link--primary'} href={'https://lbry.io/get'} target={'_blank'}>LBRY</a> blockchain
</p>
</Row>
</div>
);
}