More master reconciliation

rewards page recon

router recon

uEmailVerify recon

uPVerify recon

rm style

app/view recon

channel page recon

chanFol recon

syncPassword recon

fileDesc recon

web/redirect recon

wip

page/view recon
This commit is contained in:
zeppi 2021-04-27 21:16:28 -04:00 committed by jessopb
parent 6b307352d3
commit fe86010be5
14 changed files with 39 additions and 28 deletions

View file

@ -4,6 +4,7 @@ import React, { useEffect, useRef, useState } from 'react';
import classnames from 'classnames';
import analytics from 'analytics';
import { buildURI, parseURI } from 'lbry-redux';
import { SIMPLE_SITE } from 'config';
import Router from 'component/router/index';
import ModalRouter from 'modal/modalRouter';
import ReactModal from 'react-modal';
@ -399,12 +400,12 @@ function App(props: Props) {
{/* @if TARGET='web' */}
<YoutubeWelcome />
{!shouldHideNag && <OpenInAppLink uri={uri} />}
{!SIMPLE_SITE && !shouldHideNag && <OpenInAppLink uri={uri} />}
{!shouldHideNag && <NagContinueFirstRun />}
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && !shouldHideNag && (
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
)}
{lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
{!SIMPLE_SITE && lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
<NagDataCollection onClose={handleAnalyticsDismiss} />
)}
{/* @endif */}

View file

@ -50,7 +50,7 @@ function FileDescription(props: Props) {
<FileDetails uri={uri} />
</div>
<div className="section__actions--between">
<div className="card__bottom-actions">
{expanded ? (
<Button button="link" label={__('Less')} onClick={() => setExpanded(!expanded)} />
) : (

View file

@ -12,6 +12,7 @@ import usePersistedState from 'effects/use-persisted-state';
import { useHistory } from 'react-router';
import { useIsMobile, useIsMediumScreen } from 'effects/use-screensize';
import { parseURI } from 'lbry-redux';
import { SIMPLE_SITE } from 'config';
export const MAIN_CLASS = 'main';
type Props = {
@ -58,7 +59,7 @@ function Page(props: Props) {
const {
location: { pathname },
} = useHistory();
const [sidebarOpen, setSidebarOpen] = usePersistedState('sidebar', true);
const [sidebarOpen, setSidebarOpen] = usePersistedState('sidebar', !SIMPLE_SITE);
const isMediumScreen = useIsMediumScreen();
const isMobile = useIsMobile();

View file

@ -296,6 +296,7 @@ function AppRouter(props: Props) {
<Route path={`/$/${PAGES.EMBED}/:claimName`} exact component={EmbedWrapperPage} />
<Route path={`/$/${PAGES.EMBED}/:claimName/:claimId`} exact component={EmbedWrapperPage} />
{/* Below need to go at the end to make sure we don't match any of our pages first */}
<Route path="/:claimName" exact component={ShowPage} />
<Route path="/:claimName/:streamName" exact component={ShowPage} />

View file

@ -7,6 +7,7 @@ import { setSavedPassword } from 'util/saved-passwords';
import usePersistedState from 'effects/use-persisted-state';
import I18nMessage from 'component/i18nMessage';
import { useHistory } from 'react-router';
import { SITE_HELP_EMAIL } from 'config';
type Props = {
getSync: ((any, boolean) => void, ?string) => void,
@ -53,7 +54,7 @@ function SyncPassword(props: Props) {
error={passwordError && __('Wrong password for %email%', { email })}
label={__('Password for %email%', { email })}
value={password}
onChange={e => setPassword(e.target.value)}
onChange={(e) => setPassword(e.target.value)}
/>
<FormField
name="remember-password"
@ -75,7 +76,7 @@ function SyncPassword(props: Props) {
<I18nMessage
tokens={{
help: <Button button="link" label={__('help guide')} href="https://lbry.com/faq/account-sync" />,
email: <Button button="link" label={'help@lbry.com'} href="mailto:help@lbry.com" />,
email: <Button button="link" href={`mailto:${SITE_HELP_EMAIL}`} label={`${SITE_HELP_EMAIL}`} />,
}}
>
If you are having issues, checkout our %help% or email us at %email%.

View file

@ -4,14 +4,15 @@ import Button from 'component/button';
import UserSignOutButton from 'component/userSignOutButton';
import I18nMessage from 'component/i18nMessage';
import Card from 'component/common/card';
import { SITE_HELP_EMAIL } from 'config';
const THIRTY_SECONDS_IN_MS = 30000;
type Props = {
email: string,
isReturningUser: boolean,
resendVerificationEmail: string => void,
resendVerificationEmail: (string) => void,
resendingEmail: boolean,
checkEmailVerified: () => void,
toast: string => void,
toast: (string) => void,
user: {
has_verified_email: boolean,
},
@ -102,7 +103,7 @@ class UserEmailVerify extends React.PureComponent<Props, State> {
<p className="help--card-actions">
<I18nMessage
tokens={{
help_link: <Button button="link" href="mailto:help@lbry.com" label="help@lbry.com" />,
help_link: <Button button="link" href={`mailto:${SITE_HELP_EMAIL}`} label={`${SITE_HELP_EMAIL}`} />,
chat_link: <Button button="link" href="https://chat.lbry.com" label={__('chat')} />,
}}
>

View file

@ -4,9 +4,10 @@ import Button from 'component/button';
import { Form, FormField, Submit } from 'component/common/form';
import I18nMessage from 'component/i18nMessage';
import Card from 'component/common/card';
import { SITE_HELP_EMAIL } from 'config';
type Props = {
verifyUserPhone: string => void,
verifyUserPhone: (string) => void,
resetPhone: () => void,
phoneErrorMessage: string,
phone: string,
@ -61,7 +62,7 @@ class UserPhoneVerify extends React.PureComponent<Props, State> {
name="code"
placeholder="1234"
value={this.state.code}
onChange={event => {
onChange={(event) => {
this.handleCodeChanged(event);
}}
label={__('Verification Code')}
@ -72,7 +73,7 @@ class UserPhoneVerify extends React.PureComponent<Props, State> {
<p className="help">
<I18nMessage
tokens={{
help_link: <Button button="link" href="mailto:help@lbry.com" label="help@lbry.com" />,
help_link: <Button button="link" href={`mailto:${SITE_HELP_EMAIL}`} label={`${SITE_HELP_EMAIL}`} />,
chat_link: <Button button="link" href="https://chat.lbry.com" label={__('chat')} />,
}}
>

View file

@ -1,5 +1,5 @@
// @flow
import { SITE_NAME } from 'config';
import { SITE_NAME, SITE_HELP_EMAIL } from 'config';
import * as ICONS from 'constants/icons';
import * as React from 'react';
import classnames from 'classnames';
@ -117,9 +117,14 @@ export default function YoutubeTransferStatus(props: Props) {
{isYoutubeTransferComplete && !isNotElligible && __('View your channel or choose a new channel to sync.')}
{isNotElligible && (
<I18nMessage
tokens={{ here: <Button button="link" href="https://lbry.com/faq/youtube" label={__('here')} /> }}
tokens={{
here: (
<Button button="link" href="https://lbry.com/faq/youtube" label={__('here')} />
),
email: SITE_HELP_EMAIL,
}}
>
Email help@lbry.com if you think there has been a mistake. Make sure your channel qualifies %here%.
Email %email% if you think there has been a mistake. Make sure your channel qualifies %here%.
</I18nMessage>
)}
</span>

View file

@ -109,7 +109,7 @@ export default function ChannelsPage(props: Props) {
subtitle={__("You haven't created a channel yet. All of your beautiful channels will be listed here!")}
actions={
<div className="section__actions">
<Button button="primary" label={__('New Channel')} navigate={`/$/${PAGES.CHANNEL_NEW}`} />
<Button button="primary" label={__('Create Channel')} navigate={`/$/${PAGES.CHANNEL_NEW}`} />
</div>
}
/>

View file

@ -1,7 +1,8 @@
// @flow
import * as PAGES from 'constants/pages';
import * as ICONS from 'constants/icons';
import { ORDER_BY_NEW } from 'constants/claim_search';
import * as CS from 'constants/claim_search';
import { SIMPLE_SITE } from 'config';
import React from 'react';
import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
import ClaimListDiscover from 'component/claimListDiscover';
@ -23,6 +24,8 @@ function ChannelsFollowingPage(props: Props) {
) : (
<Page noFooter fullWidthPage={tileLayout}>
<ClaimListDiscover
hideAdvancedFilter={SIMPLE_SITE}
streamType={SIMPLE_SITE ? CS.CONTENT_ALL : undefined}
tileLayout={tileLayout}
headerLabel={
<span>
@ -30,8 +33,8 @@ function ChannelsFollowingPage(props: Props) {
{__('Following')}
</span>
}
defaultOrderBy={ORDER_BY_NEW}
channelIds={subscribedChannels.map(sub => sub.uri.split('#')[1])}
defaultOrderBy={CS.ORDER_BY_NEW}
channelIds={subscribedChannels.map((sub) => sub.uri.split('#')[1])}
meta={
<Button
icon={ICONS.SEARCH}

View file

@ -11,6 +11,7 @@ import REWARD_TYPES from 'rewards';
import RewardAuthIntro from 'component/rewardAuthIntro';
import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';
import { SITE_HELP_EMAIL, SITE_NAME } from 'config';
type Props = {
doAuth: () => void,
@ -76,10 +77,12 @@ class RewardsPage extends PureComponent<Props> {
<I18nMessage
tokens={{
rewards_faq: <Button button="link" label={__('Rewards FAQ')} href="https://lbry.com/faq/support" />,
help_email: SITE_HELP_EMAIL,
site_name: SITE_NAME,
}}
>
Please review the %rewards_faq% for eligibility, and send us an email to help@lbry.com if you continue
to see this message. You can continue to use LBRY without this feature.
Please review the %rewards_faq% for eligibility, and send us an email to %help_email% if you continue
to see this message. You can continue to use %site_name% without this feature.
</I18nMessage>
{`${__('Enjoy all the awesome free content in the meantime!')}`}
</p>

View file

@ -371,11 +371,6 @@ $metadata-z-index: 1;
.channel-staked__tooltip-text {
margin-left: var(--spacing-xs);
font-size: var(--font-xsmall);
// still needed ?
.icon--LBC {
opacity: 0.7;
margin-top: -2px;
}
}
.channel-staked__wrapper {

View file

@ -357,7 +357,6 @@ fieldset-group {
text-overflow: ellipsis;
overflow: hidden;
padding: 0.5rem;
//padding-right: var(--spacing-s);
height: var(--height-input);
border: 1px solid;
border-top-left-radius: var(--border-radius);

View file

@ -55,7 +55,7 @@ async function redirectMiddleware(ctx, next) {
} else {
redirectUrl += openQuery;
}
ctx.status = 301;
ctx.redirect(redirectUrl);
return;
}