got frustrated about no claim id on channels and went wild
update text
This commit is contained in:
parent
d85a1dc67c
commit
4c928c874b
4 changed files with 2242 additions and 2511 deletions
|
@ -1033,5 +1033,13 @@
|
|||
"Commenting is in alpha. During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.": "Commenting is in alpha. During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.",
|
||||
"Deleting or editing comments is not currently possible. Please be mindful of this when posting.": "Deleting or editing comments is not currently possible. Please be mindful of this when posting.",
|
||||
"When the alpha ends, we will attempt to transition comments, but do not promise to do so.": "When the alpha ends, we will attempt to transition comments, but do not promise to do so.",
|
||||
"More Channels": "More Channels"
|
||||
"More Channels": "More Channels",
|
||||
"You aren’t blocking any channels": "You aren’t blocking any channels",
|
||||
"When you block a channel, all content from that channel will be hidden.": "When you block a channel, all content from that channel will be hidden.",
|
||||
"View top claims for %normalized_uri%": "View top claims for %normalized_uri%",
|
||||
"Staked LBC": "Staked LBC",
|
||||
"view all claims": "view all claims",
|
||||
"Top claims at lbry://%name%": "Top claims at lbry://%name%",
|
||||
"Last Updated": "Last Updated",
|
||||
"Total Publishes": "Total Publishes"
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { makeSelectMetadataItemForUri } from 'lbry-redux';
|
||||
import { makeSelectMetadataItemForUri, makeSelectClaimForUri } from 'lbry-redux';
|
||||
import ChannelAbout from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
|
||||
website: makeSelectMetadataItemForUri(props.uri, 'website_url')(state),
|
||||
email: makeSelectMetadataItemForUri(props.uri, 'email')(state),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
null
|
||||
)(ChannelAbout);
|
||||
export default connect(select, null)(ChannelAbout);
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
import React, { Fragment } from 'react';
|
||||
import MarkdownPreview from 'component/common/markdown-preview';
|
||||
import ClaimTags from 'component/claimTags';
|
||||
import CreditAmount from 'component/common/credit-amount';
|
||||
import Button from 'component/button';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import DateTime from 'component/dateTime';
|
||||
|
||||
type Props = {
|
||||
claim: ChannelClaim,
|
||||
uri: string,
|
||||
description: ?string,
|
||||
email: ?string,
|
||||
|
@ -19,14 +24,12 @@ const formatEmail = (email: string) => {
|
|||
return null;
|
||||
};
|
||||
|
||||
function ChannelContent(props: Props) {
|
||||
const { uri, description, email, website } = props;
|
||||
const showAbout = description || email || website;
|
||||
function ChannelAbout(props: Props) {
|
||||
const { claim, uri, description, email, website } = props;
|
||||
|
||||
return (
|
||||
<section className="section">
|
||||
{!showAbout && <h2 className="main--empty empty">{__('Nothing here yet')}</h2>}
|
||||
{showAbout && (
|
||||
<div className="card">
|
||||
<section className="section card--section">
|
||||
<Fragment>
|
||||
{description && (
|
||||
<div className="media__info-text media__info-text--constrained">
|
||||
|
@ -54,10 +57,41 @@ function ChannelContent(props: Props) {
|
|||
<div className="media__info-text">
|
||||
<ClaimTags uri={uri} type="large" />
|
||||
</div>
|
||||
|
||||
<label>{__('Total Publishes')}</label>
|
||||
<div className="media__info-text">{claim.meta.claims_in_channel}</div>
|
||||
|
||||
<label>{__('Last Updated')}</label>
|
||||
<div className="media__info-text">
|
||||
<DateTime timeAgo uri={uri} />
|
||||
</div>
|
||||
|
||||
<label>{__('Claim ID')}</label>
|
||||
<div className="media__info-text">
|
||||
<div className="media__info-text media__info-text--constrained">{claim.claim_id}</div>
|
||||
</div>
|
||||
|
||||
<label>{__('Staked LBC')}</label>
|
||||
<div className="media__info-text">
|
||||
<CreditAmount
|
||||
badge={false}
|
||||
amount={parseFloat(claim.amount) + parseFloat(claim.meta.support_amount)}
|
||||
precision={8}
|
||||
/>{' '}
|
||||
(
|
||||
<Button
|
||||
button="link"
|
||||
label={__('view other claims at lbry://%name%', {
|
||||
name: claim.name,
|
||||
})}
|
||||
navigate={`/$/${PAGES.TOP}?name=${claim.name}`}
|
||||
/>
|
||||
)
|
||||
</div>
|
||||
</Fragment>
|
||||
)}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelContent;
|
||||
export default ChannelAbout;
|
||||
|
|
Loading…
Reference in a new issue