Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f33b330f56 |
No files matched your search
+33
-85
@@ -1,29 +1,40 @@
|
||||
####### .env.default #########
|
||||
|
||||
# Copy this file to .env to make modifications
|
||||
|
||||
# Base config
|
||||
MATOMO_URL=https://analytics.lbry.com/
|
||||
MATOMO_ID=4
|
||||
WEBPACK_WEB_PORT=9090
|
||||
WEBPACK_ELECTRON_PORT=9091
|
||||
WEB_SERVER_PORT=1337
|
||||
|
||||
## APIS
|
||||
LBRY_WEB_API=https://api.na-backend.odysee.com
|
||||
LBRY_WEB_API=https://api.lbry.tv
|
||||
LBRY_WEB_STREAMING_API=https://cdn.lbryplayer.xyz
|
||||
LBRY_WEB_BUFFER_API=https://collector-service.api.lbry.tv/api/v1/events/video
|
||||
COMMENT_SERVER_API=https://comments.odysee.tv/api/v2
|
||||
COMMENT_SERVER_NAME=Odysee
|
||||
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
|
||||
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
|
||||
THUMBNAIL_CDN_URL=https://image-processor.vanwanet.com/optimize/
|
||||
COMMENT_SERVER_API=https://comments.lbry.com/api/v2
|
||||
WELCOME_VERSION=1.0
|
||||
|
||||
# STRIPE
|
||||
# STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
||||
# Custom Site info
|
||||
DOMAIN=lbry.tv
|
||||
URL=https://lbry.tv
|
||||
THUMBNAIL_CDN_URL=https://image-optimizer.vanwanet.com/?address=
|
||||
|
||||
# Analytics
|
||||
MATOMO_URL=https://analytics.lbry.com/
|
||||
MATOMO_ID=4
|
||||
# UI
|
||||
SITE_TITLE=lbry.tv
|
||||
SITE_NAME=lbry.tv
|
||||
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
|
||||
SITE_HELP_EMAIL=help@lbry.com
|
||||
LOGO_TITLE=lbry.tv
|
||||
SIMPLE_SITE=false
|
||||
SHOW_ADS=true
|
||||
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
||||
YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
ENABLE_COMMENT_REACTIONS=true
|
||||
ENABLE_FILE_REACTIONS=false
|
||||
ENABLE_CREATOR_REACTIONS=false
|
||||
ENABLE_NO_SOURCE_CLAIMS=false
|
||||
ENABLE_PREROLL_ADS=false
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||
CHANNEL_STAKED_LEVEL_LIVESTREAM=5
|
||||
WEB_PUBLISH_SIZE_LIMIT_GB=4
|
||||
|
||||
# OG
|
||||
OG_TITLE_SUFFIX=| lbry.tv
|
||||
@@ -31,86 +42,23 @@ OG_HOMEPAGE_TITLE=lbry.tv
|
||||
OG_IMAGE_URL=
|
||||
SITE_CANONICAL_URL=https://lbry.tv
|
||||
|
||||
# UI
|
||||
## Custom Site info
|
||||
DOMAIN=lbry.tv
|
||||
URL=https://lbry.tv
|
||||
SITE_TITLE=LBRY
|
||||
SITE_NAME=LBRY
|
||||
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
|
||||
SITE_HELP_EMAIL=help@lbry.com
|
||||
LOGO_TITLE=LBRY
|
||||
CLOUD_CONNECT_SITE_NAME=Odysee
|
||||
## Social media
|
||||
TWITTER_ACCOUNT=LBRYcom
|
||||
BRANDED_SITE=odysee
|
||||
|
||||
## IMAGE ASSETS
|
||||
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
||||
YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
#LOGIN_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/login/b671946e911c66c5fa7233afb35de2badd9eceb8/0e1d81
|
||||
#LOGO=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
#LOGO_TEXT_LIGHT=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
#LOGO_TEXT_DARK=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
#AVATAR_DEFAULT=
|
||||
#MISSING_THUMB_DEFAULT=
|
||||
#FAVICON=
|
||||
|
||||
# LOCALE
|
||||
DEFAULT_LANGUAGE=en
|
||||
|
||||
## CUSTOM SETTINGS
|
||||
# Custom Settings
|
||||
# Additional settings for below are found in ui/constants/settings and are for
|
||||
# preventing user settings from applying to custom sites without overwriting them.
|
||||
# UNSYNCED_SETTINGS='theme dark_mode_times automatic_dark_mode_enabled'
|
||||
|
||||
## LINKED CONTENT WHITELIST
|
||||
KNOWN_APP_DOMAINS=lbry.tv,lbry.lat,odysee.com
|
||||
|
||||
## CUSTOM CONTENT
|
||||
# Custom Content
|
||||
# If the following is true, copy custom/homepage.example.js to custom/homepage.js and modify
|
||||
CUSTOM_HOMEPAGE=false
|
||||
|
||||
# Add channels to auto-follow on first run
|
||||
AUTO_FOLLOW_CHANNELS=lbry://@lbry#3fda836a92faaceedfe398225fb9b2ee2ed1f01a
|
||||
# Add up to 2 sidebar links:
|
||||
# PINNED_URI_1=@Lbrylatam#2/Integracionesporseguridad#4
|
||||
# PINNED_LABEL_1=LBRY LATAM
|
||||
# PINNED_URI_2=$/discover?t=lbrytvpaidbeta&fee_amount=>0&claim_type=stream&channel_ids=5af39f818f668d8c00943c9326c5201c4fe3c423,cda9c4e92f19d6fe0764524a2012056e06ca2055,760da3ba3dd85830a843beaaed543a89b7a367e7,40c36948f0da072dcba3e4833e90f71e16de78be,e8f68563d242f6ac9784dcbc41dd86c28a9391d6,7236fc5d2783ea7314d9076ae6c8a250e3992d1a,cf7792c2a37d0d76aaaff84aff0b99a8c791429d,8316ac90764fedf3147799b7b81a6575a9cc398e,8627af93c1a1219150f06b698f4b33e6ed2f1c1e,8972a1bd06de5186e5e89292b05aac8aaa817791,c5b0b17838df2f6c31162f64d55f60f34ae8bfc6,f576d5dba905fc179de880c3fe3eb3281ea74f59,97dd77c93c9603cbb2583f3589f7f5a6c92baa43,f399d873e0c37cf24de9569b5f22bbb30a5c6709,dba870d0620d41b2b9a152c961e0c06cf875ccfc,ca1fd651c9d14bf2e5088bb2aa0146ee7aeb2ae0,50ad846a4b1543b847bf3fdafb7b45f6b2f5844c,e09ff5abe9fb44dd0dd0576894a6db60a6211603,7b6f7517f6b816827d076fa0eaad550aa315a4e7,2068452c41d8da3bd68961335da0072a99258a1a,5da63df97c8255ae94a88940695b8471657dd5a1,3645cf2f5d0bdac0523f945be1c3ff60758f7845,4da85b12244839d6368b9290f1619ff9514ab2a8,4ad942982e43326c7700b1b6443049b3cfd82161,55304f219244abf82f684f759cc0c7769242f3b4,8f42e5b592bb7f7a03f4a94a86a41b1236bb099f,e2a014d885a48f5be2dc6409610996337312facb,c18996ca488753f714d36d4654715927c1d7f9c2,ebc4214424cfa683a7046e1f794fea1e44788d84,06b6d6d6a893fb589ec2ded948f5122856921ed5,07e4546674268fc0222b2ca22d31d0549dc217ee,060940e41973d4f7f16d72a2733138e931c35f41,f8d6eccd887c9cebd36b1d42aa349279b7f5c3ed,68098b8426f967b8d04cc566348b5c128823219e,2bfe6cdb24a21bdc1b76fb7c416edd50e9e85945,1f9bb08bfa2259629f4aaa9ed40f97e9a41b6fa1,2f20148495612946675fe1c8ea99171e4d950b81,bc6938fa1e09e840056c2e831abf9664f397c472,2a6194792beac5130641e932b5ac6e5a99b5ca4f,185ba2bd547a5e4a77d29fe6c1484f47db5e058f,29cc7f6081268eaa5b3f2946e0cd0b952a94812c,49389450b1241f5d8f4c8c4271a3eb56bba33965,ffdc62ac2f7549398d3aca9d2119e83d80d588d5,d7a4d2808074b0c55d6b239f69d90e7a4930f943,d58aa4a0b2f6c2504c3abce8de3f1afb71800acc,77ae23dc7eb8a75609881d4548a79e4935a89d37,f79bce8a60fbece671f6265adc39f6469f3b9b8c,051995fdf0af634e4911704057a551e9392e62b1
|
||||
# PINNED_LABEL_2=Paid Beta
|
||||
|
||||
## FEATURES AND LIMITS
|
||||
SIMPLE_SITE=false
|
||||
#BRANDED_SITE
|
||||
|
||||
ENABLE_COMMENT_REACTIONS=true
|
||||
ENABLE_FILE_REACTIONS=true
|
||||
ENABLE_CREATOR_REACTIONS=true
|
||||
ENABLE_NO_SOURCE_CLAIMS=false
|
||||
ENABLE_PREROLL_ADS=false
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||
CHANNEL_STAKED_LEVEL_LIVESTREAM=5
|
||||
WEB_PUBLISH_SIZE_LIMIT_GB=4
|
||||
LOADING_BAR_COLOR=#2bbb90
|
||||
LIGHTHOUSE_DEFAULT_TYPES=audio,video,text,image,application
|
||||
|
||||
SHOW_ADS=false
|
||||
|
||||
## SIMPLE_SITE REPLACEMENTS
|
||||
ENABLE_MATURE=true
|
||||
ENABLE_UI_NOTIFICATIONS=false
|
||||
|
||||
#ENABLE_LINK_TO_APP=true
|
||||
#FORCE_ANALYTICS=true
|
||||
#ENABLE_ADVANCED_FILTER=true
|
||||
#ENABLE_PAID_CONTENT=true
|
||||
#USE_FOOTER=true
|
||||
#USE_DISCOVER_WHITELIST=false
|
||||
#ENABLE_WILD_WEST=false
|
||||
#FULL_SIDE_LINKS=true
|
||||
#SHOW_TAGS_INTRO=false
|
||||
|
||||
# SEARCH TYPES
|
||||
#VIDEO_ENABLED=true
|
||||
#AUDIO_ENABLED=true
|
||||
#POSTS_ENABLED=true
|
||||
#IMAGES_ENABLED=true
|
||||
#FILES_ENABLED=true
|
||||
#MODELS_ENABLED=true
|
||||
|
||||
BRANDED_SITE=odysee
|
||||
@@ -1,92 +0,0 @@
|
||||
# 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
|
||||
@@ -35,14 +35,13 @@
|
||||
"object-curly-spacing": 0,
|
||||
"one-var": 0,
|
||||
"prefer-promise-reject-errors": 0,
|
||||
"promise/param-names": 0,
|
||||
"react/jsx-indent": 0,
|
||||
"react/jsx-no-comment-textnodes": 0,
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react/no-unescaped-entities": 0,
|
||||
"space-before-function-paren": [
|
||||
"warn",
|
||||
"error",
|
||||
{
|
||||
"anonymous": "never",
|
||||
"named": "never",
|
||||
|
||||
+8
-16
@@ -1,13 +1,18 @@
|
||||
[ignore]
|
||||
.*\.typeface\.json
|
||||
.*/node_modules/findup/.*
|
||||
.*/node_modules/react-plastic/.*
|
||||
.*/node_modules/raf-schd/.*
|
||||
.*/node_modules/react-beautiful-dnd/.*
|
||||
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
./flow-typed
|
||||
node_modules/lbry-redux/flow-typed/
|
||||
node_modules/lbryinc/flow-typed/
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/lbry-redux
|
||||
.*/node_modules/lbryinc
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -25,7 +30,6 @@ module.name_mapper='^modal\(.*\)$' -> '<PROJECT_ROOT>/ui/modal\1'
|
||||
module.name_mapper='^app\(.*\)$' -> '<PROJECT_ROOT>/ui/app\1'
|
||||
module.name_mapper='^native\(.*\)$' -> '<PROJECT_ROOT>/ui/native\1'
|
||||
module.name_mapper='^analytics\(.*\)$' -> '<PROJECT_ROOT>/ui/analytics\1'
|
||||
module.name_mapper='^recsys\(.*\)$' -> '<PROJECT_ROOT>/extras/recsys\1'
|
||||
module.name_mapper='^rewards\(.*\)$' -> '<PROJECT_ROOT>/ui/rewards\1'
|
||||
module.name_mapper='^i18n\(.*\)$' -> '<PROJECT_ROOT>/ui/i18n\1'
|
||||
module.name_mapper='^effects\(.*\)$' -> '<PROJECT_ROOT>/ui/effects\1'
|
||||
@@ -35,17 +39,5 @@ module.name_mapper='^web\/component\(.*\)$' -> '<PROJECT_ROOT>/web/component\1'
|
||||
module.name_mapper='^web\/effects\(.*\)$' -> '<PROJECT_ROOT>/web/effects\1'
|
||||
module.name_mapper='^web\/page\(.*\)$' -> '<PROJECT_ROOT>/web/page\1'
|
||||
module.name_mapper='^homepage\(.*\)$' -> '<PROJECT_ROOT>/ui/util/homepage\1'
|
||||
module.name_mapper='^scss\/component\(.*\)$' -> '<PROJECT_ROOT>/ui/scss/component/\1'
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
|
||||
; Extensions
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.css
|
||||
module.file_ext=.scss
|
||||
|
||||
|
||||
|
||||
[strict]
|
||||
@@ -1,26 +1,14 @@
|
||||
## Fixes
|
||||
|
||||
Issue Number:
|
||||
|
||||
<!-- Tip:
|
||||
- Add keywords to directly close the Issue when the PR is merged.
|
||||
- Skip the keyword if the Issue contains multiple items.
|
||||
- https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
|
||||
-->
|
||||
|
||||
## What is the current behavior?
|
||||
|
||||
## What is the new behavior?
|
||||
|
||||
## Other information
|
||||
|
||||
<!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
|
||||
|
||||
## PR Checklist
|
||||
|
||||
<!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" -->
|
||||
|
||||
<details><summary>Toggle...</summary>
|
||||
Please check all that apply to this PR using "x":
|
||||
|
||||
- [ ] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
|
||||
- [ ] I have checked that this PR does not introduce a breaking change
|
||||
- [ ] This PR introduces breaking changes and I have provided a detailed explanation below
|
||||
|
||||
## PR Type
|
||||
|
||||
What kind of change does this PR introduce?
|
||||
|
||||
@@ -31,11 +19,14 @@ What kind of change does this PR introduce?
|
||||
- [ ] Documentation changes
|
||||
- [ ] Other - Please describe:
|
||||
|
||||
Please check all that apply to this PR using "x":
|
||||
## Fixes
|
||||
|
||||
- [ ] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
|
||||
- [ ] I added a line describing my change to CHANGELOG.md
|
||||
- [ ] I have checked that this PR does not introduce a breaking change
|
||||
- [ ] This PR introduces breaking changes and I have provided a detailed explanation below
|
||||
Issue Number:
|
||||
|
||||
</details>
|
||||
## What is the current behavior?
|
||||
|
||||
## What is the new behavior?
|
||||
|
||||
## Other information
|
||||
|
||||
<!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
if: startsWith(runner.os, 'mac')
|
||||
with:
|
||||
xcode-version: '12.4.0'
|
||||
xcode-version: '10.3.0'
|
||||
|
||||
- name: Download blockchain headers
|
||||
run: |
|
||||
@@ -49,14 +49,14 @@ jobs:
|
||||
yarn global add cross-env
|
||||
yarn
|
||||
yarn build
|
||||
node ./build/afterSignHook.js
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
|
||||
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
|
||||
WIN_CSC_LINK: https://raw.githubusercontent.com/lbryio/lbry-desktop/master/build/cert-2021-2022.pfx
|
||||
WIN_CSC_LINK: https://s3.amazonaws.com/files.lbry.io/cert/win-csc-2020-2021-08.p12
|
||||
CSC_LINK: https://s3.amazonaws.com/files.lbry.io/cert/osx-csc-2021-2022.p12
|
||||
|
||||
# UI
|
||||
@@ -94,19 +94,7 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: |
|
||||
startsWith(runner.os, 'windows')
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
with:
|
||||
name: Windows
|
||||
path: ./dist/electron/*.*
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
if: |
|
||||
startsWith(runner.os, 'linux')
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --exclude '*' --include '*.deb' --include '*.AppImage' --include '*.dmg'
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.ARTIFACTS_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_SECRET }}
|
||||
AWS_REGION: 'us-east-1'
|
||||
SOURCE_DIR: 'dist/electron'
|
||||
DEST_DIR: 'app/release'
|
||||
@@ -33,6 +33,3 @@ package-lock.json
|
||||
!/custom/robots.disallowall
|
||||
!/custom/robots.allowall
|
||||
.env
|
||||
!.env.ody
|
||||
.env.desktop
|
||||
.env.lbrytv
|
||||
+4
-2
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"linters": {
|
||||
"ui/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"],
|
||||
"ui/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"]
|
||||
"web/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"],
|
||||
"ui/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"],
|
||||
"web/**/*.{js,jsx,scss}": ["eslint", "git add"]
|
||||
},
|
||||
"ignore": ["node_modules", "dist/**/*", "package-lock.json"]
|
||||
"ignore": ["node_modules", "web/dist/**/*", "dist/**/*", "package-lock.json"]
|
||||
}
|
||||
+1
-167
@@ -1,187 +1,24 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [Unreleased for Desktop]
|
||||
|
||||
## [0.52.4] - [2022-02-15]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed active channel ([#7481](https://github.com/lbryio/lbry-desktop/pull/7481))
|
||||
- Remove extra search button in header ([#7482](https://github.com/lbryio/lbry-desktop/pull/7482))
|
||||
|
||||
## [0.52.3] - [2022-02-15]
|
||||
|
||||
### Fixed
|
||||
- Fixed comment editing and pinning ([#7476](https://github.com/lbryio/lbry-desktop/pull/7476))
|
||||
- Fixed mac header ([#7479](https://github.com/lbryio/lbry-desktop/pull/7479))
|
||||
- Fixed markdown display and lbry url embedding ([#7474](https://github.com/lbryio/lbry-desktop/pull/7474))
|
||||
|
||||
## [0.52.2] - [2022-02-11]
|
||||
|
||||
### Added
|
||||
|
||||
- Reenabled generating thumbs from video ([#7384](https://github.com/lbryio/lbry-desktop/pull/7409))
|
||||
- Brought in playlist drag and drop playlist reordering _odysee team!_ ([#7442](https://github.com/lbryio/lbry-desktop/pull/7442))
|
||||
- Added duration overlays to ClaimPreview component ([#7420](https://github.com/lbryio/lbry-desktop/pull/7420))
|
||||
- Some Horizontal Scroll groundwork from _odysee team!_
|
||||
- Comment Emotes and Stickers and Mentions refactors from _odysee team!_ ([#7435](https://github.com/lbryio/lbry-desktop/pull/7435))
|
||||
- Seek forward and back from _odysee team!_ () ([#7460](https://github.com/lbryio/lbry-desktop/pull/7460))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded Electron to v15 ([#7384](https://github.com/lbryio/lbry-desktop/pull/7384))
|
||||
- Performance improvements in some selectors ([#7370](https://github.com/lbryio/lbry-desktop/pull/7370))
|
||||
- More Header refactoring from _odysee team!_ ([#7441](https://github.com/lbryio/lbry-desktop/pull/7441))
|
||||
- Header refactoring from _odysee team!_ ([#7440](https://github.com/lbryio/lbry-desktop/pull/7440))
|
||||
- Data hosting ui _incomplete_ ([#7438](https://github.com/lbryio/lbry-desktop/pull/7438))
|
||||
- Updated c: control tags from _odysee team!_ ([#7433](https://github.com/lbryio/lbry-desktop/pull/7433))
|
||||
- Nav keycodes (alt+left) no longer navigate while textarea is focused ([#7458](https://github.com/lbryio/lbry-desktop/pull/7458))
|
||||
- Improved comment-server selection ui/ux ([#7455](https://github.com/lbryio/lbry-desktop/pull/7455))
|
||||
- Improved Data Hosting settings ([#7563](https://github.com/lbryio/lbry-desktop/pull/7563))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Several fallout bugs from recent changes
|
||||
|
||||
## [0.52.1]
|
||||
|
||||
### Skipped patch version
|
||||
|
||||
## [0.52.0] - [2021-12-31]
|
||||
|
||||
### Compatibility
|
||||
|
||||
- Mac <= 10.13 (High Sierra) and Ubuntu <= 16 (Xenial) are no longer supported. If you upgrade, you will need to manually build and install your own lbrynet SDK
|
||||
|
||||
### Added
|
||||
|
||||
- Direct replying to notifications _community pr!_ ([#6935](https://github.com/lbryio/lbry-desktop/pull/6935))
|
||||
- Added "Replay" option on autoplay countdown ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added "Loop" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added "Shuffle" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added Play Next/Previous buttons (with shortcuts SHIFT+N/SHIFT+P) ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Separate control for autoplay next on video player ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Channel Mention selection ability while creating a comment ([#7151](https://github.com/lbryio/lbry-desktop/pull/7151))
|
||||
- Disk space setting under Data Hosting ([#7266](https://github.com/lbryio/lbry-desktop/pull/7266))
|
||||
- Paginated 'All Playlists' page ([#7268](https://github.com/lbryio/lbry-desktop/pull/7268))
|
||||
- Expanded playlist ordering tools ([#7305](https://github.com/lbryio/lbry-desktop/pull/7305))
|
||||
- Setting to upgrade to alpha prerelease builds ([#7353](https://github.com/lbryio/lbry-desktop/pull/7353))
|
||||
|
||||
### Changed
|
||||
|
||||
- Changing the supported language from Filipino to Tagalog _community pr!_ ([#6951](https://github.com/lbryio/lbry-desktop/pull/6951))
|
||||
- Don't show countdown to next item in list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Changed "View List" popup option to link, so can be opened on a new tab ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- App reorganized to remove lbry-redux and lbryinc repository dependencies ([#7240](https://github.com/lbryio/lbry-desktop/pull/7240))
|
||||
- Styling cleanup for file reactions ([#7251](https://github.com/lbryio/lbry-desktop/pull/7251))
|
||||
- Change share url to odysee and allow custom share url in settings ([#7258](https://github.com/lbryio/lbry-desktop/pull/7258))
|
||||
- Change Sign in/up to Cloud Connect for Odysee ([#7260](https://github.com/lbryio/lbry-desktop/pull/7260))
|
||||
- Upgraded to lbrynet v0.106.0 ([#7315](https://github.com/lbryio/lbry-desktop/pull/7315))
|
||||
- Upgraded Electron to v11.5.0 ([#7276](https://github.com/lbryio/lbry-desktop/pull/7276))
|
||||
- Cleaner Discover page filters ([#7306](https://github.com/lbryio/lbry-desktop/pull/7306))
|
||||
- Scroll bar styling ([#7314](https://github.com/lbryio/lbry-desktop/pull/7314))
|
||||
- Remove pages for obsolete features like invites, rewards, swap ([#7330](https://github.com/lbryio/lbry-desktop/pull/7330))
|
||||
- Change file repost to modal _community pr!_ ([#7341](https://github.com/lbryio/lbry-desktop/pull/7341))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Clicking on the title of a floating player will take you back to the list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Fix floating player stopping on markdown or image files ([#7073](https://github.com/lbryio/lbry-desktop/pull/7073))
|
||||
- Fix list thumbnail upload ([#7074](https://github.com/lbryio/lbry-desktop/pull/7074))
|
||||
- Stream Key is now hidden _community pr!_ ([#7127](https://github.com/lbryio/lbry-desktop/pull/7127))
|
||||
- Fix playlist preview thumbnail ([#7178](https://github.com/lbryio/lbry-desktop/pull/7178)
|
||||
- Fixed “Your Account” popup on mobile ([#7172](https://github.com/lbryio/lbry-desktop/pull/7172))
|
||||
- Fix disable-support for comments ([#7245](https://github.com/lbryio/lbry-desktop/pull/7245))
|
||||
- Fix Electron taking over .html files on linux ([#7291](https://github.com/lbryio/lbry-desktop/pull/7291))
|
||||
- Fix floating player play/pause on drag _community pr!_ ([#7339](https://github.com/lbryio/lbry-desktop/pull/7339))
|
||||
- Fix card dropdown menus triggering menu actions _community pr!_ ([#7335](https://github.com/lbryio/lbry-desktop/pull/7335))
|
||||
|
||||
## [0.51.2] - [2021-08-20]
|
||||
|
||||
### Added
|
||||
|
||||
- Show currently active playing item on playlist _community pr!_ ([#6453](https://github.com/lbryio/lbry-desktop/pull/6453))
|
||||
- Add watch later to hover action for last used playlist on popup _community pr!_ ([#6274](https://github.com/lbryio/lbry-desktop/pull/6274))
|
||||
- Add confirmation on comment removal _community pr!_ ([#6563](https://github.com/lbryio/lbry-desktop/pull/6563))
|
||||
- Show on content page if a file is part of a playlist already _community pr!_([#6393](https://github.com/lbryio/lbry-desktop/pull/6393))
|
||||
- Add filtering to playlists ([#6905](https://github.com/lbryio/lbry-desktop/pull/6905))
|
||||
|
||||
### Changed
|
||||
|
||||
- Use Canonical Url for copy link ([#6500](https://github.com/lbryio/lbry-desktop/pull/6500))
|
||||
- Use better icon for copy link ([#6485](https://github.com/lbryio/lbry-desktop/pull/6485))
|
||||
- Comments load paginated ([#6390](https://github.com/lbryio/lbry-desktop/pull/6390))
|
||||
- Improve twitter share _community pr!_ ([#6690](https://github.com/lbryio/lbry-desktop/pull/6690))
|
||||
- Update lighthouse search api _community pr!_ ([#6731](https://github.com/lbryio/lbry-desktop/pull/6731))
|
||||
- Update sockety api _community pr!_ ([#6747](https://github.com/lbryio/lbry-desktop/pull/6747))
|
||||
- Use resolve for OG metadata instead of chainquery _community pr!_ ([#6787](https://github.com/lbryio/lbry-desktop/pull/6787))
|
||||
- Improved clickability of notification links _community pr!_ ([#6711](https://github.com/lbryio/lbry-desktop/pull/6711))
|
||||
|
||||
### Fixed
|
||||
|
||||
- App now supports '#' and ':' for claimId separator ([#6496](https://github.com/lbryio/lbry-desktop/pull/6496))
|
||||
- Fix "exact match" being applied to Recommended ([#6460](https://github.com/lbryio/lbry-desktop/pull/6460))
|
||||
- Fix upload button on creator analytics _community pr!_ ([#6458](https://github.com/lbryio/lbry-desktop/pull/6458))
|
||||
- Prevent sidebar shortcut activation on textarea _community pr!_ ([#6454](https://github.com/lbryio/lbry-desktop/pull/6454))
|
||||
- Improve accessibility and some minor css fixes _community pr!_ ([#6470](https:/github.com/lbryio/lbry-desktop/pull/6470))
|
||||
- Fix drag / drop publish issues for web users _community pr!_ ([#6466](https://github.com/lbryio/lbry-desktop/pull/6466))
|
||||
- Fix yarn copyenv on windows _community pr!_ ([#6702](https://github.com/lbryio/lbry-desktop/pull/6702))
|
||||
- Fix unnecessary livestream api calls in channel page _community pr!_ ([#6652](https://github.com/lbryio/lbry-desktop/pull/6652))
|
||||
- Fix desktop app fails to resolve deep links _community pr!_ ([#6779](https://github.com/lbryio/lbry-desktop/pull/6779))
|
||||
- Fix wrong release date on GoogleVideo metadata _community pr!_ ([#6787](https://github.com/lbryio/lbry-desktop/pull/6787))
|
||||
- Fix markdown line breaking mid word _community pr!_ ([#6805](https://github.com/lbryio/lbry-desktop/pull/6805))
|
||||
- Added \ and = to reserved symbol warning _community pr!_ ([#6733](https://github.com/lbryio/lbry-desktop/pull/6733))
|
||||
- Don't break words in chat + fix text overflow past 3 dot menu _community pr!_ ([#6602](https://github.com/lbryio/lbry-desktop/pull/6602))
|
||||
- Fix embed shows wrong OG metadata _community pr!_ ([#6815](https://github.com/lbryio/lbry-desktop/pull/6815))
|
||||
- Fix OG: "Unparsable data structure - Truncated Unicode character" _community pr!_ ([#6839](https://github.com/lbryio/lbry-desktop/pull/6839))
|
||||
- Fix Paid embed warning overlay redirection button now links to odysee _community pr!_ ([#6819](https://github.com/lbryio/lbry-desktop/pull/6819))
|
||||
- Fix comment section redirection to create channel _community pr!_ ([#6557](https://github.com/lbryio/lbry-desktop/pull/6557))
|
||||
|
||||
## [0.51.1] - [2021-06-26]
|
||||
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
||||
- Enable sign up on desktop ([#6071](https://github.com/lbryio/lbry-desktop/issues/6071))
|
||||
|
||||
## [0.51.0] - [2021-06-26]
|
||||
|
||||
### Added
|
||||
|
||||
- Private and Publishable Playlists ([#6157](https://github.com/lbryio/lbry-desktop/pull/6157))
|
||||
- Channel thumbnails in following side menu ([#6193](https://github.com/lbryio/lbry-desktop/pull/6193))
|
||||
- Web is now PWA app ([#6120](https://github.com/lbryio/lbry-desktop/pull/6120))
|
||||
- Send a tip with your comment ([#5920](https://github.com/lbryio/lbry-desktop/issues/5920))
|
||||
- Search for tags in search dropdown ([#5876](https://github.com/lbryio/lbry-desktop/issues/5876))
|
||||
- Japanese, Afrikaans, Filipino, Thai and Vietnamese language support ([#5684](https://github.com/lbryio/lbry-desktop/issues/5684))
|
||||
- Brazilian-Portuguese language support ([#5900](https://github.com/lbryio/lbry-desktop/issues/5900))
|
||||
- Highlight comments made by content owner _community pr!_ ([#5744](https://github.com/lbryio/lbry-desktop/pull/5744))
|
||||
- Ability to report infringing content directly from the application ([#5808](https://github.com/lbryio/lbry-desktop/pull/5808))
|
||||
- Re-added ability to export wallet transactions ([#5899](https://github.com/lbryio/lbry-desktop/pull/5899))
|
||||
- 24-hour clock setting _community pr!_ ([#5820](https://github.com/lbryio/lbry-desktop/pull/5820))
|
||||
- "Related" (recommendations) section: added option to view more from current creator _community pr!_ ([#5847](https://github.com/lbryio/lbry-desktop/pull/5847))
|
||||
- Wallet: ability to swap cryptocurrency into LBC ([#5654](https://github.com/lbryio/lbry-desktop/pull/5654))
|
||||
- Wallet: ability to send LBC directly to a user through a name or URL search _community pr!_ ([#5990](https://github.com/lbryio/lbry-desktop/pull/5990))
|
||||
- Publish: ability to edit the Release Date field ([#6049](https://github.com/lbryio/lbry-desktop/pull/6049))
|
||||
- Creator Settings: ability to mute specific words in comments ([#5934](https://github.com/lbryio/lbry-desktop/pull/5934))
|
||||
- Creator Settings: ability to disable comments + assign moderators ([#6199](https://github.com/lbryio/lbry-desktop/pull/6199))
|
||||
- Additional options in context-menu _community pr!_ ([#6106](https://github.com/lbryio/lbry-desktop/pull/6106))
|
||||
|
||||
### Changed
|
||||
|
||||
- Keyboard shortcut additions and changes _community pr!_ ([#5717](https://github.com/lbryio/lbry-desktop/pull/5717))
|
||||
- Removed the 10k character-limit when editing _Posts_ ([#5719](https://github.com/lbryio/lbry-desktop/pull/5719))
|
||||
- Improved search functionality (more filters, infinite-scroll, etc.) ([#5742](https://github.com/lbryio/lbry-desktop/pull/5742))
|
||||
- Removed google related section ads ([#6312](https://github.com/lbryio/lbry-desktop/pull/6312))
|
||||
- Debounce and min characters on wunderbar search ([#6319](https://github.com/lbryio/lbry-desktop/pull/6319))
|
||||
- Don't use optimizer for gif thumbnails ([#6320](https://github.com/lbryio/lbry-desktop/pull/6320))
|
||||
- Upgraded [LBRY SDK 0.99.0](https://github.com/lbryio/lbry/releases/tag/v0.99.0)
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -190,9 +27,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Autoplay looping to a previous video or itself ([#5711](https://github.com/lbryio/lbry-desktop/pull/5711))
|
||||
- Autoplay not working in mini-player mode ([#5716](https://github.com/lbryio/lbry-desktop/pull/5716))
|
||||
- Edited claim accidentally moved to 'Anonymous' ([#5767](https://github.com/lbryio/lbry-desktop/pull/5767))
|
||||
- Squished "Upload Date" and "View Count" on smaller screens _community pr!_ ([#5823](https://github.com/lbryio/lbry-desktop/pull/5823))
|
||||
- Home and End key not working in search bar ([#5867](https://github.com/lbryio/lbry-desktop/pull/5867))
|
||||
- Unable to buy paid-Images or Posts ([#6114](https://github.com/lbryio/lbry-desktop/pull/6114))
|
||||
|
||||
## [0.50.2] - [2021-04-2]
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<img width="40%" src="https://miro.medium.com/max/5198/1*bTVuL2THG_0mpwmE-n7Ezg.png" />
|
||||
|
||||
# LBRY App
|
||||
# LBRY App - https://lbry.tv
|
||||
|
||||
This repo contains the UI code that powers the official LBRY desktop app. The LBRY app is a graphical browser for the decentralized content marketplace provided by the
|
||||
This repo contains the UI code that powers the official LBRY desktop app, as well as lbry.tv. The LBRY app is a graphical browser for the decentralized content marketplace provided by the
|
||||
[LBRY](https://lbry.com) protocol. It is essentially the
|
||||
[lbry daemon](https://github.com/lbryio/lbry) bundled with a UI using
|
||||
[Electron](https://electron.atom.io/).
|
||||
@@ -66,7 +66,7 @@ _Note: If coming from a deb install, the directory structure is different and yo
|
||||
| | Flatpak | Arch | Nixpkgs | ARM/ARM64 |
|
||||
| -------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- |
|
||||
| Latest Release | [FlatHub Page](https://flathub.org/apps/details/io.lbry.lbry-app) | [AUR Package](https://aur.archlinux.org/packages/lbry-app-bin/) | [Nixpkgs](https://search.nixos.org/packages?channel=unstable&show=lbry&query=lbry) | [Build Guide](https://lbry.tv/@LBRYarm:5) |
|
||||
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
|
||||
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb)/[@TimurKiyivinski](https://github.com/TimurKiyivinski) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -79,7 +79,7 @@ You can run the web version (lbry.tv), the electron app, or both at the same tim
|
||||
#### Prerequisites
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Node.js](https://nodejs.org/en/download/) (v14 required)
|
||||
- [Node.js](https://nodejs.org/en/download/) (v10 required)
|
||||
- [Yarn](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
1. Clone (or [fork](https://help.github.com/articles/fork-a-repo/)) this repository: `git clone https://github.com/lbryio/lbry-desktop`
|
||||
@@ -92,6 +92,66 @@ You can run the web version (lbry.tv), the electron app, or both at the same tim
|
||||
|
||||
- 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.
|
||||
|
||||
#### Run the web app for development
|
||||
|
||||
`yarn dev:web`
|
||||
|
||||
- This uses webpack-dev-server and includes hot-reloading. If you want to debug the [web server we use in production](https://github.com/lbryio/lbry-desktop/blob/master/src/platforms/web/server.js) you can run `yarn dev:web-server`. This starts a server at `localhost:1337` and does not include hot reloading.
|
||||
|
||||
#### Customize the web app
|
||||
|
||||
- In root directory, duplicate the .env.default file and rename it to .env then copy the code below and paste it anywhere in the .env file.
|
||||
|
||||
```
|
||||
cp .env.defaults .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
- To specify your own OG-IMAGE
|
||||
You can either place a png named v2-og.png in the /custom folder or specify the OG_IMAGE_URL in .env
|
||||
|
||||
- To specify your own channels to be followed on first run
|
||||
`AUTO_FOLLOW_URLS=lbry://@chan#123...a lbry://@chan2#456...a`
|
||||
|
||||
- If you want to customize the homepage content
|
||||
|
||||
1. add `CUSTOM_HOMEPAGE=true` to the '.env' file
|
||||
2. copy `/custom/homepage.example.js` to `/custom/homepage.js` and make desired changes to `homepage.js`
|
||||
|
||||
- If you want up to two custom sidebar links
|
||||
|
||||
```
|
||||
PINNED_URI_1=@someurl#2/someclaim#4
|
||||
PINNED_LABEL_1=Linktext
|
||||
|
||||
PINNED_URI_2=$/discover?t=tag&[queryparams]
|
||||
PINNED_LABEL_2=OtherLinkText
|
||||
```
|
||||
|
||||
- Finally `NODE_ENV=production yarn compile:web` to rebuild
|
||||
_Note: You don't need to edit the .env file in the /web folder - that is copied during compile._
|
||||
|
||||
#### Deploy the web app (_experimental_)
|
||||
|
||||
1. Create a server with a domain name and a reverse proxy https to port 1337.
|
||||
2. Install pm2, node v10, yarn
|
||||
3. Clone this repo
|
||||
4. Make any customizations as above
|
||||
5. Run `yarn` to install
|
||||
6. Run `NODE_ENV=production yarn compile:web` to build
|
||||
7. Set up pm2 to start ./web/index.js
|
||||
|
||||
#### Run both at the same time
|
||||
|
||||
Run the two commands above in separate terminal windows
|
||||
|
||||
```
|
||||
yarn dev
|
||||
|
||||
// in another terminal window
|
||||
yarn dev:web
|
||||
```
|
||||
|
||||
#### Resetting your Packages
|
||||
|
||||
If the app isn't building, or `yarn xxx` commands aren't working you may need to just reset your `node_modules`. To do so you can run: `rm -r node_modules && yarn` or `del /s /q node_modules && yarn` on Windows.
|
||||
|
||||
Binary file not shown.
@@ -8,16 +8,11 @@ const config = {
|
||||
WEBPACK_WEB_PORT: process.env.WEBPACK_WEB_PORT,
|
||||
WEBPACK_ELECTRON_PORT: process.env.WEBPACK_ELECTRON_PORT,
|
||||
WEB_SERVER_PORT: process.env.WEB_SERVER_PORT,
|
||||
LBRY_WEB_API: process.env.LBRY_WEB_API, //api.na-backend.odysee.com',
|
||||
LBRY_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
|
||||
LBRY_WEB_API: process.env.LBRY_WEB_API, //api.lbry.tv',
|
||||
LBRY_API_URL: process.env.LBRY_API_URL, //api.lbry.com',
|
||||
LBRY_WEB_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, //cdn.lbryplayer.xyz',
|
||||
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
|
||||
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
|
||||
CLOUD_CONNECT_SITE_NAME: process.env.CLOUD_CONNECT_SITE_NAME,
|
||||
COMMENT_SERVER_API: process.env.COMMENT_SERVER_API,
|
||||
COMMENT_SERVER_NAME: process.env.COMMENT_SERVER_NAME,
|
||||
SOCKETY_SERVER_API: process.env.SOCKETY_SERVER_API,
|
||||
WELCOME_VERSION: process.env.WELCOME_VERSION,
|
||||
DOMAIN: process.env.DOMAIN,
|
||||
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
|
||||
@@ -27,21 +22,10 @@ const config = {
|
||||
SITE_NAME: process.env.SITE_NAME,
|
||||
SITE_DESCRIPTION: process.env.SITE_DESCRIPTION,
|
||||
SITE_HELP_EMAIL: process.env.SITE_HELP_EMAIL,
|
||||
// SOCIAL MEDIA
|
||||
TWITTER_ACCOUNT: process.env.TWITTER_ACCOUNT,
|
||||
// LOGO
|
||||
LOGO_TITLE: process.env.LOGO_TITLE,
|
||||
FAVICON: process.env.FAVICON,
|
||||
LOGO: process.env.LOGO,
|
||||
LOGO_TEXT_LIGHT: process.env.LOGO_TEXT_LIGHT,
|
||||
LOGO_TEXT_DARK: process.env.LOGO_TEXT_DARK,
|
||||
AVATAR_DEFAULT: process.env.AVATAR_DEFAULT,
|
||||
MISSING_THUMB_DEFAULT: process.env.MISSING_THUMB_DEFAULT,
|
||||
// OG
|
||||
OG_TITLE_SUFFIX: process.env.OG_TITLE_SUFFIX,
|
||||
OG_HOMEPAGE_TITLE: process.env.OG_HOMEPAGE_TITLE,
|
||||
OG_IMAGE_URL: process.env.OG_IMAGE_URL,
|
||||
// MASCOT
|
||||
YRBL_HAPPY_IMG_URL: process.env.YRBL_HAPPY_IMG_URL,
|
||||
YRBL_SAD_IMG_URL: process.env.YRBL_SAD_IMG_URL,
|
||||
LOGIN_IMG_URL: process.env.LOGIN_IMG_URL,
|
||||
@@ -49,8 +33,6 @@ const config = {
|
||||
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
||||
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
||||
UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS,
|
||||
|
||||
// ENABLE FEATURES
|
||||
ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true',
|
||||
ENABLE_FILE_REACTIONS: process.env.ENABLE_FILE_REACTIONS === 'true',
|
||||
ENABLE_CREATOR_REACTIONS: process.env.ENABLE_CREATOR_REACTIONS === 'true',
|
||||
@@ -59,7 +41,6 @@ const config = {
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
|
||||
CHANNEL_STAKED_LEVEL_LIVESTREAM: process.env.CHANNEL_STAKED_LEVEL_LIVESTREAM,
|
||||
WEB_PUBLISH_SIZE_LIMIT_GB: process.env.WEB_PUBLISH_SIZE_LIMIT_GB,
|
||||
LOADING_BAR_COLOR: process.env.LOADING_BAR_COLOR,
|
||||
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
||||
SHOW_ADS: process.env.SHOW_ADS === 'true',
|
||||
PINNED_URI_1: process.env.PINNED_URI_1,
|
||||
@@ -67,16 +48,9 @@ const config = {
|
||||
PINNED_URI_2: process.env.PINNED_URI_2,
|
||||
PINNED_LABEL_2: process.env.PINNED_LABEL_2,
|
||||
KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [],
|
||||
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
|
||||
ENABLE_UI_NOTIFICATIONS: process.env.ENABLE_UI_NOTIFICATIONS === 'true',
|
||||
ENABLE_MATURE: process.env.ENABLE_MATURE === 'true',
|
||||
CUSTOM_HOMEPAGE: process.env.CUSTOM_HOMEPAGE === 'true',
|
||||
SHOW_TAGS_INTRO: process.env.SHOW_TAGS_INTRO === 'true',
|
||||
LIGHTHOUSE_DEFAULT_TYPES: process.env.LIGHTHOUSE_DEFAULT_TYPES,
|
||||
BRANDED_SITE: process.env.BRANDED_SITE,
|
||||
};
|
||||
|
||||
config.URL_DEV = `http://localhost:${config.WEBPACK_WEB_PORT}`;
|
||||
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;
|
||||
config.URL_DEV = `http://localhost:${config.WEBPACK_WEB_PORT}`;
|
||||
|
||||
module.exports = config;
|
||||
@@ -20,6 +20,11 @@
|
||||
"to": "static/daemon/",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/lbry-first/",
|
||||
"to": "static/lbry-first/",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/img",
|
||||
"to": "static/img",
|
||||
@@ -77,7 +82,7 @@
|
||||
}
|
||||
},
|
||||
"deb": {
|
||||
"depends": ["gconf2", "gconf-service", "libnotify4", "libxtst6", "libnss3"]
|
||||
"depends": ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
|
||||
},
|
||||
"nsis": {
|
||||
"perMachine": true,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { spawn, execSync } from 'child_process';
|
||||
import Lbry from 'lbry';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
|
||||
export default class Daemon {
|
||||
static lbrynetPath =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { WEBPACK_ELECTRON_PORT } from 'config';
|
||||
import { app, BrowserWindow, dialog, screen, nativeImage } from 'electron';
|
||||
import { app, BrowserWindow, dialog, shell, screen, nativeImage } from 'electron';
|
||||
import isDev from 'electron-is-dev';
|
||||
import windowStateKeeper from 'electron-window-state';
|
||||
import SUPPORTED_LANGUAGES from 'constants/supported_languages';
|
||||
@@ -9,8 +9,7 @@ import { TO_TRAY_WHEN_CLOSED } from 'constants/settings';
|
||||
|
||||
import setupBarMenu from './menu/setupBarMenu';
|
||||
import * as PAGES from 'constants/pages';
|
||||
const remote = require('@electron/remote/main');
|
||||
const shell = require('electron').shell;
|
||||
|
||||
function GetAppLangCode() {
|
||||
// https://www.electronjs.org/docs/api/locales
|
||||
// 1. Gets the user locale.
|
||||
@@ -55,8 +54,6 @@ export default appState => {
|
||||
webSecurity: !isDev,
|
||||
plugins: true,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
enableRemoteModule: true, // see about removing this
|
||||
},
|
||||
};
|
||||
const lbryProto = 'lbry://';
|
||||
@@ -64,7 +61,6 @@ export default appState => {
|
||||
const rendererURL = isDev ? `http://localhost:${WEBPACK_ELECTRON_PORT}` : `file://${__dirname}/index.html`;
|
||||
|
||||
let window = new BrowserWindow(windowConfiguration);
|
||||
remote.enable(window.webContents);
|
||||
|
||||
// Let us register listeners on the window, so we can update the state
|
||||
// automatically (the listeners will be removed when the window is closed)
|
||||
@@ -190,13 +186,9 @@ export default appState => {
|
||||
window = null;
|
||||
});
|
||||
|
||||
window.webContents.setWindowOpenHandler((details) => {
|
||||
// Only open http and https links to prevent
|
||||
// security issues.
|
||||
if (['https:', 'http:'].includes(new URL(details.url).protocol)) {
|
||||
shell.openExternal(details.url);
|
||||
}
|
||||
return { action: 'deny' };
|
||||
window.webContents.on('new-window', (event, url) => {
|
||||
event.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
|
||||
window.webContents.on('update-target-url', (event, url) => {
|
||||
|
||||
+7
-40
@@ -4,9 +4,9 @@
|
||||
import '@babel/polyfill';
|
||||
import SemVer from 'semver';
|
||||
import https from 'https';
|
||||
import { app, dialog, ipcMain, session, shell, BrowserWindow } from 'electron';
|
||||
import { app, dialog, ipcMain, session, shell } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import Lbry from 'lbry';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import LbryFirstInstance from './LbryFirstInstance';
|
||||
import Daemon from './Daemon';
|
||||
import isDev from 'electron-is-dev';
|
||||
@@ -17,9 +17,6 @@ import startSandbox from './startSandbox';
|
||||
import installDevtools from './installDevtools';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
const { download } = require('electron-dl');
|
||||
const remote = require('@electron/remote/main');
|
||||
remote.initialize();
|
||||
const filePath = path.join(process.resourcesPath, 'static', 'upgradeDisabled');
|
||||
let upgradeDisabled;
|
||||
try {
|
||||
@@ -48,15 +45,9 @@ let daemon;
|
||||
let lbryFirst;
|
||||
|
||||
const appState = {};
|
||||
const PROTOCOL = 'lbry';
|
||||
|
||||
if (isDev && process.platform === 'win32') {
|
||||
// Setting this is required to get this working in dev mode.
|
||||
app.setAsDefaultProtocolClient(PROTOCOL, process.execPath, [
|
||||
path.resolve(process.argv[1]),
|
||||
]);
|
||||
} else if (process.platform !== 'linux') {
|
||||
app.setAsDefaultProtocolClient(PROTOCOL);
|
||||
if (process.platform !== 'linux') {
|
||||
app.setAsDefaultProtocolClient('lbry');
|
||||
}
|
||||
|
||||
app.name = 'LBRY';
|
||||
@@ -158,15 +149,9 @@ if (!gotSingleInstanceLock) {
|
||||
app.on('second-instance', (event, argv) => {
|
||||
// Send the url to the app to navigate first, then focus
|
||||
if (rendererWindow) {
|
||||
// External uri (last item on argv):
|
||||
const EXTERNAL_URI = (argv.length) ? argv[argv.length - 1] : '';
|
||||
// Handle protocol requests for windows and linux
|
||||
const platforms = (process.platform === 'win32' || process.platform === 'linux');
|
||||
// Is LBRY protocol
|
||||
const isProtocolURI = String(EXTERNAL_URI).startsWith(PROTOCOL + '://');
|
||||
// External protocol requested:
|
||||
if (platforms && isProtocolURI) {
|
||||
let URI = EXTERNAL_URI;
|
||||
if ((process.platform === 'win32' || process.platform === 'linux') && String(argv[1]).startsWith('lbry')) {
|
||||
let URI = argv[1];
|
||||
|
||||
// Keep only command line / deep linked arguments
|
||||
// Windows normalizes URIs when they're passed in from other apps. On Windows, this tries to
|
||||
// restore the original URI that was typed.
|
||||
@@ -286,20 +271,6 @@ app.on('before-quit', () => {
|
||||
appState.isQuitting = true;
|
||||
});
|
||||
|
||||
ipcMain.on('download-upgrade', async (event, params) => {
|
||||
const { url, options } = params;
|
||||
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
|
||||
options.onProgress = function(p) {
|
||||
rendererWindow.webContents.send('download-progress-update', p);
|
||||
};
|
||||
options.directory = dir;
|
||||
options.onCompleted = function(c) {
|
||||
rendererWindow.webContents.send('download-update-complete', c);
|
||||
};
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
await download(win, url, options).catch(e => console.log('e', e));
|
||||
});
|
||||
|
||||
ipcMain.on('upgrade', (event, installerPath) => {
|
||||
app.on('quit', () => {
|
||||
console.log('Launching upgrade installer at', installerPath);
|
||||
@@ -314,10 +285,6 @@ ipcMain.on('upgrade', (event, installerPath) => {
|
||||
app.quit();
|
||||
});
|
||||
|
||||
ipcMain.on('check-for-updates', () => {
|
||||
autoUpdater.checkForUpdates();
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
autoUpdateDownloaded = true;
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ if (typeof global.fetch === 'object') {
|
||||
global.fetch = global.fetch.default;
|
||||
}
|
||||
|
||||
const Lbry = require('lbry');
|
||||
const { Lbry } = require('lbry-redux');
|
||||
|
||||
delete global.window;
|
||||
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
// @flow
|
||||
/*
|
||||
LBRY FIRST does not work due to api changes
|
||||
*/
|
||||
import 'proxy-polyfill';
|
||||
|
||||
const CHECK_LBRYFIRST_STARTED_TRY_NUMBER = 200;
|
||||
//
|
||||
// Basic LBRYFIRST connection config
|
||||
// Offers a proxy to call LBRYFIRST methods
|
||||
|
||||
//
|
||||
const LbryFirst: LbryFirstTypes = {
|
||||
isConnected: false,
|
||||
connectPromise: null,
|
||||
lbryFirstConnectionString: 'http://localhost:1337/rpc',
|
||||
apiRequestHeaders: { 'Content-Type': 'application/json' },
|
||||
|
||||
// Allow overriding lbryFirst connection string (e.g. to `/api/proxy` for lbryweb)
|
||||
setLbryFirstConnectionString: (value: string) => {
|
||||
LbryFirst.lbryFirstConnectionString = value;
|
||||
},
|
||||
|
||||
setApiHeader: (key: string, value: string) => {
|
||||
LbryFirst.apiRequestHeaders = Object.assign(LbryFirst.apiRequestHeaders, { [key]: value });
|
||||
},
|
||||
|
||||
unsetApiHeader: key => {
|
||||
Object.keys(LbryFirst.apiRequestHeaders).includes(key) &&
|
||||
delete LbryFirst.apiRequestHeaders['key'];
|
||||
},
|
||||
// Allow overriding Lbry methods
|
||||
overrides: {},
|
||||
setOverride: (methodName, newMethod) => {
|
||||
LbryFirst.overrides[methodName] = newMethod;
|
||||
},
|
||||
getApiRequestHeaders: () => LbryFirst.apiRequestHeaders,
|
||||
|
||||
// LbryFirst Methods
|
||||
status: (params = {}) => lbryFirstCallWithResult('status', params),
|
||||
stop: () => lbryFirstCallWithResult('stop', {}),
|
||||
version: () => lbryFirstCallWithResult('version', {}),
|
||||
|
||||
// Upload to youtube
|
||||
upload: (params: { title: string, description: string, file_path: ?string } = {}) => {
|
||||
// Only upload when originally publishing for now
|
||||
if (!params.file_path) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const uploadParams: {
|
||||
Title: string,
|
||||
Description: string,
|
||||
FilePath: string,
|
||||
Category: string,
|
||||
Keywords: string,
|
||||
} = {
|
||||
Title: params.title,
|
||||
Description: params.description,
|
||||
FilePath: params.file_path,
|
||||
Category: '',
|
||||
Keywords: '',
|
||||
};
|
||||
|
||||
return lbryFirstCallWithResult('youtube.Upload', uploadParams);
|
||||
},
|
||||
|
||||
hasYTAuth: (token: string) => {
|
||||
const hasYTAuthParams = {};
|
||||
hasYTAuthParams.AuthToken = token;
|
||||
return lbryFirstCallWithResult('youtube.HasAuth', hasYTAuthParams);
|
||||
},
|
||||
|
||||
ytSignup: () => {
|
||||
const emptyParams = {};
|
||||
return lbryFirstCallWithResult('youtube.Signup', emptyParams);
|
||||
},
|
||||
|
||||
remove: () => {
|
||||
const emptyParams = {};
|
||||
return lbryFirstCallWithResult('youtube.Remove', emptyParams);
|
||||
},
|
||||
|
||||
// Connect to lbry-first
|
||||
connect: () => {
|
||||
if (LbryFirst.connectPromise === null) {
|
||||
LbryFirst.connectPromise = new Promise((resolve, reject) => {
|
||||
let tryNum = 0;
|
||||
// Check every half second to see if the lbryFirst is accepting connections
|
||||
function checkLbryFirstStarted() {
|
||||
tryNum += 1;
|
||||
LbryFirst.status()
|
||||
.then(resolve)
|
||||
.catch(() => {
|
||||
if (tryNum <= CHECK_LBRYFIRST_STARTED_TRY_NUMBER) {
|
||||
setTimeout(checkLbryFirstStarted, tryNum < 50 ? 400 : 1000);
|
||||
} else {
|
||||
reject(new Error('Unable to connect to LBRY'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
checkLbryFirstStarted();
|
||||
});
|
||||
}
|
||||
|
||||
// Flow thinks this could be empty, but it will always return a promise
|
||||
// $FlowFixMe
|
||||
return LbryFirst.connectPromise;
|
||||
},
|
||||
};
|
||||
|
||||
function checkAndParse(response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
}
|
||||
return response.json().then(json => {
|
||||
let error;
|
||||
if (json.error) {
|
||||
const errorMessage = typeof json.error === 'object' ? json.error.message : json.error;
|
||||
error = new Error(errorMessage);
|
||||
} else {
|
||||
error = new Error('Protocol error with unknown response signature');
|
||||
}
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}
|
||||
|
||||
export function apiCall(method: string, params: ?{}, resolve: Function, reject: Function) {
|
||||
const counter = new Date().getTime();
|
||||
const paramsArray = [params];
|
||||
const options = {
|
||||
method: 'POST',
|
||||
headers: LbryFirst.apiRequestHeaders,
|
||||
body: JSON.stringify({
|
||||
jsonrpc: '2.0',
|
||||
method,
|
||||
params: paramsArray,
|
||||
id: counter,
|
||||
}),
|
||||
};
|
||||
|
||||
return fetch(LbryFirst.lbryFirstConnectionString, options)
|
||||
.then(checkAndParse)
|
||||
.then(response => {
|
||||
const error = response.error || (response.result && response.result.error);
|
||||
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
return resolve(response.result);
|
||||
})
|
||||
.catch(reject);
|
||||
}
|
||||
|
||||
function lbryFirstCallWithResult(name: string, params: ?{} = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
apiCall(
|
||||
name,
|
||||
params,
|
||||
result => {
|
||||
resolve(result);
|
||||
},
|
||||
reject
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// This is only for a fallback
|
||||
// If there is a LbryFirst method that is being called by an app, it should be added to /flow-typed/LbryFirst.js
|
||||
const lbryFirstProxy = new Proxy(LbryFirst, {
|
||||
get(target: LbryFirstTypes, name: string) {
|
||||
if (name in target) {
|
||||
return target[name];
|
||||
}
|
||||
|
||||
return (params = {}) =>
|
||||
new Promise((resolve, reject) => {
|
||||
apiCall(name, params, resolve, reject);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export default lbryFirstProxy;
|
||||
@@ -1,97 +0,0 @@
|
||||
// Claims
|
||||
export const FETCH_FEATURED_CONTENT_STARTED = 'FETCH_FEATURED_CONTENT_STARTED';
|
||||
export const FETCH_FEATURED_CONTENT_COMPLETED = 'FETCH_FEATURED_CONTENT_COMPLETED';
|
||||
export const FETCH_TRENDING_CONTENT_STARTED = 'FETCH_TRENDING_CONTENT_STARTED';
|
||||
export const FETCH_TRENDING_CONTENT_COMPLETED = 'FETCH_TRENDING_CONTENT_COMPLETED';
|
||||
export const RESOLVE_URIS_STARTED = 'RESOLVE_URIS_STARTED';
|
||||
export const RESOLVE_URIS_COMPLETED = 'RESOLVE_URIS_COMPLETED';
|
||||
export const FETCH_CHANNEL_CLAIMS_STARTED = 'FETCH_CHANNEL_CLAIMS_STARTED';
|
||||
export const FETCH_CHANNEL_CLAIMS_COMPLETED = 'FETCH_CHANNEL_CLAIMS_COMPLETED';
|
||||
export const FETCH_CHANNEL_CLAIM_COUNT_STARTED = 'FETCH_CHANNEL_CLAIM_COUNT_STARTED';
|
||||
export const FETCH_CHANNEL_CLAIM_COUNT_COMPLETED = 'FETCH_CHANNEL_CLAIM_COUNT_COMPLETED';
|
||||
export const FETCH_CLAIM_LIST_MINE_STARTED = 'FETCH_CLAIM_LIST_MINE_STARTED';
|
||||
export const FETCH_CLAIM_LIST_MINE_COMPLETED = 'FETCH_CLAIM_LIST_MINE_COMPLETED';
|
||||
export const ABANDON_CLAIM_STARTED = 'ABANDON_CLAIM_STARTED';
|
||||
export const ABANDON_CLAIM_SUCCEEDED = 'ABANDON_CLAIM_SUCCEEDED';
|
||||
export const FETCH_CHANNEL_LIST_STARTED = 'FETCH_CHANNEL_LIST_STARTED';
|
||||
export const FETCH_CHANNEL_LIST_COMPLETED = 'FETCH_CHANNEL_LIST_COMPLETED';
|
||||
export const CREATE_CHANNEL_STARTED = 'CREATE_CHANNEL_STARTED';
|
||||
export const CREATE_CHANNEL_COMPLETED = 'CREATE_CHANNEL_COMPLETED';
|
||||
export const PUBLISH_STARTED = 'PUBLISH_STARTED';
|
||||
export const PUBLISH_COMPLETED = 'PUBLISH_COMPLETED';
|
||||
export const PUBLISH_FAILED = 'PUBLISH_FAILED';
|
||||
export const SET_PLAYING_URI = 'SET_PLAYING_URI';
|
||||
export const SET_CONTENT_POSITION = 'SET_CONTENT_POSITION';
|
||||
export const SET_CONTENT_LAST_VIEWED = 'SET_CONTENT_LAST_VIEWED';
|
||||
export const CLEAR_CONTENT_HISTORY_URI = 'CLEAR_CONTENT_HISTORY_URI';
|
||||
export const CLEAR_CONTENT_HISTORY_ALL = 'CLEAR_CONTENT_HISTORY_ALL';
|
||||
|
||||
// Subscriptions
|
||||
export const CHANNEL_SUBSCRIBE = 'CHANNEL_SUBSCRIBE';
|
||||
export const CHANNEL_UNSUBSCRIBE = 'CHANNEL_UNSUBSCRIBE';
|
||||
export const CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS =
|
||||
'CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS';
|
||||
export const CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS =
|
||||
'CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS';
|
||||
export const HAS_FETCHED_SUBSCRIPTIONS = 'HAS_FETCHED_SUBSCRIPTIONS';
|
||||
export const SET_SUBSCRIPTION_LATEST = 'SET_SUBSCRIPTION_LATEST';
|
||||
export const UPDATE_SUBSCRIPTION_UNREADS = 'UPDATE_SUBSCRIPTION_UNREADS';
|
||||
export const REMOVE_SUBSCRIPTION_UNREADS = 'REMOVE_SUBSCRIPTION_UNREADS';
|
||||
export const CHECK_SUBSCRIPTION_STARTED = 'CHECK_SUBSCRIPTION_STARTED';
|
||||
export const CHECK_SUBSCRIPTION_COMPLETED = 'CHECK_SUBSCRIPTION_COMPLETED';
|
||||
export const CHECK_SUBSCRIPTIONS_SUBSCRIBE = 'CHECK_SUBSCRIPTIONS_SUBSCRIBE';
|
||||
export const FETCH_SUBSCRIPTIONS_START = 'FETCH_SUBSCRIPTIONS_START';
|
||||
export const FETCH_SUBSCRIPTIONS_FAIL = 'FETCH_SUBSCRIPTIONS_FAIL';
|
||||
export const FETCH_SUBSCRIPTIONS_SUCCESS = 'FETCH_SUBSCRIPTIONS_SUCCESS';
|
||||
export const SET_VIEW_MODE = 'SET_VIEW_MODE';
|
||||
export const GET_SUGGESTED_SUBSCRIPTIONS_START = 'GET_SUGGESTED_SUBSCRIPTIONS_START';
|
||||
export const GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS = 'GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS';
|
||||
export const GET_SUGGESTED_SUBSCRIPTIONS_FAIL = 'GET_SUGGESTED_SUBSCRIPTIONS_FAIL';
|
||||
export const SUBSCRIPTION_FIRST_RUN_COMPLETED = 'SUBSCRIPTION_FIRST_RUN_COMPLETED';
|
||||
export const VIEW_SUGGESTED_SUBSCRIPTIONS = 'VIEW_SUGGESTED_SUBSCRIPTIONS';
|
||||
|
||||
// Blacklist
|
||||
export const FETCH_BLACK_LISTED_CONTENT_STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED';
|
||||
export const FETCH_BLACK_LISTED_CONTENT_COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED';
|
||||
export const FETCH_BLACK_LISTED_CONTENT_FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED';
|
||||
export const BLACK_LISTED_CONTENT_SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE';
|
||||
|
||||
// Filtered list
|
||||
export const FETCH_FILTERED_CONTENT_STARTED = 'FETCH_FILTERED_CONTENT_STARTED';
|
||||
export const FETCH_FILTERED_CONTENT_COMPLETED = 'FETCH_FILTERED_CONTENT_COMPLETED';
|
||||
export const FETCH_FILTERED_CONTENT_FAILED = 'FETCH_FILTERED_CONTENT_FAILED';
|
||||
export const FILTERED_CONTENT_SUBSCRIBE = 'FILTERED_CONTENT_SUBSCRIBE';
|
||||
|
||||
// Cost Info
|
||||
export const FETCH_COST_INFO_STARTED = 'FETCH_COST_INFO_STARTED';
|
||||
export const FETCH_COST_INFO_COMPLETED = 'FETCH_COST_INFO_COMPLETED';
|
||||
|
||||
// Stats
|
||||
export const FETCH_VIEW_COUNT_STARTED = 'FETCH_VIEW_COUNT_STARTED';
|
||||
export const FETCH_VIEW_COUNT_FAILED = 'FETCH_VIEW_COUNT_FAILED';
|
||||
export const FETCH_VIEW_COUNT_COMPLETED = 'FETCH_VIEW_COUNT_COMPLETED';
|
||||
export const FETCH_SUB_COUNT_STARTED = 'FETCH_SUB_COUNT_STARTED';
|
||||
export const FETCH_SUB_COUNT_FAILED = 'FETCH_SUB_COUNT_FAILED';
|
||||
export const FETCH_SUB_COUNT_COMPLETED = 'FETCH_SUB_COUNT_COMPLETED';
|
||||
|
||||
// Cross-device Sync
|
||||
export const GET_SYNC_STARTED = 'GET_SYNC_STARTED';
|
||||
export const GET_SYNC_COMPLETED = 'GET_SYNC_COMPLETED';
|
||||
export const GET_SYNC_FAILED = 'GET_SYNC_FAILED';
|
||||
export const SET_SYNC_STARTED = 'SET_SYNC_STARTED';
|
||||
export const SET_SYNC_FAILED = 'SET_SYNC_FAILED';
|
||||
export const SET_SYNC_COMPLETED = 'SET_SYNC_COMPLETED';
|
||||
export const SET_DEFAULT_ACCOUNT = 'SET_DEFAULT_ACCOUNT';
|
||||
export const SYNC_APPLY_STARTED = 'SYNC_APPLY_STARTED';
|
||||
export const SYNC_APPLY_COMPLETED = 'SYNC_APPLY_COMPLETED';
|
||||
export const SYNC_APPLY_FAILED = 'SYNC_APPLY_FAILED';
|
||||
export const SYNC_APPLY_BAD_PASSWORD = 'SYNC_APPLY_BAD_PASSWORD';
|
||||
export const SYNC_RESET = 'SYNC_RESET';
|
||||
|
||||
// Lbry.tv
|
||||
export const UPDATE_UPLOAD_PROGRESS = 'UPDATE_UPLOAD_PROGRESS';
|
||||
|
||||
// User
|
||||
export const GENERATE_AUTH_TOKEN_FAILURE = 'GENERATE_AUTH_TOKEN_FAILURE';
|
||||
export const GENERATE_AUTH_TOKEN_STARTED = 'GENERATE_AUTH_TOKEN_STARTED';
|
||||
export const GENERATE_AUTH_TOKEN_SUCCESS = 'GENERATE_AUTH_TOKEN_SUCCESS';
|
||||
@@ -1,5 +0,0 @@
|
||||
export const MINIMUM_PUBLISH_BID = 0.00000001;
|
||||
|
||||
export const CHANNEL_ANONYMOUS = 'anonymous';
|
||||
export const CHANNEL_NEW = 'new';
|
||||
export const PAGE_SIZE = 20;
|
||||
@@ -1,4 +0,0 @@
|
||||
export const ALREADY_CLAIMED =
|
||||
'once the invite reward has been claimed the referrer cannot be changed';
|
||||
export const REFERRER_NOT_FOUND =
|
||||
'A lbry.tv account could not be found for the referrer you provided.';
|
||||
@@ -1,11 +0,0 @@
|
||||
export const YOUTUBE_SYNC_NOT_TRANSFERRED = 'not_transferred';
|
||||
export const YOUTUBE_SYNC_PENDING = 'pending';
|
||||
export const YOUTUBE_SYNC_PENDING_EMAIL = 'pendingemail';
|
||||
export const YOUTUBE_SYNC_PENDING_TRANSFER = 'pending_transfer';
|
||||
export const YOUTUBE_SYNC_COMPLETED_TRANSFER = 'completed_transfer';
|
||||
export const YOUTUBE_SYNC_QUEUED = 'queued';
|
||||
export const YOUTUBE_SYNC_SYNCING = 'syncing';
|
||||
export const YOUTUBE_SYNC_SYNCED = 'synced';
|
||||
export const YOUTUBE_SYNC_FAILED = 'failed';
|
||||
export const YOUTUBE_SYNC_PENDINGUPGRADE = 'pendingupgrade';
|
||||
export const YOUTUBE_SYNC_ABANDONDED = 'abandoned';
|
||||
@@ -1,71 +0,0 @@
|
||||
import * as LBRYINC_ACTIONS from 'constants/action_types';
|
||||
import * as YOUTUBE_STATUSES from 'constants/youtube';
|
||||
import * as ERRORS from 'constants/errors';
|
||||
import Lbryio from './lbryio';
|
||||
|
||||
export { Lbryio };
|
||||
|
||||
// constants
|
||||
export { LBRYINC_ACTIONS, YOUTUBE_STATUSES, ERRORS };
|
||||
|
||||
// utils
|
||||
export { doTransifexUpload } from 'util/transifex-upload';
|
||||
|
||||
// actions
|
||||
export { doGenerateAuthToken } from './redux/actions/auth';
|
||||
export { doFetchCostInfoForUri } from './redux/actions/cost_info';
|
||||
export { doBlackListedOutpointsSubscribe } from './redux/actions/blacklist';
|
||||
export { doFilteredOutpointsSubscribe } from './redux/actions/filtered';
|
||||
export { doFetchViewCount, doFetchSubCount } from './redux/actions/stats';
|
||||
export {
|
||||
doCheckSync,
|
||||
doGetSync,
|
||||
doSetSync,
|
||||
doSetDefaultAccount,
|
||||
doSyncApply,
|
||||
doResetSync,
|
||||
doSyncEncryptAndDecrypt,
|
||||
} from 'redux/actions/sync';
|
||||
|
||||
// reducers
|
||||
export { authReducer } from './redux/reducers/auth';
|
||||
export { costInfoReducer } from './redux/reducers/cost_info';
|
||||
export { blacklistReducer } from './redux/reducers/blacklist';
|
||||
export { filteredReducer } from './redux/reducers/filtered';
|
||||
export { statsReducer } from './redux/reducers/stats';
|
||||
export { syncReducer } from './redux/reducers/sync';
|
||||
|
||||
// selectors
|
||||
export { selectAuthToken, selectIsAuthenticating } from './redux/selectors/auth';
|
||||
export {
|
||||
selectFetchingCostInfoForUri,
|
||||
selectCostInfoForUri,
|
||||
selectAllCostInfoByUri,
|
||||
selectFetchingCostInfo,
|
||||
} from './redux/selectors/cost_info';
|
||||
export {
|
||||
selectBlackListedOutpoints,
|
||||
selectBlacklistedOutpointMap,
|
||||
} from './redux/selectors/blacklist';
|
||||
export { selectFilteredOutpoints, selectFilteredOutpointMap } from './redux/selectors/filtered';
|
||||
export {
|
||||
selectViewCount,
|
||||
selectViewCountForUri,
|
||||
// makeSelectViewCountForUri, // deprecated
|
||||
selectSubCountForUri,
|
||||
// makeSelectSubCountForUri, // deprecated
|
||||
} from './redux/selectors/stats';
|
||||
export { selectBanStateForUri } from './redux/selectors/ban';
|
||||
export {
|
||||
selectHasSyncedWallet,
|
||||
selectSyncData,
|
||||
selectSyncHash,
|
||||
selectSetSyncErrorMessage,
|
||||
selectGetSyncErrorMessage,
|
||||
selectGetSyncIsPending,
|
||||
selectSetSyncIsPending,
|
||||
selectSyncApplyIsPending,
|
||||
selectHashChanged,
|
||||
selectSyncApplyErrorMessage,
|
||||
selectSyncApplyPasswordError,
|
||||
} from './redux/selectors/sync';
|
||||
@@ -1,238 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import Lbry from 'lbry';
|
||||
import querystring from 'querystring';
|
||||
|
||||
const Lbryio = {
|
||||
enabled: true,
|
||||
authenticationPromise: null,
|
||||
exchangePromise: null,
|
||||
exchangeLastFetched: null,
|
||||
CONNECTION_STRING: 'https://api.lbry.com/',
|
||||
};
|
||||
|
||||
const EXCHANGE_RATE_TIMEOUT = 20 * 60 * 1000;
|
||||
const INTERNAL_APIS_DOWN = 'internal_apis_down';
|
||||
|
||||
// We can't use env's because they aren't passed into node_modules
|
||||
Lbryio.setLocalApi = endpoint => {
|
||||
Lbryio.CONNECTION_STRING = endpoint.replace(/\/*$/, '/'); // exactly one slash at the end;
|
||||
};
|
||||
|
||||
Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
||||
if (!Lbryio.enabled) {
|
||||
return Promise.reject(new Error(__('LBRY internal API is disabled')));
|
||||
}
|
||||
|
||||
if (!(method === 'get' || method === 'post')) {
|
||||
return Promise.reject(new Error(__('Invalid method')));
|
||||
}
|
||||
|
||||
function checkAndParse(response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
}
|
||||
|
||||
if (response.status === 500) {
|
||||
return Promise.reject(INTERNAL_APIS_DOWN);
|
||||
}
|
||||
|
||||
if (response)
|
||||
return response.json().then(json => {
|
||||
let error;
|
||||
if (json.error) {
|
||||
error = new Error(json.error);
|
||||
} else {
|
||||
error = new Error('Unknown API error signature');
|
||||
}
|
||||
error.response = response; // This is primarily a hack used in actions/user.js
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}
|
||||
|
||||
function makeRequest(url, options) {
|
||||
return fetch(url, options).then(checkAndParse);
|
||||
}
|
||||
|
||||
return Lbryio.getAuthToken().then(token => {
|
||||
const fullParams = { auth_token: token, ...params };
|
||||
Object.keys(fullParams).forEach(key => {
|
||||
const value = fullParams[key];
|
||||
if (typeof value === 'object') {
|
||||
fullParams[key] = JSON.stringify(value);
|
||||
}
|
||||
});
|
||||
|
||||
const qs = querystring.stringify(fullParams);
|
||||
let url = `${Lbryio.CONNECTION_STRING}${resource}/${action}?${qs}`;
|
||||
|
||||
let options = {
|
||||
method: 'GET',
|
||||
};
|
||||
|
||||
if (method === 'post') {
|
||||
options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: qs,
|
||||
};
|
||||
url = `${Lbryio.CONNECTION_STRING}${resource}/${action}`;
|
||||
}
|
||||
|
||||
return makeRequest(url, options).then(response => response.data);
|
||||
});
|
||||
};
|
||||
|
||||
Lbryio.authToken = null;
|
||||
|
||||
Lbryio.getAuthToken = () =>
|
||||
new Promise(resolve => {
|
||||
if (Lbryio.authToken) {
|
||||
resolve(Lbryio.authToken);
|
||||
} else if (Lbryio.overrides.getAuthToken) {
|
||||
Lbryio.overrides.getAuthToken().then(token => {
|
||||
resolve(token);
|
||||
});
|
||||
} else if (typeof window !== 'undefined') {
|
||||
const { store } = window;
|
||||
if (store) {
|
||||
const state = store.getState();
|
||||
const token = state.auth ? state.auth.authToken : null;
|
||||
Lbryio.authToken = token;
|
||||
resolve(token);
|
||||
}
|
||||
|
||||
resolve(null);
|
||||
} else {
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
|
||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
||||
|
||||
Lbryio.authenticate = (domain, language) => {
|
||||
if (!Lbryio.enabled) {
|
||||
const params = {
|
||||
id: 1,
|
||||
primary_email: 'disabled@lbry.io',
|
||||
has_verified_email: true,
|
||||
is_identity_verified: true,
|
||||
is_reward_approved: false,
|
||||
language: language || 'en',
|
||||
};
|
||||
|
||||
return new Promise(resolve => {
|
||||
resolve(params);
|
||||
});
|
||||
}
|
||||
|
||||
if (Lbryio.authenticationPromise === null) {
|
||||
Lbryio.authenticationPromise = new Promise((resolve, reject) => {
|
||||
Lbryio.getAuthToken()
|
||||
.then(token => {
|
||||
if (!token || token.length > 60) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// check that token works
|
||||
return Lbryio.getCurrentUser()
|
||||
.then(user => user)
|
||||
.catch(error => {
|
||||
if (error === INTERNAL_APIS_DOWN) {
|
||||
throw new Error('Internal APIS down');
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
})
|
||||
.then(user => {
|
||||
if (user) {
|
||||
return user;
|
||||
}
|
||||
|
||||
return Lbry.status()
|
||||
.then(
|
||||
status =>
|
||||
new Promise((res, rej) => {
|
||||
const appId =
|
||||
domain && domain !== 'lbry.tv'
|
||||
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
|
||||
: status.installation_id;
|
||||
Lbryio.call(
|
||||
'user',
|
||||
'new',
|
||||
{
|
||||
auth_token: '',
|
||||
language: language || 'en',
|
||||
app_id: appId,
|
||||
},
|
||||
'post'
|
||||
)
|
||||
.then(response => {
|
||||
if (!response.auth_token) {
|
||||
throw new Error('auth_token was not set in the response');
|
||||
}
|
||||
|
||||
const { store } = window;
|
||||
if (Lbryio.overrides.setAuthToken) {
|
||||
Lbryio.overrides.setAuthToken(response.auth_token);
|
||||
}
|
||||
|
||||
if (store) {
|
||||
store.dispatch({
|
||||
type: ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS,
|
||||
data: { authToken: response.auth_token },
|
||||
});
|
||||
}
|
||||
Lbryio.authToken = response.auth_token;
|
||||
return res(response);
|
||||
})
|
||||
.catch(error => rej(error));
|
||||
})
|
||||
)
|
||||
.then(newUser => {
|
||||
if (!newUser) {
|
||||
return Lbryio.getCurrentUser();
|
||||
}
|
||||
return newUser;
|
||||
});
|
||||
})
|
||||
.then(resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
return Lbryio.authenticationPromise;
|
||||
};
|
||||
|
||||
Lbryio.getStripeToken = () =>
|
||||
Lbryio.CONNECTION_STRING.startsWith('http://localhost:')
|
||||
? 'pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
||||
: 'pk_live_e8M4dRNnCCbmpZzduEUZBgJO';
|
||||
|
||||
Lbryio.getExchangeRates = () => {
|
||||
if (
|
||||
!Lbryio.exchangeLastFetched ||
|
||||
Date.now() - Lbryio.exchangeLastFetched > EXCHANGE_RATE_TIMEOUT
|
||||
) {
|
||||
Lbryio.exchangePromise = new Promise((resolve, reject) => {
|
||||
Lbryio.call('lbc', 'exchange_rate', {}, 'get', true)
|
||||
.then(({ lbc_usd: LBC_USD, lbc_btc: LBC_BTC, btc_usd: BTC_USD }) => {
|
||||
const rates = { LBC_USD, LBC_BTC, BTC_USD };
|
||||
resolve(rates);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
Lbryio.exchangeLastFetched = Date.now();
|
||||
}
|
||||
return Lbryio.exchangePromise;
|
||||
};
|
||||
|
||||
// Allow overriding lbryio methods
|
||||
// The desktop app will need to use it for getAuthToken because we use electron's ipcRenderer
|
||||
Lbryio.overrides = {};
|
||||
Lbryio.setOverride = (methodName, newMethod) => {
|
||||
Lbryio.overrides[methodName] = newMethod;
|
||||
};
|
||||
|
||||
export default Lbryio;
|
||||
@@ -1,38 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
|
||||
export function doGenerateAuthToken(installationId) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.GENERATE_AUTH_TOKEN_STARTED,
|
||||
});
|
||||
|
||||
Lbryio.call(
|
||||
'user',
|
||||
'new',
|
||||
{
|
||||
auth_token: '',
|
||||
language: 'en',
|
||||
app_id: installationId,
|
||||
},
|
||||
'post'
|
||||
)
|
||||
.then(response => {
|
||||
if (!response.auth_token) {
|
||||
dispatch({
|
||||
type: ACTIONS.GENERATE_AUTH_TOKEN_FAILURE,
|
||||
});
|
||||
} else {
|
||||
dispatch({
|
||||
type: ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS,
|
||||
data: { authToken: response.auth_token },
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
dispatch({
|
||||
type: ACTIONS.GENERATE_AUTH_TOKEN_FAILURE,
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const CHECK_BLACK_LISTED_CONTENT_INTERVAL = 60 * 60 * 1000;
|
||||
|
||||
export function doFetchBlackListedOutpoints() {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED,
|
||||
});
|
||||
|
||||
const success = ({ outpoints }) => {
|
||||
const splitOutpoints = [];
|
||||
if (outpoints) {
|
||||
outpoints.forEach((outpoint, index) => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
|
||||
splitOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED,
|
||||
data: {
|
||||
outpoints: splitOutpoints,
|
||||
success: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const failure = ({ message: error }) => {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED,
|
||||
data: {
|
||||
error,
|
||||
success: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Lbryio.call('file', 'list_blocked', {
|
||||
auth_token: '',
|
||||
}).then(success, failure);
|
||||
};
|
||||
}
|
||||
|
||||
export function doBlackListedOutpointsSubscribe() {
|
||||
return dispatch => {
|
||||
dispatch(doFetchBlackListedOutpoints());
|
||||
setInterval(() => dispatch(doFetchBlackListedOutpoints()), CHECK_BLACK_LISTED_CONTENT_INTERVAL);
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { selectClaimForUri } from 'redux/selectors/claims';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function doFetchCostInfoForUri(uri) {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const claim = selectClaimForUri(state, uri);
|
||||
|
||||
if (!claim) return;
|
||||
|
||||
function resolve(costInfo) {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_COST_INFO_COMPLETED,
|
||||
data: {
|
||||
uri,
|
||||
costInfo,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const fee = claim.value ? claim.value.fee : undefined;
|
||||
|
||||
if (fee === undefined) {
|
||||
resolve({ cost: 0, includesData: true });
|
||||
} else if (fee.currency === 'LBC') {
|
||||
resolve({ cost: fee.amount, includesData: true });
|
||||
} else {
|
||||
Lbryio.getExchangeRates().then(({ LBC_USD }) => {
|
||||
resolve({ cost: fee.amount / LBC_USD, includesData: true });
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const CHECK_FILTERED_CONTENT_INTERVAL = 60 * 60 * 1000;
|
||||
|
||||
export function doFetchFilteredOutpoints() {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_FILTERED_CONTENT_STARTED,
|
||||
});
|
||||
|
||||
const success = ({ outpoints }) => {
|
||||
let formattedOutpoints = [];
|
||||
if (outpoints) {
|
||||
formattedOutpoints = outpoints.map(outpoint => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
return { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,
|
||||
data: {
|
||||
outpoints: formattedOutpoints,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const failure = ({ error }) => {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_FILTERED_CONTENT_FAILED,
|
||||
data: {
|
||||
error,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Lbryio.call('file', 'list_filtered', { auth_token: '' }).then(success, failure);
|
||||
};
|
||||
}
|
||||
|
||||
export function doFilteredOutpointsSubscribe() {
|
||||
return dispatch => {
|
||||
dispatch(doFetchFilteredOutpoints());
|
||||
setInterval(() => dispatch(doFetchFilteredOutpoints()), CHECK_FILTERED_CONTENT_INTERVAL);
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// @flow
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
export const doFetchViewCount = (claimIdCsv: string) => (dispatch: Dispatch) => {
|
||||
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_STARTED });
|
||||
|
||||
return Lbryio.call('file', 'view_count', { claim_id: claimIdCsv })
|
||||
.then((result: Array<number>) => {
|
||||
const viewCounts = result;
|
||||
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_COMPLETED, data: { claimIdCsv, viewCounts } });
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_FAILED, data: error });
|
||||
});
|
||||
};
|
||||
|
||||
export const doFetchSubCount = (claimId: string) => (dispatch: Dispatch) => {
|
||||
dispatch({ type: ACTIONS.FETCH_SUB_COUNT_STARTED });
|
||||
|
||||
return Lbryio.call('subscription', 'sub_count', { claim_id: claimId })
|
||||
.then((result: Array<number>) => {
|
||||
const subCount = result[0];
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_SUB_COUNT_COMPLETED,
|
||||
data: { claimId, subCount },
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch({ type: ACTIONS.FETCH_SUB_COUNT_FAILED, data: error });
|
||||
});
|
||||
};
|
||||
@@ -1,289 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import Lbry from 'lbry';
|
||||
import { doWalletEncrypt, doWalletDecrypt } from 'redux/actions/wallet';
|
||||
|
||||
const NO_WALLET_ERROR = 'no wallet found for this user';
|
||||
|
||||
export function doSetDefaultAccount(success, failure) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.SET_DEFAULT_ACCOUNT,
|
||||
});
|
||||
|
||||
Lbry.account_list()
|
||||
.then(accountList => {
|
||||
const { lbc_mainnet: accounts } = accountList;
|
||||
let defaultId;
|
||||
for (let i = 0; i < accounts.length; ++i) {
|
||||
if (accounts[i].satoshis > 0) {
|
||||
defaultId = accounts[i].id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// In a case where there's no balance on either account
|
||||
// assume the second (which is created after sync) as default
|
||||
if (!defaultId && accounts.length > 1) {
|
||||
defaultId = accounts[1].id;
|
||||
}
|
||||
|
||||
// Set the default account
|
||||
if (defaultId) {
|
||||
Lbry.account_set({ account_id: defaultId, default: true })
|
||||
.then(() => {
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
if (failure) {
|
||||
failure(err);
|
||||
}
|
||||
});
|
||||
} else if (failure) {
|
||||
// no default account to set
|
||||
failure('Could not set a default account'); // fail
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
if (failure) {
|
||||
failure(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doSetSync(oldHash, newHash, data) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.SET_SYNC_STARTED,
|
||||
});
|
||||
|
||||
return Lbryio.call('sync', 'set', { old_hash: oldHash, new_hash: newHash, data }, 'post')
|
||||
.then(response => {
|
||||
if (!response.hash) {
|
||||
throw Error('No hash returned for sync/set.');
|
||||
}
|
||||
|
||||
return dispatch({
|
||||
type: ACTIONS.SET_SYNC_COMPLETED,
|
||||
data: { syncHash: response.hash },
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch({
|
||||
type: ACTIONS.SET_SYNC_FAILED,
|
||||
data: { error },
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doGetSync(passedPassword, callback) {
|
||||
const password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
|
||||
|
||||
function handleCallback(error, hasNewData) {
|
||||
if (callback) {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new Error('Second argument passed to "doGetSync" must be a function');
|
||||
}
|
||||
|
||||
callback(error, hasNewData);
|
||||
}
|
||||
}
|
||||
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_STARTED,
|
||||
});
|
||||
|
||||
const data = {};
|
||||
|
||||
Lbry.wallet_status()
|
||||
.then(status => {
|
||||
if (status.is_locked) {
|
||||
return Lbry.wallet_unlock({ password });
|
||||
}
|
||||
|
||||
// Wallet is already unlocked
|
||||
return true;
|
||||
})
|
||||
.then(isUnlocked => {
|
||||
if (isUnlocked) {
|
||||
return Lbry.sync_hash();
|
||||
}
|
||||
data.unlockFailed = true;
|
||||
throw new Error();
|
||||
})
|
||||
.then(hash => Lbryio.call('sync', 'get', { hash }, 'post'))
|
||||
.then(response => {
|
||||
const syncHash = response.hash;
|
||||
data.syncHash = syncHash;
|
||||
data.syncData = response.data;
|
||||
data.changed = response.changed;
|
||||
data.hasSyncedWallet = true;
|
||||
|
||||
if (response.changed) {
|
||||
return Lbry.sync_apply({ password, data: response.data, blocking: true });
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response) {
|
||||
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
|
||||
handleCallback(null, data.changed);
|
||||
return;
|
||||
}
|
||||
|
||||
const { hash: walletHash, data: walletData } = response;
|
||||
|
||||
if (walletHash !== data.syncHash) {
|
||||
// different local hash, need to synchronise
|
||||
dispatch(doSetSync(data.syncHash, walletHash, walletData));
|
||||
}
|
||||
|
||||
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
|
||||
handleCallback(null, data.changed);
|
||||
})
|
||||
.catch(syncAttemptError => {
|
||||
if (data.unlockFailed) {
|
||||
dispatch({ type: ACTIONS.GET_SYNC_FAILED, data: { error: syncAttemptError } });
|
||||
|
||||
if (password !== '') {
|
||||
dispatch({ type: ACTIONS.SYNC_APPLY_BAD_PASSWORD });
|
||||
}
|
||||
|
||||
handleCallback(syncAttemptError);
|
||||
} else if (data.hasSyncedWallet) {
|
||||
const error =
|
||||
(syncAttemptError && syncAttemptError.message) || 'Error getting synced wallet';
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_FAILED,
|
||||
data: {
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
// Temp solution until we have a bad password error code
|
||||
// Don't fail on blank passwords so we don't show a "password error" message
|
||||
// before users have ever entered a password
|
||||
if (password !== '') {
|
||||
dispatch({ type: ACTIONS.SYNC_APPLY_BAD_PASSWORD });
|
||||
}
|
||||
|
||||
handleCallback(error);
|
||||
} else {
|
||||
// user doesn't have a synced wallet
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_COMPLETED,
|
||||
data: { hasSyncedWallet: false, syncHash: null },
|
||||
});
|
||||
|
||||
// call sync_apply to get data to sync
|
||||
// first time sync. use any string for old hash
|
||||
if (syncAttemptError.message === NO_WALLET_ERROR) {
|
||||
Lbry.sync_apply({ password })
|
||||
.then(({ hash: walletHash, data: syncApplyData }) => {
|
||||
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||
handleCallback();
|
||||
})
|
||||
.catch(syncApplyError => {
|
||||
handleCallback(syncApplyError);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doSyncApply(syncHash, syncData, password) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.SYNC_APPLY_STARTED,
|
||||
});
|
||||
|
||||
Lbry.sync_apply({ password, data: syncData })
|
||||
.then(({ hash: walletHash, data: walletData }) => {
|
||||
dispatch({
|
||||
type: ACTIONS.SYNC_APPLY_COMPLETED,
|
||||
});
|
||||
|
||||
if (walletHash !== syncHash) {
|
||||
// different local hash, need to synchronise
|
||||
dispatch(doSetSync(syncHash, walletHash, walletData));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
dispatch({
|
||||
type: ACTIONS.SYNC_APPLY_FAILED,
|
||||
data: {
|
||||
error:
|
||||
'Invalid password specified. Please enter the password for your previously synchronised wallet.',
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doCheckSync() {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_STARTED,
|
||||
});
|
||||
|
||||
Lbry.sync_hash().then(hash => {
|
||||
Lbryio.call('sync', 'get', { hash }, 'post')
|
||||
.then(response => {
|
||||
const data = {
|
||||
hasSyncedWallet: true,
|
||||
syncHash: response.hash,
|
||||
syncData: response.data,
|
||||
hashChanged: response.changed,
|
||||
};
|
||||
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
|
||||
})
|
||||
.catch(() => {
|
||||
// user doesn't have a synced wallet
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_COMPLETED,
|
||||
data: { hasSyncedWallet: false, syncHash: null },
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doResetSync() {
|
||||
return dispatch =>
|
||||
new Promise(resolve => {
|
||||
dispatch({ type: ACTIONS.SYNC_RESET });
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
export function doSyncEncryptAndDecrypt(oldPassword, newPassword, encrypt) {
|
||||
return dispatch => {
|
||||
const data = {};
|
||||
return Lbry.sync_hash()
|
||||
.then(hash => Lbryio.call('sync', 'get', { hash }, 'post'))
|
||||
.then(syncGetResponse => {
|
||||
data.oldHash = syncGetResponse.hash;
|
||||
|
||||
return Lbry.sync_apply({ password: oldPassword, data: syncGetResponse.data });
|
||||
})
|
||||
.then(() => {
|
||||
if (encrypt) {
|
||||
dispatch(doWalletEncrypt(newPassword));
|
||||
} else {
|
||||
dispatch(doWalletDecrypt());
|
||||
}
|
||||
})
|
||||
.then(() => Lbry.sync_apply({ password: newPassword }))
|
||||
.then(syncApplyResponse => {
|
||||
if (syncApplyResponse.hash !== data.oldHash) {
|
||||
return dispatch(doSetSync(data.oldHash, syncApplyResponse.hash, syncApplyResponse.data));
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const reducers = {};
|
||||
const defaultState = {
|
||||
authenticating: false,
|
||||
};
|
||||
|
||||
reducers[ACTIONS.GENERATE_AUTH_TOKEN_FAILURE] = state =>
|
||||
Object.assign({}, state, {
|
||||
authToken: null,
|
||||
authenticating: false,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.GENERATE_AUTH_TOKEN_STARTED] = state =>
|
||||
Object.assign({}, state, {
|
||||
authenticating: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
authToken: action.data.authToken,
|
||||
authenticating: false,
|
||||
});
|
||||
|
||||
export function authReducer(state = defaultState, action) {
|
||||
const handler = reducers[action.type];
|
||||
if (handler) return handler(state, action);
|
||||
return state;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import { handleActions } from 'util/redux-utils';
|
||||
|
||||
const defaultState = {
|
||||
fetchingBlackListedOutpoints: false,
|
||||
fetchingBlackListedOutpointsSucceed: undefined,
|
||||
blackListedOutpoints: undefined,
|
||||
};
|
||||
|
||||
export const blacklistReducer = handleActions(
|
||||
{
|
||||
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED]: state => ({
|
||||
...state,
|
||||
fetchingBlackListedOutpoints: true,
|
||||
}),
|
||||
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED]: (state, action) => {
|
||||
const { outpoints, success } = action.data;
|
||||
return {
|
||||
...state,
|
||||
fetchingBlackListedOutpoints: false,
|
||||
fetchingBlackListedOutpointsSucceed: success,
|
||||
blackListedOutpoints: outpoints,
|
||||
};
|
||||
},
|
||||
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED]: (state, action) => {
|
||||
const { error, success } = action.data;
|
||||
|
||||
return {
|
||||
...state,
|
||||
fetchingBlackListedOutpoints: false,
|
||||
fetchingBlackListedOutpointsSucceed: success,
|
||||
fetchingBlackListedOutpointsError: error,
|
||||
};
|
||||
},
|
||||
},
|
||||
defaultState
|
||||
);
|
||||
@@ -1,38 +0,0 @@
|
||||
import { handleActions } from 'util/redux-utils';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const defaultState = {
|
||||
fetching: {},
|
||||
byUri: {},
|
||||
};
|
||||
|
||||
export const costInfoReducer = handleActions(
|
||||
{
|
||||
[ACTIONS.FETCH_COST_INFO_STARTED]: (state, action) => {
|
||||
const { uri } = action.data;
|
||||
const newFetching = Object.assign({}, state.fetching);
|
||||
newFetching[uri] = true;
|
||||
|
||||
return {
|
||||
...state,
|
||||
fetching: newFetching,
|
||||
};
|
||||
},
|
||||
|
||||
[ACTIONS.FETCH_COST_INFO_COMPLETED]: (state, action) => {
|
||||
const { uri, costInfo } = action.data;
|
||||
const newByUri = Object.assign({}, state.byUri);
|
||||
const newFetching = Object.assign({}, state.fetching);
|
||||
|
||||
newByUri[uri] = costInfo;
|
||||
delete newFetching[uri];
|
||||
|
||||
return {
|
||||
...state,
|
||||
byUri: newByUri,
|
||||
fetching: newFetching,
|
||||
};
|
||||
},
|
||||
},
|
||||
defaultState
|
||||
);
|
||||
@@ -1,34 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import { handleActions } from 'util/redux-utils';
|
||||
|
||||
const defaultState = {
|
||||
loading: false,
|
||||
filteredOutpoints: undefined,
|
||||
};
|
||||
|
||||
export const filteredReducer = handleActions(
|
||||
{
|
||||
[ACTIONS.FETCH_FILTERED_CONTENT_STARTED]: state => ({
|
||||
...state,
|
||||
loading: true,
|
||||
}),
|
||||
[ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
|
||||
const { outpoints } = action.data;
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
filteredOutpoints: outpoints,
|
||||
};
|
||||
},
|
||||
[ACTIONS.FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
|
||||
const { error } = action.data;
|
||||
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
fetchingFilteredOutpointsError: error,
|
||||
};
|
||||
},
|
||||
},
|
||||
defaultState
|
||||
);
|
||||
@@ -1,55 +0,0 @@
|
||||
import { handleActions } from 'util/redux-utils';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const defaultState = {
|
||||
fetchingViewCount: false,
|
||||
viewCountError: undefined,
|
||||
viewCountById: {},
|
||||
fetchingSubCount: false,
|
||||
subCountError: undefined,
|
||||
subCountById: {},
|
||||
};
|
||||
|
||||
export const statsReducer = handleActions(
|
||||
{
|
||||
[ACTIONS.FETCH_VIEW_COUNT_STARTED]: state => ({ ...state, fetchingViewCount: true }),
|
||||
[ACTIONS.FETCH_VIEW_COUNT_FAILED]: (state, action) => ({
|
||||
...state,
|
||||
viewCountError: action.data,
|
||||
}),
|
||||
[ACTIONS.FETCH_VIEW_COUNT_COMPLETED]: (state, action) => {
|
||||
const { claimIdCsv, viewCounts } = action.data;
|
||||
|
||||
const viewCountById = Object.assign({}, state.viewCountById);
|
||||
const claimIds = claimIdCsv.split(',');
|
||||
|
||||
if (claimIds.length === viewCounts.length) {
|
||||
claimIds.forEach((claimId, index) => {
|
||||
viewCountById[claimId] = viewCounts[index];
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
...state,
|
||||
fetchingViewCount: false,
|
||||
viewCountById,
|
||||
};
|
||||
},
|
||||
[ACTIONS.FETCH_SUB_COUNT_STARTED]: state => ({ ...state, fetchingSubCount: true }),
|
||||
[ACTIONS.FETCH_SUB_COUNT_FAILED]: (state, action) => ({
|
||||
...state,
|
||||
subCountError: action.data,
|
||||
}),
|
||||
[ACTIONS.FETCH_SUB_COUNT_COMPLETED]: (state, action) => {
|
||||
const { claimId, subCount } = action.data;
|
||||
|
||||
const subCountById = { ...state.subCountById, [claimId]: subCount };
|
||||
return {
|
||||
...state,
|
||||
fetchingSubCount: false,
|
||||
subCountById,
|
||||
};
|
||||
},
|
||||
},
|
||||
defaultState
|
||||
);
|
||||
@@ -1,89 +0,0 @@
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
const reducers = {};
|
||||
const defaultState = {
|
||||
hasSyncedWallet: false,
|
||||
syncHash: null,
|
||||
syncData: null,
|
||||
setSyncErrorMessage: null,
|
||||
getSyncErrorMessage: null,
|
||||
syncApplyErrorMessage: '',
|
||||
syncApplyIsPending: false,
|
||||
syncApplyPasswordError: false,
|
||||
getSyncIsPending: false,
|
||||
setSyncIsPending: false,
|
||||
hashChanged: false,
|
||||
};
|
||||
|
||||
reducers[ACTIONS.GET_SYNC_STARTED] = state =>
|
||||
Object.assign({}, state, {
|
||||
getSyncIsPending: true,
|
||||
getSyncErrorMessage: null,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.GET_SYNC_COMPLETED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
syncHash: action.data.syncHash,
|
||||
syncData: action.data.syncData,
|
||||
hasSyncedWallet: action.data.hasSyncedWallet,
|
||||
getSyncIsPending: false,
|
||||
hashChanged: action.data.hashChanged,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.GET_SYNC_FAILED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
getSyncIsPending: false,
|
||||
getSyncErrorMessage: action.data.error,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SET_SYNC_STARTED] = state =>
|
||||
Object.assign({}, state, {
|
||||
setSyncIsPending: true,
|
||||
setSyncErrorMessage: null,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SET_SYNC_FAILED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
setSyncIsPending: false,
|
||||
setSyncErrorMessage: action.data.error,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SET_SYNC_COMPLETED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
setSyncIsPending: false,
|
||||
setSyncErrorMessage: null,
|
||||
hasSyncedWallet: true, // sync was successful, so the user has a synced wallet at this point
|
||||
syncHash: action.data.syncHash,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SYNC_APPLY_STARTED] = state =>
|
||||
Object.assign({}, state, {
|
||||
syncApplyPasswordError: false,
|
||||
syncApplyIsPending: true,
|
||||
syncApplyErrorMessage: '',
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SYNC_APPLY_COMPLETED] = state =>
|
||||
Object.assign({}, state, {
|
||||
syncApplyIsPending: false,
|
||||
syncApplyErrorMessage: '',
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SYNC_APPLY_FAILED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
syncApplyIsPending: false,
|
||||
syncApplyErrorMessage: action.data.error,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SYNC_APPLY_BAD_PASSWORD] = state =>
|
||||
Object.assign({}, state, {
|
||||
syncApplyPasswordError: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.SYNC_RESET] = () => defaultState;
|
||||
|
||||
export function syncReducer(state = defaultState, action) {
|
||||
const handler = reducers[action.type];
|
||||
if (handler) return handler(state, action);
|
||||
return state;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const selectState = state => state.auth || {};
|
||||
|
||||
export const selectAuthToken = createSelector(selectState, state => state.authToken);
|
||||
|
||||
export const selectIsAuthenticating = createSelector(selectState, state => state.authenticating);
|
||||
@@ -1,68 +0,0 @@
|
||||
// @flow
|
||||
|
||||
// TODO: This should be in 'redux/selectors/claim.js'. Temporarily putting it
|
||||
// here to get past importing issues with 'lbryinc', which the real fix might
|
||||
// involve moving it from 'extras' to 'ui' (big change).
|
||||
|
||||
import { createCachedSelector } from 're-reselect';
|
||||
import { selectClaimForUri } from 'redux/selectors/claims';
|
||||
import { selectMutedChannels } from 'redux/selectors/blocked';
|
||||
import { selectModerationBlockList } from 'redux/selectors/comments';
|
||||
import { selectBlacklistedOutpointMap, selectFilteredOutpointMap } from 'lbryinc';
|
||||
import { getChannelFromClaim } from 'util/claim';
|
||||
import { isURIEqual } from 'util/lbryURI';
|
||||
|
||||
export const selectBanStateForUri = createCachedSelector(
|
||||
selectClaimForUri,
|
||||
selectBlacklistedOutpointMap,
|
||||
selectFilteredOutpointMap,
|
||||
selectMutedChannels,
|
||||
selectModerationBlockList,
|
||||
(claim, blackListedOutpointMap, filteredOutpointMap, mutedChannelUris, personalBlocklist) => {
|
||||
const banState = {};
|
||||
|
||||
if (!claim) {
|
||||
return banState;
|
||||
}
|
||||
|
||||
const channelClaim = getChannelFromClaim(claim);
|
||||
|
||||
// This will be replaced once blocking is done at the wallet server level.
|
||||
if (blackListedOutpointMap) {
|
||||
if (
|
||||
(channelClaim && blackListedOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) ||
|
||||
blackListedOutpointMap[`${claim.txid}:${claim.nout}`]
|
||||
) {
|
||||
banState['blacklisted'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// We're checking to see if the stream outpoint or signing channel outpoint
|
||||
// is in the filter list.
|
||||
if (filteredOutpointMap) {
|
||||
if (
|
||||
(channelClaim && filteredOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) ||
|
||||
filteredOutpointMap[`${claim.txid}:${claim.nout}`]
|
||||
) {
|
||||
banState['filtered'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// block stream claims
|
||||
// block channel claims if we can't control for them in claim search
|
||||
if (mutedChannelUris.length && channelClaim) {
|
||||
if (mutedChannelUris.some((blockedUri) => isURIEqual(blockedUri, channelClaim.permanent_url))) {
|
||||
banState['muted'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Commentron blocklist
|
||||
if (personalBlocklist.length && channelClaim) {
|
||||
if (personalBlocklist.some((blockedUri) => isURIEqual(blockedUri, channelClaim.permanent_url))) {
|
||||
banState['blocked'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return banState;
|
||||
}
|
||||
)((state, uri) => String(uri));
|
||||
@@ -1,20 +0,0 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
export const selectState = state => state.blacklist || {};
|
||||
|
||||
export const selectBlackListedOutpoints = createSelector(
|
||||
selectState,
|
||||
state => state.blackListedOutpoints
|
||||
);
|
||||
|
||||
export const selectBlacklistedOutpointMap = createSelector(
|
||||
selectBlackListedOutpoints,
|
||||
outpoints =>
|
||||
outpoints
|
||||
? outpoints.reduce((acc, val) => {
|
||||
const outpoint = `${val.txid}:${val.nout}`;
|
||||
acc[outpoint] = 1;
|
||||
return acc;
|
||||
}, {})
|
||||
: {}
|
||||
);
|
||||
@@ -1,16 +0,0 @@
|
||||
// @flow
|
||||
type State = { costInfo: any };
|
||||
|
||||
export const selectState = (state: State) => state.costInfo || {};
|
||||
export const selectAllCostInfoByUri = (state: State) => selectState(state).byUri;
|
||||
export const selectFetchingCostInfo = (state: State) => selectState(state).fetching;
|
||||
|
||||
export const selectCostInfoForUri = (state: State, uri: string) => {
|
||||
const costInfos = selectAllCostInfoByUri(state);
|
||||
return costInfos && costInfos[uri];
|
||||
};
|
||||
|
||||
export const selectFetchingCostInfoForUri = (state: State, uri: string) => {
|
||||
const fetchingByUri = selectFetchingCostInfo(state);
|
||||
return fetchingByUri && fetchingByUri[uri];
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
export const selectState = state => state.filtered || {};
|
||||
|
||||
export const selectFilteredOutpoints = createSelector(
|
||||
selectState,
|
||||
state => state.filteredOutpoints
|
||||
);
|
||||
|
||||
export const selectFilteredOutpointMap = createSelector(
|
||||
selectFilteredOutpoints,
|
||||
outpoints =>
|
||||
outpoints
|
||||
? outpoints.reduce((acc, val) => {
|
||||
const outpoint = `${val.txid}:${val.nout}`;
|
||||
acc[outpoint] = 1;
|
||||
return acc;
|
||||
}, {})
|
||||
: {}
|
||||
);
|
||||
@@ -1,20 +0,0 @@
|
||||
// @flow
|
||||
import { createSelector } from 'reselect';
|
||||
import { selectClaimIdForUri } from 'redux/selectors/claims';
|
||||
|
||||
type State = { claims: any };
|
||||
const selectState = state => state.stats || {};
|
||||
export const selectViewCount = createSelector(selectState, state => state.viewCountById);
|
||||
export const selectSubCount = createSelector(selectState, state => state.subCountById);
|
||||
|
||||
export const selectViewCountForUri = (state: State, uri: string) => {
|
||||
const claimId = selectClaimIdForUri(state, uri);
|
||||
const viewCountById = selectViewCount(state);
|
||||
return claimId ? viewCountById[claimId] || 0 : 0;
|
||||
};
|
||||
|
||||
export const selectSubCountForUri = (state: State, uri: string) => {
|
||||
const claimId = selectClaimIdForUri(state, uri);
|
||||
const subCountById = selectSubCount(state);
|
||||
return claimId ? subCountById[claimId] || 0 : 0;
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const selectState = state => state.sync || {};
|
||||
|
||||
export const selectHasSyncedWallet = createSelector(selectState, state => state.hasSyncedWallet);
|
||||
|
||||
export const selectSyncHash = createSelector(selectState, state => state.syncHash);
|
||||
|
||||
export const selectSyncData = createSelector(selectState, state => state.syncData);
|
||||
|
||||
export const selectSetSyncErrorMessage = createSelector(
|
||||
selectState,
|
||||
state => state.setSyncErrorMessage
|
||||
);
|
||||
|
||||
export const selectGetSyncErrorMessage = createSelector(
|
||||
selectState,
|
||||
state => state.getSyncErrorMessage
|
||||
);
|
||||
|
||||
export const selectGetSyncIsPending = createSelector(selectState, state => state.getSyncIsPending);
|
||||
|
||||
export const selectSetSyncIsPending = createSelector(selectState, state => state.setSyncIsPending);
|
||||
|
||||
export const selectHashChanged = createSelector(selectState, state => state.hashChanged);
|
||||
|
||||
export const selectSyncApplyIsPending = createSelector(
|
||||
selectState,
|
||||
state => state.syncApplyIsPending
|
||||
);
|
||||
|
||||
export const selectSyncApplyErrorMessage = createSelector(
|
||||
selectState,
|
||||
state => state.syncApplyErrorMessage
|
||||
);
|
||||
|
||||
export const selectSyncApplyPasswordError = createSelector(
|
||||
selectState,
|
||||
state => state.syncApplyPasswordError
|
||||
);
|
||||
@@ -1,17 +0,0 @@
|
||||
// util for creating reducers
|
||||
// based off of redux-actions
|
||||
// https://redux-actions.js.org/docs/api/handleAction.html#handleactions
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const handleActions = (actionMap, defaultState) => (state = defaultState, action) => {
|
||||
const handler = actionMap[action.type];
|
||||
|
||||
if (handler) {
|
||||
const newState = handler(state, action);
|
||||
return Object.assign({}, state, newState);
|
||||
}
|
||||
|
||||
// just return the original state if no handler
|
||||
// returning a copy here breaks redux-persist
|
||||
return state;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
export function swapKeyAndValue(dict) {
|
||||
const ret = {};
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const key in dict) {
|
||||
if (dict.hasOwnProperty(key)) {
|
||||
ret[dict[key]] = key;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
const apiBaseUrl = 'https://www.transifex.com/api/2/project';
|
||||
const resource = 'app-strings';
|
||||
|
||||
export function doTransifexUpload(contents, project, token, success, fail) {
|
||||
const url = `${apiBaseUrl}/${project}/resources/`;
|
||||
const updateUrl = `${apiBaseUrl}/${project}/resource/${resource}/content/`;
|
||||
const headers = {
|
||||
Authorization: `Basic ${Buffer.from(`api:${token}`).toString('base64')}`,
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
const req = {
|
||||
accept_translations: true,
|
||||
i18n_type: 'KEYVALUEJSON',
|
||||
name: resource,
|
||||
slug: resource,
|
||||
content: contents,
|
||||
};
|
||||
|
||||
function handleResponse(text) {
|
||||
let json;
|
||||
try {
|
||||
// transifex api returns Python dicts for some reason.
|
||||
// Any way to get the api to return valid JSON?
|
||||
json = JSON.parse(text);
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
if (success) {
|
||||
success(json || text);
|
||||
}
|
||||
}
|
||||
|
||||
function handleError(err) {
|
||||
if (fail) {
|
||||
fail(err.message ? err.message : 'Could not upload strings resource to Transifex');
|
||||
}
|
||||
}
|
||||
|
||||
// check if the resource exists
|
||||
fetch(updateUrl, { headers })
|
||||
.then(response => response.json())
|
||||
.then(() => {
|
||||
// perform an update
|
||||
fetch(updateUrl, {
|
||||
method: 'PUT',
|
||||
headers,
|
||||
body: JSON.stringify({ content: contents }),
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status !== 200 && response.status !== 201) {
|
||||
throw new Error('failed to update transifex');
|
||||
}
|
||||
|
||||
return response.text();
|
||||
})
|
||||
.then(handleResponse)
|
||||
.catch(handleError);
|
||||
})
|
||||
.catch(() => {
|
||||
// resource doesn't exist, create a fresh resource
|
||||
fetch(url, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify(req),
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status !== 200 && response.status !== 201) {
|
||||
throw new Error('failed to upload to transifex');
|
||||
}
|
||||
|
||||
return response.text();
|
||||
})
|
||||
.then(handleResponse)
|
||||
.catch(handleError);
|
||||
});
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import Recsys from './recsys';
|
||||
|
||||
export default Recsys;
|
||||
@@ -1,257 +0,0 @@
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import { makeSelectRecommendedRecsysIdForClaimId } from 'redux/selectors/search';
|
||||
import { v4 as Uuidv4 } from 'uuid';
|
||||
import { parseURI } from 'util/lbryURI';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { selectPlayingUri, selectPrimaryUri } from 'redux/selectors/content';
|
||||
import { makeSelectClientSetting, selectDaemonSettings } from 'redux/selectors/settings';
|
||||
import { history } from 'ui/store';
|
||||
|
||||
const recsysEndpoint = 'https://clickstream.odysee.com/log/video/view';
|
||||
const recsysId = 'lighthouse-v0';
|
||||
|
||||
const getClaimIdsFromUris = (uris) => {
|
||||
return uris
|
||||
? uris.map((uri) => {
|
||||
try {
|
||||
const { claimId } = parseURI(uri);
|
||||
return claimId;
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
})
|
||||
: [];
|
||||
};
|
||||
|
||||
const recsys = {
|
||||
entries: {},
|
||||
debug: false,
|
||||
/**
|
||||
* Provides for creating, updating, and sending Clickstream data object Entries.
|
||||
* Entries are Created either when recommendedContent loads, or when recommendedContent is clicked.
|
||||
* If recommended content is clicked, An Entry with parentUuid is created.
|
||||
* On page load, find an empty entry with your claimId, or create a new entry and record to it.
|
||||
* The entry will be populated with the following:
|
||||
* - parentUuid // optional
|
||||
* - Uuid
|
||||
* - claimId
|
||||
* - recommendedClaims [] // optionally empty
|
||||
* - playerEvents [] // optionally empty
|
||||
* - recommendedClaimsIndexClicked [] // optionally empty
|
||||
* - UserId
|
||||
* - pageLoadedAt
|
||||
* - isEmbed
|
||||
* - pageExitedAt
|
||||
* - recsysId // optional
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function: onClickedRecommended()
|
||||
* Called when RecommendedContent was clicked.
|
||||
* Adds index of clicked recommendation to parent entry
|
||||
* Adds new Entry with parentUuid for destination page
|
||||
* @param parentClaimId: string,
|
||||
* @param newClaimId: string,
|
||||
*/
|
||||
onClickedRecommended: function (parentClaimId, newClaimId) {
|
||||
const parentEntry = recsys.entries[parentClaimId] ? recsys.entries[parentClaimId] : null;
|
||||
const parentUuid = parentEntry['uuid'];
|
||||
const parentRecommendedClaims = parentEntry['recClaimIds'] || [];
|
||||
const parentClickedIndexes = parentEntry['recClickedVideoIdx'] || [];
|
||||
const indexClicked = parentRecommendedClaims.indexOf(newClaimId);
|
||||
|
||||
if (parentUuid) {
|
||||
recsys.createRecsysEntry(newClaimId, parentUuid);
|
||||
}
|
||||
parentClickedIndexes.push(indexClicked);
|
||||
recsys.log('onClickedRecommended', { parentClaimId, newClaimId });
|
||||
},
|
||||
|
||||
/**
|
||||
* Page was loaded. Get or Create entry and populate it with default data, plus recommended content, recsysId, etc.
|
||||
* Called from recommendedContent component
|
||||
*/
|
||||
onRecsLoaded: function (claimId, uris) {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
if (!recsys.entries[claimId]) {
|
||||
recsys.createRecsysEntry(claimId);
|
||||
}
|
||||
const claimIds = getClaimIdsFromUris(uris);
|
||||
recsys.entries[claimId]['recsysId'] = makeSelectRecommendedRecsysIdForClaimId(claimId)(state) || recsysId;
|
||||
recsys.entries[claimId]['pageLoadedAt'] = Date.now();
|
||||
recsys.entries[claimId]['recClaimIds'] = claimIds;
|
||||
}
|
||||
recsys.log('onRecsLoaded', claimId);
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates an Entry with optional parentUuid
|
||||
* @param: claimId: string
|
||||
* @param: parentUuid: string (optional)
|
||||
*/
|
||||
createRecsysEntry: function (claimId, parentUuid) {
|
||||
if (window.store && claimId) {
|
||||
const state = window.store.getState();
|
||||
const user = selectUser(state);
|
||||
const userId = user ? user.id : null;
|
||||
if (parentUuid) {
|
||||
// Make a stub entry that will be filled out on page load
|
||||
recsys.entries[claimId] = {
|
||||
uuid: Uuidv4(),
|
||||
parentUuid: parentUuid,
|
||||
uid: userId || null, // selectUser
|
||||
claimId: claimId,
|
||||
recClickedVideoIdx: [],
|
||||
pageLoadedAt: Date.now(),
|
||||
events: [],
|
||||
};
|
||||
} else {
|
||||
recsys.entries[claimId] = {
|
||||
uuid: Uuidv4(),
|
||||
uid: userId, // selectUser
|
||||
claimId: claimId,
|
||||
pageLoadedAt: Date.now(),
|
||||
recsysId: null,
|
||||
recClaimIds: [],
|
||||
recClickedVideoIdx: [],
|
||||
events: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
recsys.log('createRecsysEntry', claimId);
|
||||
},
|
||||
|
||||
/**
|
||||
* Send event for claimId
|
||||
* @param claimId
|
||||
* @param isTentative
|
||||
*/
|
||||
sendRecsysEntry: function (claimId, isTentative) {
|
||||
const shareTelemetry =
|
||||
IS_WEB || (window && window.store && selectDaemonSettings(window.store.getState()).share_usage_data);
|
||||
|
||||
if (recsys.entries[claimId] && shareTelemetry) {
|
||||
const data = JSON.stringify(recsys.entries[claimId]);
|
||||
try {
|
||||
navigator.sendBeacon(recsysEndpoint, data);
|
||||
if (!isTentative) {
|
||||
delete recsys.entries[claimId];
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('no beacon for you', error);
|
||||
}
|
||||
}
|
||||
recsys.log('sendRecsysEntry', claimId);
|
||||
},
|
||||
|
||||
/**
|
||||
* A player event fired. Get the Entry for the claimId, and add the events
|
||||
* @param claimId
|
||||
* @param event
|
||||
*/
|
||||
onRecsysPlayerEvent: function (claimId, event, isEmbedded) {
|
||||
if (!recsys.entries[claimId]) {
|
||||
recsys.createRecsysEntry(claimId);
|
||||
// do something to show it's floating or autoplay
|
||||
}
|
||||
if (isEmbedded) {
|
||||
recsys.entries[claimId]['isEmbed'] = true;
|
||||
}
|
||||
recsys.entries[claimId].events.push(event);
|
||||
recsys.log('onRecsysPlayerEvent', claimId);
|
||||
},
|
||||
log: function (callName, claimId) {
|
||||
if (recsys.debug) {
|
||||
console.log(`Call: ***${callName}***, ClaimId: ${claimId}, Recsys Entries`, Object.assign({}, recsys.entries));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Player closed. Check to see if primaryUri = playingUri
|
||||
* if so, send the Entry.
|
||||
*/
|
||||
onPlayerDispose: function (claimId, isEmbedded) {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
const playingUri = selectPlayingUri(state);
|
||||
const primaryUri = selectPrimaryUri(state);
|
||||
const onFilePage = playingUri === primaryUri;
|
||||
if (!onFilePage || isEmbedded) {
|
||||
if (isEmbedded) {
|
||||
recsys.entries[claimId]['isEmbed'] = true;
|
||||
}
|
||||
recsys.sendRecsysEntry(claimId);
|
||||
}
|
||||
}
|
||||
recsys.log('PlayerDispose', claimId);
|
||||
},
|
||||
|
||||
// /**
|
||||
// * File page unmount or change event
|
||||
// * Check to see if playingUri, floatingEnabled, primaryUri === playingUri
|
||||
// * If not, send the Entry.
|
||||
// * If floating enabled, leaving file page will pop out player, leading to
|
||||
// * more events until player is disposed. Don't send unless floatingPlayer playingUri
|
||||
// */
|
||||
// onLeaveFilePage: function (primaryUri) {
|
||||
// if (window.store) {
|
||||
// const state = window.store.getState();
|
||||
// const claim = makeSelectClaimForUri(primaryUri)(state);
|
||||
// const claimId = claim ? claim.claim_id : null;
|
||||
// const playingUri = selectPlayingUri(state);
|
||||
// const actualPlayingUri = playingUri && playingUri.uri;
|
||||
// // const primaryUri = selectPrimaryUri(state);
|
||||
// const floatingPlayer = makeSelectClientSetting(SETTINGS.FLOATING_PLAYER)(state);
|
||||
// // When leaving page, if floating player is enabled, play will continue.
|
||||
// if (claimId) {
|
||||
// recsys.entries[claimId]['pageExitedAt'] = Date.now();
|
||||
// }
|
||||
// const shouldSend =
|
||||
// (claimId && floatingPlayer && actualPlayingUri && actualPlayingUri !== primaryUri) || !floatingPlayer || !actualPlayingUri;
|
||||
// if (shouldSend) {
|
||||
// recsys.sendRecsysEntry(claimId);
|
||||
// }
|
||||
// recsys.log('LeaveFile', claimId);
|
||||
// }
|
||||
// },
|
||||
|
||||
/**
|
||||
* Navigate event
|
||||
* Send all claimIds that aren't currently playing.
|
||||
*/
|
||||
onNavigate: function () {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
const playingUri = selectPlayingUri(state);
|
||||
const actualPlayingUri = playingUri && playingUri.uri;
|
||||
const claim = makeSelectClaimForUri(actualPlayingUri)(state);
|
||||
const playingClaimId = claim ? claim.claim_id : null;
|
||||
// const primaryUri = selectPrimaryUri(state);
|
||||
const floatingPlayer = makeSelectClientSetting(SETTINGS.FLOATING_PLAYER)(state);
|
||||
// When leaving page, if floating player is enabled, play will continue.
|
||||
Object.keys(recsys.entries).forEach((claimId) => {
|
||||
const shouldSkip = recsys.entries[claimId].parentUuid && !recsys.entries[claimId].recClaimIds;
|
||||
if (!shouldSkip && ((claimId !== playingClaimId && floatingPlayer) || !floatingPlayer)) {
|
||||
recsys.entries[claimId]['pageExitedAt'] = Date.now();
|
||||
recsys.sendRecsysEntry(claimId);
|
||||
}
|
||||
recsys.log('OnNavigate', claimId);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
// @if TARGET='web'
|
||||
document.addEventListener('visibilitychange', function logData() {
|
||||
if (document.visibilityState === 'hidden') {
|
||||
Object.keys(recsys.entries).map((claimId) => recsys.sendRecsysEntry(claimId, true));
|
||||
}
|
||||
});
|
||||
// @endif
|
||||
|
||||
history.listen(() => {
|
||||
recsys.onNavigate();
|
||||
});
|
||||
|
||||
export default recsys;
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
declare type BlocklistState = {
|
||||
blockedChannels: Array<string>
|
||||
};
|
||||
|
||||
declare type BlocklistAction = {
|
||||
type: string,
|
||||
data: {
|
||||
uri: string,
|
||||
},
|
||||
};
|
||||
Vendored
-214
@@ -1,214 +0,0 @@
|
||||
// @flow
|
||||
|
||||
declare type Claim = StreamClaim | ChannelClaim | CollectionClaim;
|
||||
|
||||
declare type ChannelClaim = GenericClaim & {
|
||||
value: ChannelMetadata,
|
||||
};
|
||||
|
||||
declare type CollectionClaim = GenericClaim & {
|
||||
value: CollectionMetadata,
|
||||
};
|
||||
|
||||
declare type StreamClaim = GenericClaim & {
|
||||
value: StreamMetadata,
|
||||
};
|
||||
|
||||
declare type GenericClaim = {
|
||||
address: string, // address associated with tx
|
||||
amount: string, // bid amount at time of tx
|
||||
canonical_url: string, // URL with short id, includes channel with short id
|
||||
claim_id: string, // unique claim identifier
|
||||
claim_sequence: number, // not being used currently
|
||||
claim_op: 'create' | 'update',
|
||||
confirmations: number,
|
||||
decoded_claim: boolean, // Not available currently https://github.com/lbryio/lbry/issues/2044
|
||||
timestamp?: number, // date of last transaction
|
||||
height: number, // block height the tx was confirmed
|
||||
is_channel_signature_valid?: boolean,
|
||||
is_my_output: boolean,
|
||||
name: string,
|
||||
normalized_name: string, // `name` normalized via unicode NFD spec,
|
||||
nout: number, // index number for an output of a tx
|
||||
permanent_url: string, // name + claim_id
|
||||
short_url: string, // permanent_url with short id, no channel
|
||||
txid: string, // unique tx id
|
||||
type: 'claim' | 'update' | 'support',
|
||||
value_type: 'stream' | 'channel' | 'collection',
|
||||
signing_channel?: ChannelClaim,
|
||||
reposted_claim?: GenericClaim,
|
||||
repost_channel_url?: string,
|
||||
repost_url?: string,
|
||||
repost_bid_amount?: string,
|
||||
purchase_receipt?: PurchaseReceipt,
|
||||
meta: {
|
||||
activation_height: number,
|
||||
claims_in_channel?: number,
|
||||
creation_height: number,
|
||||
creation_timestamp: number,
|
||||
effective_amount: string,
|
||||
expiration_height: number,
|
||||
is_controlling: boolean,
|
||||
support_amount: string,
|
||||
reposted: number,
|
||||
trending_global: number,
|
||||
trending_group: number,
|
||||
trending_local: number,
|
||||
trending_mixed: number,
|
||||
},
|
||||
};
|
||||
|
||||
declare type GenericMetadata = {
|
||||
title?: string,
|
||||
description?: string,
|
||||
thumbnail?: {
|
||||
url?: string,
|
||||
},
|
||||
languages?: Array<string>,
|
||||
tags?: Array<string>,
|
||||
locations?: Array<Location>,
|
||||
};
|
||||
|
||||
declare type ChannelMetadata = GenericMetadata & {
|
||||
public_key: string,
|
||||
public_key_id: string,
|
||||
cover_url?: string,
|
||||
email?: string,
|
||||
website_url?: string,
|
||||
featured?: Array<string>,
|
||||
};
|
||||
|
||||
declare type CollectionMetadata = GenericMetadata & {
|
||||
claims: Array<string>,
|
||||
}
|
||||
|
||||
declare type StreamMetadata = GenericMetadata & {
|
||||
license?: string, // License "title" ex: Creative Commons, Custom copyright
|
||||
license_url?: string, // Link to full license
|
||||
release_time?: number, // linux timestamp
|
||||
author?: string,
|
||||
|
||||
source: {
|
||||
sd_hash: string,
|
||||
media_type?: string,
|
||||
hash?: string,
|
||||
name?: string, // file name
|
||||
size?: number, // size of file in bytes
|
||||
},
|
||||
|
||||
// Only exists if a stream has a fee
|
||||
fee?: Fee,
|
||||
|
||||
stream_type: 'video' | 'audio' | 'image' | 'software',
|
||||
// Below correspond to `stream_type`
|
||||
video?: {
|
||||
duration: number,
|
||||
height: number,
|
||||
width: number,
|
||||
},
|
||||
audio?: {
|
||||
duration: number,
|
||||
},
|
||||
image?: {
|
||||
height: number,
|
||||
width: number,
|
||||
},
|
||||
software?: {
|
||||
os: string,
|
||||
},
|
||||
};
|
||||
|
||||
declare type Location = {
|
||||
latitude?: number,
|
||||
longitude?: number,
|
||||
country?: string,
|
||||
state?: string,
|
||||
city?: string,
|
||||
code?: string,
|
||||
};
|
||||
|
||||
declare type Fee = {
|
||||
amount: string,
|
||||
currency: string,
|
||||
address: string,
|
||||
};
|
||||
|
||||
declare type PurchaseReceipt = {
|
||||
address: string,
|
||||
amount: string,
|
||||
claim_id: string,
|
||||
confirmations: number,
|
||||
height: number,
|
||||
nout: number,
|
||||
timestamp: number,
|
||||
txid: string,
|
||||
type: 'purchase',
|
||||
};
|
||||
|
||||
declare type ClaimActionResolveInfo = {
|
||||
[string]: {
|
||||
stream: ?StreamClaim,
|
||||
channel: ?ChannelClaim,
|
||||
claimsInChannel: ?number,
|
||||
collection: ?CollectionClaim,
|
||||
},
|
||||
}
|
||||
|
||||
declare type ChannelUpdateParams = {
|
||||
claim_id: string,
|
||||
bid?: string,
|
||||
title?: string,
|
||||
cover_url?: string,
|
||||
thumbnail_url?: string,
|
||||
description?: string,
|
||||
website_url?: string,
|
||||
email?: string,
|
||||
tags?: Array<string>,
|
||||
replace?: boolean,
|
||||
languages?: Array<string>,
|
||||
locations?: Array<string>,
|
||||
blocking?: boolean,
|
||||
}
|
||||
|
||||
declare type ChannelPublishParams = {
|
||||
name: string,
|
||||
bid: string,
|
||||
blocking?: true,
|
||||
title?: string,
|
||||
cover_url?: string,
|
||||
thumbnail_url?: string,
|
||||
description?: string,
|
||||
website_url?: string,
|
||||
email?: string,
|
||||
tags?: Array<string>,
|
||||
languages?: Array<string>,
|
||||
}
|
||||
|
||||
declare type CollectionUpdateParams = {
|
||||
claim_id: string,
|
||||
claim_ids?: Array<string>,
|
||||
bid?: string,
|
||||
title?: string,
|
||||
cover_url?: string,
|
||||
thumbnail_url?: string,
|
||||
description?: string,
|
||||
website_url?: string,
|
||||
email?: string,
|
||||
tags?: Array<string>,
|
||||
replace?: boolean,
|
||||
languages?: Array<string>,
|
||||
locations?: Array<string>,
|
||||
blocking?: boolean,
|
||||
}
|
||||
|
||||
declare type CollectionPublishParams = {
|
||||
name: string,
|
||||
bid: string,
|
||||
claim_ids: Array<string>,
|
||||
blocking?: true,
|
||||
title?: string,
|
||||
thumbnail_url?: string,
|
||||
description?: string,
|
||||
tags?: Array<string>,
|
||||
languages?: Array<string>,
|
||||
}
|
||||
Vendored
-29
@@ -1,29 +0,0 @@
|
||||
declare type CoinSwapInfo = {
|
||||
chargeCode: string,
|
||||
coins: Array<string>,
|
||||
sendAddresses: { [string]: string},
|
||||
sendAmounts: { [string]: any },
|
||||
lbcAmount: number,
|
||||
status?: {
|
||||
status: string,
|
||||
receiptCurrency: string,
|
||||
receiptTxid: string,
|
||||
lbcTxid: string,
|
||||
},
|
||||
}
|
||||
|
||||
declare type CoinSwapState = {
|
||||
coinSwaps: Array<CoinSwapInfo>,
|
||||
};
|
||||
|
||||
declare type CoinSwapAddAction = {
|
||||
type: string,
|
||||
data: CoinSwapInfo,
|
||||
};
|
||||
|
||||
declare type CoinSwapRemoveAction = {
|
||||
type: string,
|
||||
data: {
|
||||
chargeCode: string,
|
||||
},
|
||||
};
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
declare type Collection = {
|
||||
id: string,
|
||||
items: Array<?string>,
|
||||
name: string,
|
||||
type: string,
|
||||
updatedAt: number,
|
||||
totalItems?: number,
|
||||
sourceId?: string, // if copied, claimId of original collection
|
||||
};
|
||||
|
||||
declare type CollectionState = {
|
||||
unpublished: CollectionGroup,
|
||||
resolved: CollectionGroup,
|
||||
pending: CollectionGroup,
|
||||
edited: CollectionGroup,
|
||||
builtin: CollectionGroup,
|
||||
saved: Array<string>,
|
||||
isResolvingCollectionById: { [string]: boolean },
|
||||
error?: string | null,
|
||||
};
|
||||
|
||||
declare type CollectionGroup = {
|
||||
[string]: Collection,
|
||||
}
|
||||
|
||||
declare type CollectionEditParams = {
|
||||
uris?: Array<string>,
|
||||
remove?: boolean,
|
||||
replace?: boolean,
|
||||
order?: { from: number, to: number },
|
||||
type?: string,
|
||||
name?: string,
|
||||
}
|
||||
Vendored
+14
-201
@@ -13,11 +13,6 @@ declare type Comment = {
|
||||
parent_id?: number, // comment_id of comment this is in reply to
|
||||
is_pinned: boolean,
|
||||
support_amount: number,
|
||||
replies: number, // number of direct replies (i.e. excluding nested replies).
|
||||
is_moderator: boolean,
|
||||
is_creator: boolean,
|
||||
is_global_mod: boolean,
|
||||
is_fiat?: boolean,
|
||||
};
|
||||
|
||||
declare type PerChannelSettings = {
|
||||
@@ -32,40 +27,20 @@ declare type PerChannelSettings = {
|
||||
declare type CommentsState = {
|
||||
commentsByUri: { [string]: string },
|
||||
superChatsByUri: { [string]: { totalAmount: number, comments: Array<Comment> } },
|
||||
byId: { [string]: Array<string> }, // ClaimID -> list of fetched comment IDs.
|
||||
totalCommentsById: {}, // ClaimId -> ultimate total (including replies) in commentron.
|
||||
repliesByParentId: { [string]: Array<string> }, // ParentCommentID -> list of fetched replies.
|
||||
repliesTotalPagesByParentId: {}, // ParentCommentID -> total number of reply pages for a parentId in commentron.
|
||||
topLevelCommentsById: { [string]: Array<string> }, // ClaimID -> list of fetched top level comments.
|
||||
topLevelTotalPagesById: { [string]: number }, // ClaimID -> total number of top-level pages in commentron. Based on COMMENT_PAGE_SIZE_TOP_LEVEL.
|
||||
topLevelTotalCommentsById: { [string]: number }, // ClaimID -> total top level comments in commentron.
|
||||
byId: { [string]: Array<string> },
|
||||
repliesByParentId: { [string]: Array<string> }, // ParentCommentID -> list of reply comments
|
||||
topLevelCommentsById: { [string]: Array<string> }, // ClaimID -> list of top level comments
|
||||
commentById: { [string]: Comment },
|
||||
linkedCommentAncestors: { [string]: Array<string> }, // {"linkedCommentId": ["parentId", "grandParentId", ...]}
|
||||
pinnedCommentsById: {}, // ClaimId -> array of pinned comment IDs
|
||||
isLoading: boolean,
|
||||
isLoadingById: boolean,
|
||||
isLoadingByParentId: { [string]: boolean },
|
||||
isCommenting: boolean,
|
||||
myComments: ?Set<string>,
|
||||
isFetchingReacts: boolean,
|
||||
myReactsByCommentId: ?{ [string]: Array<string> }, // {"CommentId:MyChannelId": ["like", "dislike", ...]}
|
||||
othersReactsByCommentId: ?{ [string]: { [string]: number } }, // {"CommentId:MyChannelId": {"like": 2, "dislike": 2, ...}}
|
||||
myReactsByCommentId: any,
|
||||
othersReactsByCommentId: any,
|
||||
pendingCommentReactions: Array<string>,
|
||||
moderationBlockList: ?Array<string>, // @KP rename to "personalBlockList"?
|
||||
adminBlockList: ?Array<string>,
|
||||
moderatorBlockList: ?Array<string>,
|
||||
moderatorBlockListDelegatorsMap: {[string]: Array<string>}, // {"blockedUri": ["delegatorUri1", ""delegatorUri2", ...]}
|
||||
moderationBlockList: ?Array<string>,
|
||||
fetchingModerationBlockList: boolean,
|
||||
moderationDelegatesById: { [string]: Array<{ channelId: string, channelName: string }> },
|
||||
fetchingModerationDelegates: boolean,
|
||||
moderationDelegatorsById: { [string]: { global: boolean, delegators: { name: string, claimId: string } }},
|
||||
fetchingModerationDelegators: boolean,
|
||||
blockingByUri: {},
|
||||
unBlockingByUri: {},
|
||||
personalTimeoutMap: { [uri: string]: { blockedAt: string, bannedFor: number, banRemaining: number } },
|
||||
adminTimeoutMap: { [uri: string]: { blockedAt: string, bannedFor: number, banRemaining: number } },
|
||||
moderatorTimeoutMap: { [uri: string]: { blockedAt: string, bannedFor: number, banRemaining: number } },
|
||||
togglingForDelegatorMap: {[string]: Array<string>}, // {"blockedUri": ["delegatorUri1", ""delegatorUri2", ...]}
|
||||
settingsByChannelId: { [string]: PerChannelSettings }, // ChannelID -> settings
|
||||
fetchingSettings: boolean,
|
||||
fetchingBlockedWords: boolean,
|
||||
@@ -80,91 +55,17 @@ declare type CommentReactParams = {
|
||||
remove?: boolean,
|
||||
};
|
||||
|
||||
declare type ReactionReactParams = {
|
||||
comment_ids: string,
|
||||
signature?: string,
|
||||
signing_ts?: string,
|
||||
remove?: boolean,
|
||||
clear_types?: string,
|
||||
type: string,
|
||||
channel_id: string,
|
||||
channel_name: string,
|
||||
};
|
||||
|
||||
declare type ReactionReactResponse = {
|
||||
Reactions: { [string]: { [string]: number} },
|
||||
};
|
||||
|
||||
declare type ReactionListParams = {
|
||||
comment_ids: string, // CSV of IDs
|
||||
channel_id?: string,
|
||||
channel_name?: string,
|
||||
signature?: string,
|
||||
signing_ts?: string,
|
||||
types?: string,
|
||||
};
|
||||
|
||||
declare type ReactionListResponse = {
|
||||
my_reactions: Array<MyReactions>,
|
||||
others_reactions: Array<OthersReactions>,
|
||||
};
|
||||
|
||||
declare type CommentListParams = {
|
||||
page: number, // pagination: which page of results
|
||||
page_size: number, // pagination: nr of comments to show in a page (max 200)
|
||||
claim_id?: string, // claim id of claim being commented on
|
||||
channel_name?: string, // signing channel name of claim (enables 'commentsEnabled' check)
|
||||
channel_id?: string, // signing channel claim id of claim (enables 'commentsEnabled' check)
|
||||
author_claim_id?: string, // filters comments to just this author
|
||||
parent_id?: string, // filters comments to those under this thread
|
||||
top_level?: boolean, // filters to only top level comments
|
||||
hidden?: boolean, // if true, will show hidden comments as well
|
||||
sort_by?: number, // @see: ui/constants/comments.js::SORT_BY
|
||||
page: number,
|
||||
page_size: number,
|
||||
claim_id: string,
|
||||
};
|
||||
|
||||
declare type CommentListResponse = {
|
||||
items: Array<Comment>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number, // Grand total for the claim being commented on.
|
||||
total_filtered_items: number, // Total for filtered queries (e.g. top_level=true, parent_id=xxx, etc.).
|
||||
total_pages: number,
|
||||
has_hidden_comments: boolean,
|
||||
total_amount: number,
|
||||
};
|
||||
|
||||
declare type CommentByIdParams = {
|
||||
comment_id: string,
|
||||
with_ancestors: boolean,
|
||||
}
|
||||
|
||||
declare type CommentByIdResponse = {
|
||||
item: Comment,
|
||||
items: Comment,
|
||||
ancestors: Array<Comment>,
|
||||
}
|
||||
|
||||
declare type CommentPinParams = {
|
||||
comment_id: string,
|
||||
channel_id: string,
|
||||
channel_name: string,
|
||||
remove?: boolean,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
}
|
||||
|
||||
declare type CommentPinResponse = {
|
||||
items: Comment, // "items" is an inherited typo to match SDK. Will be "item" in a new version.
|
||||
}
|
||||
|
||||
declare type CommentEditParams = {
|
||||
comment: string,
|
||||
comment_id: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
}
|
||||
|
||||
declare type CommentEditResponse = Comment
|
||||
|
||||
declare type CommentAbandonParams = {
|
||||
comment_id: string,
|
||||
creator_channel_id?: string,
|
||||
@@ -178,107 +79,19 @@ declare type CommentCreateParams = {
|
||||
claim_id: string,
|
||||
parent_id?: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
signing_ts: number,
|
||||
support_tx_id?: string,
|
||||
};
|
||||
|
||||
declare type SuperListParams = {};
|
||||
|
||||
declare type SuperListResponse = {
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_pages: number,
|
||||
total_items: number,
|
||||
total_amount: number,
|
||||
items: Array<Comment>,
|
||||
has_hidden_comments: boolean,
|
||||
};
|
||||
declare type ModerationBlockParams = {};
|
||||
|
||||
declare type ModerationBlockParams = {
|
||||
// Publisher, Moderator, or Commentron Admin
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
// Offender being blocked
|
||||
blocked_channel_id: string,
|
||||
blocked_channel_name: string,
|
||||
// Creator that Moderator is delegated from. Used for delegated moderation
|
||||
creator_channel_id?: string,
|
||||
creator_channel_name?: string,
|
||||
// Blocks identity from comment universally, requires Admin rights on commentron instance
|
||||
block_all?: boolean,
|
||||
time_out?: number,
|
||||
// If true will delete all comments of the offender, requires Admin rights on commentron for universal delete
|
||||
delete_all?: boolean,
|
||||
// The usual signature stuff
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationBlockResponse = {
|
||||
deleted_comment_ids: Array<string>,
|
||||
banned_channel_id: string,
|
||||
all_blocked: boolean,
|
||||
banned_from: string,
|
||||
};
|
||||
|
||||
declare type BlockedListArgs = {
|
||||
// Publisher, Moderator or Commentron Admin
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
// Creator that Moderator is delegated from. Used for delegated moderation
|
||||
creator_channel_id?: string,
|
||||
creator_channel_name?: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationAddDelegateParams = {
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationRemoveDelegateParams = {
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationListDelegatesParams = {
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationAmIParams = {
|
||||
declare type SettingsParams = {
|
||||
channel_name: string,
|
||||
channel_id: string,
|
||||
signature: string,
|
||||
signing_ts: string
|
||||
};
|
||||
|
||||
declare type SettingsParams = {
|
||||
channel_name?: string,
|
||||
channel_id: string,
|
||||
signature?: string,
|
||||
signing_ts?: string,
|
||||
};
|
||||
|
||||
declare type SettingsResponse = {
|
||||
words?: string,
|
||||
comments_enabled: boolean,
|
||||
min_tip_amount_comment: number,
|
||||
min_tip_amount_super_chat: number,
|
||||
slow_mode_min_gap: number,
|
||||
curse_jar_amount: number,
|
||||
filters_enabled?: boolean,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type UpdateSettingsParams = {
|
||||
|
||||
Vendored
-78
@@ -1,78 +0,0 @@
|
||||
// @flow
|
||||
|
||||
declare type FileListItem = {
|
||||
metadata: StreamMetadata,
|
||||
added_on: number,
|
||||
blobs_completed: number,
|
||||
blobs_in_stream: number,
|
||||
blobs_remaining: number,
|
||||
channel_claim_id: string,
|
||||
channel_name: string,
|
||||
claim_id: string,
|
||||
claim_name: string,
|
||||
completed: false,
|
||||
content_fee?: { txid: string },
|
||||
purchase_receipt?: { txid: string, amount: string },
|
||||
download_directory: string,
|
||||
download_path: string,
|
||||
file_name: string,
|
||||
key: string,
|
||||
mime_type: string,
|
||||
nout: number,
|
||||
outpoint: string,
|
||||
points_paid: number,
|
||||
protobuf: string,
|
||||
reflector_progress: number,
|
||||
sd_hash: string,
|
||||
status: string,
|
||||
stopped: false,
|
||||
stream_hash: string,
|
||||
stream_name: string,
|
||||
streaming_url: string,
|
||||
suggested_file_name: string,
|
||||
total_bytes: number,
|
||||
total_bytes_lower_bound: number,
|
||||
is_fully_reflected: boolean,
|
||||
// TODO: sdk plans to change `tx`
|
||||
// It isn't currently used by the apps
|
||||
tx: {},
|
||||
txid: string,
|
||||
uploading_to_reflector: boolean,
|
||||
written_bytes: number,
|
||||
};
|
||||
|
||||
declare type FileState = {
|
||||
failedPurchaseUris: Array<string>,
|
||||
purchasedUris: Array<string>,
|
||||
};
|
||||
|
||||
declare type PurchaseUriCompleted = {
|
||||
type: ACTIONS.PURCHASE_URI_COMPLETED,
|
||||
data: {
|
||||
uri: string,
|
||||
streamingUrl: string,
|
||||
},
|
||||
};
|
||||
|
||||
declare type PurchaseUriFailed = {
|
||||
type: ACTIONS.PURCHASE_URI_FAILED,
|
||||
data: {
|
||||
uri: string,
|
||||
error: any,
|
||||
},
|
||||
};
|
||||
|
||||
declare type PurchaseUriStarted = {
|
||||
type: ACTIONS.PURCHASE_URI_STARTED,
|
||||
data: {
|
||||
uri: string,
|
||||
streamingUrl: string,
|
||||
},
|
||||
};
|
||||
|
||||
declare type DeletePurchasedUri = {
|
||||
type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS,
|
||||
data: {
|
||||
uri: string,
|
||||
},
|
||||
};
|
||||
Vendored
-369
@@ -1,369 +0,0 @@
|
||||
// @flow
|
||||
declare type StatusResponse = {
|
||||
blob_manager: {
|
||||
finished_blobs: number,
|
||||
},
|
||||
blockchain_headers: {
|
||||
download_progress: number,
|
||||
downloading_headers: boolean,
|
||||
},
|
||||
dht: {
|
||||
node_id: string,
|
||||
peers_in_routing_table: number,
|
||||
},
|
||||
hash_announcer: {
|
||||
announce_queue_size: number,
|
||||
},
|
||||
installation_id: string,
|
||||
is_running: boolean,
|
||||
skipped_components: Array<string>,
|
||||
startup_status: {
|
||||
blob_manager: boolean,
|
||||
blockchain_headers: boolean,
|
||||
database: boolean,
|
||||
dht: boolean,
|
||||
exchange_rate_manager: boolean,
|
||||
hash_announcer: boolean,
|
||||
peer_protocol_server: boolean,
|
||||
stream_manager: boolean,
|
||||
upnp: boolean,
|
||||
wallet: boolean,
|
||||
},
|
||||
stream_manager: {
|
||||
managed_files: number,
|
||||
},
|
||||
upnp: {
|
||||
aioupnp_version: string,
|
||||
dht_redirect_set: boolean,
|
||||
external_ip: string,
|
||||
gateway: string,
|
||||
peer_redirect_set: boolean,
|
||||
redirects: {},
|
||||
},
|
||||
wallet: ?{
|
||||
connected: string,
|
||||
best_blockhash: string,
|
||||
blocks: number,
|
||||
blocks_behind: number,
|
||||
is_encrypted: boolean,
|
||||
is_locked: boolean,
|
||||
headers_synchronization_progress: number,
|
||||
available_servers: number,
|
||||
},
|
||||
};
|
||||
|
||||
declare type VersionResponse = {
|
||||
build: string,
|
||||
lbrynet_version: string,
|
||||
os_release: string,
|
||||
os_system: string,
|
||||
platform: string,
|
||||
processor: string,
|
||||
python_version: string,
|
||||
};
|
||||
|
||||
declare type BalanceResponse = {
|
||||
available: string,
|
||||
reserved: string,
|
||||
reserved_subtotals: ?{
|
||||
claims: string,
|
||||
supports: string,
|
||||
tips: string,
|
||||
},
|
||||
total: string,
|
||||
};
|
||||
|
||||
declare type ResolveResponse = {
|
||||
// Keys are the url(s) passed to resolve
|
||||
[string]: { error?: {}, stream?: StreamClaim, channel?: ChannelClaim, collection?: CollectionClaim, claimsInChannel?: number },
|
||||
};
|
||||
|
||||
declare type GetResponse = FileListItem & { error?: string };
|
||||
|
||||
declare type GenericTxResponse = {
|
||||
height: number,
|
||||
hex: string,
|
||||
inputs: Array<{}>,
|
||||
outputs: Array<{}>,
|
||||
total_fee: string,
|
||||
total_input: string,
|
||||
total_output: string,
|
||||
txid: string,
|
||||
};
|
||||
|
||||
declare type PublishResponse = GenericTxResponse & {
|
||||
// Only first value in outputs is a claim
|
||||
// That's the only value we care about
|
||||
outputs: Array<Claim>,
|
||||
};
|
||||
|
||||
declare type ClaimSearchResponse = {
|
||||
items: Array<Claim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type ClaimListResponse = {
|
||||
items: Array<ChannelClaim | Claim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type ChannelCreateResponse = GenericTxResponse & {
|
||||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type ChannelUpdateResponse = GenericTxResponse & {
|
||||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type CommentCreateResponse = Comment;
|
||||
declare type CommentUpdateResponse = Comment;
|
||||
|
||||
declare type MyReactions = {
|
||||
// Keys are the commentId
|
||||
[string]: Array<string>,
|
||||
};
|
||||
|
||||
declare type OthersReactions = {
|
||||
// Keys are the commentId
|
||||
[string]: {
|
||||
// Keys are the reaction_type, e.g. 'like'
|
||||
[string]: number,
|
||||
},
|
||||
};
|
||||
|
||||
declare type CommentReactListResponse = {
|
||||
my_reactions: Array<MyReactions>,
|
||||
others_reactions: Array<OthersReactions>,
|
||||
};
|
||||
|
||||
declare type CommentHideResponse = {
|
||||
// keyed by the CommentIds entered
|
||||
[string]: { hidden: boolean },
|
||||
};
|
||||
|
||||
declare type CommentPinResponse = {
|
||||
// keyed by the CommentIds entered
|
||||
items: Comment,
|
||||
};
|
||||
|
||||
declare type CommentAbandonResponse = {
|
||||
// keyed by the CommentId given
|
||||
abandoned: boolean,
|
||||
};
|
||||
|
||||
declare type ChannelListResponse = {
|
||||
items: Array<ChannelClaim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type ChannelSignResponse = {
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type CollectionCreateResponse = {
|
||||
outputs: Array<Claim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
}
|
||||
|
||||
declare type CollectionListResponse = {
|
||||
items: Array<Claim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type CollectionResolveResponse = {
|
||||
items: Array<Claim>,
|
||||
total_items: number,
|
||||
};
|
||||
|
||||
declare type CollectionResolveOptions = {
|
||||
claim_id: string,
|
||||
};
|
||||
|
||||
declare type CollectionListOptions = {
|
||||
page: number,
|
||||
page_size: number,
|
||||
resolve?: boolean,
|
||||
};
|
||||
|
||||
declare type FileListResponse = {
|
||||
items: Array<FileListItem>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type TxListResponse = {
|
||||
items: Array<Transaction>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type SupportListResponse = {
|
||||
items: Array<Support>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type BlobListResponse = { items: Array<string> };
|
||||
|
||||
declare type WalletListResponse = Array<{
|
||||
id: string,
|
||||
name: string,
|
||||
}>;
|
||||
|
||||
declare type WalletStatusResponse = {
|
||||
is_encrypted: boolean,
|
||||
is_locked: boolean,
|
||||
is_syncing: boolean,
|
||||
};
|
||||
|
||||
declare type SyncApplyResponse = {
|
||||
hash: string,
|
||||
data: string,
|
||||
};
|
||||
|
||||
declare type SupportAbandonResponse = GenericTxResponse;
|
||||
|
||||
declare type StreamListResponse = {
|
||||
items: Array<StreamClaim>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type StreamRepostOptions = {
|
||||
name: string,
|
||||
bid: string,
|
||||
claim_id: string,
|
||||
channel_id?: string,
|
||||
};
|
||||
|
||||
declare type StreamRepostResponse = GenericTxResponse;
|
||||
|
||||
declare type PurchaseListResponse = {
|
||||
items: Array<PurchaseReceipt & { claim: StreamClaim }>,
|
||||
page: number,
|
||||
page_size: number,
|
||||
total_items: number,
|
||||
total_pages: number,
|
||||
};
|
||||
|
||||
declare type PurchaseListOptions = {
|
||||
page: number,
|
||||
page_size: number,
|
||||
resolve: boolean,
|
||||
claim_id?: string,
|
||||
channel_id?: string,
|
||||
};
|
||||
|
||||
//
|
||||
// Types used in the generic Lbry object that is exported
|
||||
//
|
||||
declare type LbryTypes = {
|
||||
isConnected: boolean,
|
||||
connectPromise: any, // null |
|
||||
connect: () => any, // void | Promise<any> ?
|
||||
daemonConnectionString: string,
|
||||
alternateConnectionString: string,
|
||||
methodsUsingAlternateConnectionString: Array<string>,
|
||||
apiRequestHeaders: { [key: string]: string },
|
||||
setDaemonConnectionString: string => void,
|
||||
setApiHeader: (string, string) => void,
|
||||
unsetApiHeader: string => void,
|
||||
overrides: { [string]: ?Function },
|
||||
setOverride: (string, Function) => void,
|
||||
// getMediaType: (?string, ?string) => string,
|
||||
|
||||
// Lbry Methods
|
||||
stop: () => Promise<string>,
|
||||
status: () => Promise<StatusResponse>,
|
||||
version: () => Promise<VersionResponse>,
|
||||
resolve: (params: {}) => Promise<ResolveResponse>,
|
||||
get: (params: {}) => Promise<GetResponse>,
|
||||
publish: (params: {}) => Promise<PublishResponse>,
|
||||
|
||||
claim_search: (params: {}) => Promise<ClaimSearchResponse>,
|
||||
claim_list: (params: {}) => Promise<ClaimListResponse>,
|
||||
channel_create: (params: {}) => Promise<ChannelCreateResponse>,
|
||||
channel_update: (params: {}) => Promise<ChannelUpdateResponse>,
|
||||
channel_import: (params: {}) => Promise<string>,
|
||||
channel_list: (params: {}) => Promise<ChannelListResponse>,
|
||||
channel_sign: (params: {}) => Promise<ChannelSignResponse>,
|
||||
stream_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
stream_list: (params: {}) => Promise<StreamListResponse>,
|
||||
channel_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
support_create: (params: {}) => Promise<GenericTxResponse>,
|
||||
support_list: (params: {}) => Promise<SupportListResponse>,
|
||||
support_abandon: (params: {}) => Promise<SupportAbandonResponse>,
|
||||
stream_repost: (params: StreamRepostOptions) => Promise<StreamRepostResponse>,
|
||||
purchase_list: (params: PurchaseListOptions) => Promise<PurchaseListResponse>,
|
||||
collection_resolve: (params: CollectionResolveOptions) => Promise<CollectionResolveResponse>,
|
||||
collection_list: (params: CollectionListOptions) => Promise<CollectionListResponse>,
|
||||
collection_create: (params: {}) => Promise<CollectionCreateResponse>,
|
||||
collection_update: (params: {}) => Promise<CollectionCreateResponse>,
|
||||
|
||||
// File fetching and manipulation
|
||||
file_list: (params: {}) => Promise<FileListResponse>,
|
||||
file_delete: (params: {}) => Promise<boolean>,
|
||||
blob_delete: (params: {}) => Promise<string>,
|
||||
blob_list: (params: {}) => Promise<BlobListResponse>,
|
||||
file_set_status: (params: {}) => Promise<any>,
|
||||
file_reflect: (params: {}) => Promise<any>,
|
||||
|
||||
// Preferences
|
||||
preference_get: (params?: {}) => Promise<any>,
|
||||
preference_set: (params: {}) => Promise<any>,
|
||||
|
||||
// Commenting
|
||||
comment_update: (params: {}) => Promise<CommentUpdateResponse>,
|
||||
comment_hide: (params: {}) => Promise<CommentHideResponse>,
|
||||
comment_abandon: (params: {}) => Promise<CommentAbandonResponse>,
|
||||
comment_list: (params: {}) => Promise<any>,
|
||||
comment_create: (params: {}) => Promise<any>,
|
||||
|
||||
// Wallet utilities
|
||||
wallet_balance: (params: {}) => Promise<BalanceResponse>,
|
||||
wallet_decrypt: (prams: {}) => Promise<boolean>,
|
||||
wallet_encrypt: (params: {}) => Promise<boolean>,
|
||||
wallet_unlock: (params: {}) => Promise<boolean>,
|
||||
wallet_list: (params: {}) => Promise<WalletListResponse>,
|
||||
wallet_send: (params: {}) => Promise<GenericTxResponse>,
|
||||
wallet_status: (params?: {}) => Promise<WalletStatusResponse>,
|
||||
address_is_mine: (params: {}) => Promise<boolean>,
|
||||
address_unused: (params: {}) => Promise<string>, // New address
|
||||
address_list: (params: {}) => Promise<string>,
|
||||
transaction_list: (params: {}) => Promise<TxListResponse>,
|
||||
txo_list: (params: {}) => Promise<any>,
|
||||
account_set: (params: {}) => Promise<any>,
|
||||
account_list: (params?: {}) => Promise<any>,
|
||||
|
||||
// Sync
|
||||
sync_hash: (params?: {}) => Promise<string>,
|
||||
sync_apply: (params: {}) => Promise<SyncApplyResponse>,
|
||||
// syncGet
|
||||
|
||||
// The app shouldn't need to do this
|
||||
utxo_release: () => Promise<any>,
|
||||
};
|
||||
Vendored
-99
@@ -1,99 +0,0 @@
|
||||
// @flow
|
||||
declare type LbryFirstStatusResponse = {
|
||||
Version: string,
|
||||
Message: string,
|
||||
Running: boolean,
|
||||
Commit: string,
|
||||
};
|
||||
|
||||
declare type LbryFirstVersionResponse = {
|
||||
build: string,
|
||||
lbrynet_version: string,
|
||||
os_release: string,
|
||||
os_system: string,
|
||||
platform: string,
|
||||
processor: string,
|
||||
python_version: string,
|
||||
};
|
||||
/* SAMPLE UPLOAD RESPONSE (FULL)
|
||||
"Video": {
|
||||
"etag": "\"Dn5xIderbhAnUk5TAW0qkFFir0M/xlGLrlTox7VFTRcR8F77RbKtaU4\"",
|
||||
"id": "8InjtdvVmwE",
|
||||
"kind": "youtube#video",
|
||||
"snippet": {
|
||||
"categoryId": "22",
|
||||
"channelId": "UCXiVsGTU88fJjheB2rqF0rA",
|
||||
"channelTitle": "Mark Beamer",
|
||||
"liveBroadcastContent": "none",
|
||||
"localized": {
|
||||
"title": "my title"
|
||||
},
|
||||
"publishedAt": "2020-05-05T04:17:53.000Z",
|
||||
"thumbnails": {
|
||||
"default": {
|
||||
"height": 90,
|
||||
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/default.jpg?sqp=CMTQw_UF&rs=AOn4CLB6dlhZMSMrazDlWRsitPgCsn8fVw",
|
||||
"width": 120
|
||||
},
|
||||
"high": {
|
||||
"height": 360,
|
||||
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/hqdefault.jpg?sqp=CMTQw_UF&rs=AOn4CLB-Je_7l6qvASRAR_bSGWZHaXaJWQ",
|
||||
"width": 480
|
||||
},
|
||||
"medium": {
|
||||
"height": 180,
|
||||
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/mqdefault.jpg?sqp=CMTQw_UF&rs=AOn4CLCvSnDLqVznRNMKuvJ_0misY_chPQ",
|
||||
"width": 320
|
||||
}
|
||||
},
|
||||
"title": "my title"
|
||||
},
|
||||
"status": {
|
||||
"embeddable": true,
|
||||
"license": "youtube",
|
||||
"privacyStatus": "private",
|
||||
"publicStatsViewable": true,
|
||||
"uploadStatus": "uploaded"
|
||||
}
|
||||
}
|
||||
*/
|
||||
declare type UploadResponse = {
|
||||
Video: {
|
||||
id: string,
|
||||
snippet: {
|
||||
channelId: string,
|
||||
},
|
||||
status: {
|
||||
uploadStatus: string,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
declare type HasYTAuthResponse = {
|
||||
HashAuth: boolean,
|
||||
};
|
||||
|
||||
declare type YTSignupResponse = {};
|
||||
|
||||
//
|
||||
// Types used in the generic LbryFirst object that is exported
|
||||
//
|
||||
declare type LbryFirstTypes = {
|
||||
isConnected: boolean,
|
||||
connectPromise: ?Promise<any>,
|
||||
connect: () => void,
|
||||
lbryFirstConnectionString: string,
|
||||
apiRequestHeaders: { [key: string]: string },
|
||||
setApiHeader: (string, string) => void,
|
||||
unsetApiHeader: string => void,
|
||||
overrides: { [string]: ?Function },
|
||||
setOverride: (string, Function) => void,
|
||||
|
||||
// LbryFirst Methods
|
||||
stop: () => Promise<string>,
|
||||
status: () => Promise<StatusResponse>,
|
||||
version: () => Promise<VersionResponse>,
|
||||
upload: any => Promise<?UploadResponse>,
|
||||
hasYTAuth: string => Promise<HasYTAuthResponse>,
|
||||
ytSignup: () => Promise<YTSignupResponse>,
|
||||
};
|
||||
Vendored
-136
@@ -1,136 +0,0 @@
|
||||
// @flow
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
/*
|
||||
Toasts:
|
||||
- First-in, first-out queue
|
||||
- Simple messages that are shown in response to user interactions
|
||||
- Never saved
|
||||
- If they are the result of errors, use the isError flag when creating
|
||||
- For errors that should interrupt user behavior, use Error
|
||||
*/
|
||||
declare type ToastParams = {
|
||||
message: string,
|
||||
title?: string,
|
||||
linkText?: string,
|
||||
linkTarget?: string,
|
||||
isError?: boolean,
|
||||
};
|
||||
|
||||
declare type Toast = {
|
||||
id: string,
|
||||
params: ToastParams,
|
||||
};
|
||||
|
||||
declare type DoToast = {
|
||||
type: ACTIONS.CREATE_TOAST,
|
||||
data: Toast,
|
||||
};
|
||||
|
||||
/*
|
||||
Notifications:
|
||||
- List of notifications based on user interactions/app notifications
|
||||
- Always saved, but can be manually deleted
|
||||
- Can happen in the background, or because of user interaction (ex: publish confirmed)
|
||||
*/
|
||||
declare type Notification = {
|
||||
id: string, // Unique id
|
||||
dateCreated: number,
|
||||
isRead: boolean, // Used to display "new" notifications that a user hasn't seen yet
|
||||
source?: string, // The type/area an notification is from. Used for sorting (ex: publishes, transactions)
|
||||
// We may want to use priority/isDismissed in the future to specify how urgent a notification is
|
||||
// and if the user should see it immediately
|
||||
// isDissmied: boolean,
|
||||
// priority?: number
|
||||
};
|
||||
|
||||
declare type DoNotification = {
|
||||
type: ACTIONS.CREATE_NOTIFICATION,
|
||||
data: Notification,
|
||||
};
|
||||
|
||||
declare type DoEditNotification = {
|
||||
type: ACTIONS.EDIT_NOTIFICATION,
|
||||
data: {
|
||||
notification: Notification,
|
||||
},
|
||||
};
|
||||
|
||||
declare type DoDeleteNotification = {
|
||||
type: ACTIONS.DELETE_NOTIFICATION,
|
||||
data: {
|
||||
id: string, // The id to delete
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
Errors:
|
||||
- First-in, first-out queue
|
||||
- Errors that should interupt user behavior
|
||||
- For errors that can be shown without interrupting a user, use Toast with the isError flag
|
||||
*/
|
||||
declare type ErrorNotification = {
|
||||
title: string,
|
||||
text: string,
|
||||
};
|
||||
|
||||
declare type DoError = {
|
||||
type: ACTIONS.CREATE_ERROR,
|
||||
data: ErrorNotification,
|
||||
};
|
||||
|
||||
declare type DoDismissError = {
|
||||
type: ACTIONS.DISMISS_ERROR,
|
||||
};
|
||||
|
||||
/*
|
||||
NotificationState
|
||||
*/
|
||||
declare type NotificationState = {
|
||||
notifications: Array<Notification>,
|
||||
errors: Array<ErrorNotification>,
|
||||
toasts: Array<Toast>,
|
||||
};
|
||||
|
||||
declare type WebNotification = {
|
||||
active_at: string,
|
||||
created_at: string,
|
||||
id: number,
|
||||
is_app_readable: boolean,
|
||||
is_device_notified: boolean,
|
||||
is_emailed: boolean,
|
||||
is_read: boolean,
|
||||
is_seen: boolean,
|
||||
notification_parameters: {
|
||||
device: {
|
||||
analytics_label: string,
|
||||
image_url: string,
|
||||
is_data_only: boolean,
|
||||
name: string,
|
||||
placeholders: ?string,
|
||||
target: string,
|
||||
text: string,
|
||||
title: string,
|
||||
type: string,
|
||||
},
|
||||
dynamic: {
|
||||
comment_author: string,
|
||||
reply_author: string,
|
||||
hash: string,
|
||||
claim_title: string,
|
||||
comment?: string,
|
||||
channel_url: string,
|
||||
},
|
||||
email: {},
|
||||
},
|
||||
notification_rule: string,
|
||||
type: string,
|
||||
updated_at: string,
|
||||
user_id: number,
|
||||
group_count?: number,
|
||||
};
|
||||
|
||||
declare type NotificationCategory = {
|
||||
name: string,
|
||||
types: ?Array<string>,
|
||||
};
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable no-use-before-define */
|
||||
declare type GetState = () => any;
|
||||
declare type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;
|
||||
declare type Dispatch = (action: {} | Promise<*> | Array<{}> | ThunkAction) => any; // Need to refer to ThunkAction
|
||||
/* eslint-enable */
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
declare type ReflectingUpdate = {
|
||||
fileListItem: FileListItem,
|
||||
progress: number | boolean,
|
||||
stalled: boolean,
|
||||
};
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
declare type CommentServerDetails = {
|
||||
name: string,
|
||||
url: string,
|
||||
}
|
||||
|
||||
declare type WalletServerDetails = {
|
||||
|
||||
};
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
declare type TagState = {
|
||||
followedTags: FollowedTags,
|
||||
knownTags: KnownTags,
|
||||
};
|
||||
|
||||
declare type Tag = {
|
||||
name: string,
|
||||
};
|
||||
|
||||
declare type KnownTags = {
|
||||
[string]: Tag,
|
||||
};
|
||||
|
||||
declare type FollowedTags = Array<string>;
|
||||
|
||||
declare type TagAction = {
|
||||
type: string,
|
||||
data: {
|
||||
name: string,
|
||||
},
|
||||
};
|
||||
Vendored
-28
@@ -1,28 +0,0 @@
|
||||
// @flow
|
||||
declare type Transaction = {
|
||||
amount: number,
|
||||
claim_id: string,
|
||||
claim_name: string,
|
||||
fee: number,
|
||||
nout: number,
|
||||
txid: string,
|
||||
type: string,
|
||||
date: Date,
|
||||
};
|
||||
|
||||
declare type Support = {
|
||||
address: string,
|
||||
amount: string,
|
||||
claim_id: string,
|
||||
confirmations: number,
|
||||
height: string,
|
||||
is_change: string,
|
||||
is_mine: string,
|
||||
name: string,
|
||||
normalized_name: string,
|
||||
nout: string,
|
||||
permanent_url: string,
|
||||
timestamp: number,
|
||||
txid: string,
|
||||
type: string,
|
||||
};
|
||||
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
declare type Txo = {
|
||||
amount: number,
|
||||
claim_id: string,
|
||||
normalized_name: string,
|
||||
nout: number,
|
||||
txid: string,
|
||||
type: string,
|
||||
value_type: string,
|
||||
timestamp: number,
|
||||
is_my_output: boolean,
|
||||
is_my_input: boolean,
|
||||
is_spent: boolean,
|
||||
signing_channel?: {
|
||||
channel_id: string,
|
||||
},
|
||||
};
|
||||
|
||||
declare type TxoListParams = {
|
||||
page: number,
|
||||
page_size: number,
|
||||
type: string,
|
||||
is_my_input?: boolean,
|
||||
is_my_output?: boolean,
|
||||
is_not_my_input?: boolean,
|
||||
is_not_my_output?: boolean,
|
||||
is_spent?: boolean,
|
||||
};
|
||||
Vendored
-1
@@ -2,7 +2,6 @@
|
||||
|
||||
declare type PlayingUri = {
|
||||
uri: string,
|
||||
primaryUri: string,
|
||||
pathname: string,
|
||||
commentId?: string,
|
||||
source?: string,
|
||||
|
||||
Vendored
+3
-5
@@ -4,12 +4,12 @@ declare type HomepageObject = {
|
||||
options: any,
|
||||
route: string,
|
||||
title: string,
|
||||
};
|
||||
}
|
||||
|
||||
declare type HomepageData = {
|
||||
[string]: HomepageObject,
|
||||
default: any => any,
|
||||
};
|
||||
}
|
||||
|
||||
declare type RowDataItem = {
|
||||
title: any,
|
||||
@@ -17,11 +17,9 @@ declare type RowDataItem = {
|
||||
help?: any,
|
||||
icon?: string,
|
||||
extra?: any,
|
||||
pinnedUrls?: Array<string>,
|
||||
options?: {
|
||||
channelIds?: Array<string>,
|
||||
limitClaimsPerChannel?: number,
|
||||
pageSize?: number,
|
||||
pageSize: number,
|
||||
},
|
||||
route?: string,
|
||||
hideForUnauth?: boolean,
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
// @flow
|
||||
declare function __(a: string, b?: {}): string;
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
// @flow
|
||||
declare type LbryUrlObj = {
|
||||
// Path and channel will always exist when calling parseURI
|
||||
// But they may not exist when code calls buildURI
|
||||
isChannel?: boolean,
|
||||
path?: string,
|
||||
streamName?: string,
|
||||
streamClaimId?: string,
|
||||
channelName?: string,
|
||||
channelClaimId?: string,
|
||||
primaryClaimSequence?: number,
|
||||
secondaryClaimSequence?: number,
|
||||
primaryBidPosition?: number,
|
||||
secondaryBidPosition?: number,
|
||||
startTime?: number,
|
||||
|
||||
// Below are considered deprecated and should not be used due to unreliableness with claim.canonical_url
|
||||
claimName?: string,
|
||||
claimId?: string,
|
||||
contentName?: string,
|
||||
};
|
||||
Vendored
-15
@@ -23,19 +23,4 @@ declare type LivestreamReplayData = Array<LivestreamReplayItem>;
|
||||
|
||||
declare type LivestreamState = {
|
||||
fetchingById: {},
|
||||
viewersById: {},
|
||||
fetchingActiveLivestreams: boolean,
|
||||
activeLivestreams: ?LivestreamInfo,
|
||||
activeLivestreamsLastFetchedDate: number,
|
||||
activeLivestreamsLastFetchedOptions: {},
|
||||
}
|
||||
|
||||
declare type LivestreamInfo = {
|
||||
[/* creatorId */ string]: {
|
||||
live: boolean,
|
||||
viewCount: number,
|
||||
creatorId: string,
|
||||
latestClaimId: string,
|
||||
latestClaimUri: string,
|
||||
}
|
||||
}
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
// @flow
|
||||
declare type WebNotification = {
|
||||
active_at: string,
|
||||
created_at: string,
|
||||
id: number,
|
||||
is_app_readable: boolean,
|
||||
is_device_notified: boolean,
|
||||
is_emailed: boolean,
|
||||
is_read: boolean,
|
||||
is_seen: boolean,
|
||||
notification_parameters: {
|
||||
device: {
|
||||
analytics_label: string,
|
||||
image_url: string,
|
||||
is_data_only: boolean,
|
||||
name: string,
|
||||
placeholders: ?string,
|
||||
target: string,
|
||||
text: string,
|
||||
title: string,
|
||||
type: string,
|
||||
},
|
||||
dynamic: {
|
||||
comment_author: string,
|
||||
reply_author: string,
|
||||
hash: string,
|
||||
claim_title: string,
|
||||
comment?: string,
|
||||
channel_url: string,
|
||||
},
|
||||
email: {},
|
||||
},
|
||||
notification_rule: string,
|
||||
type: string,
|
||||
updated_at: string,
|
||||
user_id: number,
|
||||
group_count?: number,
|
||||
};
|
||||
|
||||
declare type NotificationCategory = {
|
||||
name: string,
|
||||
types: ?Array<string>,
|
||||
};
|
||||
+1
-1
@@ -25,7 +25,7 @@ declare type UpdatePublishFormData = {
|
||||
licenseType?: string,
|
||||
uri?: string,
|
||||
nsfw: boolean,
|
||||
isMarkdownPost?: boolean,
|
||||
isMarkdownPost: boolean,
|
||||
};
|
||||
|
||||
declare type PublishParams = {
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
|
||||
declare type Dispatch = any;
|
||||
Vendored
+1
-5
@@ -28,11 +28,9 @@ declare type SearchOptions = {
|
||||
|
||||
declare type SearchState = {
|
||||
options: SearchOptions,
|
||||
resultsByQuery: {},
|
||||
results: Array<string>,
|
||||
urisByQuery: {},
|
||||
hasReachedMaxResultsLength: {},
|
||||
searching: boolean,
|
||||
mentionQuery: string,
|
||||
};
|
||||
|
||||
declare type SearchSuccess = {
|
||||
@@ -42,8 +40,6 @@ declare type SearchSuccess = {
|
||||
from: number,
|
||||
size: number,
|
||||
uris: Array<string>,
|
||||
recsys: string,
|
||||
query: string,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Vendored
-1
@@ -28,7 +28,6 @@ declare type User = {
|
||||
device_types: Array<DeviceType>,
|
||||
lbry_first_approved: boolean,
|
||||
experimental_ui: boolean,
|
||||
fiat_enabled: boolean,
|
||||
odysee_live_enabled: boolean,
|
||||
odysee_live_disabled: boolean,
|
||||
global_mod: boolean,
|
||||
|
||||
+171
-16
@@ -1,7 +1,38 @@
|
||||
import * as PAGES from '../ui/constants/pages';
|
||||
import * as CS from '../ui/constants/claim_search';
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import * as CS from 'constants/claim_search';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import moment from 'moment';
|
||||
import { toCapitalCase } from 'util/string';
|
||||
import { useIsLargeScreen } from 'effects/use-screensize';
|
||||
|
||||
const YOUTUBER_CHANNEL_IDS = [
|
||||
export type RowDataItem = {
|
||||
title: string,
|
||||
link?: string,
|
||||
help?: any,
|
||||
options?: {},
|
||||
icon?: string,
|
||||
};
|
||||
|
||||
export default function GetHomePageRowData(
|
||||
authenticated: boolean,
|
||||
showPersonalizedChannels: boolean,
|
||||
showPersonalizedTags: boolean,
|
||||
subscribedChannels: Array<Subscription>,
|
||||
followedTags: Array<Tag>,
|
||||
showIndividualTags: boolean,
|
||||
showNsfw: boolean
|
||||
) {
|
||||
const isLargeScreen = useIsLargeScreen();
|
||||
|
||||
function getPageSize(originalSize) {
|
||||
return isLargeScreen ? originalSize * (3 / 2) : originalSize;
|
||||
}
|
||||
|
||||
let rowData: Array<RowDataItem> = [];
|
||||
const individualTagDataItems: Array<RowDataItem> = [];
|
||||
const YOUTUBER_CHANNEL_IDS = [
|
||||
'fb364ef587872515f545a5b4b3182b58073f230f',
|
||||
'589276465a23c589801d874f484cc39f307d7ec7',
|
||||
'ba79c80788a9e1751e49ad401f5692d86f73a2db',
|
||||
@@ -85,18 +116,142 @@ const YOUTUBER_CHANNEL_IDS = [
|
||||
'e8f68563d242f6ac9784dcbc41dd86c28a9391d6',
|
||||
];
|
||||
|
||||
const YOUTUBERS = {
|
||||
ids: YOUTUBER_CHANNEL_IDS,
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${CS.CHANNEL_IDS_KEY}=${YOUTUBER_CHANNEL_IDS.join(
|
||||
','
|
||||
)}`,
|
||||
name: 'general',
|
||||
label: 'CableTube Escape Artists',
|
||||
channelLimit: 1,
|
||||
daysOfContent: 30,
|
||||
pageSize: 24,
|
||||
//pinnedUrls: [],
|
||||
//mixIn: [],
|
||||
const YOUTUBE_CREATOR_ROW = {
|
||||
title: __('CableTube Escape Artists'),
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${CS.CHANNEL_IDS_KEY}=${YOUTUBER_CHANNEL_IDS.join(
|
||||
','
|
||||
)}`,
|
||||
options: {
|
||||
claimType: ['stream'],
|
||||
orderBy: ['release_time'],
|
||||
pageSize: getPageSize(12),
|
||||
channelIds: YOUTUBER_CHANNEL_IDS,
|
||||
limitClaimsPerChannel: 1,
|
||||
releaseTime: `>${Math.floor(moment().subtract(1, 'months').startOf('week').unix())}`,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = { YOUTUBERS };
|
||||
if (followedTags.length) {
|
||||
followedTags.forEach((tag: Tag) => {
|
||||
const tagName = `#${toCapitalCase(tag.name)}`;
|
||||
individualTagDataItems.push({
|
||||
title: __('Trending for %tagName%', { tagName: tagName }),
|
||||
link: `/$/${PAGES.DISCOVER}?t=${tag.name}`,
|
||||
options: {
|
||||
pageSize: 4,
|
||||
tags: [tag.name],
|
||||
claimType: ['stream'],
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const RECENT_FROM_FOLLOWING = {
|
||||
title: __('Recent From Following'),
|
||||
link: `/$/${PAGES.CHANNELS_FOLLOWING}`,
|
||||
icon: ICONS.SUBSCRIBE,
|
||||
options: {
|
||||
streamTypes: null,
|
||||
orderBy: ['release_time'],
|
||||
releaseTime:
|
||||
subscribedChannels.length > 20
|
||||
? `>${Math.floor(moment().subtract(6, 'months').startOf('week').unix())}`
|
||||
: `>${Math.floor(moment().subtract(1, 'year').startOf('week').unix())}`,
|
||||
pageSize: getPageSize(subscribedChannels.length > 3 ? (subscribedChannels.length > 6 ? 16 : 8) : 4),
|
||||
channelIds: subscribedChannels.map((subscription: Subscription) => {
|
||||
const { channelClaimId } = parseURI(subscription.uri);
|
||||
return channelClaimId;
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
const TOP_CONTENT_TODAY = {
|
||||
title: __('Top Content from Today'),
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`,
|
||||
options: {
|
||||
pageSize: getPageSize(showPersonalizedChannels || showPersonalizedTags ? 4 : 8),
|
||||
orderBy: ['effective_amount'],
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 2,
|
||||
releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`,
|
||||
},
|
||||
};
|
||||
|
||||
const TOP_CHANNELS = {
|
||||
title: __('Top Channels On LBRY'),
|
||||
link: `/$/${PAGES.DISCOVER}?claim_type=channel&${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_ALL}`,
|
||||
options: {
|
||||
orderBy: ['effective_amount'],
|
||||
claimType: ['channel'],
|
||||
},
|
||||
};
|
||||
|
||||
// const TRENDING_CLASSICS = {
|
||||
// title: __('Trending Classics'),
|
||||
// link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TRENDING}&${CS.FRESH_KEY}=${CS.FRESH_WEEK}`,
|
||||
// options: {
|
||||
// pageSize: getPageSize(4),
|
||||
// claimType: ['stream'],
|
||||
// limitClaimsPerChannel: 1,
|
||||
// releaseTime: `<${Math.floor(
|
||||
// moment()
|
||||
// .subtract(6, 'month')
|
||||
// .startOf('day')
|
||||
// .unix()
|
||||
// )}`,
|
||||
// },
|
||||
// };
|
||||
|
||||
// const TRENDING_ON_LBRY = {
|
||||
// title: __('Trending On LBRY'),
|
||||
// link: `/$/${PAGES.DISCOVER}`,
|
||||
// options: {
|
||||
// pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8,
|
||||
// },
|
||||
// };
|
||||
|
||||
const TRENDING_FOR_TAGS = {
|
||||
title: __('Trending For Your Tags'),
|
||||
link: `/$/${PAGES.TAGS_FOLLOWING}`,
|
||||
icon: ICONS.TAG,
|
||||
|
||||
options: {
|
||||
pageSize: getPageSize(4),
|
||||
tags: followedTags.map((tag) => tag.name),
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 2,
|
||||
},
|
||||
};
|
||||
|
||||
const LATEST_FROM_LBRY = {
|
||||
title: __('Latest From @lbry'),
|
||||
link: `/@lbry:3f`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
pageSize: getPageSize(4),
|
||||
channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'],
|
||||
},
|
||||
};
|
||||
|
||||
if (showPersonalizedChannels) rowData.push(RECENT_FROM_FOLLOWING);
|
||||
if (showPersonalizedTags && !showIndividualTags) rowData.push(TRENDING_FOR_TAGS);
|
||||
if (showPersonalizedTags && showIndividualTags) {
|
||||
individualTagDataItems.forEach((item: RowDataItem) => {
|
||||
rowData.push(item);
|
||||
});
|
||||
}
|
||||
|
||||
if (!authenticated) {
|
||||
rowData.push(YOUTUBE_CREATOR_ROW);
|
||||
}
|
||||
|
||||
rowData.push(TOP_CONTENT_TODAY);
|
||||
|
||||
// rowData.push(TRENDING_ON_LBRY);
|
||||
|
||||
rowData.push(LATEST_FROM_LBRY);
|
||||
|
||||
if (!showPersonalizedChannels) rowData.push(TOP_CHANNELS);
|
||||
|
||||
return rowData;
|
||||
}
|
||||
+5
-3
@@ -1,3 +1,5 @@
|
||||
module.exports = {
|
||||
en: {},
|
||||
};
|
||||
import * as lbrytv from './homepage';
|
||||
// import all homepages
|
||||
// export object of homepages
|
||||
export default {'en': lbrytv};
|
||||
export const NO_ADS_CHANNEL_IDS = [];
|
||||
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
text: `This is LBRY`,
|
||||
url: 'https://odysee.com/@Odysee:8?view=discussion',
|
||||
};
|
||||
+30
-38
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.52.4",
|
||||
"version": "0.50.3-rc.1",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -20,53 +20,41 @@
|
||||
},
|
||||
"main": "./dist/electron/main.js",
|
||||
"scripts": {
|
||||
"analyze": "source-map-explorer --only-mapped dist/electron/webpack/ui*.js --html dist/sourceMap.html",
|
||||
"compile:electron": "node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --config webpack.electron.config.js",
|
||||
"compile": "cross-env NODE_ENV=production yarn compile:electron",
|
||||
"copyenv": "copyfiles ./.env* web/",
|
||||
"compile:web": "yarn copyenv && cd web && node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --config webpack.config.js",
|
||||
"compile": "cross-env NODE_ENV=production yarn compile:electron && cross-env NODE_ENV=production yarn compile:web",
|
||||
"copyenv": "cp ./.env* web/",
|
||||
"dev": "yarn dev:electron",
|
||||
"dev:electron": "cross-env NODE_ENV=development node ./electron/devServer.js",
|
||||
"dev:web": "yarn copyenv && cd web && yarn dev",
|
||||
"dev:web-server": "cross-env NODE_ENV=development yarn compile:web && concurrently \"cross-env NODE_ENV=development yarn compile:web --watch\" \"cd web && yarn dev:server\"",
|
||||
"dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev:electron",
|
||||
"dev:iatv": "LBRY_API_URL='http://localhost:15400' SDK_API_URL='http://localhost:15100' yarn dev:web",
|
||||
"run:web-server": "cross-env NODE_ENV=production yarn compile:web && cd web && yarn dev:server",
|
||||
"pack": "electron-builder --dir",
|
||||
"dist": "electron-builder",
|
||||
"build": "cross-env NODE_ENV=production yarn compile:electron && electron-builder build",
|
||||
"build:dir": "yarn build -- --dir -c.compression=store -c.mac.identity=null",
|
||||
"crossenv": "./node_modules/cross-env/dist/bin/cross-env",
|
||||
"flow": "flow",
|
||||
"lint": "eslint 'ui/**/*.{js,jsx}' && eslint 'electron/**/*.js' && flow",
|
||||
"lint-fix": "eslint --fix --quiet 'ui/**/*.{js,jsx}' && eslint --fix --quiet 'electron/**/*.js'",
|
||||
"lint": "eslint 'ui/**/*.{js,jsx}' && eslint 'web/**/*.{js,jsx}' && eslint 'electron/**/*.js' && flow",
|
||||
"format": "prettier 'src/**/*.{js,jsx,scss,json}' --write",
|
||||
"flow-defs": "flow-typed install",
|
||||
"precommit": "lint-staged",
|
||||
"preinstall": "yarn cache clean lbry-redux && yarn cache clean lbryinc",
|
||||
"postinstall": "electron-builder install-app-deps && node ./build/downloadDaemon.js",
|
||||
"postinstall": "cd web && yarn && cd .. && if-env NODE_ENV=production && yarn postinstall:warning || if-env APP_ENV=web && echo 'Done installing deps' || yarn postinstall:electron",
|
||||
"postinstall:electron": "electron-builder install-app-deps && node ./build/downloadDaemon.js && node ./build/downloadLBRYFirst.js",
|
||||
"postinstall:warning": "echo '\n\nWARNING\n\nNot all node modules were installed because NODE_ENV is set to \"production\".\nThis should only be set after installing dependencies with \"yarn\". The app will not work.\n\n'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.1",
|
||||
"@emotion/react": "^11.6.0",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@mui/material": "^5.2.1",
|
||||
"@ungap/from-entries": "^0.2.1",
|
||||
"auto-launch": "^5.0.5",
|
||||
"electron-dl": "^3.2.0",
|
||||
"electron-dl": "^1.11.0",
|
||||
"electron-log": "^2.2.12",
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-updater": "^4.2.4",
|
||||
"express": "^4.17.1",
|
||||
"humanize-duration": "^3.27.0",
|
||||
"if-env": "^1.0.4",
|
||||
"match-sorter": "^6.3.0",
|
||||
"node-html-parser": "^5.1.0",
|
||||
"parse-duration": "^1.0.0",
|
||||
"proxy-polyfill": "0.1.6",
|
||||
"re-reselect": "^4.0.0",
|
||||
"react-beautiful-dnd": "^13.1.0",
|
||||
"react-datetime-picker": "^3.4.3",
|
||||
"react-datetime-picker": "^3.2.1",
|
||||
"remove-markdown": "^0.3.0",
|
||||
"rss": "^1.2.2",
|
||||
"source-map-explorer": "^2.5.2",
|
||||
"tempy": "^0.6.0",
|
||||
"videojs-logo": "^2.1.4"
|
||||
},
|
||||
@@ -75,7 +63,6 @@
|
||||
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.3.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.2.3",
|
||||
"@babel/plugin-transform-runtime": "^7.4.3",
|
||||
@@ -85,12 +72,12 @@
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"@datapunt/matomo-tracker-js": "^0.1.4",
|
||||
"@exponent/electron-cookies": "^2.0.0",
|
||||
"@hot-loader/react-dom": "^16.13",
|
||||
"@meetfranz/electron-cookies": "^3.0.2",
|
||||
"@reach/auto-id": "^0.13.0",
|
||||
"@reach/combobox": "^0.12.1",
|
||||
"@reach/menu-button": "0.7.4",
|
||||
"@reach/rect": "^0.16.0",
|
||||
"@reach/rect": "^0.13.0",
|
||||
"@reach/tabs": "^0.1.5",
|
||||
"@reach/tooltip": "^0.12.1",
|
||||
"@reach/utils": "^0.12.1",
|
||||
@@ -111,8 +98,7 @@
|
||||
"codemirror": "^5.39.2",
|
||||
"concurrently": "^4.1.2",
|
||||
"connected-react-router": "^6.8.0",
|
||||
"copy-webpack-plugin": "^6.4.1",
|
||||
"copyfiles": "^2.4.1",
|
||||
"copy-webpack-plugin": "^5.1.2",
|
||||
"country-data": "^0.0.31",
|
||||
"cross-env": "^7.0.3",
|
||||
"crypto-js": "^4.0.0",
|
||||
@@ -126,7 +112,7 @@
|
||||
"dom-scroll-into-view": "^1.2.1",
|
||||
"dotenv-defaults": "^2.0.1",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"electron": "15.3.2",
|
||||
"electron": "9.4.0",
|
||||
"electron-builder": "^22.9.1",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"electron-is-dev": "^0.3.0",
|
||||
@@ -157,6 +143,8 @@
|
||||
"imagesloaded": "^4.1.4",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#5cd9e7601cdc1c81b8d0e2d2f02e9b9d2fb86575",
|
||||
"lbryinc": "lbryio/lbryinc#8f9a58bfc8312a65614fd7327661cdcc502c4e59",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
@@ -164,10 +152,8 @@
|
||||
"moment": "^2.22.0",
|
||||
"node-abi": "^2.5.1",
|
||||
"node-fetch": "^2.6.1",
|
||||
"node-html-parser": "^5.1.0",
|
||||
"node-libs-browser": "^2.1.0",
|
||||
"node-loader": "^0.6.0",
|
||||
"node-wget": "^0.4.3",
|
||||
"nodemon": "^1.19.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
@@ -211,18 +197,20 @@
|
||||
"stream-to-blob-url": "^2.1.1",
|
||||
"strip-markdown": "^3.0.3",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"three-full": "^28.0.1",
|
||||
"terser-webpack-plugin": "^1.2.3",
|
||||
"three": "^0.125.0",
|
||||
"three-full": "^17.1.0",
|
||||
"tiny-relative-date": "^1.3.0",
|
||||
"tree-kill": "^1.1.0",
|
||||
"unist-util-visit": "^2.0.3",
|
||||
"uuid": "^8.3.2",
|
||||
"video.js": "^7.14.3",
|
||||
"vast-client": "^3.1.1",
|
||||
"video.js": "^7.10.1",
|
||||
"videojs-contrib-quality-levels": "^2.0.9",
|
||||
"videojs-event-tracking": "^1.0.1",
|
||||
"villain-react": "^1.0.9",
|
||||
"wavesurfer.js": "^2.2.1",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack": "^4.28.4",
|
||||
"webpack-bundle-analyzer": "^3.1.0",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-config-utils": "^2.3.1",
|
||||
@@ -239,9 +227,13 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.106.0",
|
||||
"lbrynetDaemonVersion": "0.92.0",
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet"
|
||||
"lbrynetDaemonFileName": "lbrynet",
|
||||
"LBRYFirstVersion": "0.0.20",
|
||||
"LBRYFirstUrlTemplate": "https://github.com/lbryio/lbry-first/releases/download/vLBRYFIRSTVER/lbry-first_OSNAME_amd64.zip",
|
||||
"LBRYFirstDir": "static/lbry-first",
|
||||
"LBRYFirstFileName": "lbry-first"
|
||||
}
|
||||
}
|
||||
+68
-406
@@ -30,9 +30,6 @@
|
||||
"Send a tip": "Send a tip",
|
||||
"Share": "Share",
|
||||
"Play": "Play",
|
||||
"Shuffle Play": "Shuffle Play",
|
||||
"Shuffle": "Shuffle",
|
||||
"Loop": "Loop",
|
||||
"Subscribe": "Subscribe",
|
||||
"Report content": "Report content",
|
||||
"Report Content": "Report Content",
|
||||
@@ -51,6 +48,8 @@
|
||||
"Description of your content": "Description of your content",
|
||||
"Price": "Price",
|
||||
"Free": "Free",
|
||||
"The LBRY URL is the exact address where people find your content (ex. lbry://myvideo).": "The LBRY URL is the exact address where people find your content (ex. lbry://myvideo).",
|
||||
"Learn more": "Learn more",
|
||||
"Name": "Name",
|
||||
"Deposit": "Deposit",
|
||||
"Language": "Language",
|
||||
@@ -102,6 +101,7 @@
|
||||
"Enter a URL for your thumbnail.": "Enter a URL for your thumbnail.",
|
||||
"Thumbnail Preview": "Thumbnail Preview",
|
||||
"Use thumbnail upload tool": "Use thumbnail upload tool",
|
||||
"Thumbnails that entice a viewer to watch a video work best": "Thumbnails that entice a viewer to watch a video work best",
|
||||
"Create a URL for this content. Simpler names are easier to find and remember.": "Create a URL for this content. Simpler names are easier to find and remember.",
|
||||
"Open file": "Open file",
|
||||
"Delete": "Delete",
|
||||
@@ -156,12 +156,9 @@
|
||||
"Lost passwords cannot be recovered.": "Lost passwords cannot be recovered.",
|
||||
"Experimental settings": "Experimental settings",
|
||||
"Autoplay media files": "Autoplay media files",
|
||||
"Autoplay video and audio files when navigating to a file.": "Autoplay video and audio files when navigating to a file.",
|
||||
"Autoplay next recommended content": "Autoplay next recommended content",
|
||||
"Autoplay the next related item when a file (video or audio) finishes playing.": "Autoplay the next related item when a file (video or audio) finishes playing.",
|
||||
"Clear application cache": "Clear application cache",
|
||||
"Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.": "Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.",
|
||||
"Application cache": "Application cache",
|
||||
"Clear Cache": "Clear Cache",
|
||||
"This might fix issues that you are having. Your wallet will not be affected.": "This might fix issues that you are having. Your wallet will not be affected.",
|
||||
"Currency": "Currency",
|
||||
"US Dollars": "US Dollars",
|
||||
"There's nothing available at this location.": "There's nothing available at this location.",
|
||||
@@ -173,9 +170,11 @@
|
||||
"Continue": "Continue",
|
||||
"This file has been shared with you by other people.": "This file has been shared with you by other people.",
|
||||
"LBRY Inc is not responsible for its content, click continue to proceed at your own risk.": "LBRY Inc is not responsible for its content, click continue to proceed at your own risk.",
|
||||
"Find what you were looking for?": "Find what you were looking for?",
|
||||
"Yes": "Yes",
|
||||
"No": "No",
|
||||
"These search results are provided by LBRY, Inc.": "These search results are provided by LBRY, Inc.",
|
||||
"FILTER": "FILTER",
|
||||
"View file": "View file",
|
||||
"Files": "Files",
|
||||
"Channels": "Channels",
|
||||
@@ -204,21 +203,14 @@
|
||||
"View": "View",
|
||||
"Edit": "Edit",
|
||||
"Copied": "Copied",
|
||||
"Copied stream key.": "Copied stream key.",
|
||||
"Copied stream server URL.": "Copied stream server URL.",
|
||||
"Failed to copy.": "Failed to copy.",
|
||||
"The publisher has chosen to charge %lbc% to view this content. Your balance is currently too low to view it. Check out %reward_link% for free %lbc% or send more %lbc% to your wallet. You can also %buy_link% more %lbc%.": "The publisher has chosen to charge %lbc% to view this content. Your balance is currently too low to view it. Check out %reward_link% for free %lbc% or send more %lbc% to your wallet. You can also %buy_link% more %lbc%.",
|
||||
"Connecting...": "Connecting...",
|
||||
"Your comments": "Your comments",
|
||||
"View your past comments.": "View your past comments.",
|
||||
"Content or channel was deleted.": "Content or channel was deleted.",
|
||||
"Comments": "Comments",
|
||||
"Comment": "Comment",
|
||||
"Comment --[button to submit something]--": "Comment",
|
||||
"Your comment": "Your comment",
|
||||
"Post --[button to submit something]--": "Post",
|
||||
"Post --[noun, markdown post tab button]--": "Post",
|
||||
"Livestream --[noun, livestream tab button]--": "Livestream",
|
||||
"Posting...": "Posting...",
|
||||
"Incompatible daemon": "Incompatible daemon",
|
||||
"Incompatible daemon running": "Incompatible daemon running",
|
||||
@@ -317,8 +309,6 @@
|
||||
"Confirm Thumbnail Upload": "Confirm Thumbnail Upload",
|
||||
"Upload": "Upload",
|
||||
"upload": "upload",
|
||||
"Your uploads": "Your uploads",
|
||||
"Invalid thumbnail": "Invalid thumbnail",
|
||||
"Uploading thumbnail": "Uploading thumbnail",
|
||||
"Please wait for thumbnail to finish uploading": "Please wait for thumbnail to finish uploading",
|
||||
"A thumbnail is required. Please upload or provide an image URL above.": "A thumbnail is required. Please upload or provide an image URL above.",
|
||||
@@ -347,7 +337,7 @@
|
||||
"Remove tag": "Remove tag",
|
||||
"Add tag": "Add tag",
|
||||
"No tags added": "No tags added",
|
||||
"Choose an enticing thumbnail": "Choose an enticing thumbnail",
|
||||
"Choose a thumbnail": "Choose a thumbnail",
|
||||
"Take a snapshot from your video": "Take a snapshot from your video",
|
||||
"Upload your thumbnail to": "Upload your thumbnail to",
|
||||
"Add a price to this file": "Add a price to this file",
|
||||
@@ -387,8 +377,6 @@
|
||||
"Got it": "Got it",
|
||||
"View your channels": "View your channels",
|
||||
"Unfollow": "Unfollow",
|
||||
"Follow @%channelName%": "Follow @%channelName%",
|
||||
"Unfollow @%channelName%": "Unfollow @%channelName%",
|
||||
"These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.": "These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.",
|
||||
"Create channel": "Create channel",
|
||||
"Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.": "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.",
|
||||
@@ -398,25 +386,22 @@
|
||||
"Email Us": "Email Us",
|
||||
"Today": "Today",
|
||||
"All time": "All time",
|
||||
"Share on Reddit": "Share on Reddit",
|
||||
"Share on Facebook": "Share on Facebook",
|
||||
"Share on Twitter": "Share on Twitter",
|
||||
"Share on Telegram": "Share on Telegram",
|
||||
"Share via...": "Share via...",
|
||||
"Share On Twitter": "Share On Twitter",
|
||||
"View on lbry.tv": "View on lbry.tv",
|
||||
"You will receive an SMS text message confirming your phone number is valid. Does not work for Canada and possibly other regions.": "You will receive an SMS text message confirming your phone number is valid. Does not work for Canada and possibly other regions.",
|
||||
"Standard messaging rates apply. LBRY will not text or call you otherwise. Having trouble?": "Standard messaging rates apply. LBRY will not text or call you otherwise. Having trouble?",
|
||||
"You currently have the highest bid for this name.": "You currently have the highest bid for this name.",
|
||||
"You can generate a new address at any time, and any previous addresses will continue to work.": "You can generate a new address at any time, and any previous addresses will continue to work.",
|
||||
"Confirm Removal": "Confirm Removal",
|
||||
"Confirm Claim Revoke": "Confirm Claim Revoke",
|
||||
"Confirm Tip Unlock": "Confirm Tip Unlock",
|
||||
"Confirm Channel Removal": "Confirm Channel Removal",
|
||||
"Confirm Support Removal": "Confirm Support Removal",
|
||||
"Are you sure you want to remove this boost?": "Are you sure you want to remove this boost?",
|
||||
"These Credits are permanently yours and this boost can be removed at any time. Removing this boost will reduce discoverability and return %lbc% to your spendable balance.": "These Credits are permanently yours and this boost can be removed at any time. Removing this boost will reduce discoverability and return %lbc% to your spendable balance.",
|
||||
"Confirm Support Revoke": "Confirm Support Revoke",
|
||||
"Are you sure you want to remove this support?": "Are you sure you want to remove this support?",
|
||||
"These Credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the %lbc% to your spendable balance.": "These Credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the %lbc% to your spendable balance.",
|
||||
"Are you sure you want to unlock these Credits?": "Are you sure you want to unlock these Credits?",
|
||||
"These Credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but reduces discoverability of your content in lookups and search results. It is recommended you leave Credits locked until you need or want to spend them.": "These Credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but reduces discoverability of your content in lookups and search results. It is recommended you leave Credits locked until you need or want to spend them.",
|
||||
"Are you sure you want to remove this?": "Are you sure you want to remove this?",
|
||||
"This will prevent others from resolving and accessing the content you published. It will return the %lbc% to your spendable balance.": "This will prevent others from resolving and accessing the content you published. It will return the %lbc% to your spendable balance.",
|
||||
"These Credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but can hurt the performance of your content in lookups and search results. It is recommended you leave tips locked until you need or want to spend them.": "These Credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but can hurt the performance of your content in lookups and search results. It is recommended you leave tips locked until you need or want to spend them.",
|
||||
"Are you sure you want to revoke this claim?": "Are you sure you want to revoke this claim?",
|
||||
"This will prevent others from resolving and accessing the content you published. It will return the %lbc% to your spendable balance, less a small transaction fee.": "This will prevent others from resolving and accessing the content you published. It will return the %lbc% to your spendable balance, less a small transaction fee.",
|
||||
"Mature": "Mature",
|
||||
"Show mature content": "Show mature content",
|
||||
"Mature content may include nudity, intense sexuality, profanity, or other adult content. By displaying mature content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ": "Mature content may include nudity, intense sexuality, profanity, or other adult content. By displaying mature content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ",
|
||||
@@ -465,13 +450,13 @@
|
||||
"Trending": "Trending",
|
||||
"Top": "Top",
|
||||
"New": "New",
|
||||
"New --[clears Publish Form]--": "New",
|
||||
"Loading": "Loading",
|
||||
"This file is in your library.": "This file is in your library.",
|
||||
"'claimName', 'channelName', and 'streamName' are all empty. One must be present to build a url.": "'claimName', 'channelName', and 'streamName' are all empty. One must be present to build a url.",
|
||||
"Invalid claim ID %s.": "Invalid claim ID %s.",
|
||||
"'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead": "'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead",
|
||||
"View Tag": "View Tag",
|
||||
"Block": "Block",
|
||||
"'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead": "'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead",
|
||||
"Vietnamese": "Vietnamese",
|
||||
"Thai": "Thai",
|
||||
@@ -504,7 +489,7 @@
|
||||
"Automatic dark mode": "Automatic dark mode",
|
||||
"24-hour clock": "24-hour clock",
|
||||
"Hide wallet balance in header": "Hide wallet balance in header",
|
||||
"Max connections": "Max connections",
|
||||
"Max Connections": "Max Connections",
|
||||
"For users with good bandwidth, try a higher value to improve streaming and download speeds. Low bandwidth users may benefit from a lower setting. Default is 4.": "For users with good bandwidth, try a higher value to improve streaming and download speeds. Low bandwidth users may benefit from a lower setting. Default is 4.",
|
||||
"Show All": "Show All",
|
||||
"LBRY names cannot contain spaces or reserved symbols": "LBRY names cannot contain spaces or reserved symbols",
|
||||
@@ -522,7 +507,7 @@
|
||||
"Read more": "Read more",
|
||||
"Multi-language support is brand new and incomplete. Switching your language may have unintended consequences, like glossolalia.": "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences, like glossolalia.",
|
||||
"Tailor your experience.": "Tailor your experience.",
|
||||
"Save wallet password": "Save wallet password",
|
||||
"Save Password": "Save Password",
|
||||
"Automatically unlock your wallet on startup": "Automatically unlock your wallet on startup",
|
||||
"Dark": "Dark",
|
||||
"light": "light",
|
||||
@@ -543,7 +528,6 @@
|
||||
"Create a new account or sign in.": "Create a new account or sign in.",
|
||||
"Terms of Service": "Terms of Service",
|
||||
"Learn More": "Learn More",
|
||||
"Learn more": "Learn more",
|
||||
"Community": "Community",
|
||||
"Resources": "Resources",
|
||||
"Policies": "Policies",
|
||||
@@ -562,6 +546,7 @@
|
||||
"Extra Verification Needed": "Extra Verification Needed",
|
||||
"We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.": "We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.",
|
||||
"Verify phone number": "Verify phone number",
|
||||
"Verify Phone Number": "Verify Phone Number",
|
||||
"OR": "OR",
|
||||
"Proof via Credit": "Proof via Credit",
|
||||
"If you have a valid credit or debit card, you can use it to instantly prove your humanity. LBRY does not store your credit card information. There is no charge at all for this, now or in the future.": "If you have a valid credit or debit card, you can use it to instantly prove your humanity. LBRY does not store your credit card information. There is no charge at all for this, now or in the future.",
|
||||
@@ -637,7 +622,7 @@
|
||||
"If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.": "If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.",
|
||||
"Your update is now pending on LBRY. It will take a few minutes to appear for other users.": "Your update is now pending on LBRY. It will take a few minutes to appear for other users.",
|
||||
"Your livestream is now pending. You will be able to start shortly at the streaming dashboard.": "Your livestream is now pending. You will be able to start shortly at the streaming dashboard.",
|
||||
"Your content will be live shortly.": "Your content will be live shortly.",
|
||||
"Your file is now pending on LBRY. It will take a few minutes to appear for other users.": "Your file is now pending on LBRY. It will take a few minutes to appear for other users.",
|
||||
"Your video will appear on Odysee shortly.": "Your video will appear on Odysee shortly.",
|
||||
"Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!": "Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!",
|
||||
"No results for %query%": "No results for %query%",
|
||||
@@ -668,6 +653,7 @@
|
||||
"Invalid claim ID %claimId%.": "Invalid claim ID %claimId%.",
|
||||
"Suggested": "Suggested",
|
||||
"Startup preferences": "Startup preferences",
|
||||
"This will clear the application cache, and might fix issues you are having. Your wallet will not be affected. ": "This will clear the application cache, and might fix issues you are having. Your wallet will not be affected. ",
|
||||
"Start minimized": "Start minimized",
|
||||
"Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.": "Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.",
|
||||
"Content Type": "Content Type",
|
||||
@@ -714,15 +700,9 @@
|
||||
"Bid position must be a number.": "Bid position must be a number.",
|
||||
"Copy": "Copy",
|
||||
"Copy Link": "Copy Link",
|
||||
"Link copied.": "Link copied.",
|
||||
"Failed to copy link.": "Failed to copy link.",
|
||||
"Copy RSS URL": "Copy RSS URL",
|
||||
"RSS URL copied.": "RSS URL copied.",
|
||||
"Failed to copy RSS URL.": "Failed to copy RSS URL.",
|
||||
"Text copied": "Text copied",
|
||||
"Rewards Disabled": "Rewards Disabled",
|
||||
"Wallet server": "Wallet server",
|
||||
"Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%": "Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%",
|
||||
"Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%.": "Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%.",
|
||||
"Your Tags": "Your Tags",
|
||||
"All Content": "All Content",
|
||||
"Accepted": "Accepted",
|
||||
@@ -753,8 +733,9 @@
|
||||
"Update published": "Update published",
|
||||
"Livestream Created": "Livestream Created",
|
||||
"Delete this file from my computer": "Delete this file from my computer",
|
||||
"Are you sure you'd like to remove %title%?": "Are you sure you'd like to remove %title%?",
|
||||
"Remove from blockchain (%lbc%)": "Remove from blockchain (%lbc%)",
|
||||
"Are you sure you'd like to remove %title% from LBRY?": "Are you sure you'd like to remove %title% from LBRY?",
|
||||
"reclaim %amount%": "reclaim %amount%",
|
||||
"Abandon on blockchain (%lbc%)": "Abandon on blockchain (%lbc%)",
|
||||
"Abandon on blockchain (reclaim %lbc%)": "Abandon on blockchain (reclaim %lbc%)",
|
||||
"This will increase the overall bid amount for this content, which will boost its ability to be discovered while active.": "This will increase the overall bid amount for this content, which will boost its ability to be discovered while active.",
|
||||
"Show this channel your appreciation by sending a donation.": "Show this channel your appreciation by sending a donation.",
|
||||
@@ -786,7 +767,6 @@
|
||||
"There was an error reposting this claim. Please try again later.": "There was an error reposting this claim. Please try again later.",
|
||||
"Claim ID": "Claim ID",
|
||||
"Official YouTube Creator": "Official YouTube Creator",
|
||||
"YouTube Sync": "YouTube Sync",
|
||||
"Last checked %time_ago%": "Last checked %time_ago%",
|
||||
"Install Now": "Install Now",
|
||||
"Invite Link": "Invite Link",
|
||||
@@ -833,7 +813,7 @@
|
||||
"While we respect the desire for maximally private usage, please note that choosing this option hurts the ability for creators to understand how their content is performing.": "While we respect the desire for maximally private usage, please note that choosing this option hurts the ability for creators to understand how their content is performing.",
|
||||
"Internal sharing is required while signed in.": "Internal sharing is required while signed in.",
|
||||
"FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone.",
|
||||
"This action is permanent and cannot be undone": "This action is permanent and cannot be undone",
|
||||
"This action is permanent and cannot be undone.": "This action is permanent and cannot be undone.",
|
||||
"Allow the app to access third party analytics platforms": "Allow the app to access third party analytics platforms",
|
||||
"Share usage data with LBRY inc.": "Share usage data with LBRY inc.",
|
||||
"Required": "Required",
|
||||
@@ -869,11 +849,10 @@
|
||||
"view all claims": "view all claims",
|
||||
"Top claims at lbry://%name%": "Top claims at lbry://%name%",
|
||||
"Last Updated": "Last Updated",
|
||||
"Are you sure? Type %name% to confirm that you wish to remove the channel.": "Are you sure? Type %name% to confirm that you wish to remove the channel.",
|
||||
"This will permanently remove your channel. Content published under this channel will be orphaned.": "This will permanently remove your channel. Content published under this channel will be orphaned.",
|
||||
"Are you sure you'd like to remove \"%title%\"?": "Are you sure you'd like to remove \"%title%\"?",
|
||||
"Are you sure? Type %name% to confirm that you wish to delete the channel.": "Are you sure? Type %name% to confirm that you wish to delete the channel.",
|
||||
"You're about to permanently delete a channel. Content published under this channel will be orphaned and their signing channel invalid. Content sync programs using this channel will fail.": "You're about to permanently delete a channel. Content published under this channel will be orphaned and their signing channel invalid. Content sync programs using this channel will fail.",
|
||||
"You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.": "You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.",
|
||||
"%SITE_NAME% works better if you find and follow a couple creators you like. You can also block channels you never want to see.": "%SITE_NAME% works better if you find and follow a couple creators you like. You can also block channels you never want to see.",
|
||||
"LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.": "LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.",
|
||||
"Nice! You are currently following %followingCount% creator": "Nice! You are currently following %followingCount% creator",
|
||||
"Nice! You are currently following %followingCount% creators": "Nice! You are currently following %followingCount% creators",
|
||||
"Get Validated": "Get Validated",
|
||||
@@ -940,7 +919,6 @@
|
||||
"Community Choice?": "Community Choice?",
|
||||
"Download to your Library": "Download to your Library",
|
||||
"Leave a Comment": "Leave a Comment",
|
||||
"This comment has been deleted.": "This comment has been deleted.",
|
||||
"That was pretty deep. What do you think?": "That was pretty deep. What do you think?",
|
||||
"%repost_total% Reposts": "%repost_total% Reposts",
|
||||
"File Description": "File Description",
|
||||
@@ -1009,12 +987,10 @@
|
||||
"Error unlocking your tip": "Error unlocking your tip",
|
||||
"You deposited %lbc% as a support!": "You deposited %lbc% as a support!",
|
||||
"You deposited %amount% LBRY Credits as a support!": "You deposited %amount% LBRY Credits as a support!",
|
||||
"You sent $%amount% as a tip to %tipChannelName%, I'm sure they appreciate it!": "You sent $%amount% as a tip to %tipChannelName%, I'm sure they appreciate it!",
|
||||
"You sent %tipAmount% LBRY Credits as a tip to %tipChannelName%, I'm sure they appreciate it!": "You sent %tipAmount% LBRY Credits as a tip to %tipChannelName%, I'm sure they appreciate it!",
|
||||
"You sent %amount% LBRY Credits as a tip, Mahalo!": "You sent %amount% LBRY Credits as a tip, Mahalo!",
|
||||
"You sent %amount% LBRY Credits": "You sent %amount% LBRY Credits",
|
||||
"No stats found": "No stats found",
|
||||
"Sorry about that. Contact %SITE_HELP_EMAIL% if you continue to have issues.": "Sorry about that. Contact %SITE_HELP_EMAIL% if you continue to have issues.",
|
||||
"Sorry about that. Try refreshing or something else.": "Sorry about that. Try refreshing or something else.",
|
||||
"You are not able to see this channel's stats. Make sure you are signed in with the correct email and have data sharing turned on.": "You are not able to see this channel's stats. Make sure you are signed in with the correct email and have data sharing turned on.",
|
||||
"%follower_count% followers": "%follower_count% followers",
|
||||
"Sign Up": "Sign Up",
|
||||
@@ -1088,7 +1064,6 @@
|
||||
"download the app": "download the app",
|
||||
"lbry.tv collects usage information for itself only (%more_information%).": "lbry.tv collects usage information for itself only (%more_information%).",
|
||||
"lbry.tv collects usage information for itself only (%more_information%). Want control over this and more?": "lbry.tv collects usage information for itself only (%more_information%). Want control over this and more?",
|
||||
"more --[value for \"more_information\"]--": "more",
|
||||
"%DOMAIN% performance may be degraded. You can try to use it, or wait 5 minutes and refresh. Please no crush us.": "%DOMAIN% performance may be degraded. You can try to use it, or wait 5 minutes and refresh. Please no crush us.",
|
||||
"Please %sign_in_link% to comment.": "Please %sign_in_link% to comment.",
|
||||
"Replying as %reply_channel%": "Replying as %reply_channel%",
|
||||
@@ -1188,11 +1163,7 @@
|
||||
"Tap to unmute": "Tap to unmute",
|
||||
"Retry": "Retry",
|
||||
"Playing in %seconds_left% seconds...": "Playing in %seconds_left% seconds...",
|
||||
"Playing next free content in %seconds_left% seconds...": "Playing next free content in %seconds_left% seconds...",
|
||||
"Autoplay timer paused.": "Autoplay timer paused.",
|
||||
"Play Previous": "Play Previous",
|
||||
"Purchase?": "Purchase?",
|
||||
"Replay?": "Replay?",
|
||||
"0 Bytes": "0 Bytes",
|
||||
"Bytes": "Bytes",
|
||||
"KB": "KB",
|
||||
@@ -1206,7 +1177,6 @@
|
||||
"Edit existing claim instead": "Edit existing claim instead",
|
||||
"You already have a claim at %existing_uri%. Publishing will update (overwrite) your existing claim.": "You already have a claim at %existing_uri%. Publishing will update (overwrite) your existing claim.",
|
||||
"Save": "Save",
|
||||
"Saved": "Saved",
|
||||
"Saving...": "Saving...",
|
||||
"Downloading update": "Downloading update",
|
||||
"complete": "complete",
|
||||
@@ -1222,20 +1192,14 @@
|
||||
"Changelog": "Changelog",
|
||||
"Boost your content": "Boost your content",
|
||||
"Boost This Video": "Boost This Video",
|
||||
"Boost This %claimTypeText%": "Boost This %claimTypeText%",
|
||||
"Send a $%displayAmount% Tip": "Send a $%displayAmount% Tip",
|
||||
"Send a %displayAmount% Credit Tip": "Send a %displayAmount% Credit Tip",
|
||||
"Boost This Content": "Boost This Content",
|
||||
"Boost": "Boost",
|
||||
"Boosting": "Boosting",
|
||||
"Tipping Credit": "Tipping Credit",
|
||||
"Tipping Fiat (USD)": "Tipping Fiat (USD)",
|
||||
"Send Revocable Support": "Send Revocable Support",
|
||||
"Send a %amount% Tip": "Send a %amount% Tip",
|
||||
"Channel to show support as": "Channel to show support as",
|
||||
"Buy more LBRY Credits": "Buy more LBRY Credits",
|
||||
"Buy or swap more LBRY Credits": "Buy or swap more LBRY Credits",
|
||||
"Buy or Swap": "Buy or Swap",
|
||||
"Support This %claimTypeText%": "Support This %claimTypeText%",
|
||||
"Support this content": "Support this content",
|
||||
"Custom support amount": "Custom support amount",
|
||||
"(%lbc_balance% Credits available)": "(%lbc_balance% Credits available)",
|
||||
"Loading your channels...": "Loading your channels...",
|
||||
@@ -1301,8 +1265,6 @@
|
||||
"(6.25:1)": "(6.25:1)",
|
||||
"(1:1)": "(1:1)",
|
||||
"You Followed Your First Channel!": "You Followed Your First Channel!",
|
||||
"You followed %CHANNEL_NAME%!": "You followed %CHANNEL_NAME%!",
|
||||
"Unfollowed %CHANNEL_NAME%.": "Unfollowed %CHANNEL_NAME%.",
|
||||
"Awesome! You just followed your first channel.": "Awesome! You just followed your first channel.",
|
||||
"You will receive notifications related to new content.": "You will receive notifications related to new content.",
|
||||
"Log in with %SITE_NAME% to receive notifications about new content.": "Log in with %SITE_NAME% to receive notifications about new content.",
|
||||
@@ -1310,14 +1272,11 @@
|
||||
"Anything": "Anything",
|
||||
"Paid": "Paid",
|
||||
"Start at": "Start at",
|
||||
"Include List ID": "Include List ID",
|
||||
"Links": "Links",
|
||||
"LBRY URL": "LBRY URL",
|
||||
"Download Link": "Download Link",
|
||||
"Mature content is not supported.": "Mature content is not supported.",
|
||||
"Mature content blocked.": "Mature content blocked.",
|
||||
"Change this in your %content_settings%.": "Change this in your %content_settings%.",
|
||||
"You can download the LBRY Desktop or Android app on %download_url% and enable mature content in Settings.": "You can download the LBRY Desktop or Android app on %download_url% and enable mature content in Settings.",
|
||||
"content settings": "content settings",
|
||||
"Autoplay next in list": "Autoplay next in list",
|
||||
"Autoplay the next media file in the related list.": "Autoplay the next media file in the related list.",
|
||||
@@ -1329,26 +1288,21 @@
|
||||
"Check the status of various LBRY services.": "Check the status of various LBRY services.",
|
||||
"Check Status": "Check Status",
|
||||
"Upload your thumbnail to %domain%. Recommended size is 16:9.": "Upload your thumbnail to %domain%. Recommended size is 16:9.",
|
||||
"(16:9)": "(16:9)",
|
||||
"Are you sure you want to upload this thumbnail to %domain%": "Are you sure you want to upload this thumbnail to %domain%",
|
||||
"View thumbnail": "View thumbnail",
|
||||
"These changes will appear shortly.": "These changes will appear shortly.",
|
||||
"Block": "Block",
|
||||
"Block Channel": "Block Channel",
|
||||
"Unblock Channel": "Unblock Channel",
|
||||
"Blocking...": "Blocking...",
|
||||
"Blocked": "Blocked",
|
||||
"Channel \"%channel%\" blocked.": "Channel \"%channel%\" blocked.",
|
||||
"Unblock": "Unblock",
|
||||
"Unblock Channel": "Unblock Channel",
|
||||
"Unblocking...": "Unblocking...",
|
||||
"Channel unblocked!": "Channel unblocked!",
|
||||
"Channel blocked. You will not see them again.": "Channel blocked. You will not see them again.",
|
||||
"Mute Channel": "Mute Channel",
|
||||
"Unmute Channel": "Unmute Channel",
|
||||
"Muted": "Muted",
|
||||
"Mute": "Mute",
|
||||
"Unmute": "Unmute",
|
||||
"Channel muted. You will not see them again.": "Channel muted. You will not see them again.",
|
||||
"Channel unmuted!": "Channel unmuted!",
|
||||
"Manage notifications": "Manage notifications",
|
||||
"Uploads": "Uploads",
|
||||
"All uploads": "All uploads",
|
||||
@@ -1404,8 +1358,8 @@
|
||||
"Gaming": "Gaming",
|
||||
"Game": "Game",
|
||||
"Nice People": "Nice People",
|
||||
"Lab": "Lab",
|
||||
"Tech": "Tech",
|
||||
"Lab": "Lab",
|
||||
"Technology": "Technology",
|
||||
"Movies": "Movies",
|
||||
"News": "News",
|
||||
@@ -1437,15 +1391,15 @@
|
||||
"Confirm Edit": "Confirm Edit",
|
||||
"Create Livestream": "Create Livestream",
|
||||
"File": "File",
|
||||
"Video/audio file": "Video/audio file",
|
||||
"Transcode": "Transcode",
|
||||
"Estimated transaction fee:": "Estimated transaction fee:",
|
||||
"Est. transaction fee:": "Est. transaction fee:",
|
||||
"Publish confirmation": "Publish confirmation",
|
||||
"Skip preview and confirmation": "Skip preview and confirmation",
|
||||
"Show preview and confirmation dialog before publishing content.": "Show preview and confirmation dialog before publishing content.",
|
||||
"Upload settings": "Upload settings",
|
||||
"Currently Uploading": "Currently Uploading",
|
||||
"Leave the app running until upload is complete": "Leave the app running until upload is complete",
|
||||
"Currently uploading": "Currently uploading",
|
||||
"You files are currently uploading.": "You files are currently uploading.",
|
||||
"Your file is currently uploading.": "Your file is currently uploading.",
|
||||
"Enable Sync": "Enable Sync",
|
||||
"Disable Sync": "Disable Sync",
|
||||
"Getting your profiles...": "Getting your profiles...",
|
||||
@@ -1463,29 +1417,20 @@
|
||||
"Staked LBRY Credits": "Staked LBRY Credits",
|
||||
"1 comment": "1 comment",
|
||||
"%total_comments% comments": "%total_comments% comments",
|
||||
"No comments": "No comments",
|
||||
"Upvote": "Upvote",
|
||||
"Downvote": "Downvote",
|
||||
"You loved this": "You loved this",
|
||||
"Creator loved this": "Creator loved this",
|
||||
"A channel is required to throw fire and slime": "A channel is required to throw fire and slime",
|
||||
"The requested comment is no longer available.": "The requested comment is no longer available.",
|
||||
"Best": "Best",
|
||||
"Controversial": "Controversial",
|
||||
"Show Replies": "Show Replies",
|
||||
"Hide replies": "Hide replies",
|
||||
"Unable to create comment, please try again later.": "Unable to create comment, please try again later.",
|
||||
"Unable to comment. This channel has blocked you.": "Unable to comment. This channel has blocked you.",
|
||||
"Unable to comment. Your channel has been blocked by an admin.": "Unable to comment. Your channel has been blocked by an admin.",
|
||||
"Unable to comment. The content owner has disabled comments.": "Unable to comment. The content owner has disabled comments.",
|
||||
"Please do not spam.": "Please do not spam.",
|
||||
"Slow mode is on. Please wait up to %1% seconds before commenting again.": "Slow mode is on. Please wait up to %1% seconds before commenting again.",
|
||||
"The comment contains contents that are blocked by %1%.": "The comment contains contents that are blocked by %1%.",
|
||||
"Your user name \"%1%\" is too close to the creator's user name \"%2%\" and may cause confusion. Please use another identity.": "Your user name \"%1%\" is too close to the creator's user name \"%2%\" and may cause confusion. Please use another identity.",
|
||||
"The comment contains contents that are blocked by %author%": "The comment contains contents that are blocked by %author%",
|
||||
"Your channel is still being setup, try again in a few moments.": "Your channel is still being setup, try again in a few moments.",
|
||||
"Unable to delete this comment, please try again later.": "Unable to delete this comment, please try again later.",
|
||||
"Unable to edit this comment, please try again later.": "Unable to edit this comment, please try again later.",
|
||||
"No active channel selected.": "No active channel selected.",
|
||||
"Unable to verify your channel. Please try again.": "Unable to verify your channel. Please try again.",
|
||||
"Channel cannot be anonymous, please select a channel and try again.": "Channel cannot be anonymous, please select a channel and try again.",
|
||||
"Change to list layout": "Change to list layout",
|
||||
"Change to tile layout": "Change to tile layout",
|
||||
@@ -1521,7 +1466,7 @@
|
||||
"Earn a random reward of at least %lbc% for watching anything at all.": "Earn a random reward of at least %lbc% for watching anything at all.",
|
||||
"You have already claimed this reward within the last 24 hours.": "You have already claimed this reward within the last 24 hours.",
|
||||
"Please watch some content to earn this reward.": "Please watch some content to earn this reward.",
|
||||
"You will receive an SMS text message confirming your phone number is valid. May not be available in all regions.": "You will receive an SMS text message confirming your phone number is valid. May not be available in all regions.",
|
||||
"You will receive an SMS text message confirming your phone number is valid.": "You will receive an SMS text message confirming your phone number is valid.",
|
||||
"Verified accounts are eligible to earn LBRY Credits for views, watching and reposting videos, sharing invite links etc. Verifying also helps us keep the %SITE_NAME% community safe too! %Refresh% or %Skip%.": "Verified accounts are eligible to earn LBRY Credits for views, watching and reposting videos, sharing invite links etc. Verifying also helps us keep the %SITE_NAME% community safe too! %Refresh% or %Skip%.",
|
||||
"Your First Nickel": "Your First Nickel",
|
||||
"Your First Credit": "Your First Credit",
|
||||
@@ -1542,7 +1487,6 @@
|
||||
"Create A Channel": "Create A Channel",
|
||||
"At least 10 views are required to earn the reward, consume more!": "At least 10 views are required to earn the reward, consume more!",
|
||||
"Blocked %channel%": "Blocked %channel%",
|
||||
"Comment(s) blocked.": "Comment(s) blocked.",
|
||||
"You earned %lbc% for streaming your first video.": "You earned %lbc% for streaming your first video.",
|
||||
"You earned %lbc% for successfully completing The Journey L4: Perfect Harmony.": "You earned %lbc% for successfully completing The Journey L4: Perfect Harmony.",
|
||||
"You earned %lbc% for successfully completing The Journey L3: Bliss.": "You earned %lbc% for successfully completing The Journey L3: Bliss.",
|
||||
@@ -1634,18 +1578,12 @@
|
||||
"None selected": "None selected",
|
||||
"Secondary Language": "Secondary Language",
|
||||
"Your other content language": "Your other content language",
|
||||
"Search only in the selected language by default": "Search only in the selected language by default",
|
||||
"Search only in this language by default": "Search only in this language by default",
|
||||
"This link leads to an external website.": "This link leads to an external website.",
|
||||
"No Content Found": "No Content Found",
|
||||
"No Lists Found": "No Lists Found",
|
||||
"No matching playlists": "No matching playlists",
|
||||
"You have no lists! Create one from any playable content.": "You have no lists! Create one from any playable content.",
|
||||
"Pick": "Pick",
|
||||
"You have unpublished lists! %pick% one and publish it!": "You have unpublished lists! %pick% one and publish it!",
|
||||
"No Reposts Found": "No Reposts Found",
|
||||
"Publish Something": "Publish Something",
|
||||
"Repost Something": "Repost Something",
|
||||
"Watch on %SITE_NAME%": "Watch on %SITE_NAME%",
|
||||
"Watch on lbry.tv": "Watch on lbry.tv",
|
||||
"Paid content cannot be embedded.": "Paid content cannot be embedded.",
|
||||
"Please wait a bit, we are still getting your account ready.": "Please wait a bit, we are still getting your account ready.",
|
||||
"this channel is connected to a different account. Contact hello@lbry.com for help.": "this channel is connected to a different account. Contact hello@lbry.com for help.",
|
||||
@@ -1729,73 +1667,34 @@
|
||||
"%balance% available.": "%balance% available.",
|
||||
"Unlock all tips": "Unlock all tips",
|
||||
"Unlock All": "Unlock All",
|
||||
"Working...": "Working...",
|
||||
"there's so much room for activities": "there's so much room for activities",
|
||||
"Moon cheese is an acquired taste": "Moon cheese is an acquired taste",
|
||||
"Nothing found here. Like big tech ethics.": "Nothing found here. Like big tech ethics.",
|
||||
"Level %current_level%": "Level %current_level%",
|
||||
"Creator tools": "Creator tools",
|
||||
"Prevent this channel from interacting with you.": "Prevent this channel from interacting with you.",
|
||||
"Choose a permanent or temporary ban.": "Choose a permanent or temporary ban.",
|
||||
"Personal | Moderator | Admin": "Personal | Moderator | Admin",
|
||||
"Personal | Moderator": "Personal | Moderator",
|
||||
"Personal | Admin": "Personal | Admin",
|
||||
"Hide this channel for you only.": "Hide this channel for you only.",
|
||||
"Interacting as %channelName%": "Interacting as %channelName%",
|
||||
"Page Not Found": "Page Not Found",
|
||||
"Transaction limit reached. Try reducing the Description length.": "Transaction limit reached. Try reducing the Description length.",
|
||||
"You do not have any muted channels": "You do not have any muted channels",
|
||||
"You do not have any blocked channels": "You do not have any blocked channels",
|
||||
"You do not have any globally-blocked channels": "You do not have any globally-blocked channels",
|
||||
"You do not have any blocked channels as a moderator": "You do not have any blocked channels as a moderator",
|
||||
"Blocked channels will be invisible to you in the app. They will not be able to comment on your content, nor reply to your comments left on other channels' content.": "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, nor reply to your comments left on other channels' content.",
|
||||
"Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.": "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.",
|
||||
"Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.": "Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.",
|
||||
"List of channels that you have blocked as a moderator, along with the list of delegators.": "List of channels that you have blocked as a moderator, along with the list of delegators.",
|
||||
"This is the global block list.": "This is the global block list.",
|
||||
"This channel is blocked": "This channel is blocked",
|
||||
"This channel is muted": "This channel is muted",
|
||||
"Are you sure you want to view this content? Viewing will not unblock @%channel%": "Are you sure you want to view this content? Viewing will not unblock @%channel%",
|
||||
"Are you sure you want to view this content? Viewing will not unmute @%channel%": "Are you sure you want to view this content? Viewing will not unmute @%channel%",
|
||||
"View Content": "View Content",
|
||||
"Global": "Global",
|
||||
"Global Admin": "Global Admin",
|
||||
"Moderator": "Moderator",
|
||||
"Global Unblock Channel": "Global Unblock Channel",
|
||||
"Global Block Channel": "Global Block Channel",
|
||||
"Block this channel on behalf of %creator%.": "Block this channel on behalf of %creator%.",
|
||||
"Block this channel on behalf of the creator.": "Block this channel on behalf of the creator.",
|
||||
"Enter the timeout duration. Examples: %examples%": "Enter the timeout duration. Examples: %examples%",
|
||||
"Wow, banned for more than 100 years?": "Wow, banned for more than 100 years?",
|
||||
"Invalid duration.": "Invalid duration.",
|
||||
"Permanent": "Permanent",
|
||||
"Timeout --[time-based ban instead of permanent]--": "Timeout",
|
||||
"(Remaining: %duration%) --[timeout ban duration]--": "(Remaining: %duration%)",
|
||||
"Create a channel to change this setting.": "Create a channel to change this setting.",
|
||||
"Invalid channel URL \"%url%\"": "Invalid channel URL \"%url%\"",
|
||||
"Delegation": "Delegation",
|
||||
"Add moderator": "Add moderator",
|
||||
"Search channel": "Search channel",
|
||||
"Enter a name, @username or URL": "Enter a name, @username or URL",
|
||||
"Enter full channel name or URL": "Enter full channel name or URL",
|
||||
"Enter a channel name or URL to add as a moderator.\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8": "Enter a channel name or URL to add as a moderator.\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8",
|
||||
"Moderators": "Moderators",
|
||||
"Moderators can block channels on your behalf. Blocked channels will appear in your \"Blocked and Muted\" list.": "Moderators can block channels on your behalf. Blocked channels will appear in your \"Blocked and Muted\" list.",
|
||||
"Add as moderator": "Add as moderator",
|
||||
"Assign this user to moderate %channel%.": "Assign this user to moderate %channel%.",
|
||||
"Assign this user to moderate your channel.": "Assign this user to moderate your channel.",
|
||||
"Mute (m)": "Mute (m)",
|
||||
"Playback Rate (<, >)": "Playback Rate (<, >)",
|
||||
"Fullscreen (f)": "Fullscreen (f)",
|
||||
"Pause (space)": "Pause (space)",
|
||||
"Play (space)": "Play (space)",
|
||||
"Play Next (SHIFT+N)": "Play Next (SHIFT+N)",
|
||||
"Play Previous (SHIFT+P)": "Play Previous (SHIFT+P)",
|
||||
"Unmute (m)": "Unmute (m)",
|
||||
"Exit Fullscreen (f)": "Exit Fullscreen (f)",
|
||||
"Theater Mode (t)": "Theater Mode (t)",
|
||||
"Default Mode (t)": "Default Mode (t)",
|
||||
"Toggle Theater mode (t)": "Toggle Theater mode (t)",
|
||||
"Quality": "Quality",
|
||||
"Autoplay Next On": "Autoplay Next On",
|
||||
"Autoplay Next Off": "Autoplay Next Off",
|
||||
"Announcements, updates, and rewards specific to users of LBRY Android.": "Announcements, updates, and rewards specific to users of LBRY Android.",
|
||||
"LBRY has special programs and opportunities for people in school.": "LBRY has special programs and opportunities for people in school.",
|
||||
"Creator specific news, automated reports, and other updates.": "Creator specific news, automated reports, and other updates.",
|
||||
@@ -1811,9 +1710,7 @@
|
||||
"Receive tutorial emails related to LBRY ": "Receive tutorial emails related to LBRY ",
|
||||
"Create A LiveStream": "Create A LiveStream",
|
||||
"%channel% has disabled chat for this stream. Enjoy the stream!": "%channel% has disabled chat for this stream. Enjoy the stream!",
|
||||
"This channel has disabled chat for this stream. Enjoy the stream!": "This channel has disabled chat for this stream. Enjoy the stream!",
|
||||
"%channel% isn't live right now, but the chat is! Check back later to watch the stream.": "%channel% isn't live right now, but the chat is! Check back later to watch the stream.",
|
||||
"This channel isn't live right now, but the chat is! Check back later to watch the stream.": "This channel isn't live right now, but the chat is! Check back later to watch the stream.",
|
||||
"Right now": "Right now",
|
||||
"%viewer_count% currently watching": "%viewer_count% currently watching",
|
||||
"Slowmode is on. You can comment again in %time% seconds.": "Slowmode is on. You can comment again in %time% seconds.",
|
||||
@@ -1829,13 +1726,10 @@
|
||||
"Nothing here yet. %check_again%": "Nothing here yet. %check_again%",
|
||||
"Check again": "Check again",
|
||||
"Check again...": "Check again...",
|
||||
"Only visible to you": "Only visible to you",
|
||||
"People who view this link will be redirected to your livestream. Make sure to use this for sharing so your title and thumbnail are displayed properly.": "People who view this link will be redirected to your livestream. Make sure to use this for sharing so your title and thumbnail are displayed properly.",
|
||||
"View livestream": "View livestream",
|
||||
"You need to upload your livestream details before you can go live. If you already created one in this channel, it should appear soon.": "You need to upload your livestream details before you can go live. If you already created one in this channel, it should appear soon.",
|
||||
"Create A Livestream": "Create A Livestream",
|
||||
"Create a Livestream by first submitting your livestream details and waiting for approval confirmation. This can be done well in advance and will take a few minutes.": "Create a Livestream by first submitting your livestream details and waiting for approval confirmation. This can be done well in advance and will take a few minutes.",
|
||||
"The livestream will not be visible on your channel page until you are live, but you can share the URL in advance.": "The livestream will not be visible on your channel page until you are live, but you can share the URL in advance.",
|
||||
"Create a Livestream by first submitting your Livestream details and waiting for approval confirmation.": "Create a Livestream by first submitting your Livestream details and waiting for approval confirmation.",
|
||||
"The livestream will not be visible on your channel until you are live, but you can share the URL in advance.": "The livestream will not be visible on your channel until you are live, but you can share the URL in advance.",
|
||||
"Once the your livestream is confirmed, configure your streaming software (OBS, Restream, etc) and input the server URL along with the stream key in it.": "Once the your livestream is confirmed, configure your streaming software (OBS, Restream, etc) and input the server URL along with the stream key in it.",
|
||||
"To ensure the best streaming experience with OBS, open settings -> output": "To ensure the best streaming experience with OBS, open settings -> output",
|
||||
"Select advanced mode from the dropdown at the top.": "Select advanced mode from the dropdown at the top.",
|
||||
@@ -1844,17 +1738,16 @@
|
||||
"Keyframes: 1": "Keyframes: 1",
|
||||
"Profile: High": "Profile: High",
|
||||
"Tune: Zerolatency": "Tune: Zerolatency",
|
||||
"If using other streaming software, make sure the bitrate is below 4500 kbps or the stream will not work.": "If using other streaming software, make sure the bitrate is below 4500 kbps or the stream will not work.",
|
||||
"After your stream:\nClick the Update button on the content page. This will allow you to select a replay or upload your own edited MP4. Replays are limited to 4 hours and may take a few minutes to show (use the Check For Replays button).": "After your stream:\nClick the Update button on the content page. This will allow you to select a replay or upload your own edited MP4. Replays are limited to 4 hours and may take a few minutes to show (use the Check For Replays button).",
|
||||
"Click Save, then confirm, and you are done!": "Click Save, then confirm, and you are done!",
|
||||
"Note: If you don't plan on publishing your replay, you'll want to delete your livestream and then start with a fresh one next time.": "Note: If you don't plan on publishing your replay, you'll want to delete your livestream and then start with a fresh one next time.",
|
||||
"If using other livestreaming software, make sure the bitrate is below 5000 kbps or the stream will not work.": "If using other livestreaming software, make sure the bitrate is below 5000 kbps or the stream will not work.",
|
||||
"Please note: You'll need to record your own stream through your software if you plan to share it afterward. You can also delete it if you prefer not to upload the copy.": "Please note: You'll need to record your own stream through your software if you plan to share it afterward. You can also delete it if you prefer not to upload the copy.",
|
||||
"In the near future, this manual step will be removed and you will be able to share the stream right after its finished without needing to record it yourself.": "In the near future, this manual step will be removed and you will be able to share the stream right after its finished without needing to record it yourself.",
|
||||
"After your livestream:\nClick the Publish Replay button. This will allow you to edit details before sharing on Odysee. Be sure to select the saved mp4 file you recorded.": "After your livestream:\nClick the Publish Replay button. This will allow you to edit details before sharing on Odysee. Be sure to select the saved mp4 file you recorded.",
|
||||
"Click Save and you are done!": "Click Save and you are done!",
|
||||
"How does this work?": "How does this work?",
|
||||
"Introducing Lists": "Introducing Lists",
|
||||
"You have no lists yet. Better start hoarding!": "You have no lists yet. Better start hoarding!",
|
||||
"Update your livestream": "Update your livestream",
|
||||
"Prepare an upcoming livestream": "Prepare an upcoming livestream",
|
||||
"Edit your post": "Edit your post",
|
||||
"Update your content": "Update your content",
|
||||
"Update your video": "Update your video",
|
||||
"Go Live on Odysee": "Go Live on Odysee",
|
||||
"You're invited to try out our new livestreaming service while in beta!": "You're invited to try out our new livestreaming service while in beta!",
|
||||
"lbry.tv is being retired in favor of %odysee% and new sign ups are disabled. Sign up on %odysee% instead": "lbry.tv is being retired in favor of %odysee% and new sign ups are disabled. Sign up on %odysee% instead",
|
||||
@@ -1925,7 +1818,6 @@
|
||||
"e.g. John Doe": "e.g. John Doe",
|
||||
"e.g. john@example.com": "e.g. john@example.com",
|
||||
"e.g. satoshi@example.com": "e.g. satoshi@example.com",
|
||||
"e.g. odysee": "e.g. odysee",
|
||||
"Your channel": "Your channel",
|
||||
"Set to \"Anonymous\" if you do not want to associate your channel in this report.": "Set to \"Anonymous\" if you do not want to associate your channel in this report.",
|
||||
"Send report?": "Send report?",
|
||||
@@ -1975,33 +1867,26 @@
|
||||
"Clarification": "Clarification",
|
||||
"Client name": "Client name",
|
||||
"Creator settings": "Creator settings",
|
||||
"Comments and livestream chat containing these words will be blocked.": "Comments and livestream chat containing these words will be blocked.",
|
||||
"Muted words": "Muted words",
|
||||
"Add words": "Add words",
|
||||
"Suggestions": "Suggestions",
|
||||
"Add words to block": "Add words to block",
|
||||
"Enable comments for channel.": "Enable comments for channel.",
|
||||
"Slow mode": "Slow mode",
|
||||
"Minimum time gap in seconds between comments (affects livestream chat as well).": "Minimum time gap in seconds between comments (affects livestream chat as well).",
|
||||
"Minimum time gap in seconds for Slow Mode in livestream chat.": "Minimum time gap in seconds for Slow Mode in livestream chat.",
|
||||
"Minimum %lbc% tip amount for comments": "Minimum %lbc% tip amount for comments",
|
||||
"Enabling a minimum amount to comment will force all comments, including livestreams, to have tips associated with them. This can help prevent spam.": "Enabling a minimum amount to comment will force all comments, including livestreams, to have tips associated with them. This can help prevent spam.",
|
||||
"Minimum %lbc% tip amount for hyperchats": "Minimum %lbc% tip amount for hyperchats",
|
||||
"Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.": "Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.",
|
||||
"This channel requires a minimum tip for each comment.": "This channel requires a minimum tip for each comment.",
|
||||
"Comment min: %lbc%": "Comment min: %lbc%",
|
||||
"This channel requires a minimum amount for HyperChats to be visible.": "This channel requires a minimum amount for HyperChats to be visible.",
|
||||
"This settings is not applicable if all comments require a tip.": "This settings is not applicable if all comments require a tip.",
|
||||
"HyperChat min: %lbc%": "HyperChat min: %lbc%",
|
||||
"The creator just updated the minimum setting. Please revise or double-check your tip amount.": "The creator just updated the minimum setting. Please revise or double-check your tip amount.",
|
||||
"Settings unavailable for this channel": "Settings unavailable for this channel",
|
||||
"This channel isn't staking enough LBRY Credits to enable Creator Settings.": "This channel isn't staking enough LBRY Credits to enable Creator Settings.",
|
||||
"Not a channel (prefix with \"@\", or enter the channel URL)": "Not a channel (prefix with \"@\", or enter the channel URL)",
|
||||
"We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.": "We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.",
|
||||
"Help LBRY Save Crypto": "Help LBRY Save Crypto",
|
||||
"The US government is attempting to destroy the cryptocurrency industry. Can you help?": "The US government is attempting to destroy the cryptocurrency industry. Can you help?",
|
||||
"Learn more and sign petition": "Learn more and sign petition",
|
||||
"View claim details": "View claim details",
|
||||
"Publishing...": "Publishing...",
|
||||
"Collection": "Collection",
|
||||
"Enter a name, @username or URL": "Enter a name, @username or URL:",
|
||||
"Recipient search": "Recipient search",
|
||||
"Fetch transaction data for export": "Fetch transaction data for export",
|
||||
"Fetching data": "Fetching data",
|
||||
@@ -2010,6 +1895,7 @@
|
||||
"Failed to process fetched data.": "Failed to process fetched data.",
|
||||
"More from %claim_name%": "More from %claim_name%",
|
||||
"Update your video/audio": "Update your video/audio",
|
||||
"Upload that unlabeled video you found behind the TV in 1991": "Upload that unlabeled video you found behind the TV in 1991",
|
||||
"Upload that unlabeled video or cassette you found behind the TV in 1991": "Upload that unlabeled video or cassette you found behind the TV in 1991",
|
||||
"Select Replay": "Select Replay",
|
||||
"Craft an epic post clearly explaining... whatever.": "Craft an epic post clearly explaining... whatever.",
|
||||
@@ -2020,14 +1906,12 @@
|
||||
"Choose a replay file, or select None": "Choose a replay file, or select None",
|
||||
"No replays found.": "No replays found.",
|
||||
"Replay video available": "Replay video available",
|
||||
"Check for Replays": "Check for Replays",
|
||||
"Check for Replays:": "Check for Replays",
|
||||
"You can upload your own recording or select a replay when your stream is over": "You can upload your own recording or select a replay when your stream is over",
|
||||
"This channel isn't staking enough LBRY Credits for inline image previews.": "This channel isn't staking enough LBRY Credits for inline image previews.",
|
||||
"Latest": "Latest",
|
||||
"Channel Not Found": "Channel Not Found",
|
||||
"Channel not found": "Channel not found",
|
||||
"Probably because you didn't make it.": "Probably because you didn't make it.",
|
||||
"Release date": "Release date",
|
||||
"Set custom release date": "Set custom release date",
|
||||
"Now": "Now",
|
||||
"Set to current date and time": "Set to current date and time",
|
||||
@@ -2035,32 +1919,25 @@
|
||||
"%SITE_NAME% login": "%SITE_NAME% login",
|
||||
"Lists": "Lists",
|
||||
"Watch Later": "Watch Later",
|
||||
"Favorites": "Favorites",
|
||||
"New List": "New List",
|
||||
"New List Title": "New List Title",
|
||||
"Add to Lists": "Add to Lists",
|
||||
"Nothing in %collection_name%": "Nothing in %collection_name%",
|
||||
"Playlists": "Playlists",
|
||||
"Edit List": "Edit List",
|
||||
"Delete List": "Delete List",
|
||||
"Private": "Private",
|
||||
"Public": "Public",
|
||||
"View List": "View List",
|
||||
"Publish List": "Publish List",
|
||||
"Delete Collection": "Delete Collection",
|
||||
"Info": "Info",
|
||||
"Publishes": "Publishes",
|
||||
"Add To...": "Add To...",
|
||||
"Unpublished Edits": "Unpublished Edits",
|
||||
"(Empty) --[indicates empty playlist]--": "(Empty)",
|
||||
"Report channel": "Report channel",
|
||||
"List": "List",
|
||||
"Items": "Items",
|
||||
"Credits": "Credits",
|
||||
"Cannot publish empty list": "Cannot publish empty list",
|
||||
"MyAwesomeList": "MyAwesomeList",
|
||||
"My Awesome List": "My Awesome List",
|
||||
"This list has no items.": "This list has no items.",
|
||||
"1 item": "1 item",
|
||||
"%collectionCount% items": "%collectionCount% items",
|
||||
"MyAwesomeCollection": "MyAwesomeCollection",
|
||||
"My Awesome Collection": "My Awesome Collection",
|
||||
"This collection has no items.": "This collection has no items.",
|
||||
"Select File": "Select File",
|
||||
"File Selected": "File Selected",
|
||||
"Url": "Url",
|
||||
@@ -2068,222 +1945,7 @@
|
||||
"Keep": "Keep",
|
||||
"Add this claim to a list": "Add this claim to a list",
|
||||
"List is Empty": "List is Empty",
|
||||
"Confirm List Unpublish": "Confirm List Unpublish",
|
||||
"Confirm Collection Unpublish": "Confirm Collection Unpublish",
|
||||
"This will permanently delete the list.": "This will permanently delete the list.",
|
||||
"Everyone starts with 2 private lists - Watch Later and Favorites.": "Everyone starts with 2 private lists - Watch Later and Favorites.",
|
||||
"Add content to existing lists or new lists from content pages or content previews.": "Add content to existing lists or new lists from content pages or content previews.",
|
||||
"By default, lists are private. You can edit them and later publish them from the Lists page or the Publish context menu on this page. Similar to uploads, small blockchain fees apply.": "By default, lists are private. You can edit them and later publish them from the Lists page or the Publish context menu on this page. Similar to uploads, small blockchain fees apply.",
|
||||
"Chat": "Chat",
|
||||
"Tipped": "Tipped",
|
||||
"Fromage": "Fromage",
|
||||
"In Favorites": "In Favorites",
|
||||
"In Watch Later": "In Watch Later",
|
||||
"In %lastCollectionName%": "In %lastCollectionName%",
|
||||
"Remove from Watch Later": "Remove from Watch Later",
|
||||
"Add to Watch Later": "Add to Watch Later",
|
||||
"Added": "Added",
|
||||
"Item removed from %name%": "Item removed from %name%",
|
||||
"Item added to %name%": "Item added to %name%",
|
||||
"Item added to Watch Later": "Item added to Watch Later",
|
||||
"Item removed from Watch Later": "Item removed from Watch Later",
|
||||
"Item added to Favorites": "Item added to Favorites",
|
||||
"Item removed from Favorites": "Item removed from Favorites",
|
||||
"Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon",
|
||||
"Clear Edits": "Clear Edits",
|
||||
"Something not quite right..": "Something not quite right..",
|
||||
"Comments server": "Comments server",
|
||||
"Default comments server (%name%)": "Default comments server (%name%)",
|
||||
"Custom comments server": "Custom comments server",
|
||||
"Failed to fetch comments.": "Failed to fetch comments.",
|
||||
"Failed to fetch comments. Verify custom server settings.": "Failed to fetch comments. Verify custom server settings.",
|
||||
"Commenting server is not set.": "Commenting server is not set.",
|
||||
"Comments are not currently enabled.": "Comments are not currently enabled.",
|
||||
"See All": "See All",
|
||||
"System": "System",
|
||||
"Supporting content requires %lbc%": "Supporting content requires %lbc%",
|
||||
"With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.": "With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.",
|
||||
"Show this channel your appreciation by sending a donation in USD.": "Show this channel your appreciation by sending a donation in USD.",
|
||||
"This refundable boost will improve the discoverability of this %claimTypeText% while active.": "This refundable boost will improve the discoverability of this %claimTypeText% while active.",
|
||||
"Show this channel your appreciation by sending a donation of Credits.": "Show this channel your appreciation by sending a donation of Credits.",
|
||||
"Add card to tip creators in USD": "Add card to tip creators in USD",
|
||||
"Add a credit card to tip creators in their local currency.": "Add a credit card to tip creators in their local currency.",
|
||||
"Add Card": "Add Card",
|
||||
"Tip History": "Tip History",
|
||||
"Connect a bank account": "Connect a bank account",
|
||||
"Connect your card with Odysee": "Connect your card with Odysee",
|
||||
"Getting your card connection status...": "Getting your card connection status...",
|
||||
"Getting your bank account connection status...": "Getting your bank account connection status...",
|
||||
"Connect your bank account to Odysee to receive donations directly from users": "Connect your bank account to Odysee to receive donations directly from users",
|
||||
"Connect your bank account": "Connect your bank account",
|
||||
"Manage Card": "Manage Card",
|
||||
"Card Details": "Card Details",
|
||||
"Remove Card": "Remove Card",
|
||||
"Sorry, there was an error in processing your payment!": "Sorry, there was an error in processing your payment!",
|
||||
"Congratulations! Your account has been connected with Odysee.": "Congratulations! Your account has been connected with Odysee.",
|
||||
"Your account balance is %balance% USD. Functionality to view your transactions and withdraw your balance will be landing shortly.": "Your account balance is %balance% USD. Functionality to view your transactions and withdraw your balance will be landing shortly.",
|
||||
"Your account balance is $0 USD. When you receive a tip you will see it here.": "Your account balance is $0 USD. When you receive a tip you will see it here.",
|
||||
"Congratulations, you have already begun receiving tips on Odysee!": "Congratulations, you have already begun receiving tips on Odysee!",
|
||||
"Your pending account balance is %balance% USD. Functionality to view and receive your transactions will land soon.": "Your pending account balance is %balance% USD. Functionality to view and receive your transactions will land soon.",
|
||||
"Connect your bank account to be able to cash your pending balance out to your account.": "Connect your bank account to be able to cash your pending balance out to your account.",
|
||||
"Tip Creators": "Tip Creators",
|
||||
"Only select creators can receive tips at this time": "Only select creators can receive tips at this time",
|
||||
"The payment will be made from your saved card": "The payment will be made from your saved card",
|
||||
"When you begin to receive tips your balance will be updated here.": "When you begin to receive tips your balance will be updated here.",
|
||||
"This is your pending balance that will be automatically sent to your bank account.": "This is your pending balance that will be automatically sent to your bank account.",
|
||||
"Commenting...": "Commenting...",
|
||||
"Show %count% replies": "Show %count% replies",
|
||||
"Show reply": "Show reply",
|
||||
"added to": "added to",
|
||||
"removed from": "removed from",
|
||||
"Skip Navigation": "Skip Navigation",
|
||||
"Reset": "Reset",
|
||||
"Reset to original (previous) publish date": "Reset to original (previous) publish date",
|
||||
"Search for something...": "Search for something...",
|
||||
"Confirm Comment Deletion": "Confirm Comment Deletion",
|
||||
"Remove Comment": "Remove Comment",
|
||||
"Are you sure you want to remove this comment?": "Are you sure you want to remove this comment?",
|
||||
"This comment has a tip associated with it which cannot be reverted.": "This comment has a tip associated with it which cannot be reverted.",
|
||||
"Dismiss pinned comment": "Dismiss pinned comment",
|
||||
"Recent Comments": "Recent Comments",
|
||||
"%title% by %channelTitle%": "%title% by %channelTitle%",
|
||||
"%title% by %channelTitle% %ariaDate%": "%title% by %channelTitle% %ariaDate%",
|
||||
"%title% by %channelTitle% %ariaDate%, %mediaDuration%": "%title% by %channelTitle% %ariaDate%, %mediaDuration%",
|
||||
"Collapse": "Collapse",
|
||||
"Expand": "Expand",
|
||||
"%formattedSubCount% Followers": "%formattedSubCount% Followers",
|
||||
"1 Follower": "1 Follower",
|
||||
"Collection": "Collection",
|
||||
"%channelName% isn't live right now, but the chat is! Check back later to watch the stream.": "%channelName% isn't live right now, but the chat is! Check back later to watch the stream.",
|
||||
"Review": "Review",
|
||||
"Account History": "Account History",
|
||||
"Payment History": "Payment History",
|
||||
"There was an error from the server, please try again later": "There was an error from the server, please try again later",
|
||||
"There was an error getting your card setup, please try again later": "There was an error getting your card setup, please try again later",
|
||||
"View Transactions": "View Transactions",
|
||||
"Bank Accounts": "Bank Accounts",
|
||||
"Connect a bank account to receive tips and compensation in your local currency.": "Connect a bank account to receive tips and compensation in your local currency.",
|
||||
"Payment Methods": "Payment Methods",
|
||||
"Incoming": "Incoming",
|
||||
"Outgoing": "Outgoing",
|
||||
"Credits --[transactions tab]--": "Credits",
|
||||
"USD --[transactions tab]--": "USD",
|
||||
"Receiving Channel Name": "Receiving Channel Name",
|
||||
"Tip Location": "Tip Location",
|
||||
"Amount (USD)": "Amount (USD)",
|
||||
"Processing Fee": "Processing Fee",
|
||||
"Odysee Fee": "Odysee Fee",
|
||||
"Received Amount": "Received Amount",
|
||||
"Channel Page": "Channel Page",
|
||||
"Content Page": "Content Page",
|
||||
"Card Last 4": "Card Last 4",
|
||||
"Search blocked channel name": "Search blocked channel name",
|
||||
"Discuss": "Discuss",
|
||||
"lbry.tv has been retired. You have been magically transported to Odysee.com. %more%": "lbry.tv has been retired. You have been magically transported to Odysee.com. %more%",
|
||||
"Show more livestreams": "Show more livestreams",
|
||||
"Creator": "Creator",
|
||||
"From comments": "From comments",
|
||||
"From search": "From search",
|
||||
"Manage tags": "Manage tags",
|
||||
"No Reposts": "No Reposts",
|
||||
"You haven't reposted anything yet. Do it.": "You haven't reposted anything yet. Do it.",
|
||||
"Claiming credits...": "Claiming credits...",
|
||||
"%totalComments% comments": "%totalComments% comments",
|
||||
"(%lbc_balance% available)": "(%lbc_balance% available)",
|
||||
"Sending...": "Sending...",
|
||||
"Trending for #Art": "Trending for #Art",
|
||||
"Trending for #Btc": "Trending for #Btc",
|
||||
"Trending for #Music": "Trending for #Music",
|
||||
"You sent %lbc% as a tip, Mahalo!": "You sent %lbc% as a tip, Mahalo!",
|
||||
"Export All": "Export All",
|
||||
"Default share url (%name%)": "Default share url (%name%)",
|
||||
"Custom share url": "Custom share url",
|
||||
"Share url": "Share url",
|
||||
"Odysee Connect": "Odysee Connect",
|
||||
"Log in to %CLOUD_CONNECT_SITE_NAME%": "Log in to %CLOUD_CONNECT_SITE_NAME%",
|
||||
"Cloud Connect": "Cloud Connect",
|
||||
"Connect your wallet to Odysee": "Connect your wallet to Odysee",
|
||||
"Minimum time gap in seconds between comments.": "Minimum time gap in seconds between comments.",
|
||||
"Enabling a minimum amount to comment will force all comments to have tips associated with them. This can help prevent spam.": "Enabling a minimum amount to comment will force all comments to have tips associated with them. This can help prevent spam.",
|
||||
"Comments containing these words will be blocked.": "Comments containing these words will be blocked.",
|
||||
"Enter the full channel name or URL to search.\n\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8": "Enter the full channel name or URL to search.\n\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8",
|
||||
"Disk Space": "Disk Space",
|
||||
"Data Hosting": "Data Hosting",
|
||||
"Limit": "Limit",
|
||||
"Limit Space Used": "Limit Space Used",
|
||||
"Apply": "Apply",
|
||||
"Limit in GB": "Limit in GB",
|
||||
"If you set a limit, playing videos may exceed your limit until cleanup runs every 30 minutes.": "If you set a limit, playing videos may exceed your limit until cleanup runs every 30 minutes.",
|
||||
"Enable Data Hosting": "Enable Data Hosting",
|
||||
"Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.": "Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.",
|
||||
"Choose %asset%": "Choose %asset%",
|
||||
"Showing %filtered% results of %total%": "Showing %filtered% results of %total%",
|
||||
"filtered": "filtered",
|
||||
"View All Playlists": "View All Playlists",
|
||||
"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",
|
||||
"You sent %lbc%": "You sent %lbc%",
|
||||
"Buy LBC": "Buy LBC",
|
||||
"This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)": "This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)",
|
||||
"Use official LBRY wallet servers": "Use official LBRY wallet servers",
|
||||
"Enable Prerelease Updates": "Enable Prerelease Updates",
|
||||
"Enable Upgrade to Test Builds": "Enable Upgrade to Test Builds",
|
||||
"Prereleases may break things and we may not be able to fix them for you.": "Prereleases may break things and we may not be able to fix them for you.",
|
||||
"Limit (GB)": "Limit (GB)",
|
||||
"Limit Hosting for Content you Use": "Limit Hosting for Content you Use",
|
||||
"Allow (GB)": "Allow (GB)",
|
||||
"Content Data Hosting helps to seed things that you watch and download.": "Content Data Hosting helps to seed things that you watch and download.",
|
||||
"Network Data Hosting allows the p2p network to store blobs unrelated to your browsing.": "Network Data Hosting allows the p2p network to store blobs unrelated to your browsing.",
|
||||
"Content: Limit (GB)": "Content: Limit (GB)",
|
||||
"Network: Allow (GB)": "Network: Allow (GB)",
|
||||
"A channel is required to repost on LBRY": "A channel is required to repost on LBRY",
|
||||
"Admin": "Admin",
|
||||
"Stickers": "Stickers",
|
||||
"Different Sticker": "Different Sticker",
|
||||
"LBC": "LBC",
|
||||
"Add a Card": "Add a Card",
|
||||
" To Tip Creators": " To Tip Creators",
|
||||
"Nothing found": "Nothing found",
|
||||
"From Comments": "From Comments",
|
||||
"This support is priced in $USD.": "This support is priced in $USD.",
|
||||
"The current exchange rate for the submitted LBC amount is ~ $%exchange_amount%.": "The current exchange rate for the submitted LBC amount is ~ $%exchange_amount%.",
|
||||
"Amount of $%input_amount% LBC in USB is lower than price of $%price_amount%": "Amount of $%input_amount% LBC in USB is lower than price of $%price_amount%",
|
||||
"Hosting for content you have downloaded": "Hosting for content you have downloaded",
|
||||
"Hosting content selected by the network": "Hosting content selected by the network",
|
||||
"Remove all unavailable claims": "Remove all unavailable claims",
|
||||
"Drag": "Drag",
|
||||
"Move Top": "Move Top",
|
||||
"Move Bottom": "Move Bottom",
|
||||
"Move Up": "Move Up",
|
||||
"Move Down": "Move Down",
|
||||
"Trending for #Game": "Trending for #Game",
|
||||
"Help the P2P data network by hosting data.": "Help the P2P data network by hosting data.",
|
||||
"History hosting lets you choose how much storage to use helping content you've consumed.": "History hosting lets you choose how much storage to use helping content you've consumed.",
|
||||
"Automatic hosting lets you delegate some amount of storage for the network to automatically download ad host.": "Automatic hosting lets you delegate some amount of storage for the network to automatically download ad host.",
|
||||
"Playing videos may exceed your history hosting limit until cleanup runs every 30 minutes.": "Playing videos may exceed your history hosting limit until cleanup runs every 30 minutes.",
|
||||
"History: Limit (GB)": "History: Limit (GB)",
|
||||
"Automatic: Allow (GB)": "Automatic: Allow (GB)",
|
||||
"Automatic hosting lets you delegate some amount of storage for the network to automatically download and host.": "Automatic hosting lets you delegate some amount of storage for the network to automatically download and host.",
|
||||
"History Hosting": "History Hosting",
|
||||
"Automatic Hosting": "Automatic Hosting",
|
||||
"History Hosting lets you choose how much storage to use helping content you've consumed.": "History Hosting lets you choose how much storage to use helping content you've consumed.",
|
||||
"Automatic Hosting lets you delegate some amount of storage for the network to automatically download and host.": "Automatic Hosting lets you delegate some amount of storage for the network to automatically download and host.",
|
||||
"Help improve the P2P data network (and make LBRY happy) by hosting data.": "Help improve the P2P data network (and make LBRY happy) by hosting data.",
|
||||
"Limit Hosting of Content History": "Limit Hosting of Content History",
|
||||
"Remove custom comment server": "Remove custom comment server",
|
||||
"Use Https": "Use Https",
|
||||
"Server URL": "Server URL",
|
||||
"Use https": "Use https",
|
||||
"Custom Servers": "Custom Servers",
|
||||
"Add A Server": "Add A Server",
|
||||
"Autoplay Next is off.": "Autoplay Next is off.",
|
||||
"Shuffle is on.": "Shuffle is on.",
|
||||
"Shuffle is off.": "Shuffle is off.",
|
||||
"Loop is on.": "Loop is on.",
|
||||
"Loop is off.": "Loop is off.",
|
||||
"View History Hosting lets you choose how much storage to use helping content you've consumed.": "View History Hosting lets you choose how much storage to use helping content you've consumed.",
|
||||
"Clean Now": "Clean Now",
|
||||
"Enable Automatic Hosting": "Enable Automatic Hosting",
|
||||
"Download and serve arbitrary data on the network.": "Download and serve arbitrary data on the network.",
|
||||
"View History Hosting": "View History Hosting",
|
||||
"--end--": "--end--"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 320 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
+7
-10
@@ -3,17 +3,14 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<link rel="icon" type="image/png" href="/public/favicon.png" />
|
||||
|
||||
<link rel="preload" href="/public/font/v1/300.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/400.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/400i.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/700.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/700i.woff" as="font" type="font/woff" crossorigin />
|
||||
|
||||
<link rel="shortcut icon" href="/public/favicon-spaceman.png">
|
||||
<link rel="preload" href="/public/font/v1/300.woff" as="font" type="font/woff" />
|
||||
<link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" />
|
||||
<link rel="preload" href="/public/font/v1/400.woff" as="font" type="font/woff" />
|
||||
<link rel="preload" href="/public/font/v1/400i.woff" as="font" type="font/woff" />
|
||||
<link rel="preload" href="/public/font/v1/700.woff" as="font" type="font/woff" />
|
||||
<link rel="preload" href="/public/font/v1/700i.woff" as="font" type="font/woff" />
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
|
||||
+82
-172
@@ -3,25 +3,27 @@ import { Lbryio } from 'lbryinc';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import MatomoTracker from '@datapunt/matomo-tracker-js';
|
||||
import { history } from './store';
|
||||
import { SDK_API_PATH } from './index';
|
||||
// @if TARGET='app'
|
||||
import Native from 'native';
|
||||
import ElectronCookies from '@meetfranz/electron-cookies';
|
||||
import ElectronCookies from '@exponent/electron-cookies';
|
||||
import { generateInitialUrl } from 'util/url';
|
||||
import { MATOMO_ID, MATOMO_URL } from 'config';
|
||||
// @endif
|
||||
import { MATOMO_ID, MATOMO_URL, LBRY_WEB_BUFFER_API } from 'config';
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
const devInternalApis = process.env.LBRY_API_URL && process.env.LBRY_API_URL.includes('dev');
|
||||
const devInternalApis = process.env.LBRY_API_URL;
|
||||
|
||||
export const SHARE_INTERNAL = 'shareInternal';
|
||||
const SHARE_THIRD_PARTY = 'shareThirdParty';
|
||||
|
||||
const WATCHMAN_BACKEND_ENDPOINT = 'https://watchman.na-backend.odysee.com/reports/playback';
|
||||
// const SEND_DATA_TO_WATCHMAN_INTERVAL = 10; // in seconds
|
||||
|
||||
// @if TARGET='app'
|
||||
if (isProduction) {
|
||||
ElectronCookies.enable({
|
||||
origin: 'https://lbry.tv',
|
||||
});
|
||||
}
|
||||
// @endif
|
||||
|
||||
type Analytics = {
|
||||
error: (string) => Promise<any>,
|
||||
@@ -35,8 +37,8 @@ type Analytics = {
|
||||
tagFollowEvent: (string, boolean, ?string) => void,
|
||||
playerLoadedEvent: (?boolean) => void,
|
||||
playerStartedEvent: (?boolean) => void,
|
||||
videoStartEvent: (string, number, string, number, string, any, number) => void,
|
||||
videoIsPlaying: (boolean, any) => void,
|
||||
videoFetchDuration: (string, number) => void,
|
||||
videoStartEvent: (string, number) => void,
|
||||
videoBufferEvent: (
|
||||
StreamClaim,
|
||||
{
|
||||
@@ -48,7 +50,10 @@ type Analytics = {
|
||||
playerPoweredBy: string,
|
||||
readyState: number,
|
||||
}
|
||||
) => Promise<any>,
|
||||
) => void,
|
||||
adsFetchedEvent: () => void,
|
||||
adsReceivedEvent: (any) => void,
|
||||
adsErrorEvent: (any) => void,
|
||||
emailProvidedEvent: () => void,
|
||||
emailVerifiedEvent: () => void,
|
||||
rewardEligibleEvent: () => void,
|
||||
@@ -65,161 +70,14 @@ type LogPublishParams = {
|
||||
channel_claim_id?: string,
|
||||
};
|
||||
|
||||
let internalAnalyticsEnabled: boolean = false;
|
||||
let internalAnalyticsEnabled: boolean = IS_WEB || false;
|
||||
// let thirdPartyAnalyticsEnabled: boolean = IS_WEB || false;
|
||||
// @if TARGET='app'
|
||||
if (window.localStorage.getItem(SHARE_INTERNAL) === 'true') internalAnalyticsEnabled = true;
|
||||
|
||||
/**
|
||||
* Determine the mobile device type viewing the data
|
||||
* This function returns one of 'and' (Android), 'ios', or 'web'.
|
||||
*
|
||||
* @returns {String}
|
||||
*/
|
||||
function getDeviceType() {
|
||||
return 'dsk';
|
||||
}
|
||||
// variables initialized for watchman
|
||||
let amountOfBufferEvents = 0;
|
||||
let amountOfBufferTimeInMS = 0;
|
||||
let videoType, userId, claimUrl, playerPoweredBy, videoPlayer, bitrateAsBitsPerSecond;
|
||||
let lastSentTime;
|
||||
|
||||
// calculate data for backend, send them, and reset buffer data for next interval
|
||||
async function sendAndResetWatchmanData() {
|
||||
if (!userId) {
|
||||
return 'Can only be used with a user id';
|
||||
}
|
||||
|
||||
if (!videoPlayer) {
|
||||
return 'Video player not initialized';
|
||||
}
|
||||
|
||||
let timeSinceLastIntervalSend = new Date() - lastSentTime;
|
||||
lastSentTime = new Date();
|
||||
|
||||
let protocol;
|
||||
if (videoType === 'application/x-mpegURL') {
|
||||
protocol = 'hls';
|
||||
// get bandwidth if it exists from the texttrack (so it's accurate if user changes quality)
|
||||
// $FlowFixMe
|
||||
bitrateAsBitsPerSecond = videoPlayer.textTracks?.().tracks_[0]?.activeCues[0]?.value?.bandwidth;
|
||||
} else {
|
||||
protocol = 'stb';
|
||||
}
|
||||
|
||||
// current position in video in MS
|
||||
const positionInVideo = Math.round(videoPlayer.currentTime()) * 1000;
|
||||
|
||||
// get the duration marking the time in the video for relative position calculation
|
||||
const totalDurationInSeconds = Math.round(videoPlayer.duration());
|
||||
|
||||
// build object for watchman backend
|
||||
const objectToSend = {
|
||||
rebuf_count: amountOfBufferEvents,
|
||||
rebuf_duration: amountOfBufferTimeInMS,
|
||||
url: claimUrl.replace('lbry://', ''),
|
||||
device: getDeviceType(),
|
||||
duration: timeSinceLastIntervalSend,
|
||||
protocol,
|
||||
player: playerPoweredBy,
|
||||
user_id: userId.toString(),
|
||||
position: Math.round(positionInVideo),
|
||||
rel_position: Math.round((positionInVideo / (totalDurationInSeconds * 1000)) * 100),
|
||||
bitrate: bitrateAsBitsPerSecond,
|
||||
bandwidth: undefined,
|
||||
// ...(userDownloadBandwidthInBitsPerSecond && {bandwidth: userDownloadBandwidthInBitsPerSecond}), // add bandwidth if populated
|
||||
};
|
||||
|
||||
// post to watchman
|
||||
await sendWatchmanData(objectToSend);
|
||||
|
||||
// reset buffer data
|
||||
amountOfBufferEvents = 0;
|
||||
amountOfBufferTimeInMS = 0;
|
||||
}
|
||||
|
||||
let watchmanInterval;
|
||||
// clear watchman interval and mark it as null (when video paused)
|
||||
function stopWatchmanInterval() {
|
||||
clearInterval(watchmanInterval);
|
||||
watchmanInterval = null;
|
||||
}
|
||||
|
||||
// creates the setInterval that will run send to watchman on recurring basis
|
||||
function startWatchmanIntervalIfNotRunning() {
|
||||
if (!watchmanInterval) {
|
||||
// instantiate the first time to calculate duration from
|
||||
lastSentTime = new Date();
|
||||
}
|
||||
}
|
||||
|
||||
// post data to the backend
|
||||
async function sendWatchmanData(body) {
|
||||
try {
|
||||
const response = await fetch(WATCHMAN_BACKEND_ENDPOINT, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (err) {}
|
||||
}
|
||||
// if (window.localStorage.getItem(SHARE_THIRD_PARTY) === 'true') thirdPartyAnalyticsEnabled = true;
|
||||
// @endif
|
||||
|
||||
const analytics: Analytics = {
|
||||
// receive buffer events from tracking plugin and save buffer amounts and times for backend call
|
||||
videoBufferEvent: async (claim, data) => {
|
||||
amountOfBufferEvents = amountOfBufferEvents + 1;
|
||||
amountOfBufferTimeInMS = amountOfBufferTimeInMS + data.bufferDuration;
|
||||
},
|
||||
onDispose: () => {
|
||||
stopWatchmanInterval();
|
||||
},
|
||||
/**
|
||||
* Is told whether video is being started or paused, and adjusts interval accordingly
|
||||
* @param {boolean} isPlaying - Whether video was started or paused
|
||||
* @param {object} passedPlayer - VideoJS Player object
|
||||
*/
|
||||
videoIsPlaying: (isPlaying, passedPlayer) => {
|
||||
let playerIsSeeking = false;
|
||||
// have to use this because videojs pauses/unpauses during seek
|
||||
// sometimes the seeking function isn't populated yet so check for it as well
|
||||
if (passedPlayer && passedPlayer.seeking) {
|
||||
playerIsSeeking = passedPlayer.seeking();
|
||||
}
|
||||
|
||||
// if being paused, and not seeking, send existing data and stop interval
|
||||
if (!isPlaying && !playerIsSeeking) {
|
||||
sendAndResetWatchmanData();
|
||||
stopWatchmanInterval();
|
||||
// if being told to pause, and seeking, send and restart interval
|
||||
} else if (!isPlaying && playerIsSeeking) {
|
||||
sendAndResetWatchmanData();
|
||||
stopWatchmanInterval();
|
||||
startWatchmanIntervalIfNotRunning();
|
||||
// is being told to play, and seeking, don't do anything,
|
||||
// assume it's been started already from pause
|
||||
} else if (isPlaying && playerIsSeeking) {
|
||||
// start but not a seek, assuming a start from paused content
|
||||
} else if (isPlaying && !playerIsSeeking) {
|
||||
startWatchmanIntervalIfNotRunning();
|
||||
}
|
||||
},
|
||||
videoStartEvent: (claimId, timeToStartVideo, poweredBy, passedUserId, canonicalUrl, passedPlayer, videoBitrate) => {
|
||||
// populate values for watchman when video starts
|
||||
userId = passedUserId;
|
||||
claimUrl = canonicalUrl;
|
||||
playerPoweredBy = poweredBy;
|
||||
|
||||
videoType = passedPlayer.currentSource().type;
|
||||
videoPlayer = passedPlayer;
|
||||
bitrateAsBitsPerSecond = videoBitrate;
|
||||
|
||||
// sendPromMetric('time_to_start', duration);
|
||||
sendMatomoEvent('Media', 'TimeToStart', claimId, timeToStartVideo);
|
||||
},
|
||||
error: (message) => {
|
||||
return new Promise((resolve) => {
|
||||
if (internalAnalyticsEnabled && isProduction) {
|
||||
@@ -262,18 +120,27 @@ const analytics: Analytics = {
|
||||
setUser: (userId) => {
|
||||
if (internalAnalyticsEnabled && userId) {
|
||||
window._paq.push(['setUserId', String(userId)]);
|
||||
// @if TARGET='app'
|
||||
Native.getAppVersionInfo().then(({ localVersion }) => {
|
||||
sendMatomoEvent('Version', 'Desktop-Version', localVersion);
|
||||
});
|
||||
// @endif
|
||||
}
|
||||
},
|
||||
toggleInternal: (enabled: boolean): void => {
|
||||
// Always collect analytics on lbry.tv
|
||||
// @if TARGET='app'
|
||||
internalAnalyticsEnabled = enabled;
|
||||
window.localStorage.setItem(SHARE_INTERNAL, enabled);
|
||||
// @endif
|
||||
},
|
||||
|
||||
toggleThirdParty: (enabled: boolean): void => {
|
||||
// Always collect analytics on lbry.tv
|
||||
// @if TARGET='app'
|
||||
// thirdPartyAnalyticsEnabled = enabled;
|
||||
window.localStorage.setItem(SHARE_THIRD_PARTY, enabled);
|
||||
// @endif
|
||||
},
|
||||
|
||||
apiLogView: (uri, outpoint, claimId, timeToStart) => {
|
||||
@@ -290,7 +157,8 @@ const analytics: Analytics = {
|
||||
claim_id: claimId,
|
||||
};
|
||||
|
||||
if (timeToStart) {
|
||||
// lbry.tv streams from AWS so we don't care about the time to start
|
||||
if (timeToStart && !IS_WEB) {
|
||||
params.time_to_start = timeToStart;
|
||||
}
|
||||
|
||||
@@ -328,6 +196,39 @@ const analytics: Analytics = {
|
||||
Lbryio.call('content_tags', 'sync', params);
|
||||
}
|
||||
},
|
||||
|
||||
videoStartEvent: (claimId, duration) => {
|
||||
sendPromMetric('time_to_start', duration);
|
||||
sendMatomoEvent('Media', 'TimeToStart', claimId, duration);
|
||||
},
|
||||
|
||||
videoBufferEvent: (claim, data) => {
|
||||
sendMatomoEvent('Media', 'BufferTimestamp', claim.claim_id, data.timeAtBuffer);
|
||||
|
||||
if (LBRY_WEB_BUFFER_API) {
|
||||
fetch(LBRY_WEB_BUFFER_API, {
|
||||
method: 'post',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
device: 'web',
|
||||
type: 'buffering',
|
||||
client: data.userId,
|
||||
data: {
|
||||
url: claim.canonical_url,
|
||||
position: data.timeAtBuffer,
|
||||
duration: data.bufferDuration,
|
||||
player: data.playerPoweredBy,
|
||||
readyState: data.readyState,
|
||||
stream_duration: data.duration,
|
||||
stream_bitrate: data.bitRate,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
},
|
||||
adsFetchedEvent: () => {
|
||||
sendMatomoEvent('Media', 'AdsFetched');
|
||||
},
|
||||
@@ -382,15 +283,14 @@ function sendMatomoEvent(category, action, name, value) {
|
||||
}
|
||||
}
|
||||
|
||||
// Prometheus
|
||||
// function sendPromMetric(name: string, value?: number) {
|
||||
// if (IS_WEB) {
|
||||
// let url = new URL(SDK_API_PATH + '/metric/ui');
|
||||
// const params = { name: name, value: value ? value.toString() : '' };
|
||||
// url.search = new URLSearchParams(params).toString();
|
||||
// return fetch(url, { method: 'post' });
|
||||
// }
|
||||
// }
|
||||
function sendPromMetric(name: string, value?: number) {
|
||||
if (IS_WEB) {
|
||||
let url = new URL(SDK_API_PATH + '/metric/ui');
|
||||
const params = { name: name, value: value ? value.toString() : '' };
|
||||
url.search = new URLSearchParams(params).toString();
|
||||
return fetch(url, { method: 'post' });
|
||||
}
|
||||
}
|
||||
|
||||
const MatomoInstance = new MatomoTracker({
|
||||
urlBase: MATOMO_URL,
|
||||
@@ -402,7 +302,17 @@ const MatomoInstance = new MatomoTracker({
|
||||
// linkTracking: false // optional, default value: true
|
||||
});
|
||||
|
||||
analytics.pageView(generateInitialUrl(window.location.hash));
|
||||
// Manually call the first page view
|
||||
// React Router doesn't include this on `history.listen`
|
||||
// @if TARGET='web'
|
||||
analytics.pageView(window.location.pathname + window.location.search, window.location.search);
|
||||
// @endif
|
||||
|
||||
// @if TARGET='app'
|
||||
analytics.pageView(
|
||||
window.location.pathname.split('.html')[1] + window.location.search || generateInitialUrl(window.location.hash)
|
||||
);
|
||||
// @endif;
|
||||
|
||||
// Listen for url changes and report
|
||||
// This will include search queries
|
||||
|
||||
+3
-24
@@ -4,45 +4,24 @@ import { COMMENT_SERVER_API } from 'config';
|
||||
const Comments = {
|
||||
url: COMMENT_SERVER_API,
|
||||
enabled: Boolean(COMMENT_SERVER_API),
|
||||
isCustomServer: false,
|
||||
|
||||
setServerUrl: (customUrl: ?string) => {
|
||||
Comments.url = customUrl === undefined ? COMMENT_SERVER_API : customUrl;
|
||||
Comments.enabled = Boolean(Comments.url);
|
||||
Comments.isCustomServer = Comments.url !== COMMENT_SERVER_API;
|
||||
},
|
||||
|
||||
moderation_block: (params: ModerationBlockParams) => fetchCommentsApi('moderation.Block', params),
|
||||
moderation_unblock: (params: ModerationBlockParams) => fetchCommentsApi('moderation.UnBlock', params),
|
||||
moderation_block_list: (params: BlockedListArgs) => fetchCommentsApi('moderation.BlockedList', params),
|
||||
moderation_add_delegate: (params: ModerationAddDelegateParams) => fetchCommentsApi('moderation.AddDelegate', params),
|
||||
moderation_remove_delegate: (params: ModerationRemoveDelegateParams) =>
|
||||
fetchCommentsApi('moderation.RemoveDelegate', params),
|
||||
moderation_list_delegates: (params: ModerationListDelegatesParams) =>
|
||||
fetchCommentsApi('moderation.ListDelegates', params),
|
||||
moderation_am_i: (params: ModerationAmIParams) => fetchCommentsApi('moderation.AmI', params),
|
||||
moderation_block_list: (params: ModerationBlockParams) => fetchCommentsApi('moderation.BlockedList', params),
|
||||
comment_list: (params: CommentListParams) => fetchCommentsApi('comment.List', params),
|
||||
comment_abandon: (params: CommentAbandonParams) => fetchCommentsApi('comment.Abandon', params),
|
||||
comment_create: (params: CommentCreateParams) => fetchCommentsApi('comment.Create', params),
|
||||
comment_by_id: (params: CommentByIdParams) => fetchCommentsApi('comment.ByID', params),
|
||||
comment_pin: (params: CommentPinParams) => fetchCommentsApi('comment.Pin', params),
|
||||
comment_edit: (params: CommentEditParams) => fetchCommentsApi('comment.Edit', params),
|
||||
reaction_list: (params: ReactionListParams) => fetchCommentsApi('reaction.List', params),
|
||||
reaction_react: (params: ReactionReactParams) => fetchCommentsApi('reaction.React', params),
|
||||
setting_list: (params: SettingsParams) => fetchCommentsApi('setting.List', params),
|
||||
setting_block_word: (params: BlockWordParams) => fetchCommentsApi('setting.BlockWord', params),
|
||||
setting_unblock_word: (params: BlockWordParams) => fetchCommentsApi('setting.UnBlockWord', params),
|
||||
setting_list_blocked_words: (params: SettingsParams) => fetchCommentsApi('setting.ListBlockedWords', params),
|
||||
setting_update: (params: UpdateSettingsParams) => fetchCommentsApi('setting.Update', params),
|
||||
setting_get: (params: SettingsParams) => fetchCommentsApi('setting.Get', params),
|
||||
super_list: (params: SuperListParams) => fetchCommentsApi('comment.SuperChatList', params),
|
||||
};
|
||||
|
||||
function fetchCommentsApi(method: string, params: {}) {
|
||||
if (!Comments.url) {
|
||||
return Promise.reject(new Error('Commenting server is not set.'));
|
||||
} else if (!Comments.enabled) {
|
||||
return Promise.reject('Comments are not currently enabled.'); // eslint-disable-line
|
||||
if (!Comments.enabled) {
|
||||
return Promise.reject('Comments are not currently enabled'); // eslint-disable-line
|
||||
}
|
||||
|
||||
const url = `${Comments.url}?m=${method}`;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import { parseURI } from 'util/lbryURI';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import ChannelBlockButton from 'component/channelBlockButton';
|
||||
import ChannelMuteButton from 'component/channelMuteButton';
|
||||
import SubscribeButton from 'component/subscribeButton';
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { connect } from 'react-redux';
|
||||
import { selectUploadCount } from 'lbryinc';
|
||||
import { selectGetSyncErrorMessage, selectSyncFatalError } from 'redux/selectors/sync';
|
||||
import { doFetchAccessToken, doUserSetReferrer } from 'redux/actions/user';
|
||||
import { selectUser, selectAccessToken, selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectUnclaimedRewards } from 'redux/selectors/rewards';
|
||||
import { doFetchChannelListMine, doFetchCollectionListMine, doResolveUris } from 'redux/actions/claims';
|
||||
import { selectMyChannelUrls, selectMyChannelClaimIds } from 'redux/selectors/claims';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import { doFetchChannelListMine, doFetchCollectionListMine, SETTINGS, selectMyChannelUrls } from 'lbry-redux';
|
||||
import {
|
||||
makeSelectClientSetting,
|
||||
selectLanguage,
|
||||
@@ -29,7 +27,7 @@ import {
|
||||
doSetActiveChannel,
|
||||
doSetIncognito,
|
||||
} from 'redux/actions/app';
|
||||
import { doFetchModBlockedList, doFetchCommentModAmIList } from 'redux/actions/comments';
|
||||
import { doFetchModBlockedList } from 'redux/actions/comments';
|
||||
import App from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
@@ -42,14 +40,13 @@ const select = (state) => ({
|
||||
autoUpdateDownloaded: selectAutoUpdateDownloaded(state),
|
||||
isUpgradeAvailable: selectIsUpgradeAvailable(state),
|
||||
syncError: selectGetSyncErrorMessage(state),
|
||||
uploadCount: selectUploadCount(state),
|
||||
rewards: selectUnclaimedRewards(state),
|
||||
isAuthenticated: selectUserVerifiedEmail(state),
|
||||
currentModal: selectModal(state),
|
||||
syncFatalError: selectSyncFatalError(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
myChannelUrls: selectMyChannelUrls(state),
|
||||
myChannelClaimIds: selectMyChannelClaimIds(state),
|
||||
subscriptions: selectSubscriptions(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
@@ -66,8 +63,6 @@ const perform = (dispatch) => ({
|
||||
setActiveChannelIfNotSet: () => dispatch(doSetActiveChannel()),
|
||||
setIncognito: () => dispatch(doSetIncognito()),
|
||||
fetchModBlockedList: () => dispatch(doFetchModBlockedList()),
|
||||
resolveUris: (uris) => dispatch(doResolveUris(uris)),
|
||||
fetchModAmIList: () => dispatch(doFetchCommentModAmIList()),
|
||||
});
|
||||
|
||||
export default hot(connect(select, perform)(App));
|
||||
+126
-65
@@ -1,31 +1,44 @@
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React, { useEffect, useRef, useState, useLayoutEffect } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import analytics from 'analytics';
|
||||
import { buildURI, parseURI } from 'lbry-redux';
|
||||
import { SIMPLE_SITE } from 'config';
|
||||
import Router from 'component/router/index';
|
||||
import ModalRouter from 'modal/modalRouter';
|
||||
import ReactModal from 'react-modal';
|
||||
import { openContextMenu } from 'util/context-menu';
|
||||
import useKonamiListener from 'util/enhanced-layout';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import FileRenderFloating from 'component/fileRenderFloating';
|
||||
import { withRouter } from 'react-router';
|
||||
import usePrevious from 'effects/use-previous';
|
||||
import Nag from 'component/common/nag';
|
||||
import REWARDS from 'rewards';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
import LANGUAGES from 'constants/languages';
|
||||
import FileDrop from 'component/fileDrop';
|
||||
import NagContinueFirstRun from 'component/nagContinueFirstRun';
|
||||
import Spinner from 'component/spinner';
|
||||
import SyncFatalError from 'component/syncFatalError';
|
||||
// @if TARGET='app'
|
||||
import useZoom from 'effects/use-zoom';
|
||||
import useHistoryNav from 'effects/use-history-nav';
|
||||
// @endif
|
||||
// @if TARGET='web'
|
||||
import OpenInAppLink from 'web/component/openInAppLink';
|
||||
import YoutubeWelcome from 'web/component/youtubeReferralWelcome';
|
||||
import NagDegradedPerformance from 'web/component/nag-degraded-performance';
|
||||
import NagDataCollection from 'web/component/nag-data-collection';
|
||||
import {
|
||||
useDegradedPerformance,
|
||||
STATUS_OK,
|
||||
STATUS_DEGRADED,
|
||||
STATUS_FAILING,
|
||||
STATUS_DOWN,
|
||||
} from 'web/effects/use-degraded-performance';
|
||||
// @endif
|
||||
import LANGUAGE_MIGRATIONS from 'constants/language-migrations';
|
||||
|
||||
import FileDrop from 'component/fileDrop';
|
||||
import ModalRouter from 'modal/modalRouter';
|
||||
import Nag from 'component/common/nag';
|
||||
|
||||
import SyncFatalError from 'component/syncFatalError';
|
||||
import Yrbl from 'component/yrbl';
|
||||
|
||||
// ****************************************************************************
|
||||
|
||||
export const MAIN_WRAPPER_CLASS = 'main-wrapper';
|
||||
export const IS_MAC = navigator.userAgent.indexOf('Mac OS X') !== -1;
|
||||
|
||||
@@ -66,16 +79,14 @@ type Props = {
|
||||
isAuthenticated: boolean,
|
||||
socketConnect: () => void,
|
||||
syncLoop: (?boolean) => void,
|
||||
syncEnabled: boolean,
|
||||
currentModal: any,
|
||||
syncFatalError: boolean,
|
||||
activeChannelId: ?string,
|
||||
myChannelClaimIds: ?Array<string>,
|
||||
subscriptions: Array<Subscription>,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
myChannelUrls: ?Array<string>,
|
||||
setActiveChannelIfNotSet: () => void,
|
||||
setIncognito: (boolean) => void,
|
||||
fetchModBlockedList: () => void,
|
||||
resolveUris: (Array<string>) => void,
|
||||
fetchModAmIList: () => void,
|
||||
};
|
||||
|
||||
function App(props: Props) {
|
||||
@@ -103,14 +114,11 @@ function App(props: Props) {
|
||||
syncLoop,
|
||||
currentModal,
|
||||
syncFatalError,
|
||||
myChannelClaimIds,
|
||||
activeChannelId,
|
||||
myChannelUrls,
|
||||
activeChannelClaim,
|
||||
setActiveChannelIfNotSet,
|
||||
setIncognito,
|
||||
fetchModBlockedList,
|
||||
resolveUris,
|
||||
subscriptions,
|
||||
fetchModAmIList,
|
||||
} = props;
|
||||
|
||||
const appRef = useRef();
|
||||
@@ -122,11 +130,12 @@ function App(props: Props) {
|
||||
const isRewardApproved = user && user.is_reward_approved;
|
||||
const previousHasVerifiedEmail = usePrevious(hasVerifiedEmail);
|
||||
const previousRewardApproved = usePrevious(isRewardApproved);
|
||||
const { pathname, search } = props.location;
|
||||
// @if TARGET='web'
|
||||
const [showAnalyticsNag, setShowAnalyticsNag] = usePersistedState('analytics-nag', true);
|
||||
const [lbryTvApiStatus, setLbryTvApiStatus] = useState(STATUS_OK);
|
||||
// @endif
|
||||
const { pathname, hash, search } = props.location;
|
||||
const [upgradeNagClosed, setUpgradeNagClosed] = useState(false);
|
||||
const [resolvedSubscriptions, setResolvedSubscriptions] = useState(false);
|
||||
// const [retryingSync, setRetryingSync] = useState(false);
|
||||
const [sidebarOpen] = usePersistedState('sidebar', true);
|
||||
const showUpgradeButton =
|
||||
(autoUpdateDownloaded || (process.platform === 'linux' && isUpgradeAvailable)) && !upgradeNagClosed;
|
||||
// referral claiming
|
||||
@@ -134,15 +143,26 @@ function App(props: Props) {
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const rawReferrerParam = urlParams.get('r');
|
||||
const sanitizedReferrerParam = rawReferrerParam && rawReferrerParam.replace(':', '#');
|
||||
const shouldHideNag = pathname.startsWith(`/$/${PAGES.EMBED}`) || pathname.startsWith(`/$/${PAGES.AUTH_VERIFY}`);
|
||||
const userId = user && user.id;
|
||||
const useCustomScrollbar = !IS_MAC;
|
||||
const hasMyChannels = myChannelClaimIds && myChannelClaimIds.length > 0;
|
||||
const hasNoChannels = myChannelClaimIds && myChannelClaimIds.length === 0;
|
||||
const hasMyChannels = myChannelUrls && myChannelUrls.length > 0;
|
||||
const hasNoChannels = myChannelUrls && myChannelUrls.length === 0;
|
||||
const shouldMigrateLanguage = LANGUAGE_MIGRATIONS[language];
|
||||
const hasActiveChannelClaim = activeChannelId !== undefined;
|
||||
const isPersonalized = hasVerifiedEmail;
|
||||
const renderFiledrop = isAuthenticated;
|
||||
const hasActiveChannelClaim = activeChannelClaim !== undefined;
|
||||
|
||||
let uri;
|
||||
try {
|
||||
const newpath = buildURI(parseURI(pathname.slice(1).replace(/:/g, '#')));
|
||||
uri = newpath + hash;
|
||||
} catch (e) {}
|
||||
|
||||
// @if TARGET='web'
|
||||
function handleAnalyticsDismiss() {
|
||||
setShowAnalyticsNag(false);
|
||||
}
|
||||
|
||||
// @endif
|
||||
useEffect(() => {
|
||||
if (userId) {
|
||||
analytics.setUser(userId);
|
||||
@@ -153,7 +173,7 @@ function App(props: Props) {
|
||||
if (!uploadCount) return;
|
||||
const handleBeforeUnload = (event) => {
|
||||
event.preventDefault();
|
||||
event.returnValue = __('There are pending uploads.'); // without setting this to something it doesn't work
|
||||
event.returnValue = 'magic'; // without setting this to something it doesn't work
|
||||
};
|
||||
window.addEventListener('beforeunload', handleBeforeUnload);
|
||||
return () => window.removeEventListener('beforeunload', handleBeforeUnload);
|
||||
@@ -233,22 +253,12 @@ function App(props: Props) {
|
||||
|
||||
if (hasMyChannels) {
|
||||
fetchModBlockedList();
|
||||
fetchModAmIList();
|
||||
}
|
||||
}, [hasMyChannels, hasNoChannels, hasActiveChannelClaim, setActiveChannelIfNotSet, setIncognito]);
|
||||
|
||||
useEffect(() => {
|
||||
// $FlowFixMe
|
||||
document.documentElement.setAttribute('lang', language);
|
||||
}, [language]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!languages.includes(language)) {
|
||||
setLanguage(language);
|
||||
|
||||
if (document && document.documentElement && LANGUAGES[language].length >= 3) {
|
||||
document.documentElement.dir = LANGUAGES[language][2];
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [language, languages]);
|
||||
@@ -273,6 +283,7 @@ function App(props: Props) {
|
||||
}
|
||||
}, [previousRewardApproved, isRewardApproved]);
|
||||
|
||||
// @if TARGET='app'
|
||||
useEffect(() => {
|
||||
if (updatePreferences && getWalletSyncPref && readyForPrefs) {
|
||||
getWalletSyncPref()
|
||||
@@ -282,14 +293,24 @@ function App(props: Props) {
|
||||
});
|
||||
}
|
||||
}, [updatePreferences, getWalletSyncPref, setReadyForSync, readyForPrefs, hasVerifiedEmail]);
|
||||
// @endif
|
||||
|
||||
// ready for sync syncs, however after signin when hasVerifiedEmail, that syncs too.
|
||||
useEffect(() => {
|
||||
// signInSyncPref is cleared after sharedState loop.
|
||||
const syncLoopWithoutInterval = () => syncLoop(true);
|
||||
if (readyForSync && hasVerifiedEmail) {
|
||||
// In case we are syncing.
|
||||
syncLoop();
|
||||
// @if TARGET='web'
|
||||
window.addEventListener('focus', syncLoopWithoutInterval);
|
||||
// @endif
|
||||
}
|
||||
// @if TARGET='web'
|
||||
return () => {
|
||||
window.removeEventListener('focus', syncLoopWithoutInterval);
|
||||
};
|
||||
// @endif
|
||||
}, [readyForSync, hasVerifiedEmail, syncLoop]);
|
||||
|
||||
// We know someone is logging in or not when we get their user object
|
||||
@@ -313,45 +334,85 @@ function App(props: Props) {
|
||||
if (!hasSignedIn && hasVerifiedEmail) {
|
||||
signIn();
|
||||
setHasSignedIn(true);
|
||||
if (IS_WEB) setReadyForSync(true);
|
||||
}
|
||||
}, [hasVerifiedEmail, signIn, hasSignedIn]);
|
||||
|
||||
// batch resolve subscriptions to be used by the sideNavigation component.
|
||||
// add it here so that it only resolves the first time, despite route changes.
|
||||
// useLayoutEffect because it has to be executed before the sideNavigation component requests them
|
||||
useLayoutEffect(() => {
|
||||
if (sidebarOpen && isPersonalized && subscriptions && !resolvedSubscriptions) {
|
||||
setResolvedSubscriptions(true);
|
||||
resolveUris(subscriptions.map((sub) => sub.uri));
|
||||
}
|
||||
}, [sidebarOpen, isPersonalized, resolvedSubscriptions, subscriptions, resolveUris, setResolvedSubscriptions]);
|
||||
// @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 (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
// @endif
|
||||
|
||||
if (syncFatalError) {
|
||||
return <SyncFatalError />;
|
||||
return (
|
||||
<SyncFatalError
|
||||
// @if TARGET='web'
|
||||
lbryTvApiStatus={lbryTvApiStatus}
|
||||
// @endif
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classnames(MAIN_WRAPPER_CLASS, {
|
||||
// @if TARGET='app'
|
||||
[`${MAIN_WRAPPER_CLASS}--mac`]: IS_MAC,
|
||||
// @endif
|
||||
[`${MAIN_WRAPPER_CLASS}--scrollbar`]: useCustomScrollbar,
|
||||
})}
|
||||
ref={appRef}
|
||||
onContextMenu={(e) => openContextMenu(e)}
|
||||
onContextMenu={IS_WEB ? undefined : (e) => openContextMenu(e)}
|
||||
>
|
||||
<Router />
|
||||
<ModalRouter />
|
||||
{renderFiledrop && <FileDrop />}
|
||||
<FileRenderFloating />
|
||||
{isEnhancedLayout && <Yrbl className="yrbl--enhanced" />}
|
||||
|
||||
{showUpgradeButton && (
|
||||
<Nag
|
||||
message={__('An upgrade is available.')}
|
||||
actionText={__('Install Now')}
|
||||
onClick={requestDownloadUpgrade}
|
||||
onClose={() => setUpgradeNagClosed(true)}
|
||||
{IS_WEB && lbryTvApiStatus === STATUS_DOWN ? (
|
||||
<Yrbl
|
||||
className="main--empty"
|
||||
title={__('lbry.tv is currently down')}
|
||||
subtitle={__('My wheel broke, but the good news is that someone from LBRY is working on it.')}
|
||||
/>
|
||||
) : (
|
||||
<React.Fragment>
|
||||
<Router />
|
||||
<ModalRouter />
|
||||
<FileDrop />
|
||||
<FileRenderFloating />
|
||||
{isEnhancedLayout && <Yrbl className="yrbl--enhanced" />}
|
||||
|
||||
{/* @if TARGET='app' */}
|
||||
{showUpgradeButton && (
|
||||
<Nag
|
||||
message={__('An upgrade is available.')}
|
||||
actionText={__('Install Now')}
|
||||
onClick={requestDownloadUpgrade}
|
||||
onClose={() => setUpgradeNagClosed(true)}
|
||||
/>
|
||||
)}
|
||||
{/* @endif */}
|
||||
|
||||
{/* @if TARGET='web' */}
|
||||
<YoutubeWelcome />
|
||||
{!SIMPLE_SITE && !shouldHideNag && <OpenInAppLink uri={uri} />}
|
||||
{!shouldHideNag && <NagContinueFirstRun />}
|
||||
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && !shouldHideNag && (
|
||||
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
|
||||
)}
|
||||
{!SIMPLE_SITE && lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
|
||||
<NagDataCollection onClose={handleAnalyticsDismiss} />
|
||||
)}
|
||||
{/* @endif */}
|
||||
</React.Fragment>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { makeSelectClaimForUri, SETTINGS, COLLECTIONS_CONSTS, makeSelectNextUrlForCollectionAndUrl } from 'lbry-redux';
|
||||
import { withRouter } from 'react-router';
|
||||
import { makeSelectIsPlayerFloating, makeSelectNextUnplayedRecommended } from 'redux/selectors/content';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
|
||||
import AutoplayCountdown from './view';
|
||||
import { selectModal } from 'redux/selectors/app';
|
||||
|
||||
@@ -8,9 +11,32 @@ import { selectModal } from 'redux/selectors/app';
|
||||
AutoplayCountdown does not fetch it's own next content to play, it relies on <RecommendedContent> being rendered.
|
||||
This is dumb but I'm just the guy who noticed -kj
|
||||
*/
|
||||
const select = (state, props) => ({
|
||||
nextRecommendedClaim: makeSelectClaimForUri(props.nextRecommendedUri)(state),
|
||||
modal: selectModal(state),
|
||||
});
|
||||
const select = (state, props) => {
|
||||
const { location } = props;
|
||||
const { search } = location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const collectionId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID);
|
||||
|
||||
export default withRouter(connect(select, null)(AutoplayCountdown));
|
||||
let nextRecommendedUri;
|
||||
if (collectionId) {
|
||||
nextRecommendedUri = makeSelectNextUrlForCollectionAndUrl(collectionId, props.uri)(state);
|
||||
} else {
|
||||
nextRecommendedUri = makeSelectNextUnplayedRecommended(props.uri)(state);
|
||||
}
|
||||
|
||||
return {
|
||||
collectionId,
|
||||
nextRecommendedUri,
|
||||
nextRecommendedClaim: makeSelectClaimForUri(nextRecommendedUri)(state),
|
||||
isFloating: makeSelectIsPlayerFloating(props.location)(state),
|
||||
autoplay: makeSelectClientSetting(SETTINGS.AUTOPLAY)(state),
|
||||
modal: selectModal(state),
|
||||
};
|
||||
};
|
||||
|
||||
export default withRouter(
|
||||
connect(select, {
|
||||
doSetPlayingUri,
|
||||
doPlayUri,
|
||||
})(AutoplayCountdown)
|
||||
);
|
||||
@@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import React, { useCallback } from 'react';
|
||||
import Button from 'component/button';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import { withRouter } from 'react-router';
|
||||
import debounce from 'util/debounce';
|
||||
import * as ICONS from 'constants/icons';
|
||||
|
||||
import { COLLECTIONS_CONSTS } from 'lbry-redux';
|
||||
const DEBOUNCE_SCROLL_HANDLER_MS = 150;
|
||||
const CLASSNAME_AUTOPLAY_COUNTDOWN = 'autoplay-countdown';
|
||||
|
||||
@@ -14,25 +14,23 @@ type Props = {
|
||||
history: { push: (string) => void },
|
||||
nextRecommendedClaim: ?StreamClaim,
|
||||
nextRecommendedUri: string,
|
||||
isFloating: boolean,
|
||||
doSetPlayingUri: ({ uri: ?string }) => void,
|
||||
doPlayUri: (string) => void,
|
||||
modal: { id: string, modalProps: {} },
|
||||
skipPaid: boolean,
|
||||
doNavigate: () => void,
|
||||
doReplay: () => void,
|
||||
doPrevious: () => void,
|
||||
onCanceled: () => void,
|
||||
collectionId?: string,
|
||||
};
|
||||
|
||||
function AutoplayCountdown(props: Props) {
|
||||
const {
|
||||
nextRecommendedUri,
|
||||
nextRecommendedClaim,
|
||||
doSetPlayingUri,
|
||||
doPlayUri,
|
||||
isFloating,
|
||||
history: { push },
|
||||
modal,
|
||||
skipPaid,
|
||||
doNavigate,
|
||||
doReplay,
|
||||
doPrevious,
|
||||
onCanceled,
|
||||
collectionId,
|
||||
} = props;
|
||||
const nextTitle = nextRecommendedClaim && nextRecommendedClaim.value && nextRecommendedClaim.value.title;
|
||||
|
||||
@@ -45,19 +43,36 @@ function AutoplayCountdown(props: Props) {
|
||||
const anyModalPresent = modal !== undefined && modal !== null;
|
||||
const isTimerPaused = timerPaused || anyModalPresent;
|
||||
|
||||
let navigateUrl;
|
||||
if (nextTitle) {
|
||||
navigateUrl = formatLbryUrlForWeb(nextRecommendedUri);
|
||||
if (collectionId) {
|
||||
const collectionParams = new URLSearchParams();
|
||||
collectionParams.set(COLLECTIONS_CONSTS.COLLECTION_ID, collectionId);
|
||||
navigateUrl = navigateUrl + `?` + collectionParams.toString();
|
||||
}
|
||||
}
|
||||
|
||||
const doNavigate = useCallback(() => {
|
||||
if (!isFloating) {
|
||||
if (navigateUrl) {
|
||||
push(navigateUrl);
|
||||
doSetPlayingUri({ uri: nextRecommendedUri });
|
||||
doPlayUri(nextRecommendedUri);
|
||||
}
|
||||
} else {
|
||||
if (nextRecommendedUri) {
|
||||
doSetPlayingUri({ uri: nextRecommendedUri });
|
||||
doPlayUri(nextRecommendedUri);
|
||||
}
|
||||
}
|
||||
}, [navigateUrl, nextRecommendedUri, isFloating, doSetPlayingUri, doPlayUri, push]);
|
||||
|
||||
function shouldPauseAutoplay() {
|
||||
const elm = document.querySelector(`.${CLASSNAME_AUTOPLAY_COUNTDOWN}`);
|
||||
return elm && elm.getBoundingClientRect().top < 0;
|
||||
}
|
||||
|
||||
function getMsgPlayingNext() {
|
||||
if (skipPaid) {
|
||||
return __('Playing next free content in %seconds_left% seconds...', { seconds_left: timer });
|
||||
} else {
|
||||
return __('Playing in %seconds_left% seconds...', { seconds_left: timer });
|
||||
}
|
||||
}
|
||||
|
||||
// Update 'setTimerPaused'.
|
||||
React.useEffect(() => {
|
||||
// Ensure correct 'setTimerPaused' on initial render.
|
||||
@@ -82,7 +97,6 @@ function AutoplayCountdown(props: Props) {
|
||||
interval = setInterval(() => {
|
||||
const newTime = timer - 1;
|
||||
if (newTime === 0) {
|
||||
if (skipPaid) setTimer(countdownTime);
|
||||
doNavigate();
|
||||
} else {
|
||||
setTimer(timer - 1);
|
||||
@@ -93,7 +107,7 @@ function AutoplayCountdown(props: Props) {
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, [timer, doNavigate, push, timerCanceled, isTimerPaused, nextRecommendedUri, skipPaid]);
|
||||
}, [timer, doNavigate, navigateUrl, push, timerCanceled, isTimerPaused, nextRecommendedUri]);
|
||||
|
||||
if (timerCanceled || !nextRecommendedUri) {
|
||||
return null;
|
||||
@@ -120,38 +134,10 @@ function AutoplayCountdown(props: Props) {
|
||||
)}
|
||||
{!isTimerPaused && (
|
||||
<div className="file-viewer__overlay-secondary autoplay-countdown__counter">
|
||||
{getMsgPlayingNext()}{' '}
|
||||
<Button
|
||||
label={__('Cancel')}
|
||||
button="link"
|
||||
onClick={() => {
|
||||
setTimerCanceled(true);
|
||||
if (onCanceled) onCanceled();
|
||||
}}
|
||||
/>
|
||||
{__('Playing in %seconds_left% seconds...', { seconds_left: timer })}{' '}
|
||||
<Button label={__('Cancel')} button="link" onClick={() => setTimerCanceled(true)} />
|
||||
</div>
|
||||
)}
|
||||
{skipPaid && doPrevious && (
|
||||
<div>
|
||||
<Button
|
||||
label={__('Play Previous')}
|
||||
button="link"
|
||||
icon={ICONS.PLAY_PREVIOUS}
|
||||
onClick={() => doPrevious()}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<Button
|
||||
label={skipPaid ? __('Purchase?') : __('Replay?')}
|
||||
button="link"
|
||||
iconRight={skipPaid ? ICONS.WALLET : ICONS.REPLAY}
|
||||
onClick={() => {
|
||||
setTimerCanceled(true);
|
||||
doReplay();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
import BlockList from './view';
|
||||
export default BlockList;
|
||||
@@ -1,205 +0,0 @@
|
||||
// @flow
|
||||
import { Combobox, ComboboxInput, ComboboxPopover, ComboboxList, ComboboxOption } from '@reach/combobox';
|
||||
// import '@reach/combobox/styles.css'; --> 'scss/third-party.scss'
|
||||
import { matchSorter } from 'match-sorter';
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import Button from 'component/button';
|
||||
import ClaimList from 'component/claimList';
|
||||
import Icon from 'component/common/icon';
|
||||
import Paginate from 'component/common/paginate';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import useThrottle from 'effects/use-throttle';
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
|
||||
function reduceUriToChannelName(uri: string) {
|
||||
// 'parseURI' is too slow to handle a large list. Since our list should be
|
||||
// kosher in the first place, just do a quick substring call. Add a
|
||||
// try-catch just in case.
|
||||
try {
|
||||
return uri.substring(uri.indexOf('@') + 1, uri.indexOf('#'));
|
||||
} catch {
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
|
||||
// ****************************************************************************
|
||||
// BlockList
|
||||
// ****************************************************************************
|
||||
|
||||
type Props = {
|
||||
uris: Array<string>,
|
||||
help: string,
|
||||
titleEmptyList: string,
|
||||
subtitleEmptyList: string,
|
||||
getActionButtons?: (url: string) => React$Node,
|
||||
className: ?string,
|
||||
};
|
||||
|
||||
export default function BlockList(props: Props) {
|
||||
const { uris: list, help, titleEmptyList, subtitleEmptyList, getActionButtons, className } = props;
|
||||
|
||||
// Keep a local list to allow for undoing actions in this component
|
||||
const [localList, setLocalList] = React.useState(undefined);
|
||||
const stringifiedList = JSON.stringify(list);
|
||||
const hasLocalList = localList && localList.length > 0;
|
||||
const justBlocked = list && localList && localList.length < list.length;
|
||||
|
||||
const [page, setPage] = React.useState(1);
|
||||
const [searchList, setSearchList] = React.useState(null); // null: not searching; []: no results;
|
||||
const isShowingSearchResults = searchList !== null;
|
||||
|
||||
let totalPages = 0;
|
||||
let paginatedLocalList;
|
||||
if (localList) {
|
||||
paginatedLocalList = localList.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
||||
totalPages = Math.ceil(localList.length / PAGE_SIZE);
|
||||
}
|
||||
|
||||
// **************************************************************************
|
||||
// **************************************************************************
|
||||
|
||||
function getRenderActions() {
|
||||
if (getActionButtons) {
|
||||
return (claim) => <div className="section__actions">{getActionButtons(claim.permanent_url)}</div>;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function formatSearchSuggestion(suggestion: string) {
|
||||
return reduceUriToChannelName(suggestion);
|
||||
}
|
||||
|
||||
function filterSearchResults(results: ?Array<string>) {
|
||||
setSearchList(results);
|
||||
}
|
||||
|
||||
// **************************************************************************
|
||||
// **************************************************************************
|
||||
|
||||
React.useEffect(() => {
|
||||
const list = stringifiedList && JSON.parse(stringifiedList);
|
||||
if (!hasLocalList) {
|
||||
setLocalList(list && list.length > 0 ? list : []);
|
||||
}
|
||||
}, [stringifiedList, hasLocalList]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (justBlocked && stringifiedList) {
|
||||
setLocalList(JSON.parse(stringifiedList));
|
||||
}
|
||||
}, [stringifiedList, justBlocked, setLocalList]);
|
||||
|
||||
// **************************************************************************
|
||||
// **************************************************************************
|
||||
|
||||
if (paginatedLocalList === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!hasLocalList) {
|
||||
return (
|
||||
<div className="main--empty">
|
||||
<Yrbl
|
||||
title={titleEmptyList}
|
||||
subtitle={subtitleEmptyList}
|
||||
actions={
|
||||
<div className="section__actions">
|
||||
<Button button="primary" label={__('Go Home')} navigate="/" />
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="help--notice">{help}</div>
|
||||
<div className="section">
|
||||
<SearchList
|
||||
list={localList}
|
||||
placeholder={__('e.g. odysee')}
|
||||
formatter={formatSearchSuggestion}
|
||||
onResultsUpdated={filterSearchResults}
|
||||
/>
|
||||
</div>
|
||||
<div className={classnames('section block-list', className)}>
|
||||
<ClaimList
|
||||
uris={searchList || paginatedLocalList}
|
||||
showUnresolvedClaims
|
||||
showHiddenByUser
|
||||
hideMenu
|
||||
renderActions={getRenderActions()}
|
||||
/>
|
||||
</div>
|
||||
{!isShowingSearchResults && <Paginate totalPages={totalPages} disableHistory onPageChange={(p) => setPage(p)} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// ****************************************************************************
|
||||
// SearchList
|
||||
// ****************************************************************************
|
||||
|
||||
type LsbProps = {
|
||||
list: ?Array<string>,
|
||||
placeholder?: string,
|
||||
formatter?: (suggestion: string) => string,
|
||||
onResultsUpdated?: (?Array<string>) => void,
|
||||
};
|
||||
|
||||
function SearchList(props: LsbProps) {
|
||||
const { list, placeholder, formatter, onResultsUpdated } = props;
|
||||
const [term, setTerm] = React.useState('');
|
||||
const results = useAuthorMatch(term, list);
|
||||
const handleChange = (event) => setTerm(event.target.value);
|
||||
const handleSelect = (e) => setTerm(e);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (onResultsUpdated) {
|
||||
onResultsUpdated(results);
|
||||
}
|
||||
}, [results]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
return (
|
||||
<div className="wunderbar__wrapper">
|
||||
<label>{__('Search blocked channel name')}</label>
|
||||
<Combobox className="wunderbar" onSelect={handleSelect}>
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<ComboboxInput selectOnClick className="wunderbar__input" onChange={handleChange} placeholder={placeholder} />
|
||||
{results && (
|
||||
<ComboboxPopover className="wunderbar__suggestions" portal={false}>
|
||||
{results.length > 0 ? (
|
||||
<ComboboxList>
|
||||
{results.slice(0, 10).map((result, index) => (
|
||||
<ComboboxOption
|
||||
className="wunderbar__more-results"
|
||||
key={index}
|
||||
value={formatter ? formatter(result) : result}
|
||||
/>
|
||||
))}
|
||||
</ComboboxList>
|
||||
) : (
|
||||
<span style={{ display: 'block', margin: 8 }}>{__('No results')}</span>
|
||||
)}
|
||||
</ComboboxPopover>
|
||||
)}
|
||||
</Combobox>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function useAuthorMatch(term, list) {
|
||||
const throttledTerm = useThrottle(term, 200);
|
||||
return React.useMemo(() => {
|
||||
return !throttledTerm || throttledTerm.trim() === ''
|
||||
? null
|
||||
: matchSorter(list, throttledTerm, {
|
||||
keys: [(item) => reduceUriToChannelName(item)],
|
||||
threshold: matchSorter.rankings.CONTAINS,
|
||||
});
|
||||
}, [throttledTerm]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
import Button from './view';
|
||||
import React, { forwardRef } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
const mapStateToProps = state => ({
|
||||
pathname: state.router.location.pathname,
|
||||
emailVerified: selectUserVerifiedEmail(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
const ConnectedButton = connect(mapStateToProps)(Button);
|
||||
|
||||
@@ -38,7 +38,6 @@ type Props = {
|
||||
myref: any,
|
||||
dispatch: any,
|
||||
'aria-label'?: string,
|
||||
user: ?User,
|
||||
};
|
||||
|
||||
// use forwardRef to allow consumers to pass refs to the button content if they want to
|
||||
@@ -70,13 +69,10 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
myref,
|
||||
dispatch, // <button> doesn't know what to do with dispatch
|
||||
pathname,
|
||||
user,
|
||||
authSrc,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const disable = disabled || (user === null && requiresAuth);
|
||||
|
||||
const combinedClassName = classnames(
|
||||
'button',
|
||||
button
|
||||
@@ -86,7 +82,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
'button--alt': button === 'alt',
|
||||
'button--inverse': button === 'inverse',
|
||||
'button--close': button === 'close',
|
||||
'button--disabled': disable,
|
||||
'button--disabled': disabled,
|
||||
'button--link': button === 'link',
|
||||
}
|
||||
: 'button--no-style',
|
||||
@@ -97,9 +93,6 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
const combinedRef = useCombinedRefs(ref, innerRef, myref);
|
||||
const size = iconSize || (!label && !children) ? 18 : undefined; // Fall back to default
|
||||
|
||||
// Label can be a string or object ( use title instead )
|
||||
const ariaLabel = description || (typeof label === 'string' ? label : title);
|
||||
|
||||
const content = (
|
||||
<span className="button__content">
|
||||
{icon && <Icon icon={icon} iconColor={iconColor} size={iconSize} />}
|
||||
@@ -153,8 +146,6 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
className={combinedClassName}
|
||||
title={title}
|
||||
onClick={onClick}
|
||||
aria-label={ariaLabel}
|
||||
disabled={disabled} // is there a reason this wasn't here before?
|
||||
>
|
||||
{content}
|
||||
</a>
|
||||
@@ -193,15 +184,14 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
return (
|
||||
<NavLink
|
||||
exact
|
||||
onClick={(e) => {
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
to={redirectUrl}
|
||||
title={title || defaultTooltip}
|
||||
disabled={disable}
|
||||
disabled={disabled}
|
||||
className={combinedClassName}
|
||||
activeClassName={activeClass}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
{content}
|
||||
</NavLink>
|
||||
@@ -213,8 +203,8 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
exact
|
||||
to={path}
|
||||
title={title || defaultTooltip}
|
||||
disabled={disable}
|
||||
onClick={(e) => {
|
||||
disabled={disabled}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
if (onClick) {
|
||||
onClick();
|
||||
@@ -222,7 +212,6 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
}}
|
||||
className={combinedClassName}
|
||||
activeClassName={activeClass}
|
||||
aria-label={ariaLabel}
|
||||
{...otherProps}
|
||||
>
|
||||
{content}
|
||||
@@ -231,15 +220,15 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
<button
|
||||
ref={combinedRef}
|
||||
title={title || defaultTooltip}
|
||||
aria-label={ariaLabel}
|
||||
aria-label={description || label || title}
|
||||
className={combinedClassName}
|
||||
onClick={(e) => {
|
||||
onClick={e => {
|
||||
if (onClick) {
|
||||
e.stopPropagation();
|
||||
onClick(e);
|
||||
}
|
||||
}}
|
||||
disabled={disable}
|
||||
disabled={disabled}
|
||||
type={type}
|
||||
{...otherProps}
|
||||
>
|
||||
|
||||
@@ -111,7 +111,6 @@ class CardVerify extends React.Component {
|
||||
CardVerify.stripeHandler = StripeCheckout.configure({
|
||||
key: this.props.stripeKey,
|
||||
});
|
||||
|
||||
if (this.hasPendingClick) {
|
||||
this.showStripeDialog();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectMetadataItemForUri, makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { makeSelectMetadataItemForUri, makeSelectClaimForUri } from 'lbry-redux';
|
||||
import ChannelAbout from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// @flow
|
||||
import { SIMPLE_SITE } from 'config';
|
||||
import React, { Fragment } from 'react';
|
||||
import MarkdownPreview from 'component/common/markdown-preview';
|
||||
import ClaimTags from 'component/claimTags';
|
||||
import CreditAmount from 'component/common/credit-amount';
|
||||
import Button from 'component/button';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import DateTime from 'component/dateTime';
|
||||
import YoutubeBadge from 'component/youtubeBadge';
|
||||
import SUPPORTED_LANGUAGES from 'constants/supported_languages';
|
||||
@@ -98,6 +101,15 @@ function ChannelAbout(props: Props) {
|
||||
amount={parseFloat(claim.amount) + parseFloat(claim.meta.support_amount)}
|
||||
precision={8}
|
||||
/>{' '}
|
||||
{SIMPLE_SITE && (
|
||||
<Button
|
||||
button="link"
|
||||
label={__('view other claims at lbry://%name%', {
|
||||
name: claim.name,
|
||||
})}
|
||||
navigate={`/$/${PAGES.TOP}?name=${claim.name}`}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<YoutubeBadge channelClaimId={claimId} />
|
||||
|
||||
@@ -1,57 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { selectClaimIdForUri } from 'redux/selectors/claims';
|
||||
import {
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
} from 'redux/actions/comments';
|
||||
import {
|
||||
makeSelectChannelIsBlocked,
|
||||
makeSelectChannelIsAdminBlocked,
|
||||
makeSelectChannelIsModeratorBlockedForCreator,
|
||||
makeSelectUriIsBlockingOrUnBlocking,
|
||||
makeSelectIsTogglingForDelegator,
|
||||
} from 'redux/selectors/comments';
|
||||
|
||||
import { BLOCK_LEVEL } from 'constants/comment';
|
||||
import { doCommentModUnBlock, doCommentModBlock } from 'redux/actions/comments';
|
||||
import { makeSelectChannelIsBlocked, makeSelectUriIsBlockingOrUnBlocking } from 'redux/selectors/comments';
|
||||
import ChannelBlockButton from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
let isBlocked;
|
||||
let isToggling;
|
||||
|
||||
switch (props.blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
isBlocked = makeSelectChannelIsBlocked(props.uri)(state);
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
isBlocked = makeSelectChannelIsModeratorBlockedForCreator(props.uri, props.creatorUri)(state);
|
||||
isToggling = makeSelectIsTogglingForDelegator(props.uri, props.creatorUri)(state);
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
isBlocked = makeSelectChannelIsAdminBlocked(props.uri)(state);
|
||||
break;
|
||||
}
|
||||
|
||||
return {
|
||||
isBlocked,
|
||||
isToggling,
|
||||
isBlockingOrUnBlocking: makeSelectUriIsBlockingOrUnBlocking(props.uri)(state),
|
||||
creatorId: selectClaimIdForUri(state, props.creatorUri),
|
||||
};
|
||||
};
|
||||
const select = (state, props) => ({
|
||||
isBlocked: makeSelectChannelIsBlocked(props.uri)(state),
|
||||
isBlockingOrUnBlocking: makeSelectUriIsBlockingOrUnBlocking(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
})(ChannelBlockButton);
|
||||
@@ -1,93 +1,41 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import { BLOCK_LEVEL } from 'constants/comment';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
blockLevel?: string,
|
||||
creatorUri?: string,
|
||||
isBlocked: boolean,
|
||||
isBlockingOrUnBlocking: boolean,
|
||||
isToggling: boolean,
|
||||
doCommentModUnBlock: (string, boolean) => void,
|
||||
doCommentModBlock: (string, ?Number, boolean) => void,
|
||||
doCommentModUnBlockAsAdmin: (string, string) => void,
|
||||
doCommentModBlockAsAdmin: (string, string) => void,
|
||||
doCommentModUnBlockAsModerator: (string, string, string) => void,
|
||||
doCommentModBlockAsModerator: (string, string, string) => void,
|
||||
doCommentModBlock: (string, boolean) => void,
|
||||
};
|
||||
|
||||
function ChannelBlockButton(props: Props) {
|
||||
const {
|
||||
uri,
|
||||
blockLevel,
|
||||
creatorUri,
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
isBlocked,
|
||||
isBlockingOrUnBlocking,
|
||||
isToggling,
|
||||
} = props;
|
||||
const { uri, doCommentModUnBlock, doCommentModBlock, isBlocked, isBlockingOrUnBlocking } = props;
|
||||
|
||||
function handleClick() {
|
||||
switch (blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlock(uri, false);
|
||||
} else {
|
||||
doCommentModBlock(uri, undefined, false);
|
||||
}
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
if (creatorUri) {
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlockAsModerator(uri, creatorUri, '');
|
||||
} else {
|
||||
doCommentModBlockAsModerator(uri, creatorUri, '');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlockAsAdmin(uri, '');
|
||||
} else {
|
||||
doCommentModBlockAsAdmin(uri, '');
|
||||
}
|
||||
break;
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlock(uri, false);
|
||||
} else {
|
||||
doCommentModBlock(uri, false);
|
||||
}
|
||||
}
|
||||
|
||||
function getButtonText(blockLevel) {
|
||||
switch (blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
return isBlocked
|
||||
return (
|
||||
<Button
|
||||
button={isBlocked ? 'alt' : 'secondary'}
|
||||
label={
|
||||
isBlocked
|
||||
? isBlockingOrUnBlocking
|
||||
? __('Unblocking...')
|
||||
: __('Unblock')
|
||||
: isBlockingOrUnBlocking
|
||||
? __('Blocking...')
|
||||
: __('Block');
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
if (isToggling) {
|
||||
return isBlocked ? __('Unblocking...') : __('Blocking...');
|
||||
} else {
|
||||
return isBlocked ? __('Unblock') : __('Block');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return <Button button={isBlocked ? 'alt' : 'secondary'} label={getButtonText(blockLevel)} onClick={handleClick} />;
|
||||
? __('Blocking...')
|
||||
: __('Block')
|
||||
}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelBlockButton;
|
||||
@@ -3,32 +3,30 @@ import { PAGE_SIZE } from 'constants/claim';
|
||||
import {
|
||||
makeSelectClaimsInChannelForPage,
|
||||
makeSelectFetchingChannelClaims,
|
||||
selectClaimIsMine,
|
||||
makeSelectClaimIsMine,
|
||||
makeSelectTotalPagesInChannelSearch,
|
||||
selectClaimForUri,
|
||||
} from 'redux/selectors/claims';
|
||||
import { doResolveUris } from 'redux/actions/claims';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
makeSelectClaimForUri,
|
||||
doResolveUris,
|
||||
SETTINGS,
|
||||
} from 'lbry-redux';
|
||||
import { makeSelectChannelIsMuted } from 'redux/selectors/blocked';
|
||||
import { withRouter } from 'react-router';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { makeSelectClientSetting, selectShowMatureContent } from 'redux/selectors/settings';
|
||||
|
||||
import ChannelContent from './view';
|
||||
import ChannelPage from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const { search } = props.location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const page = urlParams.get('page') || 0;
|
||||
const claim = props.uri && selectClaimForUri(state, props.uri);
|
||||
|
||||
return {
|
||||
pageOfClaimsInChannel: makeSelectClaimsInChannelForPage(props.uri, page)(state),
|
||||
fetching: makeSelectFetchingChannelClaims(props.uri)(state),
|
||||
totalPages: makeSelectTotalPagesInChannelSearch(props.uri, PAGE_SIZE)(state),
|
||||
channelIsMine: selectClaimIsMine(state, claim),
|
||||
channelIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
channelIsBlocked: makeSelectChannelIsMuted(props.uri)(state),
|
||||
claim,
|
||||
claim: props.uri && makeSelectClaimForUri(props.uri)(state),
|
||||
isAuthenticated: selectUserVerifiedEmail(state),
|
||||
showMature: selectShowMatureContent(state),
|
||||
tileLayout: makeSelectClientSetting(SETTINGS.TILE_LAYOUT)(state),
|
||||
@@ -39,4 +37,4 @@ const perform = (dispatch) => ({
|
||||
doResolveUris: (uris, returnCachedUris) => dispatch(doResolveUris(uris, returnCachedUris)),
|
||||
});
|
||||
|
||||
export default withRouter(connect(select, perform)(ChannelContent));
|
||||
export default withRouter(connect(select, perform)(ChannelPage));
|
||||
@@ -1,4 +1,5 @@
|
||||
// @flow
|
||||
import { SHOW_ADS } from 'config';
|
||||
import * as CS from 'constants/claim_search';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import React, { Fragment } from 'react';
|
||||
@@ -6,13 +7,13 @@ import HiddenNsfwClaims from 'component/hiddenNsfwClaims';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import Button from 'component/button';
|
||||
import ClaimListDiscover from 'component/claimListDiscover';
|
||||
import Ads from 'web/component/ads';
|
||||
import Icon from 'component/common/icon';
|
||||
import LivestreamLink from 'component/livestreamLink';
|
||||
import { Form, FormField } from 'component/common/form';
|
||||
import { DEBOUNCE_WAIT_DURATION_MS } from 'constants/search';
|
||||
import { lighthouse } from 'redux/actions/search';
|
||||
|
||||
const TYPES_TO_ALLOW_FILTER = ['stream', 'repost'];
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
totalPages: number,
|
||||
@@ -25,14 +26,13 @@ type Props = {
|
||||
channelIsBlackListed: boolean,
|
||||
defaultPageSize?: number,
|
||||
defaultInfiniteScroll?: Boolean,
|
||||
claim: Claim,
|
||||
claim: ?Claim,
|
||||
isAuthenticated: boolean,
|
||||
showMature: boolean,
|
||||
tileLayout: boolean,
|
||||
viewHiddenChannels: boolean,
|
||||
doResolveUris: (Array<string>, boolean) => void,
|
||||
claimType: string,
|
||||
empty?: string,
|
||||
};
|
||||
|
||||
function ChannelContent(props: Props) {
|
||||
@@ -43,6 +43,7 @@ function ChannelContent(props: Props) {
|
||||
channelIsBlocked,
|
||||
channelIsBlackListed,
|
||||
claim,
|
||||
isAuthenticated,
|
||||
defaultPageSize = CS.PAGE_SIZE,
|
||||
defaultInfiniteScroll = true,
|
||||
showMature,
|
||||
@@ -50,10 +51,8 @@ function ChannelContent(props: Props) {
|
||||
viewHiddenChannels,
|
||||
doResolveUris,
|
||||
claimType,
|
||||
empty,
|
||||
} = props;
|
||||
// const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||
const claimsInChannel = 9999;
|
||||
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||
const [searchQuery, setSearchQuery] = React.useState('');
|
||||
const [searchResults, setSearchResults] = React.useState(undefined);
|
||||
const {
|
||||
@@ -61,11 +60,7 @@ function ChannelContent(props: Props) {
|
||||
} = useHistory();
|
||||
const url = `${pathname}${search}`;
|
||||
const claimId = claim && claim.claim_id;
|
||||
const showFilters =
|
||||
!claimType ||
|
||||
(Array.isArray(claimType)
|
||||
? claimType.every((ct) => TYPES_TO_ALLOW_FILTER.includes(ct))
|
||||
: TYPES_TO_ALLOW_FILTER.includes(claimType));
|
||||
const showFilters = !claimType || claimType === 'stream';
|
||||
|
||||
function handleInputChange(e) {
|
||||
const { value } = e.target;
|
||||
@@ -84,7 +79,7 @@ function ChannelContent(props: Props) {
|
||||
!showMature ? '&nsfw=false&size=50&from=0' : ''
|
||||
}`
|
||||
)
|
||||
.then(({ body: results }) => {
|
||||
.then((results) => {
|
||||
const urls = results.map(({ name, claimId }) => {
|
||||
return `lbry://${name}#${claimId}`;
|
||||
});
|
||||
@@ -114,6 +109,9 @@ function ChannelContent(props: Props) {
|
||||
{!fetching && Boolean(claimsInChannel) && !channelIsBlocked && !channelIsBlackListed && (
|
||||
<HiddenNsfwClaims uri={uri} />
|
||||
)}
|
||||
|
||||
<LivestreamLink uri={uri} />
|
||||
|
||||
{!fetching && channelIsBlackListed && (
|
||||
<section className="card card--section">
|
||||
<p>
|
||||
@@ -135,40 +133,41 @@ function ChannelContent(props: Props) {
|
||||
|
||||
{!channelIsMine && claimsInChannel > 0 && <HiddenNsfwClaims uri={uri} />}
|
||||
|
||||
<ClaimListDiscover
|
||||
hasSource
|
||||
defaultFreshness={CS.FRESH_ALL}
|
||||
showHiddenByUser={viewHiddenChannels}
|
||||
forceShowReposts
|
||||
fetchViewCount
|
||||
hideFilters={!showFilters}
|
||||
hideAdvancedFilter={!showFilters}
|
||||
tileLayout={tileLayout}
|
||||
uris={searchResults}
|
||||
channelIds={[claimId]}
|
||||
claimType={claimType}
|
||||
feeAmount={CS.FEE_AMOUNT_ANY}
|
||||
defaultOrderBy={CS.ORDER_BY_NEW}
|
||||
pageSize={defaultPageSize}
|
||||
infiniteScroll={defaultInfiniteScroll}
|
||||
meta={
|
||||
showFilters && (
|
||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
className="wunderbar__input--inline"
|
||||
value={searchQuery}
|
||||
onChange={handleInputChange}
|
||||
type="text"
|
||||
placeholder={__('Search')}
|
||||
/>
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
isChannel
|
||||
channelIsMine={channelIsMine}
|
||||
empty={empty}
|
||||
/>
|
||||
{claim && claimsInChannel > 0 ? (
|
||||
<ClaimListDiscover
|
||||
showHiddenByUser={viewHiddenChannels}
|
||||
forceShowReposts
|
||||
hideFilters={!showFilters}
|
||||
hideAdvancedFilter={!showFilters}
|
||||
tileLayout={tileLayout}
|
||||
uris={searchResults}
|
||||
channelIds={[claim.claim_id]}
|
||||
claimType={claimType}
|
||||
feeAmount={CS.FEE_AMOUNT_ANY}
|
||||
defaultOrderBy={CS.ORDER_BY_NEW}
|
||||
pageSize={defaultPageSize}
|
||||
infiniteScroll={defaultInfiniteScroll}
|
||||
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||
meta={
|
||||
showFilters && (
|
||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
className="wunderbar__input--inline"
|
||||
value={searchQuery}
|
||||
onChange={handleInputChange}
|
||||
type="text"
|
||||
placeholder={__('Search')}
|
||||
/>
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
isChannel
|
||||
channelIsMine={channelIsMine}
|
||||
/>
|
||||
) : (
|
||||
<section className="main--empty">{__("This channel hasn't published anything yet")}</section>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
Loaded 100 of 813 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user