From 856cc41f39a4754a253ab52d5953087834f4730d Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 13 Jul 2020 10:03:00 -0400 Subject: [PATCH] comment out lbry-first code --- CHANGELOG.md | 1 - .../publishAdditionalOptions/view.jsx | 124 +++++++++--------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d5bd823..28f1bb5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added -- Upload your files published via the desktop app to youtube ([#4491](https://github.com/lbryio/lbry-desktop/pull/4491)) - Add ability to sign supports ([#4382](https://github.com/lbryio/lbry-desktop/pull/4382)) - Add "tap to unmute" button for videos that start with audio muted _community pr!_ ([#4365](https://github.com/lbryio/lbry-desktop/pull/4365)) - Allow upgrade bar to be dismissed per session _community pr!_ ([#4413](https://github.com/lbryio/lbry-desktop/pull/4413)) diff --git a/ui/component/publishAdditionalOptions/view.jsx b/ui/component/publishAdditionalOptions/view.jsx index 4cc614249..103728fbd 100644 --- a/ui/component/publishAdditionalOptions/view.jsx +++ b/ui/component/publishAdditionalOptions/view.jsx @@ -4,12 +4,12 @@ import classnames from 'classnames'; import usePersistedState from 'effects/use-persisted-state'; import { FormField } from 'component/common/form'; import Button from 'component/button'; -import { LbryFirst } from 'lbry-redux'; import LicenseType from './license-type'; import Card from 'component/common/card'; -import ErrorText from 'component/common/error-text'; // @if TARGET='app' -import { ipcRenderer } from 'electron'; +// import ErrorText from 'component/common/error-text'; +// import { LbryFirst } from 'lbry-redux'; +// import { ipcRenderer } from 'electron'; // @endif type Props = { @@ -29,82 +29,82 @@ type Props = { function PublishAdditionalOptions(props: Props) { const { - user, language, name, licenseType, otherLicenseDescription, licenseUrl, updatePublishForm, - useLBRYUploader, - needsYTAuth, - accessToken, - fetchAccessToken, + // user, + // useLBRYUploader, + // needsYTAuth, + // accessToken, + // fetchAccessToken, } = props; const [hideSection, setHideSection] = usePersistedState('publish-advanced-options', true); - const [hasLaunchedLbryFirst, setHasLaunchedLbryFirst] = React.useState(false); - const [ytError, setYtError] = React.useState(false); - const isLBRYFirstUser = user && user.lbry_first_approved; - const showLbryFirstCheckbox = !IS_WEB && isLBRYFirstUser && hasLaunchedLbryFirst; + // const [hasLaunchedLbryFirst, setHasLaunchedLbryFirst] = React.useState(false); + // const [ytError, setYtError] = React.useState(false); + // const isLBRYFirstUser = user && user.lbry_first_approved; + // const showLbryFirstCheckbox = !IS_WEB && isLBRYFirstUser && hasLaunchedLbryFirst; function toggleHideSection() { setHideSection(!hideSection); } // @if TARGET='app' - function signup() { - updatePublishForm({ ytSignupPending: true }); - LbryFirst.ytSignup() - .then(response => { - updatePublishForm({ needsYTAuth: false, ytSignupPending: false }); - }) - .catch(error => { - updatePublishForm({ ytSignupPending: false }); - setYtError(true); - console.error(error); // eslint-disable-line - }); - } + // function signup() { + // updatePublishForm({ ytSignupPending: true }); + // LbryFirst.ytSignup() + // .then(response => { + // updatePublishForm({ needsYTAuth: false, ytSignupPending: false }); + // }) + // .catch(error => { + // updatePublishForm({ ytSignupPending: false }); + // setYtError(true); + // console.error(error); // eslint-disable-line + // }); + // } - function unlink() { - setYtError(false); + // function unlink() { + // setYtError(false); - LbryFirst.remove() - .then(response => { - updatePublishForm({ needsYTAuth: true }); - }) - .catch(error => { - setYtError(true); - console.error(error); // eslint-disable-line - }); - } + // LbryFirst.remove() + // .then(response => { + // updatePublishForm({ needsYTAuth: true }); + // }) + // .catch(error => { + // setYtError(true); + // console.error(error); // eslint-disable-line + // }); + // } - React.useEffect(() => { - if (!accessToken) { - fetchAccessToken(); - } - }, [accessToken, fetchAccessToken]); + // React.useEffect(() => { + // if (!accessToken) { + // fetchAccessToken(); + // } + // }, [accessToken, fetchAccessToken]); - React.useEffect(() => { - if (isLBRYFirstUser && !hasLaunchedLbryFirst) { - ipcRenderer.send('launch-lbry-first'); - ipcRenderer.on('lbry-first-launched', () => { - setHasLaunchedLbryFirst(true); - }); - } - }, [isLBRYFirstUser, hasLaunchedLbryFirst, setHasLaunchedLbryFirst]); + // React.useEffect(() => { + // if (isLBRYFirstUser && !hasLaunchedLbryFirst) { + // ipcRenderer.send('launch-lbry-first'); + // ipcRenderer.on('lbry-first-launched', () => { + // setHasLaunchedLbryFirst(true); + // }); + // } + // }, [isLBRYFirstUser, hasLaunchedLbryFirst, setHasLaunchedLbryFirst]); - React.useEffect(() => { - if (useLBRYUploader && isLBRYFirstUser && hasLaunchedLbryFirst && accessToken) { - LbryFirst.hasYTAuth(accessToken) - .then(response => { - updatePublishForm({ needsYTAuth: !response.HasAuth }); - }) - .catch(error => { - setYtError(true); - console.error(error); // eslint-disable-line - }); - } - }, [updatePublishForm, useLBRYUploader, isLBRYFirstUser, hasLaunchedLbryFirst, accessToken]); + // React.useEffect(() => { + // if (useLBRYUploader && isLBRYFirstUser && hasLaunchedLbryFirst && accessToken) { + // LbryFirst.hasYTAuth(accessToken) + // .then(response => { + // updatePublishForm({ needsYTAuth: !response.HasAuth }); + // }) + // .catch(error => { + // setYtError(true); + // console.error(error); // eslint-disable-line + // }); + // } + // }, [updatePublishForm, useLBRYUploader, isLBRYFirstUser, hasLaunchedLbryFirst, accessToken]); // @endif return ( @@ -114,7 +114,7 @@ function PublishAdditionalOptions(props: Props) { {!hideSection && (
{/* @if TARGET='app' */} - {showLbryFirstCheckbox && ( + {/* {showLbryFirstCheckbox && (
<>
- )} + )} */} {/* @endif */}