From b89c8a51c665bfcb3e4a7676b3000014dc1effba Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 3 Oct 2019 17:40:54 -0400 Subject: [PATCH] add back reverted changes --- package.json | 6 +- src/ui/component/channelEdit/view.jsx | 1 + src/ui/component/claimPreview/view.jsx | 38 ++++++---- src/ui/component/common/help-link.jsx | 13 ++++ src/ui/component/inviteList/view.jsx | 2 +- src/ui/component/publishFile/view.jsx | 4 +- src/ui/component/publishForm/view.jsx | 1 + src/ui/component/publishFormErrors/view.jsx | 3 +- src/ui/component/publishName/view.jsx | 4 +- src/ui/component/selectChannel/view.jsx | 4 +- src/ui/component/syncPassword/view.jsx | 4 +- src/ui/component/tagsSearch/view.jsx | 6 +- src/ui/component/tagsSelect/view.jsx | 3 + src/ui/component/userEmailNew/view.jsx | 67 ++++++++++++----- src/ui/component/userFirstChannel/view.jsx | 4 +- src/ui/component/userSignIn/index.js | 3 +- src/ui/component/userSignIn/view.jsx | 36 ++++++---- src/ui/component/walletBalance/view.jsx | 24 ++----- .../component/youtubeTransferStatus/view.jsx | 52 +++++++++++--- .../component/youtubeTransferWelcome/index.js | 25 ------- .../component/youtubeTransferWelcome/view.jsx | 72 ------------------- src/ui/constants/claim.js | 3 + src/ui/page/channel/view.jsx | 2 + src/ui/page/channels/view.jsx | 16 ++++- src/ui/page/file/view.jsx | 2 + src/ui/page/settings/index.js | 9 +-- src/ui/page/settings/view.jsx | 17 +++-- src/ui/redux/actions/app.js | 32 +++++++-- src/ui/redux/actions/publish.js | 5 +- src/ui/redux/actions/settings.js | 7 -- src/ui/redux/reducers/settings.js | 4 +- src/ui/scss/component/_button.scss | 7 +- src/ui/scss/component/_card.scss | 7 +- src/ui/scss/component/_claim-list.scss | 32 +-------- src/ui/scss/component/_form-field.scss | 64 +++++++---------- src/ui/scss/component/_icon.scss | 12 ++++ src/ui/scss/component/_main.scss | 4 ++ src/ui/scss/component/_navigation.scss | 4 +- src/ui/scss/component/_tags.scss | 4 +- src/ui/scss/component/_wunderbar.scss | 4 ++ src/ui/scss/component/section.scss | 3 +- src/ui/scss/init/_gui.scss | 10 +-- src/ui/scss/init/_vars.scss | 1 + src/ui/store.js | 1 + yarn.lock | 4 +- 45 files changed, 326 insertions(+), 300 deletions(-) create mode 100644 src/ui/component/common/help-link.jsx delete mode 100644 src/ui/component/youtubeTransferWelcome/index.js delete mode 100644 src/ui/component/youtubeTransferWelcome/view.jsx diff --git a/package.json b/package.json index acd019efb..4c483054c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lbry", - "version": "0.36.0-rc.1", + "version": "0.36.0-rc.5", "description": "A browser for the LBRY network, a digital marketplace controlled by its users.", "keywords": [ "lbry" @@ -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#85fe532d69704a283fd2ec640ad6e3b8dacd6d0d", - "lbryinc": "lbryio/lbryinc#a44576194e1f5f60e37d328ddfdca40bd6165c2d", + "lbry-redux": "lbryio/lbry-redux#b6a7dd0d99f0f8cfc204d3734b6cfc6eb7f8303d", + "lbryinc": "lbryio/lbryinc#f5bee9cd300c4bdc05228e31ea15cfc430975f67", "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 4672931b3..91388fcef 100644 --- a/src/ui/component/channelEdit/view.jsx +++ b/src/ui/component/channelEdit/view.jsx @@ -187,6 +187,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..a5578547f 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'; @@ -187,24 +188,27 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => {
{claim ? : {__('Nothing here')}}
- {!hideActions && actions !== undefined ? ( - actions - ) : ( -
- {isChannel && !channelIsBlocked && !claimIsMine && ( - + {!pending && ( + + {!hideActions && actions !== undefined ? ( + actions + ) : ( +
+ {isChannel && !channelIsBlocked && !claimIsMine && ( + + )} + {isChannel && !isSubscribed && !claimIsMine && ( + + )} + {!isChannel && claim && } +
)} - {isChannel && !isSubscribed && !claimIsMine && ( - - )} - {!isChannel && claim && } -
+ )}
- {pending &&
Pending...
} {!isResolvingUri && (
{claim ? ( @@ -222,12 +226,16 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { )}
- {claim && + {pending ? ( +
Pending...
+ ) : ( + claim && (isChannel ? ( type !== 'inline' && `${claimsInChannel} ${__('publishes')}` ) : ( - ))} + )) + )}
)} diff --git a/src/ui/component/common/help-link.jsx b/src/ui/component/common/help-link.jsx new file mode 100644 index 000000000..867288f1e --- /dev/null +++ b/src/ui/component/common/help-link.jsx @@ -0,0 +1,13 @@ +// @flow +import * as ICONS from 'constants/icons'; +import React from 'react'; +import Button from 'component/button'; + +type Props = { + href: string, +}; + +export default function HelpLink(props: Props) { + const { href } = props; + return
diff --git a/src/ui/component/userFirstChannel/view.jsx b/src/ui/component/userFirstChannel/view.jsx index 8cc345d13..6e5c623f1 100644 --- a/src/ui/component/userFirstChannel/view.jsx +++ b/src/ui/component/userFirstChannel/view.jsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import { isNameValid } from 'lbry-redux'; import Button from 'component/button'; import { Form, FormField } from 'component/common/form'; - +import { INVALID_NAME_ERROR } from 'constants/claim'; export const DEFAULT_BID_FOR_FIRST_CHANNEL = 0.9; type Props = { @@ -29,7 +29,7 @@ function UserFirstChannel(props: Props) { const { value } = e.target; setChannel(value); if (!isNameValid(value, false)) { - setNameError(__('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)')); + setNameError(INVALID_NAME_ERROR); } else { setNameError(); } diff --git a/src/ui/component/userSignIn/index.js b/src/ui/component/userSignIn/index.js index db127e51e..76be35dcf 100644 --- a/src/ui/component/userSignIn/index.js +++ b/src/ui/component/userSignIn/index.js @@ -15,7 +15,7 @@ import { selectGetSyncErrorMessage, selectSyncHash, } from 'lbryinc'; -import { selectMyChannelClaims, selectBalance, selectFetchingMyChannels } from 'lbry-redux'; +import { selectMyChannelClaims, selectBalance, selectFetchingMyChannels, selectCreatingChannel } from 'lbry-redux'; import { makeSelectClientSetting } from 'redux/selectors/settings'; import UserSignIn from './view'; @@ -36,6 +36,7 @@ const select = state => ({ syncingWallet: selectGetSyncIsPending(state), getSyncError: selectGetSyncErrorMessage(state), hasSynced: Boolean(selectSyncHash(state)), + creatingChannel: selectCreatingChannel(state), }); const perform = dispatch => ({ diff --git a/src/ui/component/userSignIn/view.jsx b/src/ui/component/userSignIn/view.jsx index a422f2709..23831cced 100644 --- a/src/ui/component/userSignIn/view.jsx +++ b/src/ui/component/userSignIn/view.jsx @@ -8,9 +8,10 @@ import { DEFAULT_BID_FOR_FIRST_CHANNEL } from 'component/userFirstChannel/view'; import { rewards as REWARDS, YOUTUBE_STATUSES } from 'lbryinc'; import UserVerify from 'component/userVerify'; import Spinner from 'component/spinner'; -import YoutubeTransferWelcome from 'component/youtubeTransferWelcome'; +import YoutubeTransferStatus from 'component/youtubeTransferStatus'; import SyncPassword from 'component/syncPassword'; import useFetched from 'effects/use-fetched'; +import Confetti from 'react-confetti'; type Props = { user: ?User, @@ -29,6 +30,7 @@ type Props = { hasSynced: boolean, syncingWallet: boolean, getSyncError: ?string, + creatingChannel: boolean, }; function UserSignIn(props: Props) { @@ -49,6 +51,7 @@ function UserSignIn(props: Props) { getSyncError, hasSynced, fetchingChannels, + creatingChannel, } = props; const { search } = location; const urlParams = new URLSearchParams(search); @@ -59,30 +62,33 @@ 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); // Complexity warning // 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; - const isCurrentlyFetchingSomething = fetchingChannels || claimingReward || syncingWallet; + // reward claiming, channel creation, account syncing, and youtube transfer + const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !getSyncError; + const isCurrentlyFetchingSomething = fetchingChannels || claimingReward || syncingWallet || creatingChannel; 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; const showUserVerification = hasVerifiedEmail && !rewardsApproved; const showSyncPassword = syncEnabled && getSyncError && !hasSynced; const showChannelCreation = - hasVerifiedEmail && balance && balance > DEFAULT_BID_FOR_FIRST_CHANNEL && channelCount === 0 && !hasYoutubeChannels; - const showYoutubeTransfer = - hasVerifiedEmail && hasYoutubeChannels && (hasTransferrableYoutubeChannels || hasPendingYoutubeTransfer); + hasVerifiedEmail && + balance !== undefined && + balance !== null && + balance > DEFAULT_BID_FOR_FIRST_CHANNEL && + channelCount === 0 && + !hasYoutubeChannels; + const showYoutubeTransfer = hasVerifiedEmail && hasYoutubeChannels && !isYoutubeTransferComplete; const showLoadingSpinner = canHijackSignInFlowWithSpinner && (isCurrentlyFetchingSomething || isWaitingForSomethingToFinish); @@ -109,7 +115,11 @@ function UserSignIn(props: Props) { showSyncPassword && , showChannelCreation && , // @if TARGET='app' - showYoutubeTransfer && , + showYoutubeTransfer && ( +
+ +
+ ), // @endif showLoadingSpinner && (
diff --git a/src/ui/component/walletBalance/view.jsx b/src/ui/component/walletBalance/view.jsx index eaa17472b..99d4e85ab 100644 --- a/src/ui/component/walletBalance/view.jsx +++ b/src/ui/component/walletBalance/view.jsx @@ -12,12 +12,10 @@ type Props = { claimsBalance: number, supportsBalance: number, tipsBalance: number, - rewards: Array, }; const WalletBalance = (props: Props) => { - const { balance, claimsBalance, supportsBalance, tipsBalance, rewards } = props; - const rewardTotal = rewards.reduce((acc, val) => acc + val.reward_amount, 0); + const { balance, claimsBalance, supportsBalance, tipsBalance } = props; return ( @@ -29,24 +27,12 @@ const WalletBalance = (props: Props) => {
-
-
-
- -

- - - {' '} - {__('Earned From Rewards')} -

-
-
-
@@ -54,7 +40,7 @@ const WalletBalance = (props: Props) => { {' '} - {__('Earned From Tips')} + {__('Earned and bound in tips')}
@@ -68,12 +54,12 @@ const WalletBalance = (props: Props) => {
-
{__('Your Publishes')}
+
{__('... in your publishes')}
-
{__('Your Supports')}
+
{__('... in your supports')}
diff --git a/src/ui/component/youtubeTransferStatus/view.jsx b/src/ui/component/youtubeTransferStatus/view.jsx index 421eba975..3d46ab64a 100644 --- a/src/ui/component/youtubeTransferStatus/view.jsx +++ b/src/ui/component/youtubeTransferStatus/view.jsx @@ -1,10 +1,14 @@ // @flow +import * as PAGES from 'constants/pages'; import * as React from 'react'; import Button from 'component/button'; import ClaimPreview from 'component/claimPreview'; import Card from 'component/common/card'; import { YOUTUBE_STATUSES } from 'lbryinc'; import { buildURI } from 'lbry-redux'; +import I18nMessage from 'component/i18nMessage'; + +const STATUS_URL = 'https://lbry.com/youtube/status/'; type Props = { youtubeChannels: Array, @@ -13,6 +17,7 @@ type Props = { updateUser: () => void, checkYoutubeTransfer: () => void, videosImported: ?Array, // [currentAmountImported, totalAmountToImport] + hideChannelLink: boolean, }; export default function YoutubeTransferStatus(props: Props) { @@ -23,13 +28,15 @@ export default function YoutubeTransferStatus(props: Props) { videosImported, checkYoutubeTransfer, updateUser, + hideChannelLink = false, } = props; const hasChannels = youtubeChannels && youtubeChannels.length; - const transferEnabled = youtubeChannels.some(status => status.transferable); const hasPendingTransfers = youtubeChannels.some( status => status.transfer_state === YOUTUBE_STATUSES.PENDING_TRANSFER ); + const isYoutubeTransferComplete = + hasChannels && youtubeChannels.every(channel => channel.transfer_state === YOUTUBE_STATUSES.COMPLETED_TRANSFER); let total; let complete; @@ -72,26 +79,49 @@ export default function YoutubeTransferStatus(props: Props) { return ( hasChannels && - (hasPendingTransfers || transferEnabled) && ( + !isYoutubeTransferComplete && (
1 ? __('Your YouTube Channels') : __('Your YouTube Channel')} subtitle={ - {hasPendingTransfers - ? __('Your videos are currently being transferred. There is nothing else for you to do.') - : __('Your videos are ready to be transferred.')} + {hasPendingTransfers && + __('Your videos are currently being transferred. There is nothing else for you to do.')} + {transferEnabled && !hasPendingTransfers && __('Your videos are ready to be transferred.')} + {!transferEnabled && !hasPendingTransfers && __('Please check back later.')} } body={
{youtubeChannels.map((channel, index) => { - const { lbry_channel_name: channelName, channel_claim_id: claimId } = channel; + const { + lbry_channel_name: channelName, + channel_claim_id: claimId, + status_token: statusToken, + } = channel; const url = buildURI({ channelName, channelClaimId: claimId }); const transferState = getMessage(channel); return (
- {transferState}} properties={''} /> + {claimId ? ( + {transferState}} + properties={false} + /> + ) : ( +

+ , + channelName, + }} + > + %channelName% is not ready to be transferred. You can check the status %statusLink% or check + back later. + +

+ )}
); })} @@ -101,7 +131,7 @@ export default function YoutubeTransferStatus(props: Props) {
} actions={ - transferEnabled && ( + transferEnabled ? (
+ ) : !hideChannelLink ? ( +
+
+ ) : ( + false ) } /> diff --git a/src/ui/component/youtubeTransferWelcome/index.js b/src/ui/component/youtubeTransferWelcome/index.js deleted file mode 100644 index c61bb8514..000000000 --- a/src/ui/component/youtubeTransferWelcome/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import { connect } from 'react-redux'; -import { - selectYoutubeChannels, - selectYouTubeImportPending, - selectUserIsPending, - doClaimYoutubeChannels, - doUserFetch, -} from 'lbryinc'; -import YoutubeChannelList from './view'; - -const select = state => ({ - youtubeChannels: selectYoutubeChannels(state), - youtubeImportPending: selectYouTubeImportPending(state), - userFetchPending: selectUserIsPending(state), -}); - -const perform = dispatch => ({ - claimChannels: () => dispatch(doClaimYoutubeChannels()), - updateUser: () => dispatch(doUserFetch()), -}); - -export default connect( - select, - perform -)(YoutubeChannelList); diff --git a/src/ui/component/youtubeTransferWelcome/view.jsx b/src/ui/component/youtubeTransferWelcome/view.jsx deleted file mode 100644 index 6a7692e60..000000000 --- a/src/ui/component/youtubeTransferWelcome/view.jsx +++ /dev/null @@ -1,72 +0,0 @@ -// @flow -import * as PAGES from 'constants/pages'; -import React from 'react'; -import classnames from 'classnames'; -import ClaimPreview from 'component/claimPreview'; -import Button from 'component/button'; -import Confetti from 'react-confetti'; -import { YOUTUBE_STATUSES } from 'lbryinc'; - -type Props = { - youtubeChannels: Array<{ lbry_channel_name: string, channel_claim_id: string, transfer_state: string }>, - claimChannels: () => void, -}; - -export default function UserYoutubeTransfer(props: Props) { - const { youtubeChannels, claimChannels } = props; - const hasYoutubeChannels = youtubeChannels && youtubeChannels.length; - const hasPendingYoutubeTransfer = - hasYoutubeChannels && youtubeChannels.some(channel => channel.transfer_state === YOUTUBE_STATUSES.PENDING_TRANSFER); - - return ( -
-
- {!hasPendingYoutubeTransfer ? ( - -

{__('Welcome back!')}

-

{__('Your channel is ready to be sent over.')}

-
- ) : ( - -

{__('Good To Go!')}

-

- {__('You now control your channel and your videos are being transferred to your account.')} -

-
- )} -
- -
- {youtubeChannels.map(({ lbry_channel_name: channelName, channel_claim_id: claimId }) => ( -
- {}} actions={false} uri={`lbry://${channelName}#${claimId}`} /> -
- ))} -
- - {hasPendingYoutubeTransfer ? ( -
-

{__('Transfer In Progress...')}

-

{__('You can now publish and comment using your official channel.')}

- -
-
-
- ) : ( -
-

{__('Begin Transfer')}

-
-
-
- )} - - {hasPendingYoutubeTransfer && } -
- ); -} diff --git a/src/ui/constants/claim.js b/src/ui/constants/claim.js index 4cf33ce09..83f9fb9ea 100644 --- a/src/ui/constants/claim.js +++ b/src/ui/constants/claim.js @@ -3,3 +3,6 @@ export const MINIMUM_PUBLISH_BID = 0.00000001; export const CHANNEL_ANONYMOUS = 'anonymous'; export const CHANNEL_NEW = 'new'; export const PAGE_SIZE = 20; + +export const INVALID_NAME_ERROR = + __('LBRY names cannot contain spaces or reserved symbols') + ' ' + '($#@;/"<>%{}|^~[]`)'; diff --git a/src/ui/page/channel/view.jsx b/src/ui/page/channel/view.jsx index 30550e018..edfcb0935 100644 --- a/src/ui/page/channel/view.jsx +++ b/src/ui/page/channel/view.jsx @@ -20,6 +20,7 @@ import * as MODALS from 'constants/modal_types'; import { Form, FormField } from 'component/common/form'; import ClaimPreview from 'component/claimPreview'; import Icon from 'component/common/icon'; +import HelpLink from 'component/common/help-link'; const PAGE_VIEW_QUERY = `view`; const ABOUT_PAGE = `about`; @@ -190,6 +191,7 @@ function ChannelPage(props: Props) { {subCount} {subCount !== 1 ? __('Subscribers') : __('Subscriber')} +
diff --git a/src/ui/page/channels/view.jsx b/src/ui/page/channels/view.jsx index c27ebfc0e..e56f1e448 100644 --- a/src/ui/page/channels/view.jsx +++ b/src/ui/page/channels/view.jsx @@ -15,15 +15,27 @@ type Props = { export default function ChannelsPage(props: Props) { const { channels, fetchChannelListMine, fetchingChannels, youtubeChannels } = props; const hasYoutubeChannels = youtubeChannels && Boolean(youtubeChannels.length); + const hasPendingChannels = channels && channels.some(channel => channel.confirmations === -1); useEffect(() => { fetchChannelListMine(); - }, [fetchChannelListMine]); + + let interval; + if (hasPendingChannels) { + interval = setInterval(() => { + fetchChannelListMine(); + }, 5000); + } + + return () => { + clearInterval(interval); + }; + }, [fetchChannelListMine, hasPendingChannels]); return ( {/* @if TARGET='app' */} - {hasYoutubeChannels && } + {hasYoutubeChannels && } {/* @endif */} {channels && channels.length ? ( diff --git a/src/ui/page/file/view.jsx b/src/ui/page/file/view.jsx index 277fd1911..3fe2d8aee 100644 --- a/src/ui/page/file/view.jsx +++ b/src/ui/page/file/view.jsx @@ -18,6 +18,7 @@ import CommentsList from 'component/commentsList'; import CommentCreate from 'component/commentCreate'; import ClaimUri from 'component/claimUri'; import ClaimPreview from 'component/claimPreview'; +import HelpLink from 'component/common/help-link'; export const FILE_WRAPPER_CLASS = 'grid-area--content'; @@ -161,6 +162,7 @@ class FilePage extends React.Component { {viewCount} {viewCount !== 1 ? __('Views') : __('View')} +
diff --git a/src/ui/page/settings/index.js b/src/ui/page/settings/index.js index 93901cc9f..7de1c56b1 100644 --- a/src/ui/page/settings/index.js +++ b/src/ui/page/settings/index.js @@ -1,13 +1,7 @@ import { connect } from 'react-redux'; import * as SETTINGS from 'constants/settings'; import { doClearCache, doNotifyEncryptWallet, doNotifyDecryptWallet, doNotifyForgetPassword } from 'redux/actions/app'; -import { - doSetDaemonSetting, - doSetClientSetting, - doGetThemes, - doChangeLanguage, - doSetDarkTime, -} from 'redux/actions/settings'; +import { doSetDaemonSetting, doSetClientSetting, doSetDarkTime } from 'redux/actions/settings'; import { doSetPlayingUri } from 'redux/actions/content'; import { makeSelectClientSetting, selectDaemonSettings, selectosNotificationsEnabled } from 'redux/selectors/settings'; import { doWalletStatus, selectWalletIsEncrypted, selectBlockedChannelsCount } from 'lbry-redux'; @@ -36,7 +30,6 @@ const perform = dispatch => ({ setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)), clearCache: () => dispatch(doClearCache()), setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)), - getThemes: () => dispatch(doGetThemes()), encryptWallet: () => dispatch(doNotifyEncryptWallet()), decryptWallet: () => dispatch(doNotifyDecryptWallet()), updateWalletStatus: () => dispatch(doWalletStatus()), diff --git a/src/ui/page/settings/view.jsx b/src/ui/page/settings/view.jsx index 69b352cc3..5a8351096 100644 --- a/src/ui/page/settings/view.jsx +++ b/src/ui/page/settings/view.jsx @@ -44,7 +44,6 @@ type Props = { setDaemonSetting: (string, ?SetDaemonSettingArg) => void, setClientSetting: (string, SetDaemonSettingArg) => void, clearCache: () => Promise, - getThemes: () => void, daemonSettings: DaemonSettings, showNsfw: boolean, instantPurchaseEnabled: boolean, @@ -95,7 +94,6 @@ class SettingsPage extends React.PureComponent { } componentDidMount() { - this.props.getThemes(); this.props.updateWalletStatus(); getSavedPassword().then(p => { if (p) { @@ -513,6 +511,7 @@ class SettingsPage extends React.PureComponent { {/* @if TARGET='app' */} this.onChangeEncryptWallet()} @@ -520,9 +519,19 @@ class SettingsPage extends React.PureComponent { label={__('Encrypt my wallet with a custom password')} helper={ - {__('Secure your local wallet data with a custom password.')}{' '} + + ), + }} + > + Wallet encryption is currently unavailable until it's supported for synced accounts. It will + be added back soon. %learn_more% + + {/* {__('Secure your local wallet data with a custom password.')}{' '} {__('Lost passwords cannot be recovered.')} -