fixes restoring wallet page and removing lbry.tv references

This commit is contained in:
zeppi 2021-11-28 15:05:10 -05:00 committed by jessopb
parent c6322ddb24
commit 1360e21016
16 changed files with 26 additions and 112 deletions

View file

@ -2219,5 +2219,6 @@
"Showing %filtered% results of %total%": "Showing %filtered% results of %total%",
"filtered": "filtered",
"View All Playlists": "View All Playlists",
"Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.",
"--end--": "--end--"
}

View file

@ -310,27 +310,18 @@ const analytics: Analytics = {
setUser: (userId) => {
if (internalAnalyticsEnabled && userId) {
window._paq.push(['setUserId', String(userId)]);
// @if TARGET='app'
Native.getAppVersionInfo().then(({ localVersion }) => {
sendMatomoEvent('Version', 'Desktop-Version', localVersion);
});
// @endif
}
},
toggleInternal: (enabled: boolean): void => {
// Always collect analytics on lbry.tv
// @if TARGET='app'
internalAnalyticsEnabled = enabled;
window.localStorage.setItem(SHARE_INTERNAL, enabled);
// @endif
},
toggleThirdParty: (enabled: boolean): void => {
// Always collect analytics on lbry.tv
// @if TARGET='app'
// thirdPartyAnalyticsEnabled = enabled;
window.localStorage.setItem(SHARE_THIRD_PARTY, enabled);
// @endif
},
apiLogView: (uri, outpoint, claimId, timeToStart) => {
@ -347,7 +338,6 @@ const analytics: Analytics = {
claim_id: claimId,
};
// lbry.tv streams from AWS so we don't care about the time to start
if (timeToStart && !IS_WEB) {
params.time_to_start = timeToStart;
}

View file

@ -1,9 +1,7 @@
// @flow
import React from 'react';
import FileDownloadLink from 'component/fileDownloadLink';
import * as RENDER_MODES from 'constants/file_render_modes';
import Card from 'component/common/card';
import Button from 'component/button';
type Props = {
uri: string,
@ -11,30 +9,7 @@ type Props = {
};
export default function FileRenderDownload(props: Props) {
const { uri, renderMode } = props;
// @if TARGET='web'
if (RENDER_MODES.UNSUPPORTED_IN_THIS_APP.includes(renderMode)) {
return (
<Card
title={__('Download or get the app')}
subtitle={
<p>
{__(
'This content can be downloaded from lbry.tv, but not displayed. It will display in LBRY Desktop, an app for desktop computers.'
)}
</p>
}
actions={
<div className="section__actions">
<FileDownloadLink uri={uri} buttonType="primary" showLabel />
<Button button={'link'} label={__('Get the App')} href="https://lbry.com/get" />
</div>
}
/>
);
}
// @endif
const { uri } = props;
return <Card title={__('Download')} actions={<FileDownloadLink uri={uri} buttonType="primary" showLabel />} />;
}

View file

@ -14,11 +14,11 @@ const LIMITED = 'limited';
const NONE = 'none';
type Props = {
setWelcomeVersion: number => void,
setWelcomeVersion: (number) => void,
signOut: () => void,
setShareDataInternal: boolean => void,
setShareDataThirdParty: boolean => void,
history: { replace: string => void },
setShareDataInternal: (boolean) => void,
setShareDataThirdParty: (boolean) => void,
history: { replace: (string) => void },
authenticated: boolean,
authenticateIfSharingData: () => void,
};
@ -88,7 +88,7 @@ function PrivacyAgreement(props: Props) {
helper={__(`Sending information to third parties (e.g. Google Analytics or Mixpanel) allows us to use detailed
analytical reports to improve all aspects of LBRY.`)}
checked={share === FREE}
onChange={e => setShare(FREE)}
onChange={(e) => setShare(FREE)}
/>
<FormField
name={'shareWithLBRY'}
@ -103,7 +103,7 @@ function PrivacyAgreement(props: Props) {
`Sharing information with LBRY, Inc. allows us to report to publishers how their content is doing, as
well as track basic usage and performance. This is the minimum required to earn rewards from LBRY, Inc.`
)}
onChange={e => setShare(LIMITED)}
onChange={(e) => setShare(LIMITED)}
/>
<FormField
disabled={authenticated}
@ -118,7 +118,7 @@ function PrivacyAgreement(props: Props) {
helper={__(`No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as
peer-to-peer software, your IP address and potentially other system information can be sent to other
users, though this information is not stored permanently.`)}
onChange={e => setShare(NONE)}
onChange={(e) => setShare(NONE)}
/>
{authenticated && (
<div className="card--inline section--padded">
@ -128,7 +128,7 @@ function PrivacyAgreement(props: Props) {
signout_button: <Button button="link" label={__('Sign Out')} onClick={signOut} />,
}}
>
You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.
You are signed in and sharing data with your cloud service provider. %signout_button%.
</I18nMessage>
</p>
</div>
@ -153,14 +153,14 @@ function PrivacyAgreement(props: Props) {
type="radio"
label={'Yes'}
checked={agree === true}
onChange={e => setAgree(e.target.checked)}
onChange={(e) => setAgree(e.target.checked)}
/>
<FormField
name={'disagreeButton'}
type="radio"
checked={agree === false}
label={__('No')}
onChange={e => setAgree(!e.target.checked)}
onChange={(e) => setAgree(!e.target.checked)}
/>
</fieldset>
</div>

View file

@ -34,7 +34,6 @@ import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
import ChannelsFollowingPage from 'page/channelsFollowing';
import ChannelsPage from 'page/channels';
import CheckoutPage from 'page/checkoutPage';
import CreatorDashboard from 'page/creatorDashboard';
import DiscoverPage from 'page/discover';
import FileListPublished from 'page/fileListPublished';
@ -224,9 +223,7 @@ function AppRouter(props: Props) {
return (
<Switch>
{/* @if TARGET='app' */}
{welcomeVersion < WELCOME_VERSION && <Route path="/*" component={Welcome} />}
{/* @endif */}
<Redirect
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
to={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
@ -264,7 +261,6 @@ function AppRouter(props: Props) {
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
<Route path={`/$/${PAGES.CHECKOUT}`} exact component={CheckoutPage} />
<Route path={`/$/${PAGES.REPORT_CONTENT}`} exact component={ReportContentPage} />
<Route {...props} path={`/$/${PAGES.LIST}/:collectionId`} component={CollectionPage} />

View file

@ -267,7 +267,7 @@ export default function SettingSystem(props: Props) {
subtitle={
<React.Fragment>
{__(
`This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you sign in to lbry.tv)`
`This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)`
)}{' '}
<Button button="link" label={__('Learn more')} href="https://lbry.com/privacypolicy" />
</React.Fragment>

View file

@ -114,7 +114,7 @@ function SettingWalletServer(props: Props) {
type="radio"
name="default_wallet_servers"
checked={!advancedMode}
label={__('Use official lbry.tv wallet servers')}
label={__('Use official LBRY wallet servers')}
onChange={(e) => {
if (e.target.checked) {
doClear();

View file

@ -10,7 +10,7 @@ import Card from 'component/common/card';
type Props = {
cancelButton: Node,
email: string,
resendVerificationEmail: string => void,
resendVerificationEmail: (string) => void,
checkEmailVerified: () => void,
user: {
has_verified_email: boolean,
@ -35,12 +35,12 @@ function UserEmail(props: Props) {
return (
<Card
title={__('lbry.tv Account')}
title={__('Cloud Account')}
subtitle={
isVerified
? undefined
: __(
'Creating a lbry.tv account will allow you to earn rewards, receive content and security updates, and optionally backup your data.'
'Connecting with a cloud account will allow you to earn rewards, receive content and security updates, and optionally backup your data.'
)
}
actions={

View file

@ -38,8 +38,6 @@ function UserEmailNew(props: Props) {
setShareDiagnosticData,
clearEmailEntry,
emailExists,
interestedInYoutubSync,
doToggleInterestedInYoutubeSync,
} = props;
const { share_usage_data: shareUsageData } = daemonSettings;
const { push, location } = useHistory();
@ -95,9 +93,7 @@ function UserEmailNew(props: Props) {
<div className={classnames('main__sign-up')}>
<Card
title={__('Cloud Connect')}
// @if TARGET='app'
subtitle={__('Connect your wallet to Odysee')}
// @endif
actions={
<div className={classnames({ 'card--disabled': DOMAIN === 'lbry.tv' && IS_WEB })}>
<Form onSubmit={handleSubmit} className="section">
@ -118,17 +114,6 @@ function UserEmailNew(props: Props) {
onChange={(e) => setPassword(e.target.value)}
/>
{/* @if TARGET='web' */}
<FormField
type="checkbox"
name="youtube_sync_checkbox"
label={__('Sync my YouTube channel')}
checked={interestedInYoutubSync}
onChange={() => doToggleInterestedInYoutubeSync()}
/>
{/* @endif */}
{/* @if TARGET='app' */}
<FormField
type="checkbox"
name="sync_checkbox"
@ -141,7 +126,6 @@ function UserEmailNew(props: Props) {
checked={formSyncEnabled}
onChange={() => setFormSyncEnabled(!formSyncEnabled)}
/>
{/* @endif */}
{!shareUsageData && !IS_WEB && (
<FormField

View file

@ -138,19 +138,19 @@ const WalletBalance = (props: Props) => {
</div>
)}
{/* @if TARGET='app' */}
{hasSynced ? (
<p className="section help">
{__('A backup of your wallet is synced with lbry.tv.')}
{__('A backup of your wallet is synced with a cloud service.')}
<HelpLink href="https://lbry.com/faq/account-sync" />
</p>
) : (
<p className="help--warning">
{__('Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.')}
<p className="help">
{__(
'Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.'
)}
<HelpLink navigate={`/$/${PAGES.BACKUP}`} />
</p>
)}
{/* @endif */}
<div className="section__actions">
<Button button="primary" label={__('Buy')} icon={ICONS.BUY} navigate={`/$/${PAGES.BUY}`} />
<Button button="secondary" label={__('Receive')} icon={ICONS.RECEIVE} navigate={`/$/${PAGES.RECEIVE}`} />

View file

@ -1,2 +1,2 @@
export const ALREADY_CLAIMED = 'once the invite reward has been claimed the referrer cannot be changed';
export const REFERRER_NOT_FOUND = 'A lbry.tv account could not be found for the referrer you provided.';
export const REFERRER_NOT_FOUND = 'A LBRY account could not be found for the referrer you provided.';

View file

@ -66,7 +66,7 @@ class ModalSetReferrer extends React.PureComponent<Props, State> {
title={__('Enter inviter')}
subtitle={
<React.Fragment>
{__('Did someone invite you to use lbry.tv? Tell us who and you both get a reward!')}
{__('Did someone invite you to use LBRY? Tell us who and you both get a reward!')}
<HelpLink href="https://lbry.com/faq/referrals" />
</React.Fragment>
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -1,2 +0,0 @@
import CheckoutPage from './view';
export default CheckoutPage;

View file

@ -1,32 +0,0 @@
// @flow
import * as React from 'react';
import Page from 'component/page';
import Button from 'component/button';
import Card from 'component/common/card';
import CreditCards from './credit-card-logos.png';
export default function CheckoutPage() {
return (
<Page authPage>
<Card
title={__('Checkout')}
subtitle={__('Your cart contains 1 item.')}
body={
<div className="card--inline card--section card--highlighted">
<strong>{__('lbry.tv Premium - 1 month')}</strong>
<div>$5 per month</div>
</div>
}
actions={
<div className="section__actions">
<Button button="primary" label={__('Checkout')} />
<div>
<img src={CreditCards} style={{ height: '1.5rem' }} />
</div>
<div className="help">We will refund no questions asked within 30 days.</div>
</div>
}
/>
</Page>
);
}

View file

@ -3,6 +3,7 @@ import React from 'react';
import { useHistory } from 'react-router';
import TxoList from 'component/txoList';
import Page from 'component/page';
import WalletBalance from 'component/walletBalance';
import Spinner from 'component/spinner';
import YrblWalletEmpty from 'component/yrblWalletEmpty';
@ -34,6 +35,7 @@ const WalletPage = (props: Props) => {
<YrblWalletEmpty includeWalletLink />
) : (
<div className="card-stack">
<WalletBalance />
<TxoList search={search} />
</div>
)}