diff --git a/package.json b/package.json index e43add9d9..e032095f6 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ "husky": "^0.14.3", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#973d28e46290c77f2d9d468304008f80f71fd8cd", - "lbryinc": "lbryio/lbryinc#7c94a38683344262fe34773dc50bfbe6d2a9e116", + "lbry-redux": "lbryio/lbry-redux#74f55ba9e3b81b5364788a8cbdd89bd2884d40d0", + "lbryinc": "lbryio/lbryinc#5aba3127c879f5aaa9b1eccaf57aae97449df183", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.14", diff --git a/src/ui/component/channelEdit/view.jsx b/src/ui/component/channelEdit/view.jsx index bb0ec1418..d58aa461f 100644 --- a/src/ui/component/channelEdit/view.jsx +++ b/src/ui/component/channelEdit/view.jsx @@ -186,6 +186,7 @@ function ChannelForm(props: Props) { suggestMature help={__('The better your tags are, the easier it will be for people to discover your channel.')} empty={__('No tags added')} + placeholder={__('Add a tag')} onSelect={newTag => { if (!params.tags.map(savedTag => savedTag.name).includes(newTag.name)) { setParams({ ...params, tags: [...params.tags, newTag] }); diff --git a/src/ui/component/claimPreview/view.jsx b/src/ui/component/claimPreview/view.jsx index dca0fc0c0..4021aec90 100644 --- a/src/ui/component/claimPreview/view.jsx +++ b/src/ui/component/claimPreview/view.jsx @@ -78,7 +78,8 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { properties, onClick, } = props; - const shouldFetch = claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta)); + const shouldFetch = + claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta) && !pending); const abandoned = !isResolvingUri && !claim; const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0; const showPublishLink = abandoned && placeholder === 'publish'; diff --git a/src/ui/component/inviteList/view.jsx b/src/ui/component/inviteList/view.jsx index 61ab0a7ac..9bcba2dd4 100644 --- a/src/ui/component/inviteList/view.jsx +++ b/src/ui/component/inviteList/view.jsx @@ -37,7 +37,7 @@ class InviteList extends React.PureComponent { return (
-

+

{__('Invite History')} {referralReward && showClaimable && ( diff --git a/src/ui/component/publishForm/view.jsx b/src/ui/component/publishForm/view.jsx index de8799b78..c805dbd9a 100644 --- a/src/ui/component/publishForm/view.jsx +++ b/src/ui/component/publishForm/view.jsx @@ -135,6 +135,7 @@ function PublishForm(props: Props) { suggestMature help={__('The better your tags are, the easier it will be for people to discover your content.')} empty={__('No tags added')} + placeholder={__('Add a tag')} onSelect={newTag => { if (!tags.map(savedTag => savedTag.name).includes(newTag.name)) { updatePublishForm({ tags: [...tags, newTag] }); diff --git a/src/ui/component/syncPassword/view.jsx b/src/ui/component/syncPassword/view.jsx index f62f43738..585dc8164 100644 --- a/src/ui/component/syncPassword/view.jsx +++ b/src/ui/component/syncPassword/view.jsx @@ -3,7 +3,7 @@ import React from 'react'; import { Form, FormField } from 'component/common/form'; import Button from 'component/button'; import Card from 'component/common/card'; -import { setSavedPassword } from 'util/saved-passwords'; +import { setSavedPassword, deleteSavedPassword } from 'util/saved-passwords'; type Props = { getSync: (?string) => void, @@ -18,6 +18,8 @@ function SyncPassword(props: Props) { function handleSubmit() { if (rememberPassword) { setSavedPassword(password); + } else { + deleteSavedPassword(); } getSync(password); diff --git a/src/ui/component/tagsSearch/view.jsx b/src/ui/component/tagsSearch/view.jsx index ad5940ad5..e8066469a 100644 --- a/src/ui/component/tagsSearch/view.jsx +++ b/src/ui/component/tagsSearch/view.jsx @@ -12,9 +12,10 @@ type Props = { onSelect?: Tag => void, suggestMature?: boolean, onRemove: Tag => void, + placeholder?: string, }; -export default function TagSelect(props: Props) { +export default function TagsSearch(props: Props) { const { tagsPasssedIn, unfollowedTags = [], @@ -24,6 +25,7 @@ export default function TagSelect(props: Props) { onSelect, onRemove, suggestMature, + placeholder, } = props; const [newTag, setNewTag] = useState(''); @@ -96,7 +98,7 @@ export default function TagSelect(props: Props) { autoFocus className="tag__input" onChange={onChange} - placeholder={__('Follow more tags')} + placeholder={placeholder || __('Follow more tags')} type="text" value={newTag} /> diff --git a/src/ui/component/tagsSelect/view.jsx b/src/ui/component/tagsSelect/view.jsx index a4b15653b..f27a5ebc4 100644 --- a/src/ui/component/tagsSelect/view.jsx +++ b/src/ui/component/tagsSelect/view.jsx @@ -20,6 +20,7 @@ type Props = { tagsChosen?: Array, onSelect?: Tag => void, onRemove?: Tag => void, + placeholder?: string, }; export default function TagSelect(props: Props) { @@ -33,6 +34,7 @@ export default function TagSelect(props: Props) { onSelect, onRemove, suggestMature, + placeholder, } = props; const [hasClosed, setHasClosed] = usePersistedState('tag-select:has-closed', false); const tagsToDisplay = tagsChosen || followedTags; @@ -88,6 +90,7 @@ export default function TagSelect(props: Props) { onSelect={onSelect} suggestMature={suggestMature && !hasMatureTag} tagsPasssedIn={tagsToDisplay} + placeholder={placeholder} /> } diff --git a/src/ui/component/userEmailNew/view.jsx b/src/ui/component/userEmailNew/view.jsx index 8988b4f83..c2d6e80bb 100644 --- a/src/ui/component/userEmailNew/view.jsx +++ b/src/ui/component/userEmailNew/view.jsx @@ -5,6 +5,7 @@ import Button from 'component/button'; import { Lbryio } from 'lbryinc'; import analytics from 'analytics'; import { EMAIL_REGEX } from 'constants/email'; +import I18nMessage from 'component/i18nMessage'; type Props = { errorMessage: ?string, @@ -18,6 +19,7 @@ type Props = { function UserEmailNew(props: Props) { const { errorMessage, isPending, addUserEmail, syncEnabled, setSync, balance } = props; const [newEmail, setEmail] = useState(''); + const [ageConfirmation, setAgeConfirmation] = useState(false); const valid = newEmail.match(EMAIL_REGEX); function handleSubmit() { @@ -52,28 +54,57 @@ function UserEmailNew(props: Props) { error={errorMessage} onChange={e => setEmail(e.target.value)} /> - {!IS_WEB && ( +
0 ? ( - __('This feature is not yet available for wallets with balances, but the gerbils are working on it.') - ) : ( - - {__('Blockchain expert?')}{' '} -

diff --git a/src/ui/component/userSignIn/view.jsx b/src/ui/component/userSignIn/view.jsx index a029d43fd..8aef76b51 100644 --- a/src/ui/component/userSignIn/view.jsx +++ b/src/ui/component/userSignIn/view.jsx @@ -60,9 +60,6 @@ function UserSignIn(props: Props) { const channelCount = channels ? channels.length : 0; const hasClaimedEmailAward = claimedRewards.some(reward => reward.reward_type === REWARDS.TYPE_CONFIRM_EMAIL); const hasYoutubeChannels = youtubeChannels && Boolean(youtubeChannels.length); - // const hasTransferrableYoutubeChannels = hasYoutubeChannels && youtubeChannels.some(channel => channel.transferable); - // const hasPendingYoutubeTransfer = - // hasYoutubeChannels && youtubeChannels.some(channel => channel.transfer_state === YOUTUBE_STATUSES.PENDING_TRANSFER); const isYoutubeTransferComplete = hasYoutubeChannels && youtubeChannels.every(channel => channel.transfer_state === YOUTUBE_STATUSES.COMPLETED_TRANSFER); @@ -71,13 +68,12 @@ function UserSignIn(props: Props) { // We can't just check if we are currently fetching something // We may want to keep a component rendered while something is being fetched, instead of replacing it with the large spinner // The verbose variable names are an attempt to alleviate _some_ of the confusion from handling all edge cases that come from - // reward claiming (plus the balance updating after), channel creation, account syncing, and youtube transfer - const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !getSyncError && balance === 0; + // reward claiming, channel creation, account syncing, and youtube transfer + const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !getSyncError; const isCurrentlyFetchingSomething = fetchingChannels || claimingReward || syncingWallet; const isWaitingForSomethingToFinish = // If the user has claimed the email award, we need to wait until the balance updates sometime in the future - !hasFetchedReward || (hasFetchedReward && balance === 0) || (syncEnabled && !hasSynced); - + (!hasFetchedReward && !hasClaimedEmailAward) || (syncEnabled && !hasSynced); // The possible screens for the sign in flow const showEmail = !emailToVerify && !hasVerifiedEmail; const showEmailVerification = emailToVerify && !hasVerifiedEmail; diff --git a/src/ui/redux/actions/app.js b/src/ui/redux/actions/app.js index ecaa8f0cc..349e31da2 100644 --- a/src/ui/redux/actions/app.js +++ b/src/ui/redux/actions/app.js @@ -33,7 +33,7 @@ import { selectUpgradeTimer, selectModal, } from 'redux/selectors/app'; -import { Lbryio, doAuthenticate, doGetSync, selectSyncHash } from 'lbryinc'; +import { Lbryio, doAuthenticate, doGetSync, selectSyncHash, doResetSync } from 'lbryinc'; import { lbrySettings as config, version as appVersion } from 'package.json'; import { push } from 'connected-react-router'; import analytics from 'analytics'; @@ -465,7 +465,7 @@ export function doSignIn() { const balance = selectBalance(state); // For existing users, check if they've synced before, or have 0 balance - if (syncEnabled && (!syncHash || balance === 0)) { + if (syncEnabled && (syncHash || balance === 0)) { dispatch(doGetSync()); } // @endif @@ -483,9 +483,14 @@ export function doSignOut() { // @if TARGET='web' window.persistor.purge(); // @endif + // @if TARGET='app' + return dispatch(doResetSync()); + // @endif }) .then(() => { - location.reload(); + setTimeout(() => { + location.reload(); + }); }) .catch(() => location.reload()); }; diff --git a/src/ui/scss/component/_button.scss b/src/ui/scss/component/_button.scss index 89f94f469..50ae033b8 100644 --- a/src/ui/scss/component/_button.scss +++ b/src/ui/scss/component/_button.scss @@ -40,6 +40,7 @@ .button--inverse { height: var(--button-height); border-radius: var(--button-radius); + font-size: var(--font-body); padding-top: 0; padding-bottom: 0; box-sizing: border-box; diff --git a/static/app-strings.json b/static/app-strings.json index 188ea736f..4468a7b20 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -773,8 +773,6 @@ "LBC Currently Staked": "LBC Currently Staked", "Your Supports": "Your Supports", "Add Tags": "Add Tags", - "Jeremy please change this": "Jeremy please change this", - "Jeremy please change this.": "Jeremy please change this.", "Extra Verification Needed": "Extra Verification Needed", "We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.": "We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.", "Proof via Text": "Proof via Text", @@ -797,5 +795,17 @@ "You have no rewards available.": "You have no rewards available.", "light": "light", "dark": "dark", - "Dark": "Dark" -} \ No newline at end of file + "Dark": "Dark", + "Blockchain expert?": "Blockchain expert?", + "Learn More": "Learn More", + "Creating": "Creating", + "Enter Your LBRY Password": "Enter Your LBRY Password", + "You set your wallet password when you previously installed LBRY.": "You set your wallet password when you previously installed LBRY.", + "Remember My Password": "Remember My Password", + "Failed to load translations.": "Failed to load translations.", + "Terms of Service": "Terms of Service", + "I am over the age of 13 and agree to the %terms%.": "I am over the age of 13 and agree to the %terms%.", + "Nothing published to LBRY yet.": "Nothing published to LBRY yet.", + "Add a tag": "Add a tag", + "Claim Your 20 LBC Invite Reward": "Claim Your 20 LBC Invite Reward" +} diff --git a/yarn.lock b/yarn.lock index 86cc8147f..fe3a5a89a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6850,17 +6850,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#973d28e46290c77f2d9d468304008f80f71fd8cd: +lbry-redux@lbryio/lbry-redux#74f55ba9e3b81b5364788a8cbdd89bd2884d40d0: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/973d28e46290c77f2d9d468304008f80f71fd8cd" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/74f55ba9e3b81b5364788a8cbdd89bd2884d40d0" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0" uuid "^3.3.2" -lbryinc@lbryio/lbryinc#7c94a38683344262fe34773dc50bfbe6d2a9e116: +lbryinc@lbryio/lbryinc#5aba3127c879f5aaa9b1eccaf57aae97449df183: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/7c94a38683344262fe34773dc50bfbe6d2a9e116" + resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/5aba3127c879f5aaa9b1eccaf57aae97449df183" dependencies: reselect "^3.0.0"