fix: SDK bump + small fixes
- improve claim search failure
This commit is contained in:
parent
fb50b48ae9
commit
de3d379b80
9 changed files with 78 additions and 26 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lbry",
|
||||
"version": "0.37.2-rc.1",
|
||||
"version": "0.37.2-rc.2",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
|
@ -124,7 +124,7 @@
|
|||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#4491b975cc3e23bf3733272b7c6079a28c1036b3",
|
||||
"lbryinc": "lbryio/lbryinc#d4829073e1bee3124b2be6be49bbe0325a47d686",
|
||||
"lbryinc": "lbryio/lbryinc#2aedf5a188f028f61c45bc7ed0c747a2d4ae453a",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
|
|
|
@ -862,5 +862,12 @@
|
|||
"Explore new content": "Explore new content",
|
||||
"Use this address to receive LBC.": "Use this address to receive LBC.",
|
||||
"Embedded": "Embedded",
|
||||
"Failed to load %language% translations.": "Failed to load %language% translations."
|
||||
}
|
||||
"Failed to load %language% translations.": "Failed to load %language% translations.",
|
||||
"trending for everyone": "trending for everyone",
|
||||
"discover some channels!": "discover some channels!",
|
||||
"Please try again in a few seconds.": "Please try again in a few seconds.",
|
||||
"contact support": "contact support",
|
||||
"Look what's %trending% or %discover%": "Look what's %trending% or %discover%",
|
||||
"Sorry, your request timed out. %again%": "Sorry, your request timed out. %again%",
|
||||
"If you continue to have issues, please %support%.": "If you continue to have issues, please %support%."
|
||||
}
|
|
@ -5,6 +5,7 @@ import Button from 'component/button';
|
|||
import SelectAsset from 'component/selectAsset';
|
||||
import TagsSelect from 'component/tagsSelect';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import { MINIMUM_PUBLISH_BID } from 'constants/claim';
|
||||
|
||||
type Props = {
|
||||
claim: ChannelClaim,
|
||||
|
@ -68,7 +69,6 @@ function ChannelForm(props: Props) {
|
|||
const [params, setParams] = useState(channelParams);
|
||||
const [bidError, setBidError] = useState('');
|
||||
|
||||
const MINIMUM_PUBLISH_BID = 0.00000001;
|
||||
// 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
|
||||
// would alter the Tab label's role attribute, which should stay role="tab" to work with keyboards/screen readers.
|
||||
|
@ -84,7 +84,7 @@ function ChannelForm(props: Props) {
|
|||
setBidError(__('Please decrease your deposit to account for transaction fees'));
|
||||
} else if (totalAvailableBidAmount < bid) {
|
||||
setBidError(__('Deposit cannot be higher than your balance'));
|
||||
} else if (bid <= MINIMUM_PUBLISH_BID) {
|
||||
} else if (bid < MINIMUM_PUBLISH_BID) {
|
||||
setBidError(__('Your deposit must be higher'));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -126,7 +126,7 @@ export default function ClaimList(props: Props) {
|
|||
</ul>
|
||||
)}
|
||||
|
||||
{urisLength === 0 && !loading && <p className="main--empty empty">{empty || __('No results')}</p>}
|
||||
{urisLength === 0 && !loading && <div className="main--empty empty">{empty || __('No results')}</div>}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import ClaimList from 'component/claimList';
|
|||
import Tag from 'component/tag';
|
||||
import ClaimPreview from 'component/claimPreview';
|
||||
import { toCapitalCase } from 'util/string';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
|
||||
const PAGE_SIZE = 20;
|
||||
const TIME_DAY = 'day';
|
||||
|
@ -67,6 +68,7 @@ function ClaimListDiscover(props: Props) {
|
|||
const didNavigateForward = history.action === 'PUSH';
|
||||
const [page, setPage] = useState(1);
|
||||
const { search } = location;
|
||||
const [forceRefresh, setForceRefresh] = useState();
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const personalSort = urlParams.get('sort') || (hideCustomization ? SEARCH_SORT_ALL : SEARCH_SORT_YOU);
|
||||
const typeSort = urlParams.get('type') || TYPE_TRENDING;
|
||||
|
@ -124,18 +126,58 @@ function ClaimListDiscover(props: Props) {
|
|||
|
||||
const noChannels = (
|
||||
<div>
|
||||
<p>{__("You're not following any channels.")}</p>
|
||||
<Button button={'link'} navigate={'/?type=trending&sort=everyone'}>
|
||||
{__("Look what's trending for everyone")}
|
||||
</Button>{' '}
|
||||
{__('or')}{' '}
|
||||
<Button button={'link'} navigate={'/$/following'}>
|
||||
{__('Discover some channels!')}
|
||||
</Button>
|
||||
<p>
|
||||
<I18nMessage>You're not following any channels.</I18nMessage>
|
||||
</p>
|
||||
<p>
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
trending: (
|
||||
<Button
|
||||
button="link"
|
||||
label={__("trending for everyone")}
|
||||
navigate={'/?type=trending&sort=everyone'}
|
||||
/>
|
||||
),
|
||||
discover: <Button button="link" label={__('discover some channels!')} navigate={'/$/following'} />,
|
||||
}}
|
||||
>
|
||||
Look what's %trending% or %discover%
|
||||
</I18nMessage>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
const emptyState = personalSort === SEARCH_SORT_CHANNELS ? noChannels : false;
|
||||
const noResults = (
|
||||
<div>
|
||||
<p>
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
again: (
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Please try again in a few seconds.')}
|
||||
onClick={() => setForceRefresh(Date.now())}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
>
|
||||
Sorry, your request timed out. %again%
|
||||
</I18nMessage>
|
||||
</p>
|
||||
<p>
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
support: <Button button="link" label={__('contact support')} href="https://lbry.com/faq/support" />,
|
||||
}}
|
||||
>
|
||||
If you continue to have issues, please %support%.
|
||||
</I18nMessage>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
const emptyState = personalSort === SEARCH_SORT_CHANNELS && !hasContent ? noChannels : noResults;
|
||||
|
||||
function getSearch() {
|
||||
let search = `?`;
|
||||
|
@ -177,7 +219,7 @@ function ClaimListDiscover(props: Props) {
|
|||
const searchOptions = JSON.parse(optionsStringForEffect);
|
||||
doClaimSearch(searchOptions);
|
||||
}
|
||||
}, [doClaimSearch, shouldPerformSearch, optionsStringForEffect]);
|
||||
}, [doClaimSearch, shouldPerformSearch, optionsStringForEffect, forceRefresh]);
|
||||
|
||||
const header = (
|
||||
<Fragment>
|
||||
|
|
|
@ -66,7 +66,7 @@ function PublishName(props: Props) {
|
|||
bidError = __('Please decrease your deposit to account for transaction fees');
|
||||
} else if (totalAvailableBidAmount < bid) {
|
||||
bidError = __('Deposit cannot be higher than your balance');
|
||||
} else if (bid <= MINIMUM_PUBLISH_BID) {
|
||||
} else if (bid < MINIMUM_PUBLISH_BID) {
|
||||
bidError = __('Your deposit must be higher');
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ function PublishName(props: Props) {
|
|||
onChange={event => updatePublishForm({ bid: parseFloat(event.target.value) })}
|
||||
helper={
|
||||
<BidHelpText
|
||||
uri={uri}
|
||||
uri={'lbry://' + name}
|
||||
amountNeededForTakeover={amountNeededForTakeover}
|
||||
isResolvingUri={isResolvingUri}
|
||||
/>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import { FormField, Form } from 'component/common/form';
|
||||
import { MINIMUM_PUBLISH_BID } from 'constants/claim';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
|
@ -53,13 +54,15 @@ class WalletSendTip extends React.PureComponent<Props, State> {
|
|||
let tipError;
|
||||
|
||||
if (!tipAmount) {
|
||||
tipError = __('Tip must be a number');
|
||||
tipError = __('Amount must be a number');
|
||||
} else if (tipAmount <= 0) {
|
||||
tipError = __('Tip must be a positive number');
|
||||
tipError = __('Amount must be a positive number');
|
||||
} else if (tipAmount < MINIMUM_PUBLISH_BID) {
|
||||
tipError = __('Amount must be higher');
|
||||
} else if (!validTipInput) {
|
||||
tipError = __('Tip must have no more than 8 decimal places');
|
||||
tipError = __('Amount must have no more than 8 decimal places');
|
||||
} else if (tipAmount === balance) {
|
||||
tipError = __('Please decrease your tip to account for transaction fees');
|
||||
tipError = __('Please decrease the amount to account for transaction fees');
|
||||
} else if (tipAmount > balance) {
|
||||
tipError = __('Not enough credits');
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const MINIMUM_PUBLISH_BID = 0.00000001;
|
||||
export const MINIMUM_PUBLISH_BID = 0.00001000;
|
||||
|
||||
export const CHANNEL_ANONYMOUS = 'anonymous';
|
||||
export const CHANNEL_NEW = 'new';
|
||||
|
|
|
@ -7035,9 +7035,9 @@ lbry-redux@lbryio/lbry-redux#4491b975cc3e23bf3733272b7c6079a28c1036b3:
|
|||
reselect "^3.0.0"
|
||||
uuid "^3.3.2"
|
||||
|
||||
lbryinc@lbryio/lbryinc#d4829073e1bee3124b2be6be49bbe0325a47d686:
|
||||
lbryinc@lbryio/lbryinc#2aedf5a188f028f61c45bc7ed0c747a2d4ae453a:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/d4829073e1bee3124b2be6be49bbe0325a47d686"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/2aedf5a188f028f61c45bc7ed0c747a2d4ae453a"
|
||||
dependencies:
|
||||
reselect "^3.0.0"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue