From 8a856430881f78d72c1424817722f4c133b3e01e Mon Sep 17 00:00:00 2001 From: Madiator2011 Date: Fri, 22 Oct 2021 18:42:12 +0000 Subject: [PATCH] Added LBRY Inc remover :) --- README.md | 5 +++++ diff | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 diff diff --git a/README.md b/README.md index 5944879..8b931d1 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ You can run the web version (madiator.com), the electron app, or both at the sam #### Run the electron app +To remove LBRY Inc use: +`git apply diff` + +Tu run app: + `yarn dev` - If you want to build and launch the production app you can run `yarn build`. This will give you an executable inside the `/dist` folder. We use [electron-builder](https://github.com/electron-userland/electron-builder) to create distributable packages. diff --git a/diff b/diff new file mode 100644 index 0000000..6710cd3 --- /dev/null +++ b/diff @@ -0,0 +1,56 @@ +diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx +index e4ff246cf..f07d6350d 100644 +--- a/ui/component/app/view.jsx ++++ b/ui/component/app/view.jsx +@@ -338,22 +338,6 @@ function App(props: Props) { + } + }, [hasVerifiedEmail, signIn, hasSignedIn]); + +- // @if TARGET='web' +- useDegradedPerformance(setLbryTvApiStatus, user); +- // @endif +- +- // @if TARGET='web' +- // Require an internal-api user on lbry.tv +- // This also prevents the site from loading in the un-authed state while we wait for internal-apis to return for the first time +- // It's not needed on desktop since there is no un-authed state +- if (!user) { +- return ( +-
+- +-
+- ); +- } +- // @endif + + if (syncFatalError) { + return ( +diff --git a/ui/index.jsx b/ui/index.jsx +index 2760d6d1e..2666f26d4 100644 +--- a/ui/index.jsx ++++ b/ui/index.jsx +@@ -66,8 +66,8 @@ let sdkAPIHost = process.env.SDK_API_HOST || process.env.SDK_API_URL; + sdkAPIHost = LBRY_WEB_API; + // @endif + +-export const SDK_API_PATH = `${sdkAPIHost}/api/v1`; +-const proxyURL = `${SDK_API_PATH}/proxy`; ++export const SDK_API_PATH = `${sdkAPIHost}`; ++const proxyURL = `${SDK_API_PATH}`; + + Lbry.setDaemonConnectionString(proxyURL); + +diff --git a/web/effects/use-degraded-performance.js b/web/effects/use-degraded-performance.js +index bf00f0487..18004634d 100644 +--- a/web/effects/use-degraded-performance.js ++++ b/web/effects/use-degraded-performance.js +@@ -22,7 +22,7 @@ const getParams = (user) => { + }; + + export function useDegradedPerformance(onDegradedPerformanceCallback, user) { +- const hasUser = user !== undefined; ++ const hasUser = user !== undefined && user !== null; + + useEffect(() => { + if (hasUser) { +