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> </div>
<AssetTitle />
</div> </div>
); );
} }

View file

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