add lbry.tv is shutting down message

This commit is contained in:
Sean Yesmunt 2021-03-19 16:52:59 -04:00
parent a8cc4cefb0
commit 63453284dd
8 changed files with 103 additions and 19 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -11,18 +11,19 @@ import { doSetWalletSyncPreference, doSetDaemonSetting } from 'redux/actions/set
import { selectDaemonSettings, makeSelectClientSetting } from 'redux/selectors/settings'; import { selectDaemonSettings, makeSelectClientSetting } from 'redux/selectors/settings';
import UserEmailNew from './view'; import UserEmailNew from './view';
const select = state => ({ const select = (state) => ({
isPending: selectEmailNewIsPending(state), isPending: selectEmailNewIsPending(state),
errorMessage: selectEmailNewErrorMessage(state), errorMessage: selectEmailNewErrorMessage(state),
syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state), syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state),
daemonSettings: selectDaemonSettings(state), daemonSettings: selectDaemonSettings(state),
emailExists: selectEmailAlreadyExists(state), emailExists: selectEmailAlreadyExists(state),
user: selectUser(state), user: selectUser(state),
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
}); });
const perform = dispatch => ({ const perform = (dispatch) => ({
setSync: value => dispatch(doSetWalletSyncPreference(value)), setSync: (value) => dispatch(doSetWalletSyncPreference(value)),
setShareDiagnosticData: shouldShareData => setShareDiagnosticData: (shouldShareData) =>
dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, shouldShareData)), dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, shouldShareData)),
doSignUp: (email, password) => dispatch(doUserSignUp(email, password)), doSignUp: (email, password) => dispatch(doUserSignUp(email, password)),
clearEmailEntry: () => dispatch(doClearEmailEntry()), clearEmailEntry: () => dispatch(doClearEmailEntry()),

View file

@ -1,6 +1,6 @@
// @flow // @flow
import * as PAGES from 'constants/pages'; import * as PAGES from 'constants/pages';
import { SITE_NAME } from 'config'; import { SITE_NAME, DOMAIN } from 'config';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { FormField, Form } from 'component/common/form'; import { FormField, Form } from 'component/common/form';
import Button from 'component/button'; import Button from 'component/button';
@ -11,20 +11,24 @@ import { useHistory } from 'react-router-dom';
import Card from 'component/common/card'; import Card from 'component/common/card';
import ErrorText from 'component/common/error-text'; import ErrorText from 'component/common/error-text';
import Nag from 'component/common/nag'; import Nag from 'component/common/nag';
import classnames from 'classnames';
import OdyseeLogoWithWhiteText from 'component/header/odysee_white.png';
import OdyseeLogoWithText from 'component/header/odysee.png';
type Props = { type Props = {
errorMessage: ?string, errorMessage: ?string,
emailExists: boolean, emailExists: boolean,
isPending: boolean, isPending: boolean,
syncEnabled: boolean, syncEnabled: boolean,
setSync: boolean => void, setSync: (boolean) => void,
balance: number, balance: number,
daemonSettings: { share_usage_data: boolean }, daemonSettings: { share_usage_data: boolean },
setShareDiagnosticData: boolean => void, setShareDiagnosticData: (boolean) => void,
doSignUp: (string, ?string) => Promise<any>, doSignUp: (string, ?string) => Promise<any>,
clearEmailEntry: () => void, clearEmailEntry: () => void,
interestedInYoutubSync: boolean, interestedInYoutubSync: boolean,
doToggleInterestedInYoutubeSync: () => void, doToggleInterestedInYoutubeSync: () => void,
currentTheme: string,
}; };
function UserEmailNew(props: Props) { function UserEmailNew(props: Props) {
@ -39,6 +43,7 @@ function UserEmailNew(props: Props) {
emailExists, emailExists,
interestedInYoutubSync, interestedInYoutubSync,
doToggleInterestedInYoutubeSync, doToggleInterestedInYoutubeSync,
currentTheme,
} = props; } = props;
const { share_usage_data: shareUsageData } = daemonSettings; const { share_usage_data: shareUsageData } = daemonSettings;
const { push, location } = useHistory(); const { push, location } = useHistory();
@ -98,7 +103,7 @@ function UserEmailNew(props: Props) {
subtitle={__('An account with lbry.tv allows you to earn rewards and backup your data.')} subtitle={__('An account with lbry.tv allows you to earn rewards and backup your data.')}
// @endif // @endif
actions={ actions={
<div> <div className={classnames({ 'card--disabled': DOMAIN === 'lbry.tv' })}>
<Form onSubmit={handleSubmit} className="section"> <Form onSubmit={handleSubmit} className="section">
<FormField <FormField
autoFocus autoFocus
@ -107,14 +112,14 @@ function UserEmailNew(props: Props) {
name="sign_up_email" name="sign_up_email"
label={__('Email')} label={__('Email')}
value={email} value={email}
onChange={e => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
/> />
<FormField <FormField
type="password" type="password"
name="sign_in_password" name="sign_in_password"
label={__('Password')} label={__('Password')}
value={password} value={password}
onChange={e => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
/> />
{/* @if TARGET='web' */} {/* @if TARGET='web' */}
@ -180,8 +185,38 @@ function UserEmailNew(props: Props) {
</Form> </Form>
</div> </div>
} }
nag={errorMessage && <Nag type="error" relative message={<ErrorText>{errorMessage}</ErrorText>} />} nag={
<>
{IS_WEB && DOMAIN === 'lbry.tv' && (
<Nag
relative
message={
<I18nMessage
tokens={{
odysee: (
<Button button="link" label={__('odysee.com')} href="https://odysee.com?src=lbrytv-retired" />
),
}}
>
{__(
'lbry.tv is being retired in favor of %odysee% and new sign ups are disabled. Sign up on %odysee% instead'
)}
</I18nMessage>
}
/>
)}
{errorMessage && <Nag type="error" relative message={<ErrorText>{errorMessage}</ErrorText>} />}
</>
}
/> />
{IS_WEB && DOMAIN === 'lbry.tv' && (
<div className="signup__odysee-logo">
<Button href="https://odysee.com?src=lbrytv-retired">
<img src={currentTheme === 'light' ? OdyseeLogoWithText : OdyseeLogoWithWhiteText} />
</Button>
</div>
)}
</div> </div>
); );
} }

View file

@ -17,8 +17,8 @@ type Props = {
emailDoesNotExist: boolean, emailDoesNotExist: boolean,
doClearEmailEntry: () => void, doClearEmailEntry: () => void,
doUserSignIn: (string, ?string) => void, doUserSignIn: (string, ?string) => void,
doUserCheckIfEmailExists: string => void, doUserCheckIfEmailExists: (string) => void,
doSetWalletSyncPreference: boolean => void, doSetWalletSyncPreference: (boolean) => void,
doSetClientSetting: (string, boolean, ?boolean) => void, doSetClientSetting: (string, boolean, ?boolean) => void,
isPending: boolean, isPending: boolean,
}; };
@ -87,7 +87,7 @@ function UserEmailReturning(props: Props) {
name="sign_in_email" name="sign_in_email"
label={__('Email')} label={__('Email')}
value={email} value={email}
onChange={e => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
/> />
{/* @if TARGET='app' */} {/* @if TARGET='app' */}
@ -119,7 +119,7 @@ function UserEmailReturning(props: Props) {
</div> </div>
} }
nag={ nag={
<React.Fragment> <>
{!emailDoesNotExist && emailExistsFromUrl && ( {!emailDoesNotExist && emailExistsFromUrl && (
<Nag type="helpful" relative message={__('That email is already in use. Did you mean to log in?')} /> <Nag type="helpful" relative message={__('That email is already in use. Did you mean to log in?')} />
)} )}
@ -134,7 +134,7 @@ function UserEmailReturning(props: Props) {
{!emailExistsFromUrl && !emailDoesNotExist && errorMessage && ( {!emailExistsFromUrl && !emailDoesNotExist && errorMessage && (
<Nag type="error" relative message={errorMessage} /> <Nag type="error" relative message={errorMessage} />
)} )}
</React.Fragment> </>
} }
/> />
)} )}

View file

@ -1,12 +1,14 @@
// @flow // @flow
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages'; import * as PAGES from 'constants/pages';
import { SITE_NAME, SIMPLE_SITE } from 'config'; import { SITE_NAME, SIMPLE_SITE, DOMAIN } from 'config';
import React from 'react'; import React from 'react';
import Page from 'component/page'; import Page from 'component/page';
import Button from 'component/button'; import Button from 'component/button';
import ClaimTilesDiscover from 'component/claimTilesDiscover'; import ClaimTilesDiscover from 'component/claimTilesDiscover';
import Icon from 'component/common/icon'; import Icon from 'component/common/icon';
import I18nMessage from 'component/i18nMessage';
import LbcSymbol from 'component/common/lbc-symbol';
type Props = { type Props = {
authenticated: boolean, authenticated: boolean,
@ -35,6 +37,34 @@ function HomePage(props: Props) {
return ( return (
<Page fullWidthPage> <Page fullWidthPage>
{IS_WEB && DOMAIN === 'lbry.tv' && (
<div className="notice-message--loud">
<h1 className="section__title">
<I18nMessage
tokens={{
odysee: <Button label={__('odysee.com')} button="link" href="https://odysee.com?src=lbrytv-retired" />,
}}
>
lbry.tv is being retired in favor of %odysee%
</I18nMessage>
</h1>
<p className="section__subtitle">
<I18nMessage
tokens={{
desktop_app: (
<Button label={__('desktop app')} button="link" href="https://lbry.com/get?src=lbrytv-retired" />
),
odysee: <Button label={__('odysee.com')} button="link" href="https://odysee.com?src=lbrytv-retired" />,
credits: <LbcSymbol />,
}}
>
You will have to switch to the %desktop_app% or %odysee% in the near future. Your existing login details
will work on %odysee% and all of your %credits% and other settings will be there.
</I18nMessage>
</p>
</div>
)}
{!SIMPLE_SITE && (authenticated || !IS_WEB) && !subscribedChannels.length && ( {!SIMPLE_SITE && (authenticated || !IS_WEB) && !subscribedChannels.length && (
<div className="notice-message"> <div className="notice-message">
<h1 className="section__title"> <h1 className="section__title">

View file

@ -371,9 +371,15 @@ textarea {
background-color: var(--color-primary-alt); background-color: var(--color-primary-alt);
} }
.notice-message--above-content { .notice-message--loud {
@extend .notice-message; @extend .notice-message;
margin-bottom: var(--spacing-l); background-color: #fef1f6;
color: var(--color-black);
font-weight: bold;
.button {
color: #fa6165;
}
} }
.privacy-img { .privacy-img {
@ -431,3 +437,15 @@ textarea {
max-height: 50vh; max-height: 50vh;
overflow: scroll; overflow: scroll;
} }
.signup__odysee-logo {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
img {
margin-top: var(--spacing-xl);
height: 4rem;
}
}