final cleanup I know theres bugs but ship it

This commit is contained in:
Sean Yesmunt 2019-07-23 16:13:06 -04:00
parent 4b6399bb32
commit 9311038fbb
11 changed files with 69 additions and 20 deletions

View file

@ -124,7 +124,7 @@
"jsmediatags": "^3.8.1", "jsmediatags": "^3.8.1",
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#e550f0ff0448fcad5f3d0365ec7ad744376b41cf", "lbry-redux": "lbryio/lbry-redux#885b4679ca1918076d64af063fda15608a52a5e5",
"lbryinc": "lbryio/lbryinc#a93596c51c8fb0a226cb84df04c26a6bb60a45fb", "lbryinc": "lbryio/lbryinc#a93596c51c8fb0a226cb84df04c26a6bb60a45fb",
"lint-staged": "^7.0.2", "lint-staged": "^7.0.2",
"localforage": "^1.7.1", "localforage": "^1.7.1",

View file

@ -84,9 +84,8 @@ const analytics: Analytics = {
tagFollowEvent: (tag, following, location) => { tagFollowEvent: (tag, following, location) => {
if (analyticsEnabled) { if (analyticsEnabled) {
ReactGA.event({ ReactGA.event({
category: 'Tag', category: following ? 'Tag-Follow' : 'Tag-Unfollow',
action: following ? 'follow' : 'unfollow', action: tag,
value: tag,
}); });
} }
}, },

View file

@ -9,7 +9,7 @@ type Props = {
title: string, title: string,
claim: StreamClaim, claim: StreamClaim,
isPending: boolean, isPending: boolean,
sendSupport: (number, string, string) => void, sendSupport: (number, string) => void,
onCancel: () => void, onCancel: () => void,
sendTipCallback?: () => void, sendTipCallback?: () => void,
balance: number, balance: number,
@ -71,7 +71,7 @@ class WalletSendTip extends React.PureComponent<Props, State> {
} }
render() { render() {
const { title, isPending, uri, onCancel, claimIsMine, isSupport } = this.props; const { title, isPending, onCancel, claimIsMine, isSupport } = this.props;
const { tipAmount, tipError } = this.state; const { tipAmount, tipError } = this.state;
return ( return (
@ -81,7 +81,10 @@ class WalletSendTip extends React.PureComponent<Props, State> {
autoFocus autoFocus
name="tip-input" name="tip-input"
label={ label={
(tipAmount && tipAmount !== 0 && `Tip ${tipAmount.toFixed(8).replace(/\.?0+$/, '')} LBC`) || __('Amount') (tipAmount &&
tipAmount !== 0 &&
`${isSupport ? __('Support') : __('Tip')} ${tipAmount.toFixed(8).replace(/\.?0+$/, '')} LBC`) ||
__('Amount')
} }
className="form-field--price-amount" className="form-field--price-amount"
error={tipError} error={tipError}
@ -93,6 +96,7 @@ class WalletSendTip extends React.PureComponent<Props, State> {
inputButton={ inputButton={
<Button <Button
button="primary" button="primary"
type="submit"
label={__('Send')} label={__('Send')}
disabled={isPending || tipError || !tipAmount} disabled={isPending || tipError || !tipAmount}
onClick={this.handleSendButtonClicked} onClick={this.handleSendButtonClicked}
@ -111,7 +115,7 @@ class WalletSendTip extends React.PureComponent<Props, State> {
/> />
</Form> </Form>
<div className="card__actions"> <div className="card__actions">
<Button button="link" label={__('Cancel')} onClick={onCancel} navigateParams={{ uri }} /> <Button button="link" label={__('Cancel')} onClick={onCancel} />
</div> </div>
</React.Fragment> </React.Fragment>
); );

View file

@ -229,9 +229,8 @@ function AppWrapper() {
app.store.dispatch(doInitLanguage()); app.store.dispatch(doInitLanguage());
app.store.dispatch(doBlackListedOutpointsSubscribe()); app.store.dispatch(doBlackListedOutpointsSubscribe());
app.store.dispatch(doFilteredOutpointsSubscribe()); app.store.dispatch(doFilteredOutpointsSubscribe());
window.sessionStorage.setItem('loaded', 'y');
} }
window.sessionStorage.setItem('loaded', 'y');
}, [readyToLaunch, haveLaunched]); }, [readyToLaunch, haveLaunched]);
return ( return (

View file

@ -10,10 +10,19 @@ type Props = {
class ModalError extends React.PureComponent<Props> { class ModalError extends React.PureComponent<Props> {
componentDidMount() { componentDidMount() {
if (process.env.NODE_ENV === 'production') { const { error } = this.props;
Lbryio.call('event', 'desktop_error', { error_message: JSON.stringify(this.props.error) });
// Yuck
// https://github.com/lbryio/lbry-sdk/issues/1118
// The sdk logs failed downloads, they happen so often that it's mostly noise in the desktop logs
const errorMessage = typeof error === 'string' ? error : error.message;
const failedToDownloadError = errorMessage.startsWith('Failed to download');
if (process.env.NODE_ENV === 'production' && !failedToDownloadError) {
Lbryio.call('event', 'desktop_error', { error_message: JSON.stringify(error) });
} }
} }
render() { render() {
const { closeModal, error } = this.props; const { closeModal, error } = this.props;

View file

@ -127,7 +127,7 @@ class ModalWalletEncrypt extends React.PureComponent<Props, State> {
/> />
</fieldset-section> </fieldset-section>
<div className="help help--warning"> <div className="card__subtitle--status">
{__( {__(
'If your password is lost, it cannot be recovered. You will not be able to access your wallet without a password.' 'If your password is lost, it cannot be recovered. You will not be able to access your wallet without a password.'
)} )}

View file

@ -370,7 +370,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
<Form> <Form>
<FormField <FormField
type="setting" type="checkbox"
name="support_option" name="support_option"
onChange={() => setClientSetting(SETTINGS.SUPPORT_OPTION, !supportOption)} onChange={() => setClientSetting(SETTINGS.SUPPORT_OPTION, !supportOption)}
checked={supportOption} checked={supportOption}
@ -387,7 +387,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
/> />
<FormField <FormField
type="setting"
type="checkbox" type="checkbox"
name="auto_download" name="auto_download"
onChange={() => setClientSetting(SETTINGS.AUTO_DOWNLOAD, !autoDownload)} onChange={() => setClientSetting(SETTINGS.AUTO_DOWNLOAD, !autoDownload)}

View file

@ -331,6 +331,7 @@ export function doClearCache() {
// Leaving for now // Leaving for now
// const reducersToClear = whiteListedReducers.filter(reducerKey => reducerKey !== 'tags'); // const reducersToClear = whiteListedReducers.filter(reducerKey => reducerKey !== 'tags');
// window.cacheStore.purge(reducersToClear); // window.cacheStore.purge(reducersToClear);
window.localStorage.clear();
return window.persistor.purge(); return window.persistor.purge();
}; };
} }

View file

@ -72,7 +72,7 @@
justify-content: space-between; justify-content: space-between;
&:last-of-type:not(:only-of-type) { &:last-of-type:not(:only-of-type) {
margin-bottom: var(--spacing-large); margin: 0;
} }
} }
@ -89,6 +89,7 @@
.media__action-group--large { .media__action-group--large {
display: flex; display: flex;
font-size: var(--font-multiplier-medium); font-size: var(--font-multiplier-medium);
margin-bottom: var(--spacing-large);
> * { > * {
&:not(:last-child) { &:not(:last-child) {

View file

@ -592,5 +592,42 @@
" but the LBC is returned to your wallet if revoked.": " but the LBC is returned to your wallet if revoked.", " but the LBC is returned to your wallet if revoked.": " but the LBC is returned to your wallet if revoked.",
" Both also help secure ": " Both also help secure ", " Both also help secure ": " Both also help secure ",
"vanity names": "vanity names", "vanity names": "vanity names",
"Add support to this claim": "Add support to this claim" "Add support to this claim": "Add support to this claim",
} "Find New Tags": "Find New Tags",
"Send LBC to your friends or favorite creators.": "Send LBC to your friends or favorite creators.",
"Use this address to receive LBC. You can generate a new address at any time, and any previous addresses will continue to work.": "Use this address to receive LBC. You can generate a new address at any time, and any previous addresses will continue to work.",
"Your Address": "Your Address",
"Send a tip to this creator": "Send a tip to this creator",
"Support this claim": "Support this claim",
"We know this page won't win any design awards, we just wanted to release a very basic version that works so people can use it right now. There is a much nicer version being worked on.": "We know this page won't win any design awards, we just wanted to release a very basic version that works so people can use it right now. There is a much nicer version being worked on.",
"LBRY App Link": "LBRY App Link",
"file": "file",
"hidden due to your": "hidden due to your",
"content viewing preferences": "content viewing preferences",
"Encrypt Wallet": "Encrypt Wallet",
"Encrypting your wallet will require a password to access your local wallet data when LBRY starts. Please enter a new password for your wallet.": "Encrypting your wallet will require a password to access your local wallet data when LBRY starts. Please enter a new password for your wallet.",
"Password": "Password",
"Shh...": "Shh...",
"Confirm Password": "Confirm Password",
"Your eyes only": "Your eyes only",
"If your password is lost, it cannot be recovered. You will not be able to access your wallet without a password.": "If your password is lost, it cannot be recovered. You will not be able to access your wallet without a password.",
"Enter \"I understand\"": "Enter \"I understand\"",
"Dear computer, I understand": "Dear computer, I understand",
"Unlock Wallet": "Unlock Wallet",
"Unlock": "Unlock",
"Exit": "Exit",
"Your wallet has been encrypted with a local password. Please enter your wallet password to proceed.": "Your wallet has been encrypted with a local password. Please enter your wallet password to proceed.",
"Wallet Password": "Wallet Password",
"Tip must be a number": "Tip must be a number",
"Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!.": "Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!.",
"Invite History": "Invite History",
"Invitee Email": "Invitee Email",
"Invite Status": "Invite Status",
"Reward": "Reward",
"Not Accepted": "Not Accepted",
"Unclaimable": "Unclaimable",
"Enter Reward Code": "Enter Reward Code",
"Redeem a custom reward code for LBC": "Redeem a custom reward code for LBC",
"Redeem": "Redeem",
"Code": "Code"
}

View file

@ -6653,9 +6653,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
yargs "^13.2.2" yargs "^13.2.2"
zstd-codec "^0.1.1" zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#e550f0ff0448fcad5f3d0365ec7ad744376b41cf: lbry-redux@lbryio/lbry-redux#885b4679ca1918076d64af063fda15608a52a5e5:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/e550f0ff0448fcad5f3d0365ec7ad744376b41cf" resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/885b4679ca1918076d64af063fda15608a52a5e5"
dependencies: dependencies:
proxy-polyfill "0.1.6" proxy-polyfill "0.1.6"
reselect "^3.0.0" reselect "^3.0.0"