Compare commits

...
10 Commits
Author SHA1 Message Date
Thomas Zarebczan cf2dec3e28 bump: proper release 2019-09-04 18:03:57 -04:00
Thomas Zarebczan 9e31f2e66c v0.35.3-rc.4 2019-09-04 17:39:00 -04:00
Thomas Zarebczan 24daba5dd6 feat: daily reward
Adds range to reward tile, updates lbryinc which checks the reward
2019-09-04 17:37:28 -04:00
Sean Yesmunt ba151c35a1 v0.35.3-rc.3 2019-09-04 12:58:11 -04:00
Sean Yesmunt 8ed77f9482 update lbry-redux 2019-09-04 12:57:55 -04:00
Sean Yesmunt 40b168180e v0.35.3-rc.2 2019-09-04 12:30:40 -04:00
Sean Yesmunt a42a773c83 fall back to permanent_url if canonical_url is missing (claim_list entry) 2019-09-04 12:16:51 -04:00
Sean Yesmunt b14c2bb0f6 subscription fixes 2019-09-04 12:00:56 -04:00
Sean Yesmunt a083427923 v0.35.3-rc.1 2019-09-04 00:25:57 -04:00
Sean Yesmunt 95ceee0c87 canonical_url fixes 2019-09-04 00:23:33 -04:00
15 changed files with 59 additions and 54 deletions

No files matched your search

+1
View File
@@ -4,6 +4,7 @@ declare type Reward = {
created_at: string,
id: number,
reward_amount: number,
reward_range?: string,
reward_description: string,
reward_notification: string,
reward_title: string,
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "lbry",
"version": "0.35.2",
"version": "0.35.3",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [
"lbry"
@@ -130,8 +130,8 @@
"jsmediatags": "^3.8.1",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#3861c692664f4c3e5ec1751fa0b655abe49036ea",
"lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585",
"lbry-redux": "lbryio/lbry-redux#2b3a5a59907f34d4e1c005c4696282b58d626242",
"lbryinc": "lbryio/lbryinc#534f02e54ab93585d3dcab6a6cc708117978e454",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",
"lodash-es": "^4.17.14",
@@ -206,7 +206,7 @@
"yarn": "^1.3"
},
"lbrySettings": {
"lbrynetDaemonVersion": "0.39.0",
"lbrynetDaemonVersion": "0.40.0",
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
"lbrynetDaemonDir": "static/daemon",
"lbrynetDaemonFileName": "lbrynet"
+2
View File
@@ -5,6 +5,7 @@ import {
doToast,
makeSelectClaimIsMine,
makeSelectShortUrlForUri,
makeSelectPermanentUrlForUri,
} from 'lbry-redux';
import BlockButton from './view';
@@ -12,6 +13,7 @@ const select = (state, props) => ({
channelIsBlocked: selectChannelIsBlocked(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
permanentUrl: makeSelectPermanentUrlForUri(props.uri)(state),
});
export default connect(
+19 -20
View File
@@ -6,7 +6,7 @@ import Button from 'component/button';
import useHover from 'util/use-hover';
type Props = {
uri: string,
permanentUrl: ?string,
shortUrl: string,
isSubscribed: boolean,
toggleBlockChannel: (uri: string) => void,
@@ -16,29 +16,28 @@ type Props = {
};
export default function BlockButton(props: Props) {
const { uri, shortUrl, toggleBlockChannel, channelIsBlocked, claimIsMine, doToast } = props;
const { permanentUrl, shortUrl, toggleBlockChannel, channelIsBlocked, claimIsMine, doToast } = props;
const blockRef = useRef();
const isHovering = useHover(blockRef);
const blockLabel = channelIsBlocked ? __('Blocked') : __('Block');
const blockedOverride = channelIsBlocked && isHovering && __('Unblock');
return (
!claimIsMine && (
<Button
ref={blockRef}
iconColor="red"
icon={ICONS.BLOCK}
button={'alt'}
label={blockedOverride || blockLabel}
onClick={e => {
e.stopPropagation();
if (!channelIsBlocked) {
doToast({ message: `Blocked ${shortUrl}`, linkText: 'Manage', linkTarget: `/${PAGES.BLOCKED}` });
}
toggleBlockChannel(uri);
}}
/>
)
);
return permanentUrl && !claimIsMine ? (
<Button
ref={blockRef}
iconColor="red"
icon={ICONS.BLOCK}
button={'alt'}
label={blockedOverride || blockLabel}
onClick={e => {
e.stopPropagation();
if (!channelIsBlocked) {
doToast({ message: `Blocked ${shortUrl}`, linkText: 'Manage', linkTarget: `/${PAGES.BLOCKED}` });
}
toggleBlockChannel(permanentUrl);
}}
/>
) : null;
}
+6 -5
View File
@@ -209,11 +209,12 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
</Fragment>
)}
<div>
{isChannel ? (
type !== 'inline' && `${claimsInChannel} ${__('publishes')}`
) : (
<DateTime timeAgo uri={uri} />
)}
{claim &&
(isChannel ? (
type !== 'inline' && `${claimsInChannel} ${__('publishes')}`
) : (
<DateTime timeAgo uri={uri} />
))}
</div>
</div>
)}
+2 -1
View File
@@ -4,6 +4,7 @@ import Button from 'component/button';
type Reward = {
reward_amount: number,
reward_range: string,
};
type Props = {
@@ -20,7 +21,7 @@ const RewardLink = (props: Props) => {
<Button
button={button ? 'inverse' : 'link'}
disabled={isPending}
label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_amount} LBC`}
label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_range || reward.reward_amount} LBC`}
onClick={() => {
claimReward(reward);
}}
+1
View File
@@ -12,6 +12,7 @@ type Props = {
id: string,
reward_title: string,
reward_amount: number,
reward_range?: string,
transaction_id: string,
created_at: string,
reward_description: string,
+1 -1
View File
@@ -16,7 +16,7 @@ export default function ShareButton(props: Props) {
<Button
button="alt"
icon={ICONS.SHARE}
label={__('Share Channel')}
label={__('Share')}
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, speechShareable: true, isChannel: true })}
/>
);
+2 -1
View File
@@ -2,13 +2,14 @@ import { connect } from 'react-redux';
import { doChannelSubscribe, doChannelUnsubscribe } from 'redux/actions/subscriptions';
import { doOpenModal } from 'redux/actions/app';
import { selectSubscriptions, makeSelectIsSubscribed, selectFirstRunCompleted } from 'redux/selectors/subscriptions';
import { doToast } from 'lbry-redux';
import { doToast, makeSelectPermanentUrlForUri } from 'lbry-redux';
import SubscribeButton from './view';
const select = (state, props) => ({
subscriptions: selectSubscriptions(state),
isSubscribed: makeSelectIsSubscribed(props.uri, true)(state),
firstRunCompleted: selectFirstRunCompleted(state),
permanentUrl: makeSelectPermanentUrlForUri(props.uri)(state),
});
export default connect(
+6 -6
View File
@@ -12,7 +12,7 @@ type SubscriptionArgs = {
};
type Props = {
uri: string,
permanentUrl: ?string,
isSubscribed: boolean,
subscriptions: Array<string>,
doChannelSubscribe: ({ channelName: string, uri: string }) => void,
@@ -24,7 +24,7 @@ type Props = {
export default function SubscribeButton(props: Props) {
const {
uri,
permanentUrl,
doChannelSubscribe,
doChannelUnsubscribe,
doOpenModal,
@@ -35,13 +35,13 @@ export default function SubscribeButton(props: Props) {
} = props;
const buttonRef = useRef();
const isHovering = useHover(buttonRef);
const { channelName } = parseURI(uri);
const { channelName } = parseURI(permanentUrl);
const claimName = '@' + channelName;
const subscriptionHandler = isSubscribed ? doChannelUnsubscribe : doChannelSubscribe;
const subscriptionLabel = isSubscribed ? __('Following') : __('Follow');
const unfollowOverride = isSubscribed && isHovering && __('Unfollow');
return (
return permanentUrl ? (
<Button
ref={buttonRef}
iconColor="red"
@@ -57,7 +57,7 @@ export default function SubscribeButton(props: Props) {
subscriptionHandler({
channelName: claimName,
uri,
uri: permanentUrl,
});
if (showSnackBarOnSubscribe) {
@@ -65,5 +65,5 @@ export default function SubscribeButton(props: Props) {
}
}}
/>
);
) : null;
}
+2 -6
View File
@@ -1,7 +1,6 @@
// @flow
import React from 'react';
import Button from 'component/button';
import { buildURI } from 'lbry-redux';
import Tooltip from 'component/common/tooltip';
import ClaimPreview from 'component/claimPreview';
@@ -54,11 +53,8 @@ class UriIndicator extends React.PureComponent<Props> {
const channelClaim = isChannelClaim ? claim : claim.signing_channel;
if (channelClaim) {
const { name, claim_id: claimId } = channelClaim;
let channelLink;
if (claimId && name) {
channelLink = link ? buildURI({ channelName: name, channelClaimId: claimId }) : false;
}
const { name } = channelClaim;
const channelLink = link ? channelClaim.canonical_url || channelClaim.permanent_url : false;
const inner = <span className="channel-name">{name}</span>;
+1 -1
View File
@@ -51,7 +51,7 @@ function FollowingPage(props: Props) {
onClick={() => onClick()}
/>
}
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => sub.uri) : channelUris}
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
/>
</div>
</Page>
+6 -4
View File
@@ -7,6 +7,7 @@ import {
makeSelectChannelForClaimUri,
selectClaimsByUri,
parseURI,
makeSelectClaimForUri,
} from 'lbry-redux';
import { swapKeyAndValue } from 'util/swap-json';
@@ -260,7 +261,8 @@ export const makeSelectIsSubscribed = uri =>
createSelector(
selectSubscriptions,
makeSelectChannelForClaimUri(uri, true),
(subscriptions, channelUri) => {
makeSelectClaimForUri(uri),
(subscriptions, channelUri, claim) => {
if (channelUri) {
return subscriptions.some(sub => sub.uri === channelUri);
}
@@ -271,9 +273,9 @@ export const makeSelectIsSubscribed = uri =>
({ isChannel } = parseURI(uri));
} catch (e) {}
if (isChannel) {
const uriWithPrefix = uri.startsWith('lbry://') ? uri : `lbry://${uri}`;
return subscriptions.some(sub => sub.uri === uriWithPrefix);
if (isChannel && claim) {
const uri = claim.permanent_url;
return subscriptions.some(sub => sub.uri === uri);
}
return false;
+2 -1
View File
@@ -683,5 +683,6 @@
"Content Downloaded": "Content Downloaded",
"The viewer doesn't support this file type. See more info below.": "The viewer doesn't support this file type. See more info below.",
"Catching up...": "Catching up...",
"%s blocks behind": "%s blocks behind"
"%s blocks behind": "%s blocks behind",
"Support this creator": "Support this creator"
}
+4 -4
View File
@@ -7179,17 +7179,17 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
yargs "^13.2.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#3861c692664f4c3e5ec1751fa0b655abe49036ea:
lbry-redux@lbryio/lbry-redux#2b3a5a59907f34d4e1c005c4696282b58d626242:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/3861c692664f4c3e5ec1751fa0b655abe49036ea"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/2b3a5a59907f34d4e1c005c4696282b58d626242"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"
uuid "^3.3.2"
lbryinc@lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585:
lbryinc@lbryio/lbryinc#534f02e54ab93585d3dcab6a6cc708117978e454:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/1ce266b3c52654190b955e9c869b8e302aa5c585"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/534f02e54ab93585d3dcab6a6cc708117978e454"
dependencies:
reselect "^3.0.0"