From d54976e461462a209fc97a93e8f711b37dac38df Mon Sep 17 00:00:00 2001 From: zeppi Date: Sat, 2 Oct 2021 13:12:41 -0400 Subject: [PATCH] patch creator analytics with hub without channel claim count --- .env.ody | 92 ++++++++++++++++++++++++++ .gitignore | 2 +- ui/component/creatorAnalytics/view.jsx | 4 +- 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 .env.ody diff --git a/.env.ody b/.env.ody new file mode 100644 index 000000000..2d9e1313e --- /dev/null +++ b/.env.ody @@ -0,0 +1,92 @@ +# Copy this file to .env to make modifications + +# Base config + +WEBPACK_WEB_PORT=9090 +WEBPACK_ELECTRON_PORT=9091 +WEB_SERVER_PORT=1337 + +WELCOME_VERSION=1.0 + +# Custom Site info +DOMAIN=lbry.tv +URL=https://lbry.tv + +# UI +SITE_TITLE=lbry.tv +SITE_NAME=local.lbry.tv +SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland. +LOGO_TITLE=local.lbry.tv + +##### ODYSEE SETTINGS ####### + +MATOMO_URL=https://analytics.lbry.com/ +MATOMO_ID=4 + +# Base config +WEBPACK_WEB_PORT=9090 +WEBPACK_ELECTRON_PORT=9091 +WEB_SERVER_PORT=1337 + +## APIS +LBRY_API_URL=https://api.odysee.com +#LBRY_WEB_API=https://api.na-backend.odysee.com +#LBRY_WEB_STREAMING_API=https://cdn.lbryplayer.xyz +# deprecated: +#LBRY_WEB_BUFFER_API=https://collector-service.api.lbry.tv/api/v1/events/video +#COMMENT_SERVER_API=https://comments.lbry.com/api/v2 +WELCOME_VERSION=1.0 + +# STRIPE +STRIPE_PUBLIC_KEY='pk_live_e8M4dRNnCCbmpZzduEUZBgJO' + +## UI + +LOADING_BAR_COLOR=#e50054 + +# IMAGE ASSETS +YRBL_HAPPY_IMG_URL=https://spee.ch/spaceman-happy:a.png +YRBL_SAD_IMG_URL=https://spee.ch/spaceman-sad:d.png +LOGIN_IMG_URL=https://spee.ch/login:b.png +LOGO=https://spee.ch/odysee-logo-png:3.png +LOGO_TEXT_LIGHT=https://spee.ch/odysee-white-png:f.png +LOGO_TEXT_DARK=https://spee.ch/odysee-png:2.png +AVATAR_DEFAULT=https://spee.ch/spaceman-png:2.png +FAVICON=https://spee.ch/favicon-png:c.png + +# LOCALE +DEFAULT_LANGUAGE=en + +## LINKED CONTENT WHITELIST +KNOWN_APP_DOMAINS=open.lbry.com,lbry.tv,lbry.lat,odysee.com + +## CUSTOM CONTENT +# If the following is true, copy custom/homepage.example.js to custom/homepage.js and modify +CUSTOM_HOMEPAGE=true + +# Add channels to auto-follow on firstrun (space delimited) +AUTO_FOLLOW_CHANNELS=lbry://@Odysee#80d2590ad04e36fb1d077a9b9e3a8bba76defdf8 lbry://@OdyseeHelp#b58dfaeab6c70754d792cdd9b56ff59b90aea334 + +## FEATURES AND LIMITS +SIMPLE_SITE=true +BRANDED_SITE=odysee +# SIMPLE_SITE REPLACEMENTS +ENABLE_MATURE=false +ENABLE_UI_NOTIFICATIONS=true +ENABLE_WILD_WEST=true +SHOW_TAGS_INTRO=false + +# CENTRALIZED FEATURES +ENABLE_COMMENT_REACTIONS=true +ENABLE_FILE_REACTIONS=true +ENABLE_CREATOR_REACTIONS=true +ENABLE_NO_SOURCE_CLAIMS=true +ENABLE_PREROLL_ADS=false +SHOW_ADS=true + +CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4 +CHANNEL_STAKED_LEVEL_LIVESTREAM=3 +WEB_PUBLISH_SIZE_LIMIT_GB=4 + +#SEARCH TYPES - comma-delimited +LIGHTHOUSE_DEFAULT_TYPES=audio,video diff --git a/.gitignore b/.gitignore index f3adf8f8a..cef7245af 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,6 @@ package-lock.json !/custom/robots.disallowall !/custom/robots.allowall .env -.env.ody +!.env.ody .env.desktop .env.lbrytv diff --git a/ui/component/creatorAnalytics/view.jsx b/ui/component/creatorAnalytics/view.jsx index e48acb05e..a167e3323 100644 --- a/ui/component/creatorAnalytics/view.jsx +++ b/ui/component/creatorAnalytics/view.jsx @@ -27,7 +27,9 @@ export default function CreatorAnalytics(props: Props) { const [error, setError] = React.useState(); const [fetchingStats, setFetchingStats] = React.useState(false); const claimId = claim && claim.claim_id; - const channelHasClaims = claim && claim.meta && claim.meta.claims_in_channel; + // TODO: put this back when hubs are fixed + // const channelHasClaims = claim && claim.meta && claim.meta.claims_in_channel && claim.meta.claims_in_channel > 0 || true; + const channelHasClaims = true; React.useEffect(() => { setStats(null);