use Card component
This commit is contained in:
parent
5156c90a60
commit
4c5032612c
4 changed files with 22 additions and 40 deletions
|
@ -22,6 +22,7 @@ const webConfig = {
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
port: WEBPACK_WEB_PORT,
|
port: WEBPACK_WEB_PORT,
|
||||||
|
contentBase: path.join(__dirname, 'dist'),
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
|
@ -925,7 +925,6 @@
|
||||||
"Available": "Available",
|
"Available": "Available",
|
||||||
"Unable to load your saved preferences.": "Unable to load your saved preferences.",
|
"Unable to load your saved preferences.": "Unable to load your saved preferences.",
|
||||||
"Add/Delete": "Add/Delete",
|
"Add/Delete": "Add/Delete",
|
||||||
"PDF opened externally. %click_here% to open it again.": "PDF opened externally. %click_here% to open it again.",
|
|
||||||
"%numberOfMonthsSincePublish% years ago": "%numberOfMonthsSincePublish% years ago",
|
"%numberOfMonthsSincePublish% years ago": "%numberOfMonthsSincePublish% years ago",
|
||||||
"%numberOfYearsSincePublish% years ago": "%numberOfYearsSincePublish% years ago",
|
"%numberOfYearsSincePublish% years ago": "%numberOfYearsSincePublish% years ago",
|
||||||
"%numberOfYearsSincePublish% year ago": "%numberOfYearsSincePublish% year ago",
|
"%numberOfYearsSincePublish% year ago": "%numberOfYearsSincePublish% year ago",
|
||||||
|
@ -939,5 +938,6 @@
|
||||||
"Provide a description and link to your license": "Provide a description and link to your license",
|
"Provide a description and link to your license": "Provide a description and link to your license",
|
||||||
"Walletserver preference": "Walletserver preference",
|
"Walletserver preference": "Walletserver preference",
|
||||||
"Wallet servers": "Wallet servers",
|
"Wallet servers": "Wallet servers",
|
||||||
"lbry.tv": "lbry.tv"
|
"lbry.tv": "lbry.tv",
|
||||||
|
"In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.": "In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications."
|
||||||
}
|
}
|
|
@ -8,7 +8,6 @@ import {
|
||||||
makeSelectTitleForUri,
|
makeSelectTitleForUri,
|
||||||
normalizeURI,
|
normalizeURI,
|
||||||
makeSelectClaimIsMine,
|
makeSelectClaimIsMine,
|
||||||
makeSelectFileInfoForUri,
|
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { selectBlackListedOutpoints } from 'lbryinc';
|
import { selectBlackListedOutpoints } from 'lbryinc';
|
||||||
import ShowPage from './view';
|
import ShowPage from './view';
|
||||||
|
@ -41,7 +40,6 @@ const select = (state, props) => {
|
||||||
uri,
|
uri,
|
||||||
title: makeSelectTitleForUri(uri)(state),
|
title: makeSelectTitleForUri(uri)(state),
|
||||||
claimIsMine: makeSelectClaimIsMine(uri)(state),
|
claimIsMine: makeSelectClaimIsMine(uri)(state),
|
||||||
fileInfo: makeSelectFileInfoForUri(uri)(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import FilePage from 'page/file';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { SITE_TITLE } from 'config';
|
import { SITE_TITLE } from 'config';
|
||||||
|
import Card from 'component/common/card';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isResolvingUri: boolean,
|
isResolvingUri: boolean,
|
||||||
|
@ -20,21 +21,10 @@ type Props = {
|
||||||
}>,
|
}>,
|
||||||
title: string,
|
title: string,
|
||||||
claimIsMine: Boolean,
|
claimIsMine: Boolean,
|
||||||
fileInfo: FileListItem,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function ShowPage(props: Props) {
|
function ShowPage(props: Props) {
|
||||||
const {
|
const { isResolvingUri, resolveUri, uri, claim, blackListedOutpoints, location, title, claimIsMine } = props;
|
||||||
isResolvingUri,
|
|
||||||
resolveUri,
|
|
||||||
uri,
|
|
||||||
claim,
|
|
||||||
blackListedOutpoints,
|
|
||||||
location,
|
|
||||||
title,
|
|
||||||
claimIsMine,
|
|
||||||
fileInfo,
|
|
||||||
} = props;
|
|
||||||
const { channelName, streamName } = parseURI(uri);
|
const { channelName, streamName } = parseURI(uri);
|
||||||
const signingChannel = claim && claim.signing_channel;
|
const signingChannel = claim && claim.signing_channel;
|
||||||
const canonicalUrl = claim && claim.canonical_url;
|
const canonicalUrl = claim && claim.canonical_url;
|
||||||
|
@ -98,31 +88,24 @@ function ShowPage(props: Props) {
|
||||||
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
|
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
|
||||||
);
|
);
|
||||||
|
|
||||||
let blockedMessage = (
|
|
||||||
<section className="card card--section">
|
|
||||||
<div className="card__title card__title--deprecated">{uri}</div>
|
|
||||||
<p>
|
|
||||||
{__(
|
|
||||||
'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.'
|
|
||||||
)}
|
|
||||||
</p>
|
|
||||||
<div className="card__actions">
|
|
||||||
<Button button="link" href="https://lbry.com/faq/dmca" label={__('Read More')} />
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isClaimBlackListed && !claimIsMine) {
|
if (isClaimBlackListed && !claimIsMine) {
|
||||||
innerContent = <Page>{blockedMessage}</Page>;
|
innerContent = (
|
||||||
|
<Page>
|
||||||
|
<Card
|
||||||
|
title={uri}
|
||||||
|
subtitle={__(
|
||||||
|
'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.'
|
||||||
|
)}
|
||||||
|
actions={
|
||||||
|
<div className="card__actions">
|
||||||
|
<Button button="link" href="https://lbry.com/faq/dmca" label={__('Read More')} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
innerContent =
|
innerContent = <FilePage uri={uri} location={location} />;
|
||||||
isClaimBlackListed || fileInfo ? (
|
|
||||||
<div>
|
|
||||||
{blockedMessage} <FilePage uri={uri} location={location} />
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<FilePage uri={uri} location={location} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue