parent
9e48d22d70
commit
5ed13de5d6
4 changed files with 26 additions and 4 deletions
|
@ -19,7 +19,7 @@ const WATCHMAN_BACKEND_ENDPOINT = 'https://watchman.na-backend.odysee.com/report
|
||||||
|
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
ElectronCookies.enable({
|
ElectronCookies.enable({
|
||||||
origin: 'https://lbry.com',
|
origin: 'https://lbry.tv',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,15 @@ import * as KEYCODES from 'constants/keycodes';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
import Icon from 'component/common/icon';
|
||||||
import NotificationBubble from 'component/notificationBubble';
|
import NotificationBubble from 'component/notificationBubble';
|
||||||
import DebouncedInput from 'component/common/debounced-input';
|
import DebouncedInput from 'component/common/debounced-input';
|
||||||
|
import I18nMessage from 'component/i18nMessage';
|
||||||
import ChannelThumbnail from 'component/channelThumbnail';
|
import ChannelThumbnail from 'component/channelThumbnail';
|
||||||
import { useIsMobile, isTouch } from 'effects/use-screensize';
|
import { useIsMobile, isTouch } from 'effects/use-screensize';
|
||||||
import { IS_MAC } from 'component/app/view';
|
import { IS_MAC } from 'component/app/view';
|
||||||
import { useHistory } from 'react-router';
|
import { useHistory } from 'react-router';
|
||||||
import { ENABLE_UI_NOTIFICATIONS } from 'config';
|
import { DOMAIN, ENABLE_UI_NOTIFICATIONS } from 'config';
|
||||||
|
|
||||||
const FOLLOWED_ITEM_INITIAL_LIMIT = 10;
|
const FOLLOWED_ITEM_INITIAL_LIMIT = 10;
|
||||||
const touch = isTouch();
|
const touch = isTouch();
|
||||||
|
@ -182,6 +184,7 @@ function SideNavigation(props: Props) {
|
||||||
];
|
];
|
||||||
|
|
||||||
const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
|
const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
|
||||||
|
const isAuthenticated = Boolean(email);
|
||||||
|
|
||||||
const [pulseLibrary, setPulseLibrary] = React.useState(false);
|
const [pulseLibrary, setPulseLibrary] = React.useState(false);
|
||||||
const [expandSubscriptions, setExpandSubscriptions] = React.useState(false);
|
const [expandSubscriptions, setExpandSubscriptions] = React.useState(false);
|
||||||
|
@ -354,6 +357,23 @@ function SideNavigation(props: Props) {
|
||||||
return () => window.removeEventListener('keydown', handleKeydown);
|
return () => window.removeEventListener('keydown', handleKeydown);
|
||||||
}, [sidebarOpen, setSidebarOpen, isAbsolute]);
|
}, [sidebarOpen, setSidebarOpen, isAbsolute]);
|
||||||
|
|
||||||
|
const unAuthNudge =
|
||||||
|
DOMAIN === 'lbry.tv' ? null : (
|
||||||
|
<div className="navigation__auth-nudge">
|
||||||
|
<span>
|
||||||
|
<I18nMessage tokens={{ lbc: <Icon icon={ICONS.LBC} /> }}>
|
||||||
|
Sign up to earn %lbc% for you and your favorite creators.
|
||||||
|
</I18nMessage>
|
||||||
|
</span>
|
||||||
|
<Button
|
||||||
|
button="secondary"
|
||||||
|
label={__('Sign Up')}
|
||||||
|
navigate={`/$/${PAGES.AUTH}?src=sidenav_nudge`}
|
||||||
|
disabled={user === null}
|
||||||
|
/>{' '}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
const helpLinks = (
|
const helpLinks = (
|
||||||
<ul className="navigation__tertiary navigation-links--small">
|
<ul className="navigation__tertiary navigation-links--small">
|
||||||
<li className="navigation-link">
|
<li className="navigation-link">
|
||||||
|
@ -417,6 +437,7 @@ function SideNavigation(props: Props) {
|
||||||
|
|
||||||
{getSubscriptionSection()}
|
{getSubscriptionSection()}
|
||||||
{getFollowedTagsSection()}
|
{getFollowedTagsSection()}
|
||||||
|
{!isAuthenticated && sidebarOpen && unAuthNudge}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{(!canDisposeMenu || sidebarOpen) && shouldRenderLargeMenu && helpLinks}
|
{(!canDisposeMenu || sidebarOpen) && shouldRenderLargeMenu && helpLinks}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as PAGES from 'constants/pages';
|
import * as PAGES from 'constants/pages';
|
||||||
|
import { 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';
|
||||||
|
@ -94,7 +95,7 @@ function UserEmailNew(props: Props) {
|
||||||
title={__('Cloud Connect')}
|
title={__('Cloud Connect')}
|
||||||
subtitle={__('Connect your wallet to Odysee')}
|
subtitle={__('Connect your wallet to Odysee')}
|
||||||
actions={
|
actions={
|
||||||
<div>
|
<div className={classnames({ 'card--disabled': DOMAIN === 'lbry.tv' && IS_WEB })}>
|
||||||
<Form onSubmit={handleSubmit} className="section">
|
<Form onSubmit={handleSubmit} className="section">
|
||||||
<FormField
|
<FormField
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|
|
@ -53,7 +53,7 @@ export function doInstallNew(appVersion, os = null, firebaseToken = null, callba
|
||||||
|
|
||||||
Lbry.status().then((status) => {
|
Lbry.status().then((status) => {
|
||||||
payload.app_id =
|
payload.app_id =
|
||||||
domain && domain !== 'lbry.com'
|
domain && domain !== 'lbry.tv'
|
||||||
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
|
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
|
||||||
: status.installation_id;
|
: status.installation_id;
|
||||||
payload.node_id = status.lbry_id;
|
payload.node_id = status.lbry_id;
|
||||||
|
|
Loading…
Reference in a new issue