update lbryinc and minor style

This commit is contained in:
Sean Yesmunt 2019-09-26 23:52:04 -04:00
parent b80539bc7b
commit 5f0dd61a4b
6 changed files with 30 additions and 38 deletions

View file

@ -129,7 +129,7 @@
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#42bf926138872d14523be7191694309be4f37605",
"lbryinc": "lbryio/lbryinc#67bb3e215be3f13605c5e3f9f2b0e2fb880724cf",
"lbryinc": "lbryio/lbryinc#4c00df007b60de6a5bc0e5915170d05697848a55",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",
"lodash-es": "^4.17.14",

View file

@ -78,6 +78,7 @@ function ChannelPage(props: Props) {
const [coverPreview, setCoverPreview] = useState(cover);
const [searchQuery, setSearchQuery] = useState('');
const [searchResults, setSearchResults] = useState(undefined);
const claimId = claim.claim_id;
// If a user changes tabs, update the url so it stays on the same page if they refresh.
// We don't want to use links here because we can't animate the tab change and using links
@ -126,14 +127,12 @@ function ChannelPage(props: Props) {
);
}
if (channelIsMine) {
fetchSubCount(claim.claim_id);
}
React.useEffect(() => {
setSearchResults(null);
setSearchQuery('');
}, [uri]);
fetchSubCount(claimId);
}, [uri, fetchSubCount, claimId]);
return (
<Page>
@ -187,14 +186,12 @@ function ChannelPage(props: Props) {
<Button title={__('Edit')} onClick={() => setEditing(!editing)} icon={ICONS.EDIT} iconSize={49} />
)}
</h1>
<h2 className="channel__url">
<div className="channel__meta">
<ClaimUri uri={uri} />
</h2>
{channelIsMine && (
<span>
{subCount} {subCount !== 1 ? __('Subscribers') : __('Subscriber')}
</span>
)}
</div>
</div>
</header>
<Tabs onChange={onTabChange} index={tabIndex}>

View file

@ -48,24 +48,13 @@ type Props = {
class FilePage extends React.Component<Props> {
componentDidMount() {
const {
uri,
claim,
fetchFileInfo,
fetchCostInfo,
setViewed,
isSubscribed,
claimIsMine,
fetchViewCount,
} = this.props;
const { uri, claim, fetchFileInfo, fetchCostInfo, setViewed, isSubscribed, fetchViewCount } = this.props;
if (isSubscribed) {
this.removeFromSubscriptionNotifications();
}
if (claimIsMine) {
fetchViewCount(claim.claim_id);
}
fetchViewCount(claim.claim_id);
// always refresh file info when entering file page to see if we have the file
// @if TARGET='app'
@ -78,13 +67,13 @@ class FilePage extends React.Component<Props> {
}
componentDidUpdate(prevProps: Props) {
const { isSubscribed, claim, uri, fileInfo, setViewed, fetchViewCount, claimIsMine, fetchFileInfo } = this.props;
const { isSubscribed, claim, uri, fileInfo, setViewed, fetchViewCount, fetchFileInfo } = this.props;
if (!prevProps.isSubscribed && isSubscribed) {
this.removeFromSubscriptionNotifications();
}
if (prevProps.uri !== uri && claimIsMine) {
if (prevProps.uri !== uri) {
fetchViewCount(claim.claim_id);
}
@ -170,11 +159,9 @@ class FilePage extends React.Component<Props> {
<div className="media__subtitle">
<div className="media__actions media__actions--between">
<DateTime uri={uri} show={DateTime.SHOW_DATE} />
{claimIsMine && (
<span>
{viewCount} {viewCount !== 1 ? __('Views') : __('View')}
</span>
)}
<span>
{viewCount} {viewCount !== 1 ? __('Views') : __('View')}
</span>
</div>
<div className="media__actions media__actions--between">

View file

@ -16,7 +16,7 @@ $metadata-z-index: 1;
align-self: flex-start;
position: absolute;
object-fit: cover;
filter: brightness(40%);
filter: brightness(30%);
}
.channel-cover,
@ -78,9 +78,10 @@ $metadata-z-index: 1;
// Jump over the thumbnail photo because it is absolutely positioned
// Then add normal page spacing, _then_ add the actual padding
padding-left: calc(var(--channel-thumbnail-width) + var(--spacing-large));
// padding-left: var(--spacing-large);
padding-right: var(--spacing-medium);
padding-bottom: var(--spacing-medium);
min-width: 0;
width: 100%;
}
.channel__title {
@ -98,9 +99,9 @@ $metadata-z-index: 1;
}
}
.channel__url {
color: rgba($lbry-white, 0.75);
margin-right: var(--spacing-large);
.channel__meta {
display: flex;
justify-content: space-between;
}
.channel__image--blurred {

View file

@ -711,5 +711,12 @@
"You have %credit_amount% in unclaimed rewards.": "You have %credit_amount% in unclaimed rewards.",
"URI does not include name.": "URI does not include name.",
"to fix it. If that doesn't work, press CMD/CTRL-R to reset to the homepage.": "to fix it. If that doesn't work, press CMD/CTRL-R to reset to the homepage.",
"Add Email": "Add Email"
"Add Email": "Add Email",
"Sign Out": "Sign Out",
"Follow more tags": "Follow more tags",
"In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this channel from our applications.": "In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this channel from our applications.",
"Read More": "Read More",
"Subscribers": "Subscribers",
"Your password is saved in your OS keychain.": "Your password is saved in your OS keychain.",
"I want to type it manually": "I want to type it manually"
}

View file

@ -6858,9 +6858,9 @@ lbry-redux@lbryio/lbry-redux#42bf926138872d14523be7191694309be4f37605:
reselect "^3.0.0"
uuid "^3.3.2"
lbryinc@lbryio/lbryinc#67bb3e215be3f13605c5e3f9f2b0e2fb880724cf:
lbryinc@lbryio/lbryinc#4c00df007b60de6a5bc0e5915170d05697848a55:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/67bb3e215be3f13605c5e3f9f2b0e2fb880724cf"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/4c00df007b60de6a5bc0e5915170d05697848a55"
dependencies:
reselect "^3.0.0"