rm lbry.tv, rm lbryfirst, rm DOMAIN, etc
This commit is contained in:
parent
0459148e30
commit
041127bbce
20 changed files with 89 additions and 151 deletions
|
@ -26,14 +26,15 @@ MATOMO_URL=https://analytics.lbry.com/
|
||||||
MATOMO_ID=4
|
MATOMO_ID=4
|
||||||
|
|
||||||
# OG
|
# OG
|
||||||
OG_TITLE_SUFFIX=| lbry.tv
|
OG_TITLE_SUFFIX=| LBRY
|
||||||
OG_HOMEPAGE_TITLE=lbry.tv
|
OG_HOMEPAGE_TITLE=LBRY
|
||||||
OG_IMAGE_URL=
|
OG_IMAGE_URL=
|
||||||
SITE_CANONICAL_URL=https://lbry.tv
|
#SITE_CANONICAL_URL=
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
## Custom Site info
|
## Custom Site info
|
||||||
DOMAIN=lbry.tv
|
DOMAIN=lbry.tv
|
||||||
|
SHARE_DOMAIN_URL=odysee.com
|
||||||
URL=https://lbry.tv
|
URL=https://lbry.tv
|
||||||
SITE_TITLE=LBRY
|
SITE_TITLE=LBRY
|
||||||
SITE_NAME=LBRY
|
SITE_NAME=LBRY
|
||||||
|
@ -43,7 +44,7 @@ LOGO_TITLE=LBRY
|
||||||
CLOUD_CONNECT_SITE_NAME=Odysee
|
CLOUD_CONNECT_SITE_NAME=Odysee
|
||||||
## Social media
|
## Social media
|
||||||
TWITTER_ACCOUNT=LBRYcom
|
TWITTER_ACCOUNT=LBRYcom
|
||||||
BRANDED_SITE=odysee
|
#BRANDED_SITE=
|
||||||
|
|
||||||
## IMAGE ASSETS
|
## IMAGE ASSETS
|
||||||
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
||||||
|
|
|
@ -45,7 +45,7 @@ const config = {
|
||||||
YRBL_HAPPY_IMG_URL: process.env.YRBL_HAPPY_IMG_URL,
|
YRBL_HAPPY_IMG_URL: process.env.YRBL_HAPPY_IMG_URL,
|
||||||
YRBL_SAD_IMG_URL: process.env.YRBL_SAD_IMG_URL,
|
YRBL_SAD_IMG_URL: process.env.YRBL_SAD_IMG_URL,
|
||||||
LOGIN_IMG_URL: process.env.LOGIN_IMG_URL,
|
LOGIN_IMG_URL: process.env.LOGIN_IMG_URL,
|
||||||
SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
// SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
||||||
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
||||||
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
||||||
UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS,
|
UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS,
|
||||||
|
|
|
@ -7,7 +7,6 @@ import https from 'https';
|
||||||
import { app, dialog, ipcMain, session, shell, BrowserWindow } from 'electron';
|
import { app, dialog, ipcMain, session, shell, BrowserWindow } from 'electron';
|
||||||
import { autoUpdater } from 'electron-updater';
|
import { autoUpdater } from 'electron-updater';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import LbryFirstInstance from './LbryFirstInstance';
|
|
||||||
import Daemon from './Daemon';
|
import Daemon from './Daemon';
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
import createTray from './createTray';
|
import createTray from './createTray';
|
||||||
|
@ -100,51 +99,51 @@ const startDaemon = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let isLbryFirstRunning = false;
|
// let isLbryFirstRunning = false;
|
||||||
const startLbryFirst = async () => {
|
// const startLbryFirst = async () => {
|
||||||
if (isLbryFirstRunning) {
|
// if (isLbryFirstRunning) {
|
||||||
console.log('LbryFirst already running');
|
// console.log('LbryFirst already running');
|
||||||
handleLbryFirstLaunched();
|
// handleLbryFirstLaunched();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
console.log('LbryFirst: Starting...');
|
// console.log('LbryFirst: Starting...');
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
lbryFirst = new LbryFirstInstance();
|
// lbryFirst = new LbryFirstInstance();
|
||||||
lbryFirst.on('exit', e => {
|
// lbryFirst.on('exit', e => {
|
||||||
if (!isDev) {
|
// if (!isDev) {
|
||||||
lbryFirst = null;
|
// lbryFirst = null;
|
||||||
isLbryFirstRunning = false;
|
// isLbryFirstRunning = false;
|
||||||
if (!appState.isQuitting) {
|
// if (!appState.isQuitting) {
|
||||||
dialog.showErrorBox(
|
// dialog.showErrorBox(
|
||||||
'LbryFirst has Exited',
|
// 'LbryFirst has Exited',
|
||||||
'The lbryFirst may have encountered an unexpected error, or another lbryFirst instance is already running. \n\n',
|
// 'The lbryFirst may have encountered an unexpected error, or another lbryFirst instance is already running. \n\n',
|
||||||
e
|
// e
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
app.quit();
|
// app.quit();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
console.log('LbryFirst: Failed to create new instance\n\n', e);
|
// console.log('LbryFirst: Failed to create new instance\n\n', e);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
console.log('LbryFirst: Running...');
|
// console.log('LbryFirst: Running...');
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
await lbryFirst.launch();
|
// await lbryFirst.launch();
|
||||||
handleLbryFirstLaunched();
|
// handleLbryFirstLaunched();
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
isLbryFirstRunning = false;
|
// isLbryFirstRunning = false;
|
||||||
console.log('LbryFirst: Failed to start\n', e);
|
// console.log('LbryFirst: Failed to start\n', e);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
const handleLbryFirstLaunched = () => {
|
// const handleLbryFirstLaunched = () => {
|
||||||
isLbryFirstRunning = true;
|
// isLbryFirstRunning = true;
|
||||||
rendererWindow.webContents.send('lbry-first-launched');
|
// rendererWindow.webContents.send('lbry-first-launched');
|
||||||
};
|
// };
|
||||||
|
|
||||||
// When we are starting the app, ensure there are no other apps already running
|
// When we are starting the app, ensure there are no other apps already running
|
||||||
const gotSingleInstanceLock = app.requestSingleInstanceLock();
|
const gotSingleInstanceLock = app.requestSingleInstanceLock();
|
||||||
|
@ -400,15 +399,15 @@ ipcMain.on('version-info-requested', () => {
|
||||||
|
|
||||||
requestLatestRelease();
|
requestLatestRelease();
|
||||||
});
|
});
|
||||||
|
//
|
||||||
ipcMain.on('launch-lbry-first', async () => {
|
// ipcMain.on('launch-lbry-first', async () => {
|
||||||
try {
|
// try {
|
||||||
await startLbryFirst();
|
// await startLbryFirst();
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
console.log('Failed to start LbryFirst');
|
// console.log('Failed to start LbryFirst');
|
||||||
console.log(e);
|
// console.log(e);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
process.on('uncaughtException', error => {
|
process.on('uncaughtException', error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -111,7 +111,7 @@ Lbryio.getAuthToken = () =>
|
||||||
|
|
||||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
||||||
|
|
||||||
Lbryio.authenticate = (domain, language) => {
|
Lbryio.authenticate = (language) => {
|
||||||
if (!Lbryio.enabled) {
|
if (!Lbryio.enabled) {
|
||||||
const params = {
|
const params = {
|
||||||
id: 1,
|
id: 1,
|
||||||
|
@ -155,10 +155,7 @@ Lbryio.authenticate = (domain, language) => {
|
||||||
.then(
|
.then(
|
||||||
status =>
|
status =>
|
||||||
new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
const appId =
|
const appId = status.installation_id;
|
||||||
domain && domain !== 'lbry.tv'
|
|
||||||
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
|
|
||||||
: status.installation_id;
|
|
||||||
Lbryio.call(
|
Lbryio.call(
|
||||||
'user',
|
'user',
|
||||||
'new',
|
'new',
|
||||||
|
|
|
@ -1661,7 +1661,6 @@
|
||||||
"Short (< 4 minutes)": "Short (< 4 minutes)",
|
"Short (< 4 minutes)": "Short (< 4 minutes)",
|
||||||
"Long (> 20 min)": "Long (> 20 min)",
|
"Long (> 20 min)": "Long (> 20 min)",
|
||||||
"POWERED BY %lbry_link%": "POWERED BY %lbry_link%",
|
"POWERED BY %lbry_link%": "POWERED BY %lbry_link%",
|
||||||
"Learn more about LBRY Credits on %DOMAIN%": "Learn more about LBRY Credits on %DOMAIN%",
|
|
||||||
"Results boosted by %lbc%": "Results boosted by %lbc%",
|
"Results boosted by %lbc%": "Results boosted by %lbc%",
|
||||||
"This will be visible in a few minutes.": "This will be visible in a few minutes.",
|
"This will be visible in a few minutes.": "This will be visible in a few minutes.",
|
||||||
"Turn on notifications": "Turn on notifications",
|
"Turn on notifications": "Turn on notifications",
|
||||||
|
@ -2222,5 +2221,6 @@
|
||||||
"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.",
|
"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.",
|
||||||
"Sending": "Sending",
|
"Sending": "Sending",
|
||||||
"You sent %lbc%": "You sent %lbc%",
|
"You sent %lbc%": "You sent %lbc%",
|
||||||
|
"Learn more about LBRY Credits": "Learn more about LBRY Credits",
|
||||||
"--end--": "--end--"
|
"--end--": "--end--"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { URL, SHARE_DOMAIN_URL } from 'config';
|
import { SHARE_DOMAIN_URL } from 'config';
|
||||||
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 * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
|
@ -18,7 +18,7 @@ import {
|
||||||
import { useHistory } from 'react-router';
|
import { useHistory } from 'react-router';
|
||||||
import { buildURI, parseURI } from 'util/lbryURI';
|
import { buildURI, parseURI } from 'util/lbryURI';
|
||||||
|
|
||||||
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
|
const SHARE_DOMAIN = SHARE_DOMAIN_URL;
|
||||||
const PAGE_VIEW_QUERY = 'view';
|
const PAGE_VIEW_QUERY = 'view';
|
||||||
const EDIT_PAGE = 'edit';
|
const EDIT_PAGE = 'edit';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
|
@ -90,7 +89,7 @@ function CollectionForm(props: Props) {
|
||||||
onDone,
|
onDone,
|
||||||
} = props;
|
} = props;
|
||||||
const activeChannelName = activeChannelClaim && activeChannelClaim.name;
|
const activeChannelName = activeChannelClaim && activeChannelClaim.name;
|
||||||
let prefix = IS_WEB ? `${DOMAIN}/` : 'lbry://';
|
let prefix = 'lbry://';
|
||||||
if (activeChannelName && !incognito) {
|
if (activeChannelName && !incognito) {
|
||||||
prefix += `${activeChannelName}/`;
|
prefix += `${activeChannelName}/`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { doSetDaemonSetting } from 'redux/actions/settings';
|
import { doSetDaemonSetting } from 'redux/actions/settings';
|
||||||
import { doSetWelcomeVersion, doToggle3PAnalytics, doSignOut } from 'redux/actions/app';
|
import { doSetWelcomeVersion, doToggle3PAnalytics, doSignOut } from 'redux/actions/app';
|
||||||
|
@ -19,8 +18,7 @@ const perform = (dispatch) => ({
|
||||||
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
||||||
setShareDataThirdParty: (share) => dispatch(doToggle3PAnalytics(share)),
|
setShareDataThirdParty: (share) => dispatch(doToggle3PAnalytics(share)),
|
||||||
signOut: () => dispatch(doSignOut()),
|
signOut: () => dispatch(doSignOut()),
|
||||||
authenticateIfSharingData: () =>
|
authenticateIfSharingData: () => dispatch(doAuthenticate(appVersion, undefined, undefined, true)),
|
||||||
dispatch(doAuthenticate(appVersion, undefined, undefined, true, undefined, undefined, DOMAIN)),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, perform)(PrivacyAgreement);
|
export default connect(select, perform)(PrivacyAgreement);
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import { INVALID_NAME_ERROR } from 'constants/claim';
|
import { INVALID_NAME_ERROR } from 'constants/claim';
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { isNameValid } from 'util/lbryURI';
|
import { isNameValid } from 'util/lbryURI';
|
||||||
|
@ -32,7 +31,7 @@ function PublishName(props: Props) {
|
||||||
const [nameError, setNameError] = useState(undefined);
|
const [nameError, setNameError] = useState(undefined);
|
||||||
const [blurred, setBlurred] = React.useState(false);
|
const [blurred, setBlurred] = React.useState(false);
|
||||||
const activeChannelName = activeChannelClaim && activeChannelClaim.name;
|
const activeChannelName = activeChannelClaim && activeChannelClaim.name;
|
||||||
let prefix = IS_WEB ? `${DOMAIN}/` : 'lbry://';
|
let prefix = 'lbry://';
|
||||||
if (activeChannelName && !incognito) {
|
if (activeChannelName && !incognito) {
|
||||||
prefix += `${activeChannelName}/`;
|
prefix += `${activeChannelName}/`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ import ClaimRepostAuthor from 'component/claimRepostAuthor';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
import { useHistory } from 'react-router';
|
import { useHistory } from 'react-router';
|
||||||
import LbcSymbol from 'component/common/lbc-symbol';
|
import LbcSymbol from 'component/common/lbc-symbol';
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
query: string,
|
query: string,
|
||||||
|
@ -82,11 +81,7 @@ export default function SearchTopClaim(props: Props) {
|
||||||
<div className="search__header">
|
<div className="search__header">
|
||||||
{winningUri && (
|
{winningUri && (
|
||||||
<div className="claim-preview__actions--header">
|
<div className="claim-preview__actions--header">
|
||||||
<a
|
<a className="media__uri" href="https://lbry.com/faq/trending" title={__('Learn more about LBRY Credits.')}>
|
||||||
className="media__uri"
|
|
||||||
href="https://lbry.com/faq/trending"
|
|
||||||
title={__('Learn more about LBRY Credits on %DOMAIN%', { DOMAIN })}
|
|
||||||
>
|
|
||||||
<LbcSymbol prefix={__('Most supported')} />
|
<LbcSymbol prefix={__('Most supported')} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
|
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
import FileSelector from 'component/common/file-selector';
|
import FileSelector from 'component/common/file-selector';
|
||||||
|
@ -184,9 +183,7 @@ function SelectThumbnail(props: Props) {
|
||||||
{status === THUMBNAIL_STATUSES.IN_PROGRESS && <p>{__('Uploading thumbnail')}...</p>}
|
{status === THUMBNAIL_STATUSES.IN_PROGRESS && <p>{__('Uploading thumbnail')}...</p>}
|
||||||
{!thumbUploaded && (
|
{!thumbUploaded && (
|
||||||
<p className="help">
|
<p className="help">
|
||||||
{manualInput
|
{manualInput ? __('Enter a URL for your thumbnail.') : __('Upload your thumbnail. Recommended size is 16:9.')}
|
||||||
? __('Enter a URL for your thumbnail.')
|
|
||||||
: __('Upload your thumbnail to %domain%. Recommended size is 16:9.', { domain: DOMAIN })}
|
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { SHARE_DOMAIN_URL, URL } from 'config';
|
import { SHARE_DOMAIN_URL } from 'config';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ function SettingShareUrl(props: Props) {
|
||||||
<FormField
|
<FormField
|
||||||
type="radio"
|
type="radio"
|
||||||
name="use_default_share_url"
|
name="use_default_share_url"
|
||||||
label={__('Default share url (%name%)', { name: SHARE_DOMAIN_URL || URL })}
|
label={__('Default share url (%name%)', { name: SHARE_DOMAIN_URL })}
|
||||||
checked={!customShareUrlEnabled}
|
checked={!customShareUrlEnabled}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (e.target.checked) {
|
if (e.target.checked) {
|
||||||
|
|
|
@ -6,11 +6,9 @@ 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 I18nMessage from 'component/i18nMessage';
|
|
||||||
import ChannelThumbnail from 'component/channelThumbnail';
|
import ChannelThumbnail from 'component/channelThumbnail';
|
||||||
import { DOMAIN, ENABLE_UI_NOTIFICATIONS } from 'config';
|
import { ENABLE_UI_NOTIFICATIONS } from 'config';
|
||||||
import { IS_MAC } from 'component/app/view';
|
import { IS_MAC } from 'component/app/view';
|
||||||
|
|
||||||
const HOME = {
|
const HOME = {
|
||||||
|
@ -249,23 +247,6 @@ 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">
|
||||||
|
@ -345,8 +326,6 @@ function SideNavigation(props: Props) {
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!isAuthenticated && sidebarOpen && unAuthNudge}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{sidebarOpen && helpLinks}
|
{sidebarOpen && helpLinks}
|
||||||
|
@ -421,7 +400,6 @@ function SideNavigation(props: Props) {
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
{!isAuthenticated && unAuthNudge}
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -9,9 +9,9 @@ import { useIsMobile } from 'effects/use-screensize';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
import { hmsToSeconds, secondsToHms } from 'util/time';
|
import { hmsToSeconds, secondsToHms } from 'util/time';
|
||||||
import { generateLbryContentUrl, generateLbryWebUrl, generateEncodedLbryURL, generateShareUrl } from 'util/url';
|
import { generateLbryContentUrl, generateLbryWebUrl, generateEncodedLbryURL, generateShareUrl } from 'util/url';
|
||||||
import { URL, TWITTER_ACCOUNT, SHARE_DOMAIN_URL } from 'config';
|
import { TWITTER_ACCOUNT, SHARE_DOMAIN_URL } from 'config';
|
||||||
|
|
||||||
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
|
const SHARE_DOMAIN = SHARE_DOMAIN_URL;
|
||||||
const IOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
|
const IOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
|
||||||
const SUPPORTS_SHARE_API = typeof navigator.share !== 'undefined';
|
const SUPPORTS_SHARE_API = typeof navigator.share !== 'undefined';
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,6 @@ export default function TagsSearch(props: Props) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// const countWithoutLbryFirst = selectedTagsSet.has('lbry-first') ? selectedTagsSet.size - 1 : selectedTagsSet.size;
|
|
||||||
const maxed = Boolean(limitSelect && countWithoutSpecialTags >= limitSelect);
|
const maxed = Boolean(limitSelect && countWithoutSpecialTags >= limitSelect);
|
||||||
const suggestedTags = Array.from(suggestedTagsSet).filter(doesTagMatch).slice(0, limitShow);
|
const suggestedTags = Array.from(suggestedTagsSet).filter(doesTagMatch).slice(0, limitShow);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// @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';
|
||||||
|
@ -95,7 +94,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 className={classnames({ 'card--disabled': DOMAIN === 'lbry.tv' && IS_WEB })}>
|
<div>
|
||||||
<Form onSubmit={handleSubmit} className="section">
|
<Form onSubmit={handleSubmit} className="section">
|
||||||
<FormField
|
<FormField
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { DOMAIN, ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
|
||||||
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 * as CS from 'constants/claim_search';
|
import * as CS from 'constants/claim_search';
|
||||||
|
@ -66,11 +65,7 @@ function DiscoverPage(props: Props) {
|
||||||
|
|
||||||
function getElemMeta() {
|
function getElemMeta() {
|
||||||
return !dynamicRouteProps ? (
|
return !dynamicRouteProps ? (
|
||||||
<a
|
<a className="help" href="https://lbry.com/faq/trending" title={__('Learn more about LBRY Credits')}>
|
||||||
className="help"
|
|
||||||
href="https://lbry.com/faq/trending"
|
|
||||||
title={__('Learn more about LBRY Credits on %DOMAIN%', { DOMAIN })}
|
|
||||||
>
|
|
||||||
<I18nMessage
|
<I18nMessage
|
||||||
tokens={{
|
tokens={{
|
||||||
lbc: <LbcSymbol />,
|
lbc: <LbcSymbol />,
|
||||||
|
@ -154,7 +149,6 @@ function DiscoverPage(props: Props) {
|
||||||
limitClaimsPerChannel={LIMIT_CLAIMS_PER_CHANNEL}
|
limitClaimsPerChannel={LIMIT_CLAIMS_PER_CHANNEL}
|
||||||
meta={getElemMeta()}
|
meta={getElemMeta()}
|
||||||
hasSource
|
hasSource
|
||||||
showNoSourceClaims={ENABLE_NO_SOURCE_CLAIMS}
|
|
||||||
/>
|
/>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,7 +6,6 @@ import * as MODALS from 'constants/modal_types';
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
||||||
import * as SHARED_PREFERENCES from 'constants/shared_preferences';
|
import * as SHARED_PREFERENCES from 'constants/shared_preferences';
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import { doFetchChannelListMine, doFetchCollectionListMine, doCheckPendingClaims } from 'redux/actions/claims';
|
import { doFetchChannelListMine, doFetchCollectionListMine, doCheckPendingClaims } from 'redux/actions/claims';
|
||||||
import { makeSelectClaimForUri, makeSelectClaimIsMine, selectMyChannelClaims } from 'redux/selectors/claims';
|
import { makeSelectClaimForUri, makeSelectClaimIsMine, selectMyChannelClaims } from 'redux/selectors/claims';
|
||||||
|
@ -333,8 +332,7 @@ export function doDaemonReady() {
|
||||||
analytics.trendingAlgorithmEvent(trendingAlgorithm);
|
analytics.trendingAlgorithmEvent(trendingAlgorithm);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
undefined,
|
undefined
|
||||||
DOMAIN
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
dispatch({ type: ACTIONS.DAEMON_READY });
|
dispatch({ type: ACTIONS.DAEMON_READY });
|
||||||
|
|
|
@ -10,7 +10,6 @@ import { selectEmailToVerify, selectPhoneToVerify, selectUserCountryCode, select
|
||||||
import { doToast } from 'redux/actions/notifications';
|
import { doToast } from 'redux/actions/notifications';
|
||||||
import rewards from 'rewards';
|
import rewards from 'rewards';
|
||||||
import { Lbryio } from 'lbryinc';
|
import { Lbryio } from 'lbryinc';
|
||||||
import { DOMAIN } from 'config';
|
|
||||||
import { getDefaultLanguage } from 'util/default-languages';
|
import { getDefaultLanguage } from 'util/default-languages';
|
||||||
const AUTH_IN_PROGRESS = 'authInProgress';
|
const AUTH_IN_PROGRESS = 'authInProgress';
|
||||||
export let sessionStorageAvailable = false;
|
export let sessionStorageAvailable = false;
|
||||||
|
@ -55,10 +54,7 @@ export function doInstallNew(appVersion, os = null, firebaseToken = null, callba
|
||||||
}
|
}
|
||||||
|
|
||||||
Lbry.status().then((status) => {
|
Lbry.status().then((status) => {
|
||||||
payload.app_id =
|
payload.app_id = status.installation_id;
|
||||||
domain && domain !== 'lbry.tv'
|
|
||||||
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
|
|
||||||
: status.installation_id;
|
|
||||||
payload.node_id = status.lbry_id;
|
payload.node_id = status.lbry_id;
|
||||||
Lbry.version().then((version) => {
|
Lbry.version().then((version) => {
|
||||||
payload.daemon_version = version.lbrynet_version;
|
payload.daemon_version = version.lbrynet_version;
|
||||||
|
@ -144,7 +140,7 @@ export function doAuthenticate(
|
||||||
});
|
});
|
||||||
checkAuthBusy()
|
checkAuthBusy()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return Lbryio.authenticate(DOMAIN, getDefaultLanguage());
|
return Lbryio.authenticate(getDefaultLanguage());
|
||||||
})
|
})
|
||||||
.then((user) => {
|
.then((user) => {
|
||||||
if (sessionStorageAvailable) window.sessionStorage.removeItem(AUTH_IN_PROGRESS);
|
if (sessionStorageAvailable) window.sessionStorage.removeItem(AUTH_IN_PROGRESS);
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
const { DOMAIN } = require('../../config.js');
|
|
||||||
const AUTH_TOKEN = 'auth_token';
|
const AUTH_TOKEN = 'auth_token';
|
||||||
const SAVED_PASSWORD = 'saved_password';
|
const SAVED_PASSWORD = 'saved_password';
|
||||||
const DEPRECATED_SAVED_PASSWORD = 'saved-password';
|
const domain = 'localhost';
|
||||||
const domain =
|
// typeof window === 'object' && window.location.hostname.includes('localhost') ? window.location.hostname : DOMAIN;
|
||||||
typeof window === 'object' && window.location.hostname.includes('localhost') ? window.location.hostname : DOMAIN;
|
|
||||||
const isProduction = process.env.NODE_ENV === 'production';
|
const isProduction = process.env.NODE_ENV === 'production';
|
||||||
const maxExpiration = 2147483647;
|
const maxExpiration = 2147483647;
|
||||||
let sessionPassword;
|
let sessionPassword;
|
||||||
|
@ -59,7 +57,7 @@ function deleteCookie(name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSavedPassword(value, saveToDisk) {
|
function setSavedPassword(value, saveToDisk) {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
const password = value === undefined || value === null ? '' : value;
|
const password = value === undefined || value === null ? '' : value;
|
||||||
sessionPassword = password;
|
sessionPassword = password;
|
||||||
|
|
||||||
|
@ -74,17 +72,17 @@ function setSavedPassword(value, saveToDisk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSavedPassword() {
|
function getSavedPassword() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
if (sessionPassword) {
|
if (sessionPassword) {
|
||||||
resolve(sessionPassword);
|
resolve(sessionPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
return getPasswordFromCookie().then(p => resolve(p));
|
return getPasswordFromCookie().then((p) => resolve(p));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPasswordFromCookie() {
|
function getPasswordFromCookie() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
let password;
|
let password;
|
||||||
password = getCookie(SAVED_PASSWORD);
|
password = getCookie(SAVED_PASSWORD);
|
||||||
resolve(password);
|
resolve(password);
|
||||||
|
@ -92,7 +90,7 @@ function getPasswordFromCookie() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSavedPassword() {
|
function deleteSavedPassword() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteCookie(SAVED_PASSWORD);
|
deleteCookie(SAVED_PASSWORD);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
@ -107,14 +105,14 @@ function setAuthToken(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAuthToken() {
|
function deleteAuthToken() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteCookie(AUTH_TOKEN);
|
deleteCookie(AUTH_TOKEN);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSignOutCleanup() {
|
function doSignOutCleanup() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteAuthToken();
|
deleteAuthToken();
|
||||||
deleteSavedPassword();
|
deleteSavedPassword();
|
||||||
resolve();
|
resolve();
|
||||||
|
@ -129,14 +127,6 @@ function doAuthTokenRefresh() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function doDeprecatedPasswordMigrationMarch2020() {
|
|
||||||
const savedPassword = getCookie(DEPRECATED_SAVED_PASSWORD);
|
|
||||||
if (savedPassword) {
|
|
||||||
deleteCookie(DEPRECATED_SAVED_PASSWORD);
|
|
||||||
setSavedPassword(savedPassword, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setCookie,
|
setCookie,
|
||||||
getCookie,
|
getCookie,
|
||||||
|
@ -150,5 +140,4 @@ module.exports = {
|
||||||
deleteAuthToken,
|
deleteAuthToken,
|
||||||
doSignOutCleanup,
|
doSignOutCleanup,
|
||||||
doAuthTokenRefresh,
|
doAuthTokenRefresh,
|
||||||
doDeprecatedPasswordMigrationMarch2020,
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue