Compare commits

...

494 commits

Author SHA1 Message Date
Kenneth C
d14c9141db
Update readme (#7755)
Removed my name from the readme as I have no association with this project anymore, and have not touched the Flatpak in ages. 

RIP LBRY.
2023-04-10 12:17:11 -04:00
zeppi
06c350c4db v0.53.9 2023-02-08 15:29:43 -05:00
zeppi
c3a9d9d002 fix changelog 2023-02-08 15:28:26 -05:00
zeppi
aeada6dc74 v0.53.9 2023-02-08 14:38:35 -05:00
zeppi
6ba985fd28 lbrynet version 113, changelog 2023-02-08 14:32:16 -05:00
jessopb
2a0bc85738
bump lbrynet to 113 (#7747) 2023-02-08 10:36:14 -05:00
jessopb
523ea284a2
update signing certificate for 2023 (#7744) 2023-01-25 16:25:45 -05:00
jessopb
a66d7534c2
add csc 2023-01-25 16:05:39 -05:00
zeppi
89ec07622f v0.53.8 2022-11-18 14:15:03 -05:00
zeppi
7e6ad31392 Revert "v0.53.8"
Incorrect Changelog
This reverts commit 4ab23f03fc.
2022-11-18 14:12:52 -05:00
zeppi
4ab23f03fc v0.53.8 2022-11-18 14:05:00 -05:00
zeppi
29cea5cc07 changelog 2022-11-18 14:02:37 -05:00
jessopb
8dd7150d67
fix unfollowing unpublished channels (#7737) 2022-11-18 10:22:32 -05:00
zeppi
f1b1523017 v0.53.8-alpha.1 2022-11-17 13:26:53 -05:00
jessopb
88ac250fee
fix large file uploads (#7736)
* fix large file uploads

* changelog

* update github action xcode version

* update electronbuilder for macos

* try use_hard_links=false

* no USE_HARD_LINKS

* upgrate electron-builder 23_3_3

* revert to electron-builder 22_10_5
electron-builder/issues/6124 says regressions happen after this version.

* try mac install homebrew, python2

* typo and ln /usr/bin/python

* oops

* try sudo

* try PYTHON_PATH

* comment github action mac python hack
2022-11-17 13:20:01 -05:00
zeppi
0a5e9e87ed v0.53.7 2022-11-10 14:45:50 -05:00
zeppi
20413d79b6 changelog 2022-11-10 14:44:54 -05:00
zeppi
ff9011e6ac v0.53.7-alpha.1 2022-11-04 12:37:02 -04:00
jessopb
802139d0a4
upgrade lbrynet to 112 (#7717) 2022-11-04 12:31:44 -04:00
zeppi
68d307fa50 changelog 2022-11-04 10:47:56 -04:00
jessopb
d3900e39b6
fix comment area display (#7716) 2022-11-04 10:44:36 -04:00
jessopb
35769dede6
separate out advanced textarea, fix comment channel selector width, a… (#7634)
* separate out advanced textarea, fix comment channel selector width, add advanced text icon

* fix master conflicts

* fixes

* fix channel description edit
2022-11-04 08:42:36 -04:00
zeppi
ae1e20d131 changelog 2022-11-03 17:46:08 -04:00
jessopb
051af8b6ad
fix post publish erased when confirmation (#7715) 2022-11-03 17:17:56 -04:00
jessopb
5d77b115f9
fix thumbnails disabling publish (#7714) 2022-11-03 15:55:46 -04:00
Byron Eric Perez
7dbeeac112
Add 'Collections' into txo filter (#7711) 2022-10-28 18:31:56 -04:00
zeppi
de062c4aee yarn lock 2022-10-25 13:31:32 -04:00
dependabot[bot]
18a3336714
Bump @xmldom/xmldom from 0.7.5 to 0.7.6 (#7701)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.7.5 to 0.7.6.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.6)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 13:02:03 -04:00
jessopb
ebf35a1df8
remove watchman (and errors!) (#7710) 2022-10-25 12:56:38 -04:00
jm-morani
28e168d5e5
Minor layout fixes depending on window shape (#7709)
Disable theatre mode styles for medium screen (or lower)
Fix the width of the cover in theater mode
Fix conflicting styles when width is 1150px
Remove duplicate from CHANGELOG

Co-authored-by: Jean-Michel Morani <probono+lbry@morani.org>
2022-10-25 10:03:20 -04:00
Byron Eric Perez
7ad66b99e7
Swap comment servers without going to settings page (#7670)
work in progress

added input to select custom and default server when creating comment

the problem of synchronizing the two commentServer of the application was solved

btn moved to the correct component and syncs correctly

Fixed why it didn't show comments

Aligned input

size and location of the refresh btn changed, and added maximum and minimum width for the comment server

margin removed

change using overflow

refresh
2022-10-24 12:36:30 -04:00
jahway603
7eb7c1a5ff
Updated README.md (#7695)
Fixed Arch AUR package name and current maintainer
2022-10-22 15:16:05 -04:00
zeppi
b88e704e6b v0.53.6 2022-10-21 16:54:07 -04:00
zeppi
8d85af8064 changelog 2022-10-21 16:53:03 -04:00
zeppi
f9d7340729 v0.53.6-alpha.1 2022-10-21 12:21:45 -04:00
zeppi
d57300f785 changelog 2022-10-20 14:41:43 -04:00
jessopb
09baf1d9b9
fall back on contentType for extension on file view (#7704) 2022-10-20 14:17:43 -04:00
Franco Montenegro
ce692d38ea
Upgrade to Electron 17.2.0. (#7703) 2022-10-20 14:03:12 -04:00
zeppi
b1ca3b0183 bump electron 17.2 and lbrynet 0.111.0 2022-10-20 13:09:47 -04:00
Franco Montenegro
a4c34d89e2
Sanitize values for CSV. (#7697)
* Sanitize values for CSV.

* Remove unnecessary escape sequence.
2022-10-17 11:07:33 -04:00
Franco Montenegro
d7b9ca3391
7683 upgrade to electron 17 (#7691)
* Upgrade to electron 17.

* Remove unused dependencies.

* Update recommended node version in readme.

* Move all the dependencies back to devDependencies.

* Move dependencies back as they were.
2022-10-07 13:56:33 -04:00
jessopb
55a5c7b051
make thumbnail optional (#7690) 2022-09-19 18:39:45 -04:00
Franco Montenegro
0e2a9a1033
Better handling of uploaded files. (#7688)
* Better handling of uploaded files.

* Read file when uploading it so we can properly read metadata.
2022-09-19 16:42:16 -04:00
Franco Montenegro
3fd38be789
Sort downloads (show newest first) (#7684) 2022-09-05 16:21:01 -04:00
Franco Montenegro
329d434c83
Allow only images in modal image uploader. (#7672)
* Allow only images in modal image uploader.

* Set file path and mime in file selector.

* Refactor WebFile.

* Update get-file-from-path to work with folders; fix file-list component.

* Get rid of File | string for filePath property in components.

* Show instant preview while updating channel thumbnail.

* Fix publish.

* Add jpeg and svg to image filter.
2022-09-02 12:43:35 -04:00
zeppi
6a2939d9fc v0.53.5 2022-08-26 16:31:37 -04:00
zeppi
65781e33f7 sdk 110 release changelog 2022-08-26 16:21:34 -04:00
jessopb
608721c7ac
upgrade lbrynet sdk to 0.110.0 (#7680) 2022-08-26 16:12:08 -04:00
zeppi
2846dd926b changelog 2022-08-26 16:03:32 -04:00
jm-morani
7a8a16cd9c
Fix viewer position and shape in mobile mode (#7677)
Co-authored-by: Jean-Michel Morani <probono+lbry@morani.org>
2022-08-26 15:36:48 -04:00
jessopb
1c17ff5dd9
doFetchModBlockedList: don't block ui thread (#7674)
* doFetchModBlockedList: don't block ui thread

doFetchModBlockedList is blocking the ui thread.

Duplicate data in `doFetchModBlockedList::blockListsPerChannel` to about 1000. The tab is dead when function hits, about 4s after reload.

- Yield occasionally using the `setTimeout` method.
- Doing a chunk size of 1 for now so we don't have to yield the inner loop as well (seems good enough). This is just based on a relatively large blocklist size.

- Can't do `await` in a callback, so must change the `forEach` to a `for`.

* yield thread in storeList

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-08-12 17:23:04 -04:00
jessopb
b9be8d9f3a
small fixes for blocked (#7669) 2022-08-09 13:13:57 -04:00
Franco Montenegro
6b1069f02a
Properly handle blacklisted claims. (#7665)
* Properly handle blacklisted claims.

* Identify blacklist cause and display the proper message.
2022-08-09 11:19:23 -04:00
jessopb
b92fb03856
Remove swap (#7659)
* remove requiresAuth

* remove centralized btcswap code
2022-08-02 17:17:00 -04:00
Franco Montenegro
1a9743e639
Properly handle decimals in supports liquidate component. (#7648) 2022-07-23 18:33:00 -04:00
Byron Eric Perez
2773cbbe6e
changed the color of the editor-toolbar_hover class (#7642)
* changed the color of the editor-toolbar_hover class

* Fixed hover, colors and spacing of editor-toolbar_hover class

* active editor-toolbar class modified

* var --color-editor-button-hover-bg and --color-editor-button-active-bg created

* --color-editor-button-hover-bg and --color-editor-button-active-bg
color corrected in light
2022-07-21 16:58:12 -04:00
zeppi
e11fb5d225 changelog 2022-07-16 18:24:46 -04:00
Franco Montenegro
38200b9912
Use image preview to display the cover image recently uploaded. (#7647) 2022-07-13 20:09:11 -04:00
zeppi
c69826a887 remove old scripts 2022-07-12 15:33:46 -04:00
zeppi
ce4fadbdf9 remove readme 'web' mention 2022-07-12 15:24:31 -04:00
jessopb
2895e93323
Sync pre cleanup (#7635)
* missing yarn lock

* rm modal youtube welcome

* prune some isAuthenticated

* remove invite components

* remove reward/verify components

* more odysee feature cleanup
2022-07-08 14:51:53 -04:00
jessopb
3859124c05
missing yarn lock (#7644) 2022-07-07 18:43:38 -04:00
dependabot[bot]
da5ec6edc1
Bump electron from 15.4.0 to 15.5.5 (#7614)
Bumps [electron](https://github.com/electron/electron) from 15.4.0 to 15.5.5.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v15.4.0...v15.5.5)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-07 17:34:07 -04:00
Byron Eric Perez
9825bccf4a
fix hover style for char count field (#7620)
* fix hover style for char count field

* vertically align character counter and emoji button

* add new comment icon class

* Revert "add new comment icon class"

This reverts commit 8a163e0f02.

* created and corrected the icon class

* button--comment-icons-active removed
2022-07-07 16:55:31 -04:00
Franco Montenegro
f065218ff4
Prevent .deb packages from being opened with archive manager. (#7502)
* Prevent .deb packages from being opened with archive manager.

* Allow to properly cancel download upgrade and prevent multiple downloads.

* Fix missing app-update.yml file for .deb builds.

* Small fix for allowPrerelease prop in autoUpdater.

* Use release/tags endpoint to get the release details.

* Handle error case for auto updater.

* Make install now button display the upgrade modal.

* Use GitHub as provider for manual update url.

* Small fixes in updater.

* Fix small lint errors.

* Properly handle auto download on/off.
2022-07-07 16:48:42 -04:00
Byron Eric Perez
f79c622edf
Added checkbox to enable/disable background (#7630)
* Added checkbox to enable/disable background

* bug fix in enable disable button

* small fix in translation

* rename background setting to be disable backgroud; add default value for background setting.
2022-06-28 16:01:19 -04:00
Byron Eric Perez
c7ab47f54d
use default path in windows when choosing a file (#7625)
* use default path in windows when choosing a file

* fix, changed var to let
2022-06-28 15:49:41 -04:00
Franco Montenegro
8c10617259
Use a retry counter/limit to fetch thumbnails. (#7618) 2022-06-28 11:25:20 -04:00
Franco Montenegro
2e565fd95b
Fix splash error message when the app can't initialize. (#7615) 2022-06-20 12:59:56 -04:00
zeppi
68718f32b2 v0.53.4 2022-06-10 13:58:49 -04:00
zeppi
f70bde0639 v0.53.4-alpha.8 2022-06-10 12:51:35 -04:00
jessopb
2be96a25b1
Disk space ipc fixes (#7610)
* delay get-disk-space until daemon ready

* get fresh diskspace when storage viz renders
2022-06-10 12:42:49 -04:00
zeppi
30cbc3f5c5 v0.53.4-alpha.7 2022-06-10 10:46:59 -04:00
zeppi
8d8c1fd58c bump lbrynet to 107.2 2022-06-10 10:44:36 -04:00
zeppi
d8600e286f v0.53.4-alpha.6 2022-06-09 10:47:41 -04:00
zeppi
7d08800836 revert sdk to 107.1 2022-06-09 10:45:50 -04:00
zeppi
27ede86996 v0.53.4-alpha.5 2022-06-08 17:49:17 -04:00
zeppi
60e5471f5e v0.53.4-alpha.4 2022-06-08 17:21:50 -04:00
zeppi
a1e52eea4a changelog 2022-06-08 17:20:46 -04:00
jessopb
5a99d9777f
bump sdk to 0.109.0 (#7607) 2022-06-08 17:11:15 -04:00
Franco Montenegro
fab69450c0
Hide watched progress if claim is being played. (#7606) 2022-06-08 17:11:05 -04:00
zeppi
5609b43fc7 v0.53.4-alpha.3 2022-06-05 15:07:13 -04:00
zeppi
cc9f2e62de v0.53.4-alpha.2 2022-06-05 12:16:53 -04:00
jessopb
dd6a156d7c
fix diskspace windows bytes (#7601) 2022-06-05 12:10:12 -04:00
jessopb
7b0d38eca7
Testing fixes 0.53.4 (#7600)
* view hosting setting backspace, and storage setting scroll to button

* fix duplicate settings_get call

* avoid unneccessary setDaemonSetting unlimited
2022-06-03 16:09:34 -04:00
jessopb
168ae17eb6
fix dragndrop publish (#7599) 2022-06-02 16:42:27 -04:00
zeppi
0067d5a411 v.53.4-alpha.1 2022-06-02 15:50:25 -04:00
jessopb
99ceaadf8b
add hosting to first run (#7598)
* add hosting to first run, enable auto hosting

* take welcomeVersion out of sync

* app strings fix

* recommended view hosting limit

* small changes

* fixes

* appstrings

* small fix
2022-06-02 15:24:11 -04:00
zeppi
743c75df16 changelog 2022-06-02 15:22:47 -04:00
Franco Montenegro
c5b018afc3 Reconnect to default server if custom server fails. 2022-06-01 17:39:46 -04:00
Franco Montenegro
c7511fc803 Add language category. 2022-06-01 17:06:00 -04:00
zeppi
17bd0eec30 fix status bar colors 2022-05-23 17:36:47 -04:00
zeppi
5c6f7a391b fix price key size 2022-05-23 17:21:27 -04:00
zeppi
d841835c9d fix disappearing checkbox on hover 2022-05-23 16:45:18 -04:00
Franco Montenegro
3c3635977e Implement makeSelectPrevPlayableUrlFromCollectionAndUrl and makeSelectNextPlayableUrlFromCollectionAndUrl 2022-05-21 16:41:52 -04:00
Franco Montenegro
d69eeaa589 Do not allow to add non playable items in playlists yet. 2022-05-21 16:41:52 -04:00
Franco Montenegro
8a9af7d354 Handle non playable items in playlists. 2022-05-21 16:41:52 -04:00
Franco Montenegro
6108860063 Do not show shuffle option for empty collections. 2022-05-06 12:43:29 -04:00
Franco Montenegro
63ce691b90 Disable play/suffle buttons from empty collections. 2022-05-06 12:43:29 -04:00
Franco Montenegro
de825fd4dc Do not throw error when trying to play empty collections. 2022-05-06 12:43:29 -04:00
Franco Montenegro
3671e855cb Add Intl.NumberFormat cache. 2022-05-06 11:24:26 -04:00
Franco Montenegro
efa682ef02 Use language stored in localStorage for formatting numbers. 2022-05-06 11:24:26 -04:00
Franco Montenegro
5319232918 Format numbers internationally. 2022-05-06 11:24:26 -04:00
zeppi
c5b7cc5ac4 fix bid reset 2022-05-02 16:14:21 -04:00
Franco Montenegro
02e4b651af Properly handle thumbnail field in publish/edit upload/collection. 2022-05-02 16:01:42 -04:00
Franco Montenegro
34ea712874 Do not reset description field while uploading thumbnail in playlist edit/publish form; use same upload thumbnail layout as file upload for playlist edit/publish. 2022-04-28 10:49:39 -04:00
zeppi
562e154675 v0.53.3 2022-04-27 18:32:11 -04:00
zeppi
5b4948891e changelog 2022-04-27 18:30:51 -04:00
jessopb
5ed13de5d6 Revert "more lbrytv removal"
This reverts commit 6acdfc9623.
2022-04-27 18:28:33 -04:00
jessopb
9e48d22d70 Revert "strip lbrytv"
This reverts commit befcf9fd55.
2022-04-27 18:27:56 -04:00
Franco Montenegro
9f40680b64 Add max length to fields in channel creation. 2022-04-26 16:30:53 -04:00
zeppi
addcd63794 v0.53.2 2022-04-26 15:59:37 -04:00
zeppi
c11235c70e v0.53.2-alpha.1 2022-04-26 15:13:49 -04:00
zeppi
d8bedba43d changelog 2022-04-26 15:02:37 -04:00
zeppi
befcf9fd55 strip lbrytv 2022-04-26 14:31:42 -04:00
jessopb
feb37a17a6 Revert "Update LBRY.tv to just LBRY."
This reverts commit 43c45c1f62.
2022-04-26 10:23:49 -04:00
jessopb
fcff90e78c Revert "some more lbry.tv to lbry changes"
This reverts commit 3980d0f51e.
2022-04-26 10:23:49 -04:00
zeppi
6acdfc9623 more lbrytv removal 2022-04-25 22:05:43 -04:00
zeppi
15ad30d509 fix 0.53.1 style issues 2022-04-25 21:13:07 -04:00
Kenneth C
3980d0f51e some more lbry.tv to lbry changes
Have changed some more lbry.tv instances into lbry.com so now the desktop app should no longer show the old LBRY.tv messages.
2022-04-25 20:50:36 -04:00
Kenneth C
43c45c1f62 Update LBRY.tv to just LBRY.
Noticed that quite a few files still reference the defunct LBRY.tv, so now they should be simply "LBRY" or a similar relevant string.
2022-04-25 20:50:36 -04:00
Franco Montenegro
673ab85bea Fix thumbnails missing while searching in side bar. 2022-04-25 12:38:19 -04:00
zeppi
3932ecf7c0 restore tags link 2022-04-25 10:39:12 -04:00
zeppi
9386cc678f fix collection link 2022-04-25 09:24:49 -04:00
zeppi
fe2af64b90 fix changelog 2022-04-24 10:35:14 -04:00
zeppi
7c2e4eb3e3 wip 2022-04-24 09:57:28 -04:00
zeppi
0c990ba276 fix ci
yarn lock

fix yarn3 warnings

node 16 on deploy

try deploy again

check in yarn/releases

rm lbry-format from lockfile

remove lbry-format yet again

fix flow
2022-04-24 09:57:28 -04:00
zeppi
f6fd061dd6 yarn lock 2022-04-24 09:57:28 -04:00
Daniele Basso
150f280c33 Update README.md 2022-04-24 09:57:28 -04:00
tiziodcaio
3bd97984c0 Update documentation 2022-04-24 09:57:28 -04:00
tiziodcaio
c31e40089c Enabling corepack 2022-04-24 09:57:28 -04:00
tiziodcaio
465d204e69 Update yarn to Berry
Adding changelog
2022-04-24 09:57:28 -04:00
tiziodcaio
6742bc373c Upgrade to yarn v3 2022-04-24 09:57:28 -04:00
jessopb
75d2464443
remove old lbrytv players (#7552) 2022-04-23 17:33:53 -04:00
zeppi
6a26771339 v0.53.1 2022-04-22 12:21:57 -04:00
zeppi
5a2e4ae49a changelog 2022-04-22 12:21:23 -04:00
zeppi
0d44213f78 v0.53.0 2022-04-22 11:45:37 -04:00
zeppi
0bb13331d5 changelog edit 2022-04-22 11:45:13 -04:00
zeppi
6bffc8a993 v0.53.1 2022-04-22 11:40:50 -04:00
zeppi
811bb0cf30 changelog 2022-04-22 11:38:23 -04:00
zeppi
d64da2a8b2 fix viewedBar bug 2022-04-22 11:34:55 -04:00
zeppi
a99f6d4bf2 v0.53.0 2022-04-22 10:25:46 -04:00
zeppi
0101bc0533 v0.53.0-alpha.6 2022-04-22 10:25:29 -04:00
zeppi
83faa7bba0 button tweaks 2022-04-22 10:21:15 -04:00
zeppi
a18aceed1f v0.53.0 2022-04-22 09:46:38 -04:00
zeppi
2eb0219ad1 v0.53.0-alpha.4 2022-04-22 09:46:27 -04:00
zeppi
c58b3c752e changelog 2022-04-22 09:44:57 -04:00
jessopb
ee98531c00
fix repost ribbon (#7549) 2022-04-21 23:02:26 -04:00
Franco Montenegro
ee754f0085
Add persistent watch time setting. (#7547)
* Add persistent watch time setting.

* floating bugfix --jessopb

* Improve how the persist watch time is being stored; add clear cache button.

* Add makeSelectContentWatchedPercentageForUri selector and give feedback when clearing cache.

* tweaks --jessopb

Co-authored-by: zeppi <jessopb@gmail.com>
2022-04-21 23:00:57 -04:00
zeppi
3854bf6fd4 v0.53.0 2022-04-21 11:38:49 -04:00
zeppi
3ca62704d5 v0.53.0-alpha.3 2022-04-21 11:38:03 -04:00
zeppi
34d9b05de0 changelog typo 2022-04-21 11:33:49 -04:00
zeppi
87835451f3 v0.53.0 2022-04-21 11:17:49 -04:00
zeppi
3b7b9e69c7 changelog 2022-04-21 11:12:59 -04:00
zeppi
febbb4f82e changelog 2022-04-21 11:12:26 -04:00
zeppi
e29e982ffb temp following style fix 2022-04-21 11:05:42 -04:00
zeppi
d84746d395 v0.53.0-alpha.1 2022-04-20 17:18:20 -04:00
jessopb
c133d5b53a
style fixes (#7548) 2022-04-20 17:17:47 -04:00
zeppi
845f33b4f2 v0.53.0-alpha.0 2022-04-18 08:55:19 -04:00
zeppi
9b26a65be4 changelog 2022-04-18 08:54:59 -04:00
zeppi
2193c61628 changelog 2022-04-18 08:53:57 -04:00
zeppi
aef3eccfbd changelog 2022-04-17 13:27:02 -04:00
jessopb
3034f4ce6c
bring in styles (#7542)
* bring in ody styles; modify; cleanup

* workflow

* workflow

* v0.52.6-alpha.teststyles.1

* fix hook

* v0.52.6-alpha.teststyles.2

* style fixes

* fix pagination styling

* v0.52.6-alpha.teststyles.3

* wallet icon was bad

* restore deploy script

* fixes

* fix player close button

* modal inputs

* cleanup

* cleanup

* fix staked indicator

* fix profile menu button skel delay

* fix view-all-playlists hover

* fix overlay buttons on collection page

* fix header buttons
2022-04-17 13:04:56 -04:00
Franco Montenegro
50ae6e2869
Add ability to search through publishes. (#7535)
* Add ability to search through publishes.

* Small fix in allClaimListMine type.

* Small fix for search claims in uploads page.

* Add search term in uri when filtering uploads.

* ui/ux touchup

* no appstrings for you

* resolve conflicts

Co-authored-by: jessopb <36554050+jessopb@users.noreply.github.com>
2022-04-14 23:05:59 -04:00
infinite-persistence
21204321c0
Remove abandoned claim from Uploads Page (#7534)
## Issue
In Uploads Page, Claim doesn't go away immediately when deleted, only after a refresh.

## Approach
- Also update `myClaimsPageResults` when abandoning.
- `abandonedUris` is an array because the uris come in various form, so had to check all.

(Cherry-pick of Odysee PR_1276)
2022-04-13 12:22:50 -04:00
infinite-persistence
daab8a28ed
Fix post-editor preview mode (#7532)
## Cause
It broke because lack of awareness that we can't use our components in preview mode. For some reason, we don't have redux access in SimpleMDE's preview mode.

## Change
- Restore the stub for iframes
- Fix preview for images, and apply a similar styling as in Posts.

Co-authored-by: jessopb <36554050+jessopb@users.noreply.github.com>
2022-04-13 12:22:05 -04:00
infinite-persistence
79f05a831f Uploads: show placeholder when loading 2022-04-13 12:08:04 -04:00
dependabot[bot]
243cd0dffd Bump plist from 3.0.4 to 3.0.5
Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 12:04:30 -04:00
dependabot[bot]
8e536e7020 Bump lodash-es from 4.17.15 to 4.17.21
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 12:04:11 -04:00
dependabot[bot]
b0ab2daf39 Bump moment from 2.24.0 to 2.29.2
Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.24.0...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 11:46:18 -04:00
Franco Montenegro
3fd3a548ec Add viewed bar in thumbnails. 2022-04-13 11:40:06 -04:00
zeppi
d1c82c9af0 fix send tip default 2022-04-05 16:47:21 -04:00
zeppi
5ef1baff3b v0.52.6 2022-04-04 17:35:27 -04:00
zeppi
da564452f7 fix duplicate plist key 2022-04-04 16:58:46 -04:00
zeppi
c3d836bca7 update mac plist 2022-04-04 16:41:27 -04:00
zeppi
745a3ca889 v0.52.6-alpha.8 2022-04-04 16:39:55 -04:00
zeppi
f5564086c4 v0.52.6 2022-04-04 06:27:05 -04:00
zeppi
0e6b2eae8b changelog 2022-04-04 06:16:08 -04:00
zeppi
23d61df410 v0.52.6-alpha.7 2022-04-03 11:02:05 -04:00
zeppi
c28c5219c1 do not increment welcome version 2022-04-03 11:01:40 -04:00
zeppi
1db943518d v0.52.6-alpha.6 2022-04-03 10:20:11 -04:00
zeppi
9f4ba9041b changelog 2022-04-03 10:19:54 -04:00
zeppi
b47bd7e8b6 cleaner 2022-04-03 10:17:54 -04:00
zeppi
ec600bb8c8 graphic redesign 2022-04-03 10:17:54 -04:00
zeppi
f055198b29 wip 2022-04-02 09:27:07 -04:00
zeppi
e1a66d389f prevent crash when deleting last reply (still needs work) 2022-04-02 09:27:07 -04:00
zeppi
1891107a80 v0.52.6-alpha.5 2022-04-01 10:20:40 -04:00
zeppi
cff40b338c changelog 2022-03-31 14:03:15 -04:00
zeppi
945b4b3992 changelog 2022-03-31 14:02:04 -04:00
zeppi
085929a92e v0.52.6-alpha.4 2022-03-31 12:48:18 -04:00
zeppi
7f83c68d82 bump lbrynet 2022-03-31 12:46:56 -04:00
zeppi
e0c2f03c16 edit input tweak height 2022-03-29 18:06:55 -04:00
zeppi
12b15a2549 edit input field background unset 2022-03-29 18:06:55 -04:00
zeppi
4d75922c8b edittext button style fix 2022-03-29 18:06:55 -04:00
zeppi
0de96358bd restyle collection rename 2022-03-29 18:06:55 -04:00
Franco Montenegro
5a24d6c570 Allow renaming collection in view playlist page. 2022-03-29 18:06:55 -04:00
Franco Montenegro
1369fbb064 Allow users to rename private/unpublished lists. 2022-03-29 18:06:55 -04:00
zeppi
2aeb419969 new token 2022-03-27 23:15:43 -04:00
zeppi
474115b398 v0.52.6-alpha.3 2022-03-27 21:57:24 -04:00
zeppi
d09e294797 v0.52.7-alpha.2 2022-03-27 10:48:41 -04:00
zeppi
1bfb843606 v0.52.7-alpha.1 2022-03-26 19:57:37 -04:00
zeppi
d302fbae09 v0.52.6-alpha.7 2022-03-26 17:45:10 -04:00
zeppi
52e15bbc96 try gh upload-artifact 2.2.4 2022-03-26 17:44:46 -04:00
zeppi
e0dc359241 v0.52.6-alpha.6 2022-03-26 17:20:40 -04:00
zeppi
8275ff1228 try upload-artifacts@v3 2022-03-26 17:20:08 -04:00
zeppi
31d896fb8d v0.52.6-alpha.5 2022-03-26 16:52:49 -04:00
zeppi
0c467ddc8d changelog 2022-03-26 16:52:27 -04:00
zeppi
37dbfcb40a v0.52.6-alpha.4 2022-03-26 15:12:46 -04:00
zeppi
f5b4aba9da v0.52.6-alpha.3 2022-03-26 13:59:02 -04:00
Tobias Speicher
21af8f4f28 refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-23 12:12:44 -04:00
zeppi
cde52f4d35 fix mac builds 2022-03-22 16:14:15 -04:00
zeppi
7da8be67fe v0.52.6-alpha.2 2022-03-12 22:10:47 -05:00
zeppi
538aa3b42f workflow try continue-on-error 2022-03-12 22:06:57 -05:00
zeppi
fd02bb00b3 increase yarn timeout 2022-03-12 22:06:57 -05:00
zeppi
d5c79495ab v0.52.6-alpha.1 2022-03-12 15:55:47 -05:00
zeppi
702a3f8eb8 changelog 2022-03-11 12:57:29 -05:00
infinite-persistence
35276d5879
Fix comment count not incremented when it was previously 0 (#7510)
It was causing the nudge to add a comment to still appear after one has just entered a comment.

Ticket: Odysee 928
2022-03-11 01:07:41 -05:00
zeppi
a7e70e4d21 bump electron to 15.4.0 2022-03-08 22:09:27 -05:00
zeppi
6560ab6c7b bump electron to 15.3.7 2022-03-08 22:09:27 -05:00
Franco Montenegro
66bdd3fc87 Small refactor to get the last used collection. 2022-03-08 12:30:39 -05:00
Franco Montenegro
c843991378 Update last used collection when a collection is pending or published. 2022-03-08 12:30:39 -05:00
Franco Montenegro
aa008d8a61 Small fix for last used collection when it's a published collection. 2022-03-08 12:30:39 -05:00
Franco Montenegro
ca1d0e71b7 Add last used collection to right click menu. 2022-03-08 12:30:39 -05:00
zeppi
2ddf0a2cbd add medium duration video filter 2022-03-07 18:46:28 -05:00
zeppi
64e48c1eef update flow 2022-03-07 17:07:42 -05:00
zeppi
10381ef06a Revert "Bump shelljs from 0.8.3 to 0.8.5"
This reverts commit 33e5318a29.
2022-03-07 16:43:12 -05:00
infinite-persistence
cef9ade10e Render whole app on language change
## Issues
1. We were manually adding `selectLanguage(state)` as a prop to components used in Settings Page to trigger a render. Flaws:
    - Unclear that the unused prop is just to trigger a render.
    - Manually adding on a case-by-case basis will break over time (missed component).

2. The translation file fetching is delayed (at least in Odysee) and also takes time, so the GUI will end up having mixed strings on F5, depending on when the fetch completed.

## Approach
Make the app wrapper have a key that's tied to the language and translation data, so the entire app renders when language changes. Seems like a common design in most apps.

## Ticket
odysee 921
2022-03-07 09:40:09 -05:00
dependabot[bot]
33e5318a29 Bump shelljs from 0.8.3 to 0.8.5
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.3 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.3...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 09:37:47 -05:00
dependabot[bot]
8ecdaab6d4 Bump url-parse from 1.5.3 to 1.5.10
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 09:37:35 -05:00
dependabot[bot]
9de2465e21 Bump follow-redirects from 1.13.0 to 1.14.8
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 09:36:36 -05:00
zeppi
bef46257bc depbump 2022-03-07 09:30:30 -05:00
Franco Montenegro
d410664d9a Fix small typo in actions/app.js 2022-03-04 10:58:19 -05:00
Franco Montenegro
1f8c9fd24d Display release notes and version for Linux installations using .deb packages. 2022-03-04 10:58:19 -05:00
Franco Montenegro
64a2e908ae Prevent multiple downloads when auto updater isn't supported. Hide upgrade nag when on progress modal is displayed. 2022-03-04 10:58:19 -05:00
Franco Montenegro
40e20dfc1b Small eslint warning fix. 2022-03-01 11:09:50 -05:00
Franco Montenegro
53425d8fe2 Add disk space functions for windows and mac. 2022-03-01 11:09:50 -05:00
zeppi
ca748fd16a fix random mac build failures 2022-02-27 09:07:20 -05:00
zeppi
ea7ed53bfe v0.52.5 2022-02-25 17:57:19 -05:00
zeppi
29c605de86 changelog 2022-02-25 17:56:59 -05:00
zeppi
b56746475b cleanup 2022-02-25 17:52:35 -05:00
zeppi
94f64f8d25 comment on mac disk space 2022-02-25 17:52:35 -05:00
zeppi
04a6c735ac finish view data hosting 2022-02-25 17:52:35 -05:00
zeppi
e9502410de refactor data hosting 2022-02-25 17:52:35 -05:00
zeppi
bf87ac08db reverts electron updates testing 2022-02-23 12:36:55 -05:00
zeppi
72310710af v0.52.5-alpha.2 2022-02-22 14:35:26 -05:00
zeppi
cce7cd43d8 v0.52.5-alpha.1 2022-02-22 13:14:59 -05:00
Franco Montenegro
080eee7d92 Display release changes from release notes instead of using GitHub's API. 2022-02-22 13:14:17 -05:00
Franco Montenegro
3058dbb4a6 Fix typos. 2022-02-22 13:14:17 -05:00
Franco Montenegro
b7d685b4ec Remove trailing spaces from comments. 2022-02-22 13:14:17 -05:00
Franco Montenegro
e1ecf87df7 Better way of handling autoUpdate and listen for update available event to display update nag. 2022-02-22 13:14:17 -05:00
Franco Montenegro
48c5f58a8e Multiple fixes in auto updates.
- Add "disable auto updates" setting (prevents downloading updates in the background but will still notify if there are newer versions)
- Prevent downloading multiple times the same update
- Hide nag when auto update modal is displayed
2022-02-22 13:14:17 -05:00
Franco Montenegro
aa40a44ce3 Only allow to window.open http and https protocols. 2022-02-17 15:09:43 -05:00
Franco Montenegro
8fb67d5980 Fix markdown guide button. 2022-02-17 15:09:43 -05:00
zeppi
67608dfc9c v0.52.4 2022-02-15 22:06:04 -05:00
zeppi
9fc600397c changelog 2022-02-15 22:05:39 -05:00
zeppi
3d85cff0ef Revert "v0.52.4"
This reverts commit 97fbc5e598.
2022-02-15 22:04:40 -05:00
zeppi
97fbc5e598 v0.52.4 2022-02-15 21:56:05 -05:00
zeppi
9375ada72a remove duplicate header search on mobile 2022-02-15 21:48:43 -05:00
zeppi
49c5180820 fix active channel for commenting etc 2022-02-15 20:58:13 -05:00
zeppi
12097dbbba v0.52.3 2022-02-15 14:59:44 -05:00
zeppi
870992a6e4 changelog 2022-02-15 14:59:02 -05:00
zeppi
eb1b412840 hide md preview help and restore mac header 2022-02-15 12:31:16 -05:00
zeppi
7c7c2aa053 fix comment pinning 2022-02-14 23:18:28 -05:00
Rafael
f6961f91fe fix comment editing 2022-02-14 23:18:28 -05:00
zeppi
154b20c6c8 fix embed play edge case 2022-02-14 20:56:47 -05:00
zeppi
43af7ddc5f more 2022-02-14 20:56:47 -05:00
zeppi
a574a5c1de markdown fixes - blockquotes and embedded videos 2022-02-14 20:56:47 -05:00
zeppi
c553ee46f6 v0.52.2 2022-02-11 12:54:47 -05:00
zeppi
71eedd20e1 changelog 2022-02-11 12:54:37 -05:00
zeppi
3a4ff9d35d creator reactions and file like stroke hack 2022-02-11 11:11:03 -05:00
zeppi
0106c1c361 v0.52.2-alpha.5 2022-02-09 17:11:50 -05:00
zeppi
830567b6ec changelog 2022-02-09 17:06:46 -05:00
zeppi
8bd38114dd fix channelsFollowingDiscover 2022-02-09 16:46:47 -05:00
zeppi
92ed44c0f2 refactor improve data hosting 2022-02-09 10:59:17 -05:00
zeppi
bbea2887f2 fix color override on icons 2022-02-07 16:56:35 -05:00
zeppi
ca2c6a6f8f v0.52.2-alpha.4 2022-02-06 22:59:26 -05:00
zeppi
ab87591501 changelog0.52.2-alpha.4 2022-02-06 22:56:20 -05:00
zeppi
24264a15b0 cleanup 2022-02-06 22:43:05 -05:00
zeppi
4f74ecfc47 bring in player refactor with seek ahead/back 2022-02-06 22:43:05 -05:00
zeppi
703d1afc06 add key to claimPreview to fix wrong thumbs 2022-02-06 22:06:48 -05:00
zeppi
629b928c80 disable keycode back in text area 2022-02-06 20:11:59 -05:00
zeppi
9a5f69f0eb prevent errant wallet servers error 2022-02-04 17:04:40 -05:00
zeppi
fe72dcfc2c move wallet server setting help 2022-02-04 15:54:32 -05:00
zeppi
fe1a2eac33 use radio buttons for comment server selection 2022-02-03 22:29:52 -05:00
zeppi
2e048dc225 comment server selector - create file for protocol regex 2022-02-03 10:59:10 -05:00
zeppi
cbc3624664 rename commentserver files 2022-02-03 10:59:10 -05:00
zeppi
6b37fd2eae comment server selector functional now, some cleanup 2022-02-03 10:59:10 -05:00
zeppi
d13397d4dd new custom comment servers ux 2022-02-03 10:59:10 -05:00
zeppi
f370aa8db1 v0.52.2-alpha.3 2022-01-29 20:44:20 -05:00
jessopb
0e134a02d7
Miko fixes 0.52.2 a2 (#7451)
* style, repost, and costinfo fixes

* fix anon collection publishing

* fix markdown images
2022-01-29 18:25:40 -05:00
zeppi
acbf262641 v0.52.2-alpha.2 2022-01-27 16:48:40 -05:00
zeppi
54b59dd946 remove useGetAds 2022-01-27 16:47:58 -05:00
zeppi
eb9bbd4c2c v0.52.2-alpha.1 2022-01-27 16:36:18 -05:00
jessopb
18b4f09bab
update some deps (#7447) 2022-01-27 16:35:30 -05:00
jessopb
98852e7eb4
changelog and hosting copy (#7445) 2022-01-27 14:45:48 -05:00
jessopb
5fdac4898f
Playlistorder (#7442)
* Add horizontal layout (#636)

* Test out a horizontal scroll for upcoming (tile only for now)

* - add support for list layout
- add following label on home page
- clan up css and naming conventions

* Update header type + show only if scheduled streams are showing

* [Playlist] Pull in sorting changes from desktop + Add Drag-n-Drop + Handle unavailable/deleted claims (#641)

* Add ordering Icons

* Refactor doCollectionEdit

- It required claims as parameter, when only uris are used to populate the collection, so that was changed to pass down the uris instead.
- There were unused and mostly unnecessary functions inside, for example the parameter claimIds was never used so it would never enter the claimSearch function which again would be used to generate uris, so it's better to just use uris as parameter

* Add List Reordering changes

* Add toggle button for list editing

* Add toggle on content page collection sidebar

* Enable drag-n-drop to re-order list items

https://www.youtube.com/watch?v=aYZRRyukuIw

* Allow removing all unavailable claims from a List

* Fix <g> on icons

* Fix section buttons positioning

* Move preventDefault and stopPropagation to buttons div instead of each button, preventing clicking even if disabled opening the claim

* Change dragging cursor

* Fix sizing

* Fix dragging component

* Restrict dragging to vertical axis

* Ignore shuffle state for ordering

* Fix console errors

* Mobile fixes

* Fix sidebar spacing

* Fix grey on mobile after click

* cleanup

Co-authored-by: Dan Peterson <dan@dan-peterson.ca>
Co-authored-by: saltrafael <76502841+saltrafael@users.noreply.github.com>
2022-01-27 10:20:21 -05:00
jessopb
618ab5e195
More header refactors (#7441)
* Refactor notificationHeaderButton

* Add Tooltips to header buttons and replace reach/ui

* Decrease --header-height by 20%

* more header cherry-pick

Co-authored-by: Rafael <rafael.saes@odysee.com>
2022-01-26 21:14:36 -05:00
jessopb
f095081c71
Header refactor (#7440)
* Refactor header Component, split into smaller components and remove what is unused

* fix upload menu

* better centering for backout title

* cleanup

Co-authored-by: Rafael <rafael.saes@odysee.com>
2022-01-26 14:54:58 -05:00
jessopb
3f0cc0bf2e
Compact follower counts (#7432)
* Factor out 'toCompactNotation'

* File page: use compact view count (w/ tooltip for full res)

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-01-25 18:16:28 -05:00
jessopb
caf32736b5
fix floating player disappearing on small screens (#7439) 2022-01-25 15:35:51 -05:00
jessopb
0ab1aab4e7
make data hosting clearer (#7438) 2022-01-24 22:12:27 -05:00
jessopb
0b41fc041a
Bringing in emotes, stickers, and refactors from ody (#7435)
* [New Feature] Comment Emotes (#125)

* Refactor form-field

* Create new Emote Menu

* Add Emotes

* Add Emote Selector and Emote Comment creation ability

* Fix and Split CSS

* [New Feature] Stickers (#131)

* Refactor filePrice

* Refactor Wallet Tip Components

* Add backend sticker support for comments

* Add stickers

* Refactor commentCreate

* Add Sticker Selector and sticker comment creation

* Add stickers display to comments and hyperchats

* Fix wrong checks for total Super Chats

* Stickers/emojis fall out / improvements (#220)

* Fix error logs

* Improve LBC sticker flow/clarity

* Show inline error if custom sticker amount below min

* Sort emojis alphabetically

* Improve loading of Images

* Improve quality and display of emojis and fix CSS

* Display both USD and LBC prices

* Default to LBC tip if creator can't receive USD

* Don't clear text-field after sticker is sent

* Refactor notification component

* Handle notifications

* Don't show profile pic on sticker livestream comments

* Change Sticker icon

* Fix wording and number rounding

* Fix blurring emojis

* Disable non functional emote buttons

* new Stickers! (#248)

* Add new stickers (#347)

* Fix cancel sending sticker (#447)

* Refactor scrollbar CSS for portal components outside of main

Refactor channelMention suggestions into new textareaSuggestions component

Install @mui/material packages

Move channel mentioning to use @mui/Autocomplete combobox without search functionality

Add support for suggesting Emotes while typing ':'

Improve label to display matching term

Add back and improved support for searching while mentioning

Add support for suggesting emojis

Fix non concatenated strings

Add key to groups and options

Fix dispatch props

Fix Popper positioning to be consistent

Fix and Improve searching

Add back support for Winning Uri

Filter default emojis with the same name as emotes

Remove unused topSuggestion component

Fix text color on darkmode

Fix livestream updating state from both websocket and reducer and causing double of the same comments to appear

Fix blur and focus commentCreate events

Fix no name after @ error

* desktop tweaks

Co-authored-by: saltrafael <76502841+saltrafael@users.noreply.github.com>
Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
Co-authored-by: Rafael <rafael.saes@odysee.com>
2022-01-24 11:07:09 -05:00
jessopb
fe95db15b2
muted channels fix (#7436) 2022-01-23 13:59:39 -05:00
jessopb
c1a54f9707
Control tags (#7433)
* Add prefix to all internal tags

* Strip internal tag prefix from form labels

Co-authored-by: Dan Peterson <dan@dan-peterson.ca>
2022-01-21 20:43:45 -05:00
Rahul Rajan
f06b3bd877
add property overlay to ClaimPreview (#7420)
* add property overlay to ClaimPreview

* add to changelog

* moved changelog change
2022-01-21 14:44:48 -05:00
jessopb
11eed5c9eb
apply https://github.com/OdyseeTeam/odysee-frontend/pull/726 (#7421) 2022-01-21 12:55:17 -05:00
jessopb
18c3bbe6e3
Fix comment disabling on MD (#685) (#7431)
Also restore reactions
This is only an internal tag

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
2022-01-21 12:54:43 -05:00
jessopb
fc3ddf01b1
apply ody pr 463 - move MAIN_CLASS constant (#7430) 2022-01-21 12:54:22 -05:00
jessopb
ca0cd2ca75
Use 'selectHasChannel' instead of the full 'selectMyChannelClaims' (#7427)
- selectMyChannelClaims depends on `byId`, which currently is always invalidated per update, so it is not memoized.

- Most of the use-cases just needs the ID or the length of the array anyways, so avoid generating a Claim array (in selectMyChannelClaims) unnecessarily -- the client need to reduce it back down to IDs again :/

- The simpler boolean also removes the need to memoize the selector, which saves a bit of memory.

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-01-21 12:38:11 -05:00
jessopb
2f1fc941bb
ody pr 628 - more details in thumb errors (#7429) 2022-01-21 12:06:14 -05:00
jessopb
528a0f4d6e
apply ody pr #329 no blacklist check on claimLink (#7428) 2022-01-21 11:21:43 -05:00
infinite-persistence
cff17deb5d
Video: fix grayed out "/" in time indicator (#7425) 2022-01-19 21:27:41 -05:00
dependabot[bot]
bd3126a6b8
Bump follow-redirects from 1.13.0 to 1.14.7 (#7413)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 21:27:04 -05:00
jessopb
4f6befc0ce
Fix doAbandonClaim (#699) (#7422)
* Refactor doAbandonClaim parameters to only claim

- Gets txid and nout by default now, and passing claim allows using more data to verify ownership in case of txid:nout failing again
- Unused on modalRemoveCard
- Edited the comment on doCollectionDelete to explain better

* Fix doAbandonClaim failing to select my claim

Co-authored-by: saltrafael <76502841+saltrafael@users.noreply.github.com>
2022-01-19 20:54:01 -05:00
jessopb
c7021a08ad
Selector refactors (#7424)
* Attempt to speed up sidebar menu for mobile (#283)

* Exclude default homepage data at compile time

The youtuber IDs alone is pretty huge, and is unused in the `CUSTOM_HOMEPAGE=true` configuration.

* Remove Desktop items and other cleanup

- Moved constants out of the component.
- Remove SIMPLE_SITE check.
- Remove Desktop-only items

* Sidebar: limit subscription and tag section

Too slow for huge lists

Limit to 10 initially, and load everything on "Show more"

* Fix makeSelectThumbnailForUri

- Fix memo
- Expose function to extract directly from claim if client already have it.

* Fix and optimize makeSelectIsSubscribed (#273)

- It will not return true if the uri provided is canonical, because the compared subscription uri is in permanent form. This was causing certain elements like the Heart to not appear in claim tiles.
- It is super slow for large subscriptions not just because of the array size + being a hot selector, but also because it is looking up the claim twice (not memo'd) and also calling `parseURI` to determine if it's a channel, which is unnecessary if you already have the claim.

- Optimize the selector to only look up the claim once, and make operations using already-obtained info.

* Simplify makeSelectTitleForUri

No need to memo given no transformation.

* Simplify makeSelectIsUriResolving

- Memo not required. `resolvingUris` is very dynamic and is a short array anyways.
- Changeg from using `indexOf` to `includes`, which is more concise.

* Cost Info selector fixes

- no memo required since they are just directly accessing the store.

Co-authored-by: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com>
Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-01-19 20:46:01 -05:00
jessopb
ea072febae
some fixes from odysee (#7423) 2022-01-19 15:12:54 -05:00
jessopb
064d8738dd
do not filter sharedPreferences from sdk prefs (#7418) 2022-01-17 20:08:40 -05:00
jessopb
03f5358a8c
fix recsys bug (#7412) 2022-01-10 12:50:46 -05:00
zeppi
4cfc201b20 v0.52.1-alpha.5 2022-01-10 08:42:02 -05:00
zeppi
e5c4a5a1d9 remove getTimestamp from collection new reducer 2022-01-10 08:41:34 -05:00
jessopb
ebe253f814
fix following page (#7410) 2022-01-07 22:56:36 -05:00
zeppi
3450d76295 v0.52.1-alpha.4 2022-01-07 15:09:39 -05:00
zeppi
33949e5dbf changelog 2022-01-07 15:09:16 -05:00
jessopb
85899e7e38
reenable thumbs from videos (#7409) 2022-01-07 15:00:12 -05:00
jessopb
22a302f528
mostly remove is_web (#7408) 2022-01-07 14:02:33 -05:00
jessopb
8a7b88f073
fix sync changes (#7407) 2022-01-07 13:03:29 -05:00
jessopb
78fb559fa2
small sync refactor cleaning up reducers (#7403) 2022-01-06 15:30:24 -05:00
jessopb
220021964d
clean sync_client_Settings reducer (#7402) 2022-01-06 15:30:08 -05:00
jessopb
34283f7be6
fix 7188 window.location.pathname (#7401) 2022-01-04 15:40:42 -05:00
zeppi
ca799ae4ec v0.52.1-alpha.3 2022-01-04 13:59:13 -05:00
zeppi
3812989c0a changelog 2022-01-04 13:58:50 -05:00
jessopb
7a100ec022
redux fixes (#7400) 2022-01-04 13:46:55 -05:00
jessopb
ba2caf4eb2
fix upload crash (#7399) 2022-01-04 10:13:15 -05:00
jessopb
cedfd3e32c
fix comments (#7398) 2022-01-04 10:01:01 -05:00
jessopb
e704f87557
fix publish confirmation field (#7397) 2022-01-04 09:36:44 -05:00
jessopb
0eab08e3b4
remove loadingBar, fix parser dependency (#7394) 2022-01-03 10:27:55 -05:00
Melroy van den Berg
a7659c368b
Fix WIndows artifact upload (#7389)
Fix `if statement` of the Windows binary artifact upload of GH Actions
2022-01-03 09:53:26 -05:00
Melroy van den Berg
82b9640387
Remove duplicate after sign hook (#7388)
The [afterSignHook](build/afterSignHook.js) script is already executed via electron-builder.json "afterSign" setting.
2022-01-03 09:53:13 -05:00
Melroy van den Berg
5a69c9f4e9
Unuset environment vars/secrets (#7387)
I think the following 4 environment variables/secrets aren't used at all during the build.
2022-01-02 19:27:19 -05:00
zeppi
65ad23be4f v0.52.1-alpha.2 2022-01-02 15:34:13 -05:00
jessopb
a1f4a7f8ec
Electron 15 (#7384)
* upgrade electron to 15

* linter

* change electron-cookies to modded version for electron >=10

* electron-cookies version fix
2022-01-02 15:33:11 -05:00
jessopb
6d04ff6e32
Revert "upgrade electron to 15 (#7363)" (#7383)
This reverts commit 08c47a57f1.
2021-12-31 14:49:45 -05:00
zeppi
68ecfbb990 update changelog for 0.52.1 2021-12-31 13:29:20 -05:00
zeppi
73600003b0 v0.52.1-alpha.1 2021-12-31 13:27:39 -05:00
jessopb
08c47a57f1
upgrade electron to 15 (#7363)
* upgrade electron to 15

* linter
2021-12-31 12:53:07 -05:00
jessopb
a3398843c2
Optimize selectClaimIsMine (#7370)
Frequently used; top in perf profile

Most of the time, you already have the claim object in the current context. `selectClaimIsMineForUri` will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time).

Break apart the logic and added the alternative `selectClaimIsMine` for faster lookup.

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2021-12-31 12:52:26 -05:00
zeppi
4fc050fdad v0.52.0 2021-12-31 11:11:52 -05:00
zeppi
d9d7845d96 Revert "v0.52.0"
This reverts commit 851a715025.
2021-12-31 11:11:25 -05:00
jessopb
500ed82988
restore medium spacing on cards (#7382) 2021-12-31 10:56:25 -05:00
zeppi
851a715025 v0.52.0 2021-12-31 08:08:47 -05:00
zeppi
ee520d89e1 v0.52.0-alpha.13 2021-12-30 23:38:22 -05:00
jessopb
fd8cf9b40d
clean up related card title header spacing (#7381) 2021-12-30 22:54:45 -05:00
jessopb
dbc980cab5
clear shuffle when entering edit or publish for collections (#7380) 2021-12-30 22:21:37 -05:00
zeppi
c00b9cd434 v0.52.0-alpha.12 2021-12-30 15:57:55 -05:00
jessopb
b2e2e84cc0
show channel analytics only if authed (#7378) 2021-12-30 15:54:00 -05:00
jessopb
dfdd3fc248
more whitespace on cards (#7377) 2021-12-30 15:51:28 -05:00
jessopb
2549f5b0ad
fix library filter crash (#7376) 2021-12-30 15:35:35 -05:00
Daniela Narvaez
0600646479
update input border color in light theme #5551 (#7373) 2021-12-30 13:48:26 -05:00
jessopb
36890601a8
no empty lists on lists page (#7375) 2021-12-30 13:36:08 -05:00
jessopb
59a188044e
fix private lists editing (#7374) 2021-12-30 13:10:10 -05:00
jessopb
ca15faef02
fix advanced editor in description (#7372) 2021-12-29 15:58:55 -05:00
zeppi
24c516acb0 v0.52.0-alpha.11 2021-12-24 13:10:06 -05:00
jessopb
cb7f2e87cf
use parser (#7369) 2021-12-24 13:08:47 -05:00
jessopb
1b2a6f6651
update windows code signing (#7368)
* update windows code signing

* reenable windows
2021-12-24 12:37:14 -05:00
jessopb
44fd8349a7
fix comment replies (#7367) 2021-12-23 11:31:20 -05:00
jessopb
18619cac20
successfully repair default hubs when custom hub fails (#7366) 2021-12-20 16:20:16 -05:00
zeppi
27e8159db9 v0.52.0-alpha.10 2021-12-16 17:21:44 -05:00
jessopb
6312f1eee9
changelog (#7361) 2021-12-16 17:17:58 -05:00
jessopb
1929089fab
fix advanced text area (#7360) 2021-12-16 15:03:53 -05:00
jessopb
ae682a4a33
restore posts publishing (#7359) 2021-12-16 14:26:52 -05:00
zeppi
000a750f19 v0.52.0-alpha.9 2021-12-15 21:03:34 -05:00
jessopb
5e3844390f
update disk space setting to new api (#7356) 2021-12-15 18:11:22 -05:00
jessopb
4c17b3818e
quick fix for download connecting... (#7354) 2021-12-15 17:56:20 -05:00
jessopb
a0917908bb
add feature to enable experimental upgrades (#7353) 2021-12-15 15:58:47 -05:00
infinite-persistence
05d5e6c05d
Remove old mobile chromecast css hack (#7352)
lbry-desktop--6844

This negates 49abbecb.

Now that we have a dedicated chromecast button, we don't need to hack Chrome's default cast button to appear on top of vjs-mobile-ui.  The hack no longer works anyway, since the CSS exposure has been deprecated around mid 2020 -- it is still available, but its abilities has become less and less.
2021-12-14 21:09:24 -05:00
jessopb
514bc0a273
remove referral code from share (#7350)
* remove referral code from share

* cleanup
2021-12-13 09:02:28 -05:00
jessopb
f474c014f3
update changelog (#7347) 2021-12-12 22:28:23 -05:00
jessopb
0cd1c6d535
improve repost modal styling (#7345) 2021-12-12 18:14:07 -05:00
Bradley Ray
e5072c8681
Modal repost (#7341)
* make repost into a modal

* remove unecessary import

* removed page/repost

* fixed yarn lint errors

* added page/repost back

* added "Repost" title bar

* fixed yarn lint errors
2021-12-12 01:03:00 -05:00
jessopb
6fed123253
update changelog (#7340) 2021-12-10 15:03:14 -05:00
jessopb
13a9f5035d
Fixes the play/pause on drag issue with the floating player. (#221) (#7339)
I tried to use event.preventDefault on the click handler but that didn't
work. So instead I'm using css 'pointer-events: none' to disable click
events on the player while the player is being dragged.

https://github.com/OdyseeTeam/odysee-frontend/issues/206

Co-authored-by: maxime peabody <maximepeabody@gmail.com>
2021-12-10 13:08:15 -05:00
jessopb
474782eeb0
redisable windows build (#7337) 2021-12-09 18:07:28 -05:00
Bohdan Kornatskyi
3458fa5e50
Fix MenuButton behavior from toggle dropdown onMousePress to onClick (#7335)
* changed behavior of a MenuButton. now it shows drop down on click not on mouse down

* fix 'Enter' key handling

* changed behavior of a MenuButton. now it shows drop down on click not on mouse down

* fix 'Enter' key handling
2021-12-09 18:05:37 -05:00
zeppi
6e27100606 v0.52.0-rc.8.3 2021-12-09 16:54:45 -05:00
zeppi
d22442a316 deploy no csc win 2021-12-09 16:52:34 -05:00
zeppi
28383efbdf v0.52.0-rc.8 2021-12-09 11:27:52 -05:00
zeppi
d9afaadb27 update webpack to 4.44.2 and copy-webpack-plugin to 6.4.1 2021-12-08 23:52:05 -05:00
zeppi
ec14cc8828 update deps 2021-12-08 21:18:45 -05:00
zeppi
3519be4633 remove react-plastic 2021-12-08 20:55:55 -05:00
zeppi
408eb9a347 cleanup 2021-12-08 20:41:57 -05:00
zeppi
6ba1fafaa0 remove extra sign up pages 2021-12-08 20:41:57 -05:00
zeppi
5e09de5f94 remove invites and rewards 2021-12-08 20:41:57 -05:00
zeppi
faa21cb681 remove libappindicator dependency no longer needed after electron 8 2021-12-06 00:50:03 -05:00
zeppi
79dbcfdafa fix duplicate flow files for windows 2021-12-04 23:25:10 -05:00
zeppi
19b24d3f58 v0.52.0-rc.7 2021-12-04 22:21:50 -05:00
jessopb
5be27a5e2c Revert "rm lbry.tv, rm lbryfirst, rm DOMAIN, etc"
This reverts commit 041127bbce.
2021-12-04 22:20:39 -05:00
zeppi
797c18fd15 v0.52.0-rc.6 2021-12-04 16:41:24 -05:00
zeppi
5a1cafc7d3 changelog 2021-12-04 16:40:19 -05:00
zeppi
64a31f1aad lbrynet .106 2021-12-04 16:40:19 -05:00
zeppi
d89ef5b928 fix scroll bars 2021-12-03 17:07:09 -05:00
zeppi
041127bbce rm lbry.tv, rm lbryfirst, rm DOMAIN, etc 2021-12-03 16:39:40 -05:00
infinite-persistence
0459148e30 Comment-selectors: fix memoization 2021-12-03 15:22:32 -05:00
infinite-persistence
4d01452447 Fix reaction-selector reference invalidation
When comments are refreshed, each `Comment` gets rendered 4-5 times due to reference invalidation for `othersReacts` (the data didn't actually change).

For selectors without transformation, there is no need to memoize using `createSelector` -- just access it directly. Also, don't do things like `return a[id] || {}` in a reducer, because the reference to the empty object will be different on each call.

Always return directly from the state so that the same reference is returned.

This simple change avoided the wasted resources needed for `createSelector`, and reduced to render to just 2 (initial render, and when reactions are fetched).
2021-12-03 15:22:32 -05:00
zeppi
e7572312a8 comment react selectors 2021-12-03 15:22:32 -05:00
infinite-persistence
29b845c3fc Optimize tags and followedTags
followedTags:
- Moved the filtering to the reducer side, so that we don't do it every time. We can't rely on `createSelector` because the store will be invalidated on each `USER_STATE_POPULATE`, unfortunately.

tags:
- Memoize via re-reselect for the "ForUri" selector.
2021-12-03 15:22:32 -05:00
infinite-persistence
26f89b3ec9 re-reselect proof of concept + fix Date selector as first example
`makeSelectDataForUri` always returns a new reference, so `ClaimPreview` was constantly being rendered. It's pretty expensive since `ClaimPreview`'s rendering checks against a huge blocklist, which is another issue on it's own.

- This commit tests the usage of `re-reselect` as the solution to the multi-instance memoization problem (https://github.com/toomuchdesign/re-reselect/blob/master/examples/1-join-selectors.md)
2021-12-03 15:22:32 -05:00
zeppi
e262e44912 update changelog 2021-12-03 11:46:37 -05:00
zeppi
7c11f91630 only upload linux to s3 2021-12-03 00:49:34 -05:00
zeppi
b778c70837 ORDER typo 2021-12-02 21:19:42 -05:00
zeppi
60f2fd65fd remove copy 2021-12-02 21:13:47 -05:00
zeppi
0c1b681b44 cleaner discover filters display 2021-12-02 20:43:32 -05:00
zeppi
5fed2d01c0 list editing behind toggle button 2021-12-02 20:43:19 -05:00
zeppi
f79446b1e7 update trending to use trending_score 2021-12-02 20:42:51 -05:00
zeppi
cfd876927f list publish page listview type 2021-12-02 15:08:24 -05:00
zeppi
f2da969f72 appstrings 2021-12-02 15:08:24 -05:00
zeppi
fea6ca8635 clean 2021-12-02 15:08:24 -05:00
zeppi
f1de3b193e collection reordering changes 2021-12-02 15:08:24 -05:00
infinite-persistence
02ba41e759 File description (collapsed): show ~3 lines instead of ~1
## Ticket
- Closes https://github.com/lbryio/lbry-desktop/issues/7222
- Also felt it's too squished for the longest time. Previously fixed comments but didn't handle this.
2021-12-01 13:47:14 -05:00
zeppi
d50a74327f improve sync 2021-11-30 15:03:38 -05:00
infinite-persistence
7afe2c58b0 Debounce volume and muted state update.
## Ticket
"Overall React Lag or Extra Re-renders / Volume slider laggy since v0.48"

## The problem
Every redux update results in each mounted component's prop mapping function (the `select` and `perform` stuff) to be recalculated. This is normal per redux, but we do lots of heavy stuff there.

The slider was sending tons of redux update for the Volume and Muted setting.

## Changes
The redux volume/muted setting is just used to restore vjs to the user's setting on the next video, so it doesn't need to be updated immediately/constantly -- vjs keeps it's own video settings.  Debounced that action.
2021-11-29 16:19:38 -05:00
infinite-persistence
30b1562e64 Syntax correction 2021-11-29 16:19:08 -05:00
zeppi
1360e21016 fixes restoring wallet page and removing lbry.tv references 2021-11-28 15:06:11 -05:00
infinite-persistence
c6322ddb24 Floating player position-listener fixes (#289)
- 251 Dragging the floating player is super laggy

Recent changes and/or refactoring combined the effects or added dependancies into the effects, causing them to re-run excessively.

- Restored effects to their original behavior.
- Don't perform the position check when dragging -- only do it when released.
- Do proper debouncing for the 'resize' listener -- the previous method was incorrect as a new function is created on each render.
2021-11-28 12:12:12 -05:00
dependabot[bot]
ba07cdeaa2 Bump video.js from 7.13.3 to 7.14.3
Bumps [video.js](https://github.com/videojs/video.js) from 7.13.3 to 7.14.3.
- [Release notes](https://github.com/videojs/video.js/releases)
- [Changelog](https://github.com/videojs/video.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/videojs/video.js/compare/v7.13.3...v7.14.3)

---
updated-dependencies:
- dependency-name: video.js
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-27 13:40:46 -05:00
dependabot[bot]
01a0c0ec6f Bump tmpl from 1.0.4 to 1.0.5
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-27 13:38:32 -05:00
zeppi
73c4791460 add compatibility for xenial and high sierra to changelog 2021-11-27 11:33:22 -05:00
zeppi
83ce35df1b add compatibility for xenial and high sierra to changelog 2021-11-27 11:32:36 -05:00
zeppi
1f381ffb9b do not set default protocol client on linux on startup 2021-11-27 10:24:41 -05:00
zeppi
ef2c53f678 disable windows ci for now 2021-11-27 10:18:56 -05:00
zeppi
e0b82528d2 upload artifacts 2021-11-27 10:18:56 -05:00
zeppi
eaf3826df8 update electron version to 11, some changes to app update 2021-11-27 10:18:56 -05:00
kodxana
88b9c9decd Update README.md 2021-11-24 10:50:12 -05:00
kodxana
babf6eaff7 Removed instructions for web app 2021-11-24 10:50:12 -05:00
infinite-persistence
34feee3567 abandoningById fixes
- fix: was trying to extract keys from an array.
- `abandoningById` not cleared.
2021-11-16 16:23:17 -05:00
infinite-persistence
cb97e94c4d Fix missing state 2021-11-16 16:23:17 -05:00
zeppi
eb56f1b486 carry collection active tab to playlists page 2021-11-07 14:59:35 -05:00
zeppi
41edd8317c update pagination if page param changes 2021-11-07 14:59:35 -05:00
zeppi
32988bb7ca fix pagination, reset page on filter button 2021-11-07 14:59:35 -05:00
zeppi
5df736dc6b limit collection display
make it clear lists page is truncated

lists display page

cleanup
2021-11-07 14:59:35 -05:00
zeppi
7a2adae09c restore file release time 2021-10-29 12:24:33 -04:00
zeppi
4c8920339d improve channel cover upload ux 2021-10-28 15:17:18 -04:00
zeppi
d15423dc65 do not block submit on thumb or cover error 2021-10-28 15:17:18 -04:00
zeppi
6718528847 copy 2021-10-27 21:46:47 -04:00
zeppi
772bf6fcca disk space setting 2021-10-27 21:46:47 -04:00
zeppi
82895bbce8 improve channel parsing for mentions maybe 2021-10-27 21:46:00 -04:00
zeppi
118b411b51 v0.52.0-rc.5 2021-10-26 11:34:11 -04:00
zeppi
ea14fb1a27 update csc for win 2021-10-26 11:33:20 -04:00
zeppi
b75a0ae85b v0.52.0-rc.4 2021-10-25 17:39:35 -04:00
zeppi
0864b9ad89 v0.52.0-rc.3 2021-10-25 13:15:08 -04:00
zeppi
3556015201 changelog lbrynet 103 bump 2021-10-25 13:14:44 -04:00
zeppi
1a0f0b4b16 v0.52.0-rc.2.1 2021-10-25 12:34:14 -04:00
zeppi
3015018142 fix 2021-10-25 12:33:39 -04:00
zeppi
1295e4a1d2 v0.52.0-rc.2 2021-10-25 11:35:57 -04:00
zeppi
06fe810e92 bump lbrynet 2021-10-25 11:35:31 -04:00
zeppi
efef0da03b v0.52.0-rc.1 2021-10-24 16:42:44 -04:00
zeppi
704f508292 changelog edit 2021-10-24 16:38:37 -04:00
zeppi
5dabeb558b changelog 2021-10-24 16:33:59 -04:00
zeppi
0ba3d78b27 cloud connect 2021-10-22 16:39:45 -04:00
zeppi
1dfd5386a7 package 2021-10-22 11:20:22 -04:00
zeppi
2c8cf1c51c fix lint 2021-10-22 11:20:22 -04:00
zeppi
7d5d7d3c55 remove web and embed 2021-10-22 11:20:22 -04:00
zeppi
b50779f1e5 custom share url 2021-10-21 22:58:33 -04:00
zeppi
3784ec9e21 remove lbryinc web, update sitename, etc 2021-10-21 21:20:59 -04:00
zeppi
e55cae9496 fix top on search page 2021-10-20 17:05:37 -04:00
zeppi
9cc8ccac4e xcode bump again 2021-10-20 17:05:37 -04:00
zeppi
d20e4ad0e7 remove more web folder stuff 2021-10-20 17:05:37 -04:00
zeppi
c66cfb28b5 tip modal no fiat 2021-10-20 17:05:37 -04:00
zeppi
73214a94ec export all 2021-10-20 17:05:37 -04:00
zeppi
b6bb5f05ec credits only on tx page 2021-10-20 17:05:37 -04:00
zeppi
32dd7ef952 bump macos 2021-10-20 17:05:37 -04:00
zeppi
ab9f70930d strip out livestreams 2021-10-20 17:05:37 -04:00
zeppi
fca18c26d3 remove lazy import 2021-10-20 17:05:37 -04:00
zeppi
3a77c7507b cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
jessopb
9694242989
Update deploy.yml 2021-10-19 01:03:10 -04:00
zeppi
2d008899b6 clean up file page and reactions 2021-10-16 16:42:29 -04:00
zeppi
34c0f8cd04 appstrings 2021-10-16 14:12:59 -04:00
zeppi
390bb6dfa6 fix repost list empty 2021-10-16 14:12:59 -04:00
zeppi
9306971620 fixes around follow discover page, ads .env and dev mode titlebar 2021-10-16 14:12:59 -04:00
zeppi
d405ff5ffb nudge 2021-10-15 23:49:41 -04:00
zeppi
e17e355247 cleanup 2021-10-15 23:49:41 -04:00
zeppi
23d7dc7892 recsys import 2021-10-15 23:49:41 -04:00
zeppi
98df8b265f more flow 2021-10-15 23:49:41 -04:00
zeppi
11a4524c4c lint 2021-10-15 23:49:41 -04:00
zeppi
6c3ed54d87 lint 2021-10-15 23:49:41 -04:00
zeppi
1981f16715 lint 2021-10-15 23:49:41 -04:00
zeppi
aa766dc8ee lint 2021-10-15 23:49:41 -04:00
zeppi
5088caef1e lint 2021-10-15 23:49:41 -04:00
zeppi
ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00
infinite-persistence
2c3c0e8f1d
Fix 'setting.Get' runaway calls
## Issue
60 setting.Get calls spiked since October

It was called 24 times per livestream page load.

## Notes
The effect was intended to be a one-time effect, but the dependency was changed in 2f4dedfb
2021-10-15 14:01:05 +08:00
Bradley Ray
4aaa26794b added semicolon to import statement 2021-10-12 12:49:49 -04:00
Bradley Ray
3d7470b01d change to import instead of redefining const 2021-10-12 12:49:49 -04:00
Bradley Ray
ffb3f1ac35 fixed disable-support for comments 2021-10-12 12:49:49 -04:00
infinite-persistence
8d399d6a2c
Revert accidental commit from ody repo
"[Comments] Batch resolve #7236"

This reverts commit b8cc60697b, reversing
changes made to e3791aefdc.
2021-10-11 09:43:58 +08:00
infinite-persistence
b8cc60697b
[Comments] Batch resolve #7236 2021-10-11 09:42:09 +08:00
910 changed files with 52803 additions and 51792 deletions

View file

@ -15,11 +15,8 @@ COMMENT_SERVER_API=https://comments.odysee.com/api/v2
COMMENT_SERVER_NAME=Odysee
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
THUMBNAIL_CDN_URL=https://thumbnails.odysee.com/optimize/
THUMBNAIL_HEIGHT=220
THUMBNAIL_WIDTH=390
THUMBNAIL_QUALITY=85
WELCOME_VERSION=1.0
THUMBNAIL_CDN_URL=https://image-processor.vanwanet.com/optimize/
WELCOME_VERSION=1.2
# STRIPE
# STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
@ -38,25 +35,19 @@ SITE_CANONICAL_URL=https://lbry.tv
## Custom Site info
DOMAIN=lbry.tv
URL=https://lbry.tv
SITE_TITLE=lbry.tv
SITE_NAME=lbry.tv
SITE_TITLE=LBRY
SITE_NAME=LBRY
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
SITE_HELP_EMAIL=help@lbry.com
LOGO_TITLE=lbry.tv
LOGO_TITLE=LBRY
CLOUD_CONNECT_SITE_NAME=Odysee
## Social media
TWITTER_ACCOUNT=LBRYcom
BRANDED_SITE=odysee
## IMAGE ASSETS
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
#LOGIN_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/login/b671946e911c66c5fa7233afb35de2badd9eceb8/0e1d81
#LOGO=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
#LOGO_TEXT_LIGHT=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
#LOGO_TEXT_DARK=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
#AVATAR_DEFAULT=
#MISSING_THUMB_DEFAULT=
#FAVICON=
## OLD IMAGE ASSETS
#YRBL_HAPPY_IMG_URL=https://player.odysee.com/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
#YRBL_SAD_IMG_URL=https://player.odysee.com/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
# LOCALE
DEFAULT_LANGUAGE=en
@ -81,8 +72,8 @@ SIMPLE_SITE=false
#BRANDED_SITE
ENABLE_COMMENT_REACTIONS=true
ENABLE_FILE_REACTIONS=false
ENABLE_CREATOR_REACTIONS=false
ENABLE_FILE_REACTIONS=true
ENABLE_CREATOR_REACTIONS=true
ENABLE_NO_SOURCE_CLAIMS=false
ENABLE_PREROLL_ADS=false
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
@ -91,7 +82,7 @@ WEB_PUBLISH_SIZE_LIMIT_GB=4
LOADING_BAR_COLOR=#2bbb90
LIGHTHOUSE_DEFAULT_TYPES=audio,video,text,image,application
SHOW_ADS=true
SHOW_ADS=false
## SIMPLE_SITE REPLACEMENTS
ENABLE_MATURE=true

View file

@ -2,18 +2,13 @@
.*\.typeface\.json
.*/node_modules/findup/.*
.*/node_modules/react-plastic/.*
.*/node_modules/raf-schd/.*
.*/node_modules/react-beautiful-dnd/.*
.*/node_modules/resolve/test/.*
[include]
[libs]
./flow-typed
node_modules/lbry-redux/flow-typed/
node_modules/lbryinc/flow-typed/
[untyped]
.*/node_modules/lbry-redux
.*/node_modules/lbryinc
[lints]
@ -31,7 +26,7 @@ module.name_mapper='^modal\(.*\)$' -> '<PROJECT_ROOT>/ui/modal\1'
module.name_mapper='^app\(.*\)$' -> '<PROJECT_ROOT>/ui/app\1'
module.name_mapper='^native\(.*\)$' -> '<PROJECT_ROOT>/ui/native\1'
module.name_mapper='^analytics\(.*\)$' -> '<PROJECT_ROOT>/ui/analytics\1'
module.name_mapper='^recsys\(.*\)$' -> '<PROJECT_ROOT>/ui/recsys\1'
module.name_mapper='^recsys\(.*\)$' -> '<PROJECT_ROOT>/extras/recsys\1'
module.name_mapper='^rewards\(.*\)$' -> '<PROJECT_ROOT>/ui/rewards\1'
module.name_mapper='^i18n\(.*\)$' -> '<PROJECT_ROOT>/ui/i18n\1'
module.name_mapper='^effects\(.*\)$' -> '<PROJECT_ROOT>/ui/effects\1'

127
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,127 @@
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: corepack enable
- run: yarn
- run: yarn lint
build:
needs: ['lint']
name: 'build'
strategy:
matrix:
node-version: [16.x]
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: corepack enable
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(runner.os, 'mac')
with:
xcode-version: '13.1.0'
# This is gonna be hacky.
# Github made us upgrade xcode, which would force an upgrade of electron-builder to fix mac.
# But there were bugs with copyfiles / extraFiles that kept seeing duplicates erroring on ln.
# A flag USE_HARD_LINKS=false in electron-builder.json was suggested in comments, but that broke windows builds.
# So for now we'll install python2 on mac and make sure it can find it.
# Remove this after successfully upgrading electron-builder.
# HACK part 1
- uses: Homebrew/actions/setup-homebrew@master
if: startsWith(runner.os, 'mac')
# HACK part 2
- name: Install Python2
if: startsWith(runner.os, 'mac')
run: |
/bin/bash -c "$(curl -fsSL https://github.com/alfredapp/dependency-scripts/raw/main/scripts/install-python2.sh)"
echo "PYTHON_PATH=/usr/local/bin/python" >> $GITHUB_ENV
- 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 dlx cross-env
yarn --network-timeout 600000
yarn build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_NEW }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
WIN_CSC_LINK: https://raw.githubusercontent.com/lbryio/lbry-desktop/master/build/cert2023.pfx
CSC_LINK: https://s3.amazonaws.com/files.lbry.io/cert/osx-csc-2021-2022.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
ENABLE_COMMENT_REACTIONS: true
ENABLE_NO_SOURCE_CLAIMS: false
DEFAULT_LANGUAGE: en
KNOWN_APP_DOMAINS: lbry.tv,lbry.lat,odysee.com
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: 0
- uses: actions/upload-artifact@v2.2.4
if: |
startsWith(runner.os, 'linux')
with:
name: Linux
path: ./dist/electron/*.*
- uses: actions/upload-artifact@v2.2.4
if: |
startsWith(runner.os, 'mac')
with:
name: macOS
path: ./dist/electron/*.*
- uses: actions/upload-artifact@v2.2.4
if: |
startsWith(runner.os, 'windows')
with:
name: Windows
path: ./dist/electron/*.*
- uses: jakejarvis/s3-sync-action@master
if: |
startsWith(runner.os, 'linux')
with:
args: --acl public-read --follow-symlinks --exclude '*' --include '*.deb' --include '*.AppImage' --include '*.dmg'
env:
AWS_S3_BUCKET: ${{ secrets.ARTIFACTS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_SECRET }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: 'dist/electron'
DEST_DIR: 'app/release'

View file

@ -1,59 +0,0 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
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
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
yarn global add cross-env
yarn
yarn compile:web
env:
# UI
MATOMO_URL: https://analytics.lbry.com/
MATOMO_ID: 4
WELCOME_VERSION: 1.0
DOMAIN: odysee.com
URL: https://odysee.com
SHARE_DOMAIN_URL: https://odysee.com
SITE_TITLE: Odysee
SITE_NAME: Odysee
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
ENABLE_NO_SOURCE_CLAIMS: true
DEFAULT_LANGUAGE: en
KNOWN_APP_DOMAINS: lbry.tv,lbry.lat,odysee.com
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: 4

8
.gitignore vendored
View file

@ -33,6 +33,12 @@ package-lock.json
!/custom/robots.disallowall
!/custom/robots.allowall
.env
.env.ody
!.env.ody
.env.desktop
.env.lbrytv
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
!.yarn/releases

View file

@ -1,9 +1,7 @@
{
"linters": {
"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}": ["eslint", "git add"]
"ui/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"]
},
"ignore": ["node_modules", "web/dist/**/*", "dist/**/*", "package-lock.json"]
"ignore": ["node_modules", "dist/**/*", "package-lock.json"]
}

File diff suppressed because one or more lines are too long

785
.yarn/releases/yarn-3.2.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

0
.yarn/versions/17d7e90d.yml vendored Normal file
View file

0
.yarn/versions/33178102.yml vendored Normal file
View file

0
.yarn/versions/35f2125e.yml vendored Normal file
View file

0
.yarn/versions/4f9fb046.yml vendored Normal file
View file

0
.yarn/versions/5bc94294.yml vendored Normal file
View file

0
.yarn/versions/5f1212ad.yml vendored Normal file
View file

0
.yarn/versions/5f4cac99.yml vendored Normal file
View file

0
.yarn/versions/6b35c994.yml vendored Normal file
View file

0
.yarn/versions/6be5ab70.yml vendored Normal file
View file

0
.yarn/versions/86ac1afd.yml vendored Normal file
View file

0
.yarn/versions/8e384637.yml vendored Normal file
View file

0
.yarn/versions/909c3734.yml vendored Normal file
View file

0
.yarn/versions/951a8d12.yml vendored Normal file
View file

0
.yarn/versions/97e7141a.yml vendored Normal file
View file

0
.yarn/versions/ac69bc5f.yml vendored Normal file
View file

0
.yarn/versions/c6e2b914.yml vendored Normal file
View file

0
.yarn/versions/d1a18cef.yml vendored Normal file
View file

0
.yarn/versions/ec3a9ddf.yml vendored Normal file
View file

0
.yarn/versions/fc1fde84.yml vendored Normal file
View file

0
.yarn/versions/fc597c00.yml vendored Normal file
View file

7
.yarnrc.yml Normal file
View file

@ -0,0 +1,7 @@
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.2.0.cjs

View file

@ -1,42 +1,262 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased for Desktop]
## [0.53.9] - [2023-2-8]
### Changed
- Updated lbrynet to [0.113.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.113.0)
## [0.53.8] - [2022-11-17]
### Fixed
- Selecting a large file in publish no longer crashes ([#7736](https://github.com/lbryio/lbry-desktop/pull/7736))
- Unfollowing unpublished channels ([#7737](https://github.com/lbryio/lbry-desktop/pull/7737))
### Changed
- Updated xcode to 13.1 and hacked a fix for release ([#7736](https://github.com/lbryio/lbry-desktop/pull/7736))
## [0.53.7] - [2022-11-10]
### Added
- Added direct replying to notifications _community pr!_ ([#6935](https://github.com/lbryio/lbry-desktop/pull/6935))
- 'Collections' to txo filter _community pr!_ ([#7711](https://github.com/lbryio/lbry-desktop/pull/7711))
- Swap comment servers _community pr!_ ([#7670](https://github.com/lbryio/lbry-desktop/pull/7670))
### Fixed
- Thumbnails no longer disable publish ([#7714](https://github.com/lbryio/lbry-desktop/pull/7714))
- Publishing posts were empty ([#7715](https://github.com/lbryio/lbry-desktop/pull/7715))
- Minor layout fixes _community pr!_ ([#7709](https://github.com/lbryio/lbry-desktop/pull/7709))
- Comment section buttons layout ([#7716](https://github.com/lbryio/lbry-desktop/pull/7716))
### Changed
- Removed watchman and its errors ([#7710](https://github.com/lbryio/lbry-desktop/pull/7710))
- Updated lbrynet to [0.112.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.112.0)
## [0.53.6] - [2022-10-21]
### Fixed
- Make thumbnails optional ([#7690](https://github.com/lbryio/lbry-desktop/pull/7690))
- Show downloads newest first ([#7684](https://github.com/lbryio/lbry-desktop/pull/7684))
- Only allow images in image uploader ([#7672](https://github.com/lbryio/lbry-desktop/pull/7672))
- Fixed bug with csv exports ([#7697](https://github.com/lbryio/lbry-desktop/pull/7697))
- Fixed various upload bugs including transcoding ([#7688](https://github.com/lbryio/lbry-desktop/pull/7688))
- Fallback for files with no extension ([#7704](https://github.com/lbryio/lbry-desktop/pull/7704))
### Changed
- Upgraded Electron to v17.2.0 ([#7703](https://github.com/lbryio/lbry-desktop/pull/7703))
- Upgraded Electron to v17.0.0 ([#7691](https://github.com/lbryio/lbry-desktop/pull/7691))
- Updated lbrynet to [0.111.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.111.0)
## [0.53.5] - [2022-08-26]
### Added
- Checkbox to disable background wallpaper ([#7630](https://github.com/lbryio/lbry-desktop/pull/7630))
- Handle content blocking from hub ([#7665](https://github.com/lbryio/lbry-desktop/pull/7665))
### Fixed
- Better handle decimals liquidating supports ([#7648](https://github.com/lbryio/lbry-desktop/pull/7648))
- Better handle cover uploads ([#7647](https://github.com/lbryio/lbry-desktop/pull/7647))
- Use default path when first choosing file on windows ([#7625](https://github.com/lbryio/lbry-desktop/pull/7625))
- Emoji button hover ([#7620](https://github.com/lbryio/lbry-desktop/pull/7620))
- Prevent infinite retries on thumbs ([#7618](https://github.com/lbryio/lbry-desktop/pull/7618))
- Double splash/error on app startup ([#7615](https://github.com/lbryio/lbry-desktop/pull/7615))
- App updates are now more coherent, also debs work. ([#7502](https://github.com/lbryio/lbry-desktop/pull/7502))
- Better handle many channels moderation calls at startup ([#7674](https://github.com/lbryio/lbry-desktop/pull/7674))
- Fix mobile floating viewer position ([#7677](https://github.com/lbryio/lbry-desktop/pull/7677))
### Changed
- Upgraded Electron to v15.5.5 ([#7614](https://github.com/lbryio/lbry-desktop/pull/7614))
- Upgraded to lbrynet v0.110.0 ([#7680](https://github.com/lbryio/lbry-desktop/pull/7680))
## [0.53.4] - [2022-06-10]
### Added
- Add top in language category for non-english on homepage ([#7585](https://github.com/lbryio/lbry-desktop/pull/7585))
- Auto hosting in settings and hosting first run page ([#7598](https://github.com/lbryio/lbry-desktop/pull/7598))
### Changed
- Updated lbry-sdk to [0.107.2](https://github.com/lbryio/lbry-sdk/releases/tag/v0.107.2)
### Fixed
- Better handle empty collections ([#7571](https://github.com/lbryio/lbry-desktop/pull/7571))
- Better handle thumbnails in uploads/collections ([#7574](https://github.com/lbryio/lbry-desktop/pull/7574))
- Work towards supporting collections of any claim type ([#7578](https://github.com/lbryio/lbry-desktop/pull/7578))
- Improve handling of downed custom servers on startup ([#7593](https://github.com/lbryio/lbry-desktop/pull/7593))
- Hide watch progress in related if being played ([#7606](https://github.com/lbryio/lbry-desktop/pull/7606))
- IPC disk space calls wait for daemon ready; refresh on vis. component load ([#7610](https://github.com/lbryio/lbry-desktop/pull/7610))
## [0.53.3] - [2022-04-27]
### Fixed
- Reverted lbry.tv changes that broke production login ([#7569](https://github.com/lbryio/lbry-desktop/pull/7569))
- Reverted lbry.tv changes that broke login ([#7570](https://github.com/lbryio/lbry-desktop/pull/7570))
## [0.53.2] - [2022-04-26]
### Changed
- Upgraded Yarn to Berry branch ([#7530](https://github.com/lbryio/lbry-desktop/pull/7530))
- Removed some lbrytv references ([#7560](https://github.com/lbryio/lbry-desktop/pull/7560))
- Removed some lbrytv player references ([#7552](https://github.com/lbryio/lbry-desktop/pull/7552))
### Fixed
- Repost style issues ([#7559](https://github.com/lbryio/lbry-desktop/pull/7559))
- Disappearing sidebar thumbs ([#7556](https://github.com/lbryio/lbry-desktop/pull/7556))
- Restore tags sidebar link ([#7555](https://github.com/lbryio/lbry-desktop/pull/7555))
- Playlist view link no longer crashes ([#7552](https://github.com/lbryio/lbry-desktop/pull/7552))
## [0.53.1] - [2022-04-22]
### Added
- Uploads: show placeholder when loading page _community pr!_ ([#7531](https://github.com/lbryio/lbry-desktop/pull/7531))
- Sidebar channel search _styles pr_ ([#7542](https://github.com/lbryio/lbry-desktop/pull/7542))
- Viewed content progress indicator on thumbnail part 1 ([#7541](https://github.com/lbryio/lbry-desktop/pull/7541))
- Viewed content progress indicator on thumbnail part 2 ([#7547](https://github.com/lbryio/lbry-desktop/pull/7547))
- Ability to search through publishes ([#7535](https://github.com/lbryio/lbry-desktop/pull/7535))
### Changed
- Large styles revamp following odysee _styles pr_ ([#7542](https://github.com/lbryio/lbry-desktop/pull/7542))
### Fixed
- Fix bad rerender on homepage _styles pr_ ([#7542](https://github.com/lbryio/lbry-desktop/pull/7542))
- Fix post-editor preview mode _community pr!_ ([#7532](https://github.com/lbryio/lbry-desktop/pull/7532))
- Fix send-tip default tab ([#7533](https://github.com/lbryio/lbry-desktop/pull/7533))
## [0.52.6] - [2022-04-04]
### Added
- Discover page medium duration filter ([#7506](https://github.com/lbryio/lbry-desktop/pull/7506))
- Keep last used collection for Add To ([#7491](https://github.com/lbryio/lbry-desktop/pull/7491))
- Disk space functionality on mac / windows ([#7500](https://github.com/lbryio/lbry-desktop/pull/7500))
- Enable renaming private collections ([#7519](https://github.com/lbryio/lbry-desktop/pull/7519))
### Changed
- Some upgrade modal improvements ([#7488](https://github.com/lbryio/lbry-desktop/pull/7488))
- Updated lbry-sdk to [0.107.1](https://github.com/lbryio/lbry-sdk/releases/tag/v0.107.1)
- New YRBL!; facelift for first run ([#7527](https://github.com/lbryio/lbry-desktop/pull/7527))
### Fixed
- Failed comment count increment ([#7510](https://github.com/lbryio/lbry-desktop/pull/7510))
- App crash playing media on older windows versions by updating electron ([#7509](https://github.com/lbryio/lbry-desktop/pull/7509))
- Local build failures on mac ([#7497](https://github.com/lbryio/lbry-desktop/pull/7497))
- Language change now rerenders whole app ([#7504](https://github.com/lbryio/lbry-desktop/pull/7504))
- Mac notarization ([#7518](https://github.com/lbryio/lbry-desktop/pull/7518))
- Prevent crash when deleting last comment reply ([#7526](https://github.com/lbryio/lbry-desktop/pull/7526))
## [0.52.5] - [2022-02-25]
### Fixed
- New data hosting ux ([#7493](https://github.com/lbryio/lbry-desktop/pull/7493))
- Fix markdown guide button ([#7485](https://github.com/lbryio/lbry-desktop/pull/7485))
## [0.52.4] - [2022-02-15]
### Fixed
- Fixed active channel ([#7481](https://github.com/lbryio/lbry-desktop/pull/7481))
- Remove extra search button in header ([#7482](https://github.com/lbryio/lbry-desktop/pull/7482))
## [0.52.3] - [2022-02-15]
### Fixed
- Fixed comment editing and pinning ([#7476](https://github.com/lbryio/lbry-desktop/pull/7476))
- Fixed mac header ([#7479](https://github.com/lbryio/lbry-desktop/pull/7479))
- Fixed markdown display and lbry url embedding ([#7474](https://github.com/lbryio/lbry-desktop/pull/7474))
## [0.52.2] - [2022-02-11]
### Added
- Reenabled generating thumbs from video ([#7384](https://github.com/lbryio/lbry-desktop/pull/7409))
- Brought in playlist drag and drop playlist reordering _odysee team!_ ([#7442](https://github.com/lbryio/lbry-desktop/pull/7442))
- Added duration overlays to ClaimPreview component ([#7420](https://github.com/lbryio/lbry-desktop/pull/7420))
- Some Horizontal Scroll groundwork from _odysee team!_
- Comment Emotes and Stickers and Mentions refactors from _odysee team!_ ([#7435](https://github.com/lbryio/lbry-desktop/pull/7435))
- Seek forward and back from _odysee team!_ () ([#7460](https://github.com/lbryio/lbry-desktop/pull/7460))
### Changed
- Upgraded Electron to v15 ([#7384](https://github.com/lbryio/lbry-desktop/pull/7384))
- Performance improvements in some selectors ([#7370](https://github.com/lbryio/lbry-desktop/pull/7370))
- More Header refactoring from _odysee team!_ ([#7441](https://github.com/lbryio/lbry-desktop/pull/7441))
- Header refactoring from _odysee team!_ ([#7440](https://github.com/lbryio/lbry-desktop/pull/7440))
- Data hosting ui _incomplete_ ([#7438](https://github.com/lbryio/lbry-desktop/pull/7438))
- Updated c: control tags from _odysee team!_ ([#7433](https://github.com/lbryio/lbry-desktop/pull/7433))
- Nav keycodes (alt+left) no longer navigate while textarea is focused ([#7458](https://github.com/lbryio/lbry-desktop/pull/7458))
- Improved comment-server selection ui/ux ([#7455](https://github.com/lbryio/lbry-desktop/pull/7455))
- Improved Data Hosting settings ([#7563](https://github.com/lbryio/lbry-desktop/pull/7563))
### Fixed
- Several fallout bugs from recent changes
## [0.52.1]
### Skipped patch version
## [0.52.0] - [2021-12-31]
### Compatibility
- Mac <= 10.13 (High Sierra) and Ubuntu <= 16 (Xenial) are no longer supported. If you upgrade, you will need to manually build and install your own lbrynet SDK
### Added
- Direct replying to notifications _community pr!_ ([#6935](https://github.com/lbryio/lbry-desktop/pull/6935))
- Added "Replay" option on autoplay countdown ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Added "Loop" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Added "Shuffle" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Added Play Next/Previous buttons (with shortcuts SHIFT+N/SHIFT+P) ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Added separate control for autoplay next on video player ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Added Channel Mention selection ability while creating a comment ([#7151](https://github.com/lbryio/lbry-desktop/pull/7151))
- Separate control for autoplay next on video player ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Channel Mention selection ability while creating a comment ([#7151](https://github.com/lbryio/lbry-desktop/pull/7151))
- Disk space setting under Data Hosting ([#7266](https://github.com/lbryio/lbry-desktop/pull/7266))
- Paginated 'All Playlists' page ([#7268](https://github.com/lbryio/lbry-desktop/pull/7268))
- Expanded playlist ordering tools ([#7305](https://github.com/lbryio/lbry-desktop/pull/7305))
- Setting to upgrade to alpha prerelease builds ([#7353](https://github.com/lbryio/lbry-desktop/pull/7353))
### Changed
- Changing the supported language from Filipino to Tagalog _community pr!_ ([#6951](https://github.com/lbryio/lbry-desktop/pull/6951))
- Don't show countdown to next item in list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Changed "View List" popup option to link, so can be opened on a new tab ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- App reorganized to remove lbry-redux and lbryinc repository dependencies ([#7240](https://github.com/lbryio/lbry-desktop/pull/7240))
- Styling cleanup for file reactions ([#7251](https://github.com/lbryio/lbry-desktop/pull/7251))
- Change share url to odysee and allow custom share url in settings ([#7258](https://github.com/lbryio/lbry-desktop/pull/7258))
- Change Sign in/up to Cloud Connect for Odysee ([#7260](https://github.com/lbryio/lbry-desktop/pull/7260))
- Upgraded to lbrynet v0.106.0 ([#7315](https://github.com/lbryio/lbry-desktop/pull/7315))
- Upgraded Electron to v11.5.0 ([#7276](https://github.com/lbryio/lbry-desktop/pull/7276))
- Cleaner Discover page filters ([#7306](https://github.com/lbryio/lbry-desktop/pull/7306))
- Scroll bar styling ([#7314](https://github.com/lbryio/lbry-desktop/pull/7314))
- Remove pages for obsolete features like invites, rewards, swap ([#7330](https://github.com/lbryio/lbry-desktop/pull/7330))
- Change file repost to modal _community pr!_ ([#7341](https://github.com/lbryio/lbry-desktop/pull/7341))
### Fixed
- Clicking on the title of a floating player will take you back to the list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
- Fix floating player stopping on markdown or image files ([#7073](https://github.com/lbryio/lbry-desktop/pull/7073))
- Fix list thumbnail upload ([#7074](https://github.com/lbryio/lbry-desktop/pull/7074))
- Stream Key is now hidden _community pr!_ ([#7127](https://github.com/lbryio/lbry-desktop/pull/7127))
- Fix playlist preview thumbnail ([#7178](https://github.com/lbryio/lbry-desktop/pull/7178)
- Fixed “Your Account” popup on mobile ([#7172](https://github.com/lbryio/lbry-desktop/pull/7172))
- Fix disable-support for comments ([#7245](https://github.com/lbryio/lbry-desktop/pull/7245))
- Fix Electron taking over .html files on linux ([#7291](https://github.com/lbryio/lbry-desktop/pull/7291))
- Fix floating player play/pause on drag _community pr!_ ([#7339](https://github.com/lbryio/lbry-desktop/pull/7339))
- Fix card dropdown menus triggering menu actions _community pr!_ ([#7335](https://github.com/lbryio/lbry-desktop/pull/7335))
## [0.51.2] - [2021-08-20]
### Added
- Show currently active playing item on playlist _community pr!_ ([#6453](https://github.com/lbryio/lbry-desktop/pull/6453))
- Add watch later to hover action for last used playlist on popup _community pr!_ ([#6274](https://github.com/lbryio/lbry-desktop/pull/6274))
- Add confirmation on comment removal _community pr!_ ([#6563](https://github.com/lbryio/lbry-desktop/pull/6563))
- Show on content page if a file is part of a playlist already _community pr!_([#6393](https://github.com/lbryio/lbry-desktop/pull/6393))
- Add confirmation on comment removal _community pr!_ ([#6563](https://github.com/lbryio/lbry-desktop/pull/6563))
- Show on content page if a file is part of a playlist already _community pr!_([#6393](https://github.com/lbryio/lbry-desktop/pull/6393))
- Add filtering to playlists ([#6905](https://github.com/lbryio/lbry-desktop/pull/6905))
### Changed
- Use Canonical Url for copy link ([#6500](https://github.com/lbryio/lbry-desktop/pull/6500))
- Use better icon for copy link ([#6485](https://github.com/lbryio/lbry-desktop/pull/6485))
- Comments load paginated ([#6390](https://github.com/lbryio/lbry-desktop/pull/6390))
@ -47,6 +267,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Improved clickability of notification links _community pr!_ ([#6711](https://github.com/lbryio/lbry-desktop/pull/6711))
### Fixed
- App now supports '#' and ':' for claimId separator ([#6496](https://github.com/lbryio/lbry-desktop/pull/6496))
- Fix "exact match" being applied to Recommended ([#6460](https://github.com/lbryio/lbry-desktop/pull/6460))
- Fix upload button on creator analytics _community pr!_ ([#6458](https://github.com/lbryio/lbry-desktop/pull/6458))
@ -72,11 +293,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
### Fixed
- Enable sign up on desktop ([#6071](https://github.com/lbryio/lbry-desktop/issues/6071))
## [0.51.0] - [2021-06-26]
### Added
- Private and Publishable Playlists ([#6157](https://github.com/lbryio/lbry-desktop/pull/6157))
- Channel thumbnails in following side menu ([#6193](https://github.com/lbryio/lbry-desktop/pull/6193))
- Web is now PWA app ([#6120](https://github.com/lbryio/lbry-desktop/pull/6120))

View file

@ -1,7 +1,11 @@
<img width="40%" src="https://miro.medium.com/max/5198/1*bTVuL2THG_0mpwmE-n7Ezg.png" />
# Odysee Frontend - Odysee.com
# LBRY App
This repo contains the UI and front end code that powers Odysee.com.
This repo contains the UI code that powers the official LBRY desktop app. The LBRY app is a graphical browser for the decentralized content marketplace provided by the
[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">
@ -25,6 +29,7 @@ This repo contains the UI and front end code that powers Odysee.com.
</a>
</h2>
![App GIF](https://spee.ch/ba/lbry-joule.gif)
## Table of Contents
@ -60,26 +65,26 @@ _Note: If coming from a deb install, the directory structure is different and yo
| | Flatpak | Arch | Nixpkgs | ARM/ARM64 |
| -------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- |
| Latest Release | [FlatHub Page](https://flathub.org/apps/details/io.lbry.lbry-app) | [AUR Package](https://aur.archlinux.org/packages/lbry-app-bin/) | [Nixpkgs](https://search.nixos.org/packages?channel=unstable&show=lbry&query=lbry) | [Build Guide](https://lbry.tv/@LBRYarm:5) |
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
| Latest Release | [FlatHub Page](https://flathub.org/apps/details/io.lbry.lbry-app) | [AUR Package](https://aur.archlinux.org/packages/lbry-desktop-bin/) | [Nixpkgs](https://search.nixos.org/packages?channel=unstable&show=lbry&query=lbry) | [Build Guide](https://lbry.tv/@LBRYarm:5) |
| Maintainers | N/A | [@RubenKelevra](https://github.com/RubenKelevra) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
## Usage
Double click the installed application to interact with the LBRY network.
Start 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/) (v14 required)
- [Node.js](https://nodejs.org/en/download/) (v16 required)
- [Corepack](https://nodejs.org/dist/latest-v17.x/docs/api/corepack.html) `npm i -g corepack` (Included in nodejs 14 LTS, 16 LTS and 17)
- [Yarn](https://yarnpkg.com/en/docs/install)
1. Clone (or [fork](https://help.github.com/articles/fork-a-repo/)) this repository: `git clone https://github.com/lbryio/lbry-desktop`
2. Change directory into the cloned repository: `cd lbry-desktop`
3. Install the dependencies: `yarn`
3. If corepack is not enabled, run `sudo corepack enable` (the sudo is necessary for system-wide installation, if you use container, nvm etc... you might not be forced to use it)
4. Install the dependencies: `yarn`
#### Run the electron app
@ -87,66 +92,6 @@ You can run the web version (lbry.tv), the electron app, or both at the same tim
- If you want to build and launch the production app you can run `yarn build`. This will give you an executable inside the `/dist` folder. We use [electron-builder](https://github.com/electron-userland/electron-builder) to create distributable packages.
#### Run the web app for development
`yarn dev:web`
- This uses webpack-dev-server and includes hot-reloading. If you want to debug the [web server we use in production](https://github.com/lbryio/lbry-desktop/blob/master/web/index.js) you can run `yarn dev:web-server`. This starts a server at `localhost:1337` and does not include hot reloading.
#### Customize the web app
- In root directory, duplicate the .env.default file and rename it to .env then copy the code below and paste it anywhere in the .env file.
```
cp .env.defaults .env
nano .env
```
- To specify your own OG-IMAGE
You can either place a png named v2-og.png in the /custom folder or specify the OG_IMAGE_URL in .env
- To specify your own channels to be followed on first run
`AUTO_FOLLOW_URLS=lbry://@chan#123...a lbry://@chan2#456...a`
- If you want to customize the homepage content
1. add `CUSTOM_HOMEPAGE=true` to the '.env' file
2. copy `/custom/homepage.example.js` to `/custom/homepage.js` and make desired changes to `homepage.js`
- If you want up to two custom sidebar links
```
PINNED_URI_1=@someurl#2/someclaim#4
PINNED_LABEL_1=Linktext
PINNED_URI_2=$/discover?t=tag&[queryparams]
PINNED_LABEL_2=OtherLinkText
```
- Finally `NODE_ENV=production yarn compile:web` to rebuild
_Note: You don't need to edit the .env file in the /web folder - that is copied during compile._
#### Deploy the web app (_experimental_)
1. Create a server with a domain name and a reverse proxy https to port 1337.
2. Install pm2, node v10, yarn
3. Clone this repo
4. Make any customizations as above
5. Run `yarn` to install
6. Run `NODE_ENV=production yarn compile:web` to build
7. Set up pm2 to start ./web/index.js
#### Run both at the same time
Run the two commands above in separate terminal windows
```
yarn dev
// in another terminal window
yarn dev:web
```
#### Resetting your Packages
If the app isn't building, or `yarn xxx` commands aren't working you may need to just reset your `node_modules`. To do so you can run: `rm -r node_modules && yarn` or `del /s /q node_modules && yarn` on Windows.
@ -165,6 +110,9 @@ This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
## Security
We take security seriously. Please contact security@odysee.com regarding any security issues. Our PGP key is [here](https://lbry.com/faq/pgp-key) if you need it. Previous versions up to v0.50.2 were signed by [Sean Yesmunt](https://keybase.io/seanyesmunt/key.asc).
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here](https://lbry.com/faq/pgp-key) if you need it. Previous versions up to v0.50.2 were signed by [Sean Yesmunt](https://keybase.io/seanyesmunt/key.asc).
New Releases are signed by [Jessop Breth](https://keybase.io/jessopb/key.asc).
## Contact
The primary contact for this project is [@jessopb](https://github.com/jessopb).

View file

@ -7,6 +7,8 @@ module.exports = api => {
'import-glob',
'@babel/plugin-transform-runtime',
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
['@babel/plugin-proposal-private-methods', { 'loose': false }],
['@babel/plugin-proposal-private-property-in-object', { 'loose': false }],
'@babel/plugin-transform-flow-strip-types',
'@babel/plugin-proposal-class-properties',
'react-hot-loader/babel',

BIN
build/cert-2021-2022.pfx Normal file

Binary file not shown.

BIN
build/cert2023.pfx Normal file

Binary file not shown.

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View file

@ -11,9 +11,10 @@ const config = {
LBRY_WEB_API: process.env.LBRY_WEB_API, //api.na-backend.odysee.com',
LBRY_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
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_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, //player.odysee.com
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
CLOUD_CONNECT_SITE_NAME: process.env.CLOUD_CONNECT_SITE_NAME,
COMMENT_SERVER_API: process.env.COMMENT_SERVER_API,
COMMENT_SERVER_NAME: process.env.COMMENT_SERVER_NAME,
SOCKETY_SERVER_API: process.env.SOCKETY_SERVER_API,
@ -22,9 +23,6 @@ const config = {
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
URL: process.env.URL,
THUMBNAIL_CDN_URL: process.env.THUMBNAIL_CDN_URL,
THUMBNAIL_HEIGHT: process.env.THUMBNAIL_HEIGHT,
THUMBNAIL_WIDTH: process.env.THUMBNAIL_WIDTH,
THUMBNAIL_QUALITY: process.env.THUMBNAIL_QUALITY,
SITE_TITLE: process.env.SITE_TITLE,
SITE_NAME: process.env.SITE_NAME,
SITE_DESCRIPTION: process.env.SITE_DESCRIPTION,

View file

@ -20,11 +20,6 @@
"to": "static/daemon/",
"filter": ["**/*"]
},
{
"from": "./static/lbry-first/",
"to": "static/lbry-first/",
"filter": ["**/*"]
},
{
"from": "./static/img",
"to": "static/img",
@ -34,6 +29,10 @@
"from": "./static/font",
"to": "static/font",
"filter": ["**/*"]
},
{
"from": "./static/app-update.yml",
"to": "app-update.yml"
}
],
"publish": [
@ -42,7 +41,11 @@
}
],
"mac": {
"category": "public.app-category.entertainment"
"category": "public.app-category.entertainment",
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"hardenedRuntime" : true,
"gatekeeperAssess": false
},
"dmg": {
"iconSize": 128,
@ -82,7 +85,7 @@
}
},
"deb": {
"depends": ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
"depends": ["gconf2", "gconf-service", "libnotify4", "libxtst6", "libnss3"]
},
"nsis": {
"perMachine": true,

View file

@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs';
import { spawn, execSync } from 'child_process';
import { Lbry } from 'lbry-redux';
import Lbry from 'lbry';
export default class Daemon {
static lbrynetPath =

View file

@ -1,5 +1,5 @@
import { WEBPACK_ELECTRON_PORT } from 'config';
import { app, BrowserWindow, dialog, shell, screen, nativeImage } from 'electron';
import { app, BrowserWindow, dialog, screen, nativeImage } from 'electron';
import isDev from 'electron-is-dev';
import windowStateKeeper from 'electron-window-state';
import SUPPORTED_LANGUAGES from 'constants/supported_languages';
@ -9,7 +9,8 @@ import { TO_TRAY_WHEN_CLOSED } from 'constants/settings';
import setupBarMenu from './menu/setupBarMenu';
import * as PAGES from 'constants/pages';
const remote = require('@electron/remote/main');
const shell = require('electron').shell;
function GetAppLangCode() {
// https://www.electronjs.org/docs/api/locales
// 1. Gets the user locale.
@ -54,6 +55,8 @@ export default appState => {
webSecurity: !isDev,
plugins: true,
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true, // see about removing this
},
};
const lbryProto = 'lbry://';
@ -61,6 +64,7 @@ export default appState => {
const rendererURL = isDev ? `http://localhost:${WEBPACK_ELECTRON_PORT}` : `file://${__dirname}/index.html`;
let window = new BrowserWindow(windowConfiguration);
remote.enable(window.webContents);
// Let us register listeners on the window, so we can update the state
// automatically (the listeners will be removed when the window is closed)
@ -91,7 +95,7 @@ export default appState => {
// is it a lbry://? pointing to an app page
if (deepLinkingURI.includes(lbryProtoQ)) {
let path = deepLinkingURI.substr(lbryProtoQ.length);
let path = deepLinkingURI.slice(lbryProtoQ.length);
let page = path.indexOf('?') >= 0 ? path.substring(0, path.indexOf('?')) : path;
if (Object.values(PAGES).includes(page)) {
deepLinkingURI = deepLinkingURI.replace(lbryProtoQ, '#/$/');
@ -186,9 +190,13 @@ export default appState => {
window = null;
});
window.webContents.on('new-window', (event, url) => {
event.preventDefault();
shell.openExternal(url);
window.webContents.setWindowOpenHandler((details) => {
// Only open http and https links to prevent
// security issues.
if (['https:', 'http:'].includes(new URL(details.url).protocol)) {
shell.openExternal(details.url);
}
return { action: 'deny' };
});
window.webContents.on('update-target-url', (event, url) => {

View file

@ -4,9 +4,9 @@
import '@babel/polyfill';
import SemVer from 'semver';
import https from 'https';
import { app, dialog, ipcMain, session, shell } from 'electron';
import { app, dialog, ipcMain, session, shell, BrowserWindow } from 'electron';
import { autoUpdater } from 'electron-updater';
import { Lbry } from 'lbry-redux';
import Lbry from 'lbry';
import LbryFirstInstance from './LbryFirstInstance';
import Daemon from './Daemon';
import isDev from 'electron-is-dev';
@ -17,6 +17,17 @@ import startSandbox from './startSandbox';
import installDevtools from './installDevtools';
import fs from 'fs';
import path from 'path';
import { diskSpaceLinux, diskSpaceWindows, diskSpaceMac } from '../ui/util/diskspace';
const { download } = require('electron-dl');
const mime = require('mime');
const remote = require('@electron/remote/main');
const os = require('os');
const sudo = require('sudo-prompt');
const probe = require('ffmpeg-probe');
const MAX_IPC_SEND_BUFFER_SIZE = 500000000; // large files crash when serialized for ipc message
remote.initialize();
const filePath = path.join(process.resourcesPath, 'static', 'upgradeDisabled');
let upgradeDisabled;
try {
@ -26,11 +37,18 @@ try {
upgradeDisabled = false;
}
autoUpdater.autoDownload = !upgradeDisabled;
autoUpdater.allowPrerelease = false;
// 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,
// it will still install on shutdown.
let autoUpdateDownloaded = false;
const UPDATE_STATE_INIT = 0;
const UPDATE_STATE_CHECKING = 1;
const UPDATE_STATE_UPDATES_FOUND = 2;
const UPDATE_STATE_NO_UPDATES_FOUND = 3;
const UPDATE_STATE_DOWNLOADING = 4;
const UPDATE_STATE_DOWNLOADED = 5;
let updateState = UPDATE_STATE_INIT;
let updateDownloadItem;
const isAutoUpdateSupported = ['win32', 'darwin'].includes(process.platform) || !!process.env.APPIMAGE;
// This is used to keep track of whether we are showing the special dialog
// that we show on Windows after you decline an upgrade and close the app later.
@ -52,7 +70,7 @@ if (isDev && process.platform === 'win32') {
app.setAsDefaultProtocolClient(PROTOCOL, process.execPath, [
path.resolve(process.argv[1]),
]);
} else {
} else if (process.platform !== 'linux') {
app.setAsDefaultProtocolClient(PROTOCOL);
}
@ -223,7 +241,8 @@ app.on('activate', () => {
app.on('will-quit', event => {
if (
process.platform === 'win32' &&
autoUpdateDownloaded &&
updateState === UPDATE_STATE_DOWNLOADED &&
isAutoUpdateSupported &&
!appState.autoUpdateAccepted &&
!showingAutoUpdateCloseAlert
) {
@ -283,27 +302,118 @@ app.on('before-quit', () => {
appState.isQuitting = true;
});
ipcMain.on('upgrade', (event, installerPath) => {
app.on('quit', () => {
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.openPath(installerPath);
// Get the content of a file as a raw buffer of bytes.
// Useful to convert a file path to a File instance.
// Example:
// const result = await ipcMain.invoke('get-file-from-path', 'path/to/file');
// const file = new File([result.buffer], result.name);
// NOTE: if path points to a folder, an empty
// file will be given.
ipcMain.handle('get-file-from-path', (event, path, readContents = true) => {
return new Promise((resolve, reject) => {
fs.stat(path, (error, stats) => {
if (error) {
reject(error);
return;
}
// Separate folders considering "\" and "/"
// as separators (cross platform)
const folders = path.split(/[\\/]/);
const name = folders[folders.length - 1];
if (stats.isDirectory()) {
resolve({
name,
mime: undefined,
path,
buffer: new ArrayBuffer(0),
});
return;
}
if (!readContents) {
resolve({
name,
mime: mime.getType(name) || undefined,
path,
buffer: new ArrayBuffer(0),
});
return;
}
// Encoding null ensures data results in a Buffer.
fs.readFile(path, { encoding: null }, (err, data) => {
if (err) {
reject(err);
return;
}
resolve({
name,
mime: mime.getType(name) || undefined,
path,
buffer: data,
});
});
});
});
// 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('After the install is complete, please reopen the app.');
app.quit();
});
autoUpdater.on('update-downloaded', () => {
autoUpdateDownloaded = true;
ipcMain.handle('get-file-details-from-path', async (event, path) => {
const isFfMp4 = (ffprobeResults) => {
return ffprobeResults &&
ffprobeResults.format &&
ffprobeResults.format.format_name &&
ffprobeResults.format.format_name.includes('mp4');
};
const folders = path.split(/[\\/]/);
const name = folders[folders.length - 1];
let duration = 0, size = 0, mimeType;
try {
await fs.promises.stat(path);
let ffprobeResults;
try {
ffprobeResults = await probe(path);
duration = ffprobeResults.format.duration;
size = ffprobeResults.format.size;
} catch (e) {
}
let fileReadResult;
if (size < MAX_IPC_SEND_BUFFER_SIZE) {
try {
fileReadResult = await fs.promises.readFile(path);
} catch (e) {
}
}
// TODO: use mmmagic to inspect file and get mime type
mimeType = isFfMp4(ffprobeResults) ? 'video/mp4' : mime.getType(name);
const fileData = {name, mime: mimeType || undefined, path, duration: duration, size, buffer: fileReadResult };
return fileData;
} catch (e) {
// no stat
return { error: 'no file' };
}
});
ipcMain.on('autoUpdateAccepted', () => {
appState.autoUpdateAccepted = true;
autoUpdater.quitAndInstall();
ipcMain.on('get-disk-space', async (event) => {
try {
const { data_dir } = await Lbry.settings_get();
let diskSpace;
switch (os.platform()) {
case 'linux':
diskSpace = await diskSpaceLinux(data_dir);
break;
case 'darwin':
diskSpace = await diskSpaceMac(data_dir);
break;
case 'win32':
diskSpace = await diskSpaceWindows(data_dir);
break;
default:
throw new Error('unknown platform');
}
rendererWindow.webContents.send('send-disk-space', { diskSpace });
} catch (e) {
rendererWindow.webContents.send('send-disk-space', { error: e.message || e });
console.log('Failed to get disk space', e);
}
});
ipcMain.on('version-info-requested', () => {
@ -398,3 +508,162 @@ process.on('uncaughtException', error => {
if (daemon) daemon.quit();
app.exit(1);
});
// Auto updater
autoUpdater.on('download-progress', () => {
updateState = UPDATE_STATE_DOWNLOADING;
});
autoUpdater.on('update-downloaded', () => {
updateState = UPDATE_STATE_DOWNLOADED;
// If this download was trigger by
// autoUpdateAccepted it means, the user
// wants to install the new update but
// needed to downloaded the files first.
if (appState.autoUpdateAccepted) {
autoUpdater.quitAndInstall();
}
});
autoUpdater.on('update-available', () => {
if (updateState === UPDATE_STATE_DOWNLOADING) {
return;
}
updateState = UPDATE_STATE_UPDATES_FOUND;
});
autoUpdater.on('update-not-available', () => {
updateState = UPDATE_STATE_NO_UPDATES_FOUND;
});
autoUpdater.on('error', () => {
if (updateState === UPDATE_STATE_DOWNLOADING) {
updateState = UPDATE_STATE_UPDATES_FOUND;
return;
}
updateState = UPDATE_STATE_INIT;
});
// Manual (.deb) update
ipcMain.on('cancel-download-upgrade', () => {
if (updateDownloadItem) {
// Cancel the download and execute the onCancel
// callback set in the options.
updateDownloadItem.cancel();
}
});
ipcMain.on('download-upgrade', (event, params) => {
if (updateState !== UPDATE_STATE_UPDATES_FOUND) {
return;
}
if (isAutoUpdateSupported) {
updateState = UPDATE_STATE_DOWNLOADING;
autoUpdater.downloadUpdate();
return;
}
const { url, options } = params;
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
updateState = UPDATE_STATE_DOWNLOADING;
// Grab the download item's handler to allow
// cancelling the operation if required.
options.onStarted = function(downloadItem) {
updateDownloadItem = downloadItem;
};
options.onCancel = function() {
updateState = UPDATE_STATE_UPDATES_FOUND;
updateDownloadItem = undefined;
};
options.onProgress = function(p) {
rendererWindow.webContents.send('download-progress-update', p);
};
options.onCompleted = function(c) {
updateState = UPDATE_STATE_DOWNLOADED;
updateDownloadItem = undefined;
rendererWindow.webContents.send('download-update-complete', c);
};
options.directory = dir;
const win = BrowserWindow.getFocusedWindow();
download(win, url, options).catch(e => {
updateState = UPDATE_STATE_UPDATES_FOUND;
console.log('e', e);
});
});
// Update behavior
ipcMain.on('autoUpdateAccepted', () => {
appState.autoUpdateAccepted = true;
// quitAndInstall can only be called if the
// update has been downloaded. Since the user
// can disable auto updates, we have to make
// sure it has been downloaded first.
if (updateState === UPDATE_STATE_DOWNLOADED) {
autoUpdater.quitAndInstall();
return;
}
if (updateState !== UPDATE_STATE_UPDATES_FOUND) {
return;
}
// If the update hasn't been downloaded,
// start downloading it. After it's done, the
// event 'update-downloaded' will be triggered,
// where we will be able to resume the
// update installation.
updateState = UPDATE_STATE_DOWNLOADING;
autoUpdater.downloadUpdate();
});
ipcMain.on('check-for-updates', (event, autoDownload) => {
if (![UPDATE_STATE_INIT, UPDATE_STATE_NO_UPDATES_FOUND].includes(updateState)) {
return;
}
updateState = UPDATE_STATE_CHECKING;
// If autoDownload is true, checkForUpdates will begin the
// download automatically.
if (autoDownload) {
updateState = UPDATE_STATE_DOWNLOADING;
}
autoUpdater.autoDownload = autoDownload;
autoUpdater.checkForUpdates();
});
ipcMain.on('upgrade', (event, 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('After the install is complete, please reopen the app.');
// Prevent .deb package from opening with archive manager (Ubuntu >= 20)
if (process.platform === 'linux' && !process.env.APPIMAGE) {
sudo.exec(`dpkg -i ${installerPath}`, { name: app.name }, (err, stdout, stderr) => {
if (err || stderr) {
rendererWindow.webContents.send('upgrade-installing-error');
return;
}
// Re-launch the application when the installation finishes.
app.relaunch();
app.quit();
});
return;
}
app.on('quit', () => {
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.openPath(installerPath);
});
app.quit();
});

View file

@ -1,5 +1,4 @@
import express from 'express';
import unpackByOutpoint from './unpackByOutpoint';
// import express from 'express';
// Polyfills and `lbry-redux`
global.fetch = require('node-fetch');
@ -8,31 +7,31 @@ if (typeof global.fetch === 'object') {
global.fetch = global.fetch.default;
}
const { Lbry } = require('lbry-redux');
// const Lbry = require('lbry');
delete global.window;
export default async function startSandbox() {
const port = 5278;
const sandbox = express();
// const port = 5278;
// const sandbox = express();
sandbox.get('/set/:outpoint', async (req, res) => {
const { outpoint } = req.params;
const resolvedPath = await unpackByOutpoint(Lbry, outpoint);
sandbox.use(`/sandbox/${outpoint}/`, express.static(resolvedPath));
res.send(`/sandbox/${outpoint}/`);
});
sandbox
.listen(port, 'localhost', () => console.log(`Sandbox listening on port ${port}.`))
.on('error', err => {
if (err.code === 'EADDRINUSE') {
console.log(
`Server already listening at localhost:${port}. This is probably another LBRY app running. If not, games in the app will not work.`
);
}
});
// sandbox.get('/set/:outpoint', async (req, res) => {
// const { outpoint } = req.params;
//
// const resolvedPath = await unpackByOutpoint(Lbry, outpoint);
//
// sandbox.use(`/sandbox/${outpoint}/`, express.static(resolvedPath));
//
// res.send(`/sandbox/${outpoint}/`);
// });
//
// sandbox
// .listen(port, 'localhost', () => console.log(`Sandbox listening on port ${port}.`))
// .on('error', err => {
// if (err.code === 'EADDRINUSE') {
// console.log(
// `Server already listening at localhost:${port}. This is probably another LBRY app running. If not, games in the app will not work.`
// );
// }
// });
}

View file

@ -1,23 +0,0 @@
import fs from 'fs';
import path from 'path';
import { unpackDirectory } from 'lbry-format';
async function unpackByOutpoint(lbry, outpoint) {
const { items: claimFiles } = await lbry.file_list({ outpoint, full_status: true, page: 1, page_size: 1 });
if (claimFiles && claimFiles.length) {
const claimFileInfo = claimFiles[0];
const packFilePath = path.resolve(claimFileInfo.download_path);
const unpackPath = path.normalize(path.join(claimFileInfo.download_directory, claimFileInfo.claim_name));
if (!fs.existsSync(unpackPath)) {
await unpackDirectory(unpackPath, {
fileName: packFilePath,
});
}
return unpackPath;
}
}
export default unpackByOutpoint;

View file

@ -0,0 +1,184 @@
// @flow
/*
LBRY FIRST does not work due to api changes
*/
import 'proxy-polyfill';
const CHECK_LBRYFIRST_STARTED_TRY_NUMBER = 200;
//
// Basic LBRYFIRST connection config
// Offers a proxy to call LBRYFIRST methods
//
const LbryFirst: LbryFirstTypes = {
isConnected: false,
connectPromise: null,
lbryFirstConnectionString: 'http://localhost:1337/rpc',
apiRequestHeaders: { 'Content-Type': 'application/json' },
// Allow overriding lbryFirst connection string (e.g. to `/api/proxy` for lbryweb)
setLbryFirstConnectionString: (value: string) => {
LbryFirst.lbryFirstConnectionString = value;
},
setApiHeader: (key: string, value: string) => {
LbryFirst.apiRequestHeaders = Object.assign(LbryFirst.apiRequestHeaders, { [key]: value });
},
unsetApiHeader: key => {
Object.keys(LbryFirst.apiRequestHeaders).includes(key) &&
delete LbryFirst.apiRequestHeaders['key'];
},
// Allow overriding Lbry methods
overrides: {},
setOverride: (methodName, newMethod) => {
LbryFirst.overrides[methodName] = newMethod;
},
getApiRequestHeaders: () => LbryFirst.apiRequestHeaders,
// LbryFirst Methods
status: (params = {}) => lbryFirstCallWithResult('status', params),
stop: () => lbryFirstCallWithResult('stop', {}),
version: () => lbryFirstCallWithResult('version', {}),
// Upload to youtube
upload: (params: { title: string, description: string, file_path: ?string } = {}) => {
// Only upload when originally publishing for now
if (!params.file_path) {
return Promise.resolve();
}
const uploadParams: {
Title: string,
Description: string,
FilePath: string,
Category: string,
Keywords: string,
} = {
Title: params.title,
Description: params.description,
FilePath: params.file_path,
Category: '',
Keywords: '',
};
return lbryFirstCallWithResult('youtube.Upload', uploadParams);
},
hasYTAuth: (token: string) => {
const hasYTAuthParams = {};
hasYTAuthParams.AuthToken = token;
return lbryFirstCallWithResult('youtube.HasAuth', hasYTAuthParams);
},
ytSignup: () => {
const emptyParams = {};
return lbryFirstCallWithResult('youtube.Signup', emptyParams);
},
remove: () => {
const emptyParams = {};
return lbryFirstCallWithResult('youtube.Remove', emptyParams);
},
// Connect to lbry-first
connect: () => {
if (LbryFirst.connectPromise === null) {
LbryFirst.connectPromise = new Promise((resolve, reject) => {
let tryNum = 0;
// Check every half second to see if the lbryFirst is accepting connections
function checkLbryFirstStarted() {
tryNum += 1;
LbryFirst.status()
.then(resolve)
.catch(() => {
if (tryNum <= CHECK_LBRYFIRST_STARTED_TRY_NUMBER) {
setTimeout(checkLbryFirstStarted, tryNum < 50 ? 400 : 1000);
} else {
reject(new Error('Unable to connect to LBRY'));
}
});
}
checkLbryFirstStarted();
});
}
// Flow thinks this could be empty, but it will always return a promise
// $FlowFixMe
return LbryFirst.connectPromise;
},
};
function checkAndParse(response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
return response.json().then(json => {
let error;
if (json.error) {
const errorMessage = typeof json.error === 'object' ? json.error.message : json.error;
error = new Error(errorMessage);
} else {
error = new Error('Protocol error with unknown response signature');
}
return Promise.reject(error);
});
}
export function apiCall(method: string, params: ?{}, resolve: Function, reject: Function) {
const counter = new Date().getTime();
const paramsArray = [params];
const options = {
method: 'POST',
headers: LbryFirst.apiRequestHeaders,
body: JSON.stringify({
jsonrpc: '2.0',
method,
params: paramsArray,
id: counter,
}),
};
return fetch(LbryFirst.lbryFirstConnectionString, options)
.then(checkAndParse)
.then(response => {
const error = response.error || (response.result && response.result.error);
if (error) {
return reject(error);
}
return resolve(response.result);
})
.catch(reject);
}
function lbryFirstCallWithResult(name: string, params: ?{} = {}) {
return new Promise((resolve, reject) => {
apiCall(
name,
params,
result => {
resolve(result);
},
reject
);
});
}
// This is only for a fallback
// If there is a LbryFirst method that is being called by an app, it should be added to /flow-typed/LbryFirst.js
const lbryFirstProxy = new Proxy(LbryFirst, {
get(target: LbryFirstTypes, name: string) {
if (name in target) {
return target[name];
}
return (params = {}) =>
new Promise((resolve, reject) => {
apiCall(name, params, resolve, reject);
});
},
});
export default lbryFirstProxy;

View file

@ -0,0 +1,97 @@
// Claims
export const FETCH_FEATURED_CONTENT_STARTED = 'FETCH_FEATURED_CONTENT_STARTED';
export const FETCH_FEATURED_CONTENT_COMPLETED = 'FETCH_FEATURED_CONTENT_COMPLETED';
export const FETCH_TRENDING_CONTENT_STARTED = 'FETCH_TRENDING_CONTENT_STARTED';
export const FETCH_TRENDING_CONTENT_COMPLETED = 'FETCH_TRENDING_CONTENT_COMPLETED';
export const RESOLVE_URIS_STARTED = 'RESOLVE_URIS_STARTED';
export const RESOLVE_URIS_COMPLETED = 'RESOLVE_URIS_COMPLETED';
export const FETCH_CHANNEL_CLAIMS_STARTED = 'FETCH_CHANNEL_CLAIMS_STARTED';
export const FETCH_CHANNEL_CLAIMS_COMPLETED = 'FETCH_CHANNEL_CLAIMS_COMPLETED';
export const FETCH_CHANNEL_CLAIM_COUNT_STARTED = 'FETCH_CHANNEL_CLAIM_COUNT_STARTED';
export const FETCH_CHANNEL_CLAIM_COUNT_COMPLETED = 'FETCH_CHANNEL_CLAIM_COUNT_COMPLETED';
export const FETCH_CLAIM_LIST_MINE_STARTED = 'FETCH_CLAIM_LIST_MINE_STARTED';
export const FETCH_CLAIM_LIST_MINE_COMPLETED = 'FETCH_CLAIM_LIST_MINE_COMPLETED';
export const ABANDON_CLAIM_STARTED = 'ABANDON_CLAIM_STARTED';
export const ABANDON_CLAIM_SUCCEEDED = 'ABANDON_CLAIM_SUCCEEDED';
export const FETCH_CHANNEL_LIST_STARTED = 'FETCH_CHANNEL_LIST_STARTED';
export const FETCH_CHANNEL_LIST_COMPLETED = 'FETCH_CHANNEL_LIST_COMPLETED';
export const CREATE_CHANNEL_STARTED = 'CREATE_CHANNEL_STARTED';
export const CREATE_CHANNEL_COMPLETED = 'CREATE_CHANNEL_COMPLETED';
export const PUBLISH_STARTED = 'PUBLISH_STARTED';
export const PUBLISH_COMPLETED = 'PUBLISH_COMPLETED';
export const PUBLISH_FAILED = 'PUBLISH_FAILED';
export const SET_PLAYING_URI = 'SET_PLAYING_URI';
export const SET_CONTENT_POSITION = 'SET_CONTENT_POSITION';
export const SET_CONTENT_LAST_VIEWED = 'SET_CONTENT_LAST_VIEWED';
export const CLEAR_CONTENT_HISTORY_URI = 'CLEAR_CONTENT_HISTORY_URI';
export const CLEAR_CONTENT_HISTORY_ALL = 'CLEAR_CONTENT_HISTORY_ALL';
// Subscriptions
export const CHANNEL_SUBSCRIBE = 'CHANNEL_SUBSCRIBE';
export const CHANNEL_UNSUBSCRIBE = 'CHANNEL_UNSUBSCRIBE';
export const CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS =
'CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS';
export const CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS =
'CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS';
export const HAS_FETCHED_SUBSCRIPTIONS = 'HAS_FETCHED_SUBSCRIPTIONS';
export const SET_SUBSCRIPTION_LATEST = 'SET_SUBSCRIPTION_LATEST';
export const UPDATE_SUBSCRIPTION_UNREADS = 'UPDATE_SUBSCRIPTION_UNREADS';
export const REMOVE_SUBSCRIPTION_UNREADS = 'REMOVE_SUBSCRIPTION_UNREADS';
export const CHECK_SUBSCRIPTION_STARTED = 'CHECK_SUBSCRIPTION_STARTED';
export const CHECK_SUBSCRIPTION_COMPLETED = 'CHECK_SUBSCRIPTION_COMPLETED';
export const CHECK_SUBSCRIPTIONS_SUBSCRIBE = 'CHECK_SUBSCRIPTIONS_SUBSCRIBE';
export const FETCH_SUBSCRIPTIONS_START = 'FETCH_SUBSCRIPTIONS_START';
export const FETCH_SUBSCRIPTIONS_FAIL = 'FETCH_SUBSCRIPTIONS_FAIL';
export const FETCH_SUBSCRIPTIONS_SUCCESS = 'FETCH_SUBSCRIPTIONS_SUCCESS';
export const SET_VIEW_MODE = 'SET_VIEW_MODE';
export const GET_SUGGESTED_SUBSCRIPTIONS_START = 'GET_SUGGESTED_SUBSCRIPTIONS_START';
export const GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS = 'GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS';
export const GET_SUGGESTED_SUBSCRIPTIONS_FAIL = 'GET_SUGGESTED_SUBSCRIPTIONS_FAIL';
export const SUBSCRIPTION_FIRST_RUN_COMPLETED = 'SUBSCRIPTION_FIRST_RUN_COMPLETED';
export const VIEW_SUGGESTED_SUBSCRIPTIONS = 'VIEW_SUGGESTED_SUBSCRIPTIONS';
// Blacklist
export const FETCH_BLACK_LISTED_CONTENT_STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED';
export const FETCH_BLACK_LISTED_CONTENT_COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED';
export const FETCH_BLACK_LISTED_CONTENT_FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED';
export const BLACK_LISTED_CONTENT_SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE';
// Filtered list
export const FETCH_FILTERED_CONTENT_STARTED = 'FETCH_FILTERED_CONTENT_STARTED';
export const FETCH_FILTERED_CONTENT_COMPLETED = 'FETCH_FILTERED_CONTENT_COMPLETED';
export const FETCH_FILTERED_CONTENT_FAILED = 'FETCH_FILTERED_CONTENT_FAILED';
export const FILTERED_CONTENT_SUBSCRIBE = 'FILTERED_CONTENT_SUBSCRIBE';
// Cost Info
export const FETCH_COST_INFO_STARTED = 'FETCH_COST_INFO_STARTED';
export const FETCH_COST_INFO_COMPLETED = 'FETCH_COST_INFO_COMPLETED';
// Stats
export const FETCH_VIEW_COUNT_STARTED = 'FETCH_VIEW_COUNT_STARTED';
export const FETCH_VIEW_COUNT_FAILED = 'FETCH_VIEW_COUNT_FAILED';
export const FETCH_VIEW_COUNT_COMPLETED = 'FETCH_VIEW_COUNT_COMPLETED';
export const FETCH_SUB_COUNT_STARTED = 'FETCH_SUB_COUNT_STARTED';
export const FETCH_SUB_COUNT_FAILED = 'FETCH_SUB_COUNT_FAILED';
export const FETCH_SUB_COUNT_COMPLETED = 'FETCH_SUB_COUNT_COMPLETED';
// Cross-device Sync
export const GET_SYNC_STARTED = 'GET_SYNC_STARTED';
export const GET_SYNC_COMPLETED = 'GET_SYNC_COMPLETED';
export const GET_SYNC_FAILED = 'GET_SYNC_FAILED';
export const SET_SYNC_STARTED = 'SET_SYNC_STARTED';
export const SET_SYNC_FAILED = 'SET_SYNC_FAILED';
export const SET_SYNC_COMPLETED = 'SET_SYNC_COMPLETED';
export const SET_DEFAULT_ACCOUNT = 'SET_DEFAULT_ACCOUNT';
export const SYNC_APPLY_STARTED = 'SYNC_APPLY_STARTED';
export const SYNC_APPLY_COMPLETED = 'SYNC_APPLY_COMPLETED';
export const SYNC_APPLY_FAILED = 'SYNC_APPLY_FAILED';
export const SYNC_APPLY_BAD_PASSWORD = 'SYNC_APPLY_BAD_PASSWORD';
export const SYNC_RESET = 'SYNC_RESET';
// Lbry.tv
export const UPDATE_UPLOAD_PROGRESS = 'UPDATE_UPLOAD_PROGRESS';
// User
export const GENERATE_AUTH_TOKEN_FAILURE = 'GENERATE_AUTH_TOKEN_FAILURE';
export const GENERATE_AUTH_TOKEN_STARTED = 'GENERATE_AUTH_TOKEN_STARTED';
export const GENERATE_AUTH_TOKEN_SUCCESS = 'GENERATE_AUTH_TOKEN_SUCCESS';

View file

@ -0,0 +1,5 @@
export const MINIMUM_PUBLISH_BID = 0.00000001;
export const CHANNEL_ANONYMOUS = 'anonymous';
export const CHANNEL_NEW = 'new';
export const PAGE_SIZE = 20;

View file

@ -0,0 +1,4 @@
export const ALREADY_CLAIMED =
'once the invite reward has been claimed the referrer cannot be changed';
export const REFERRER_NOT_FOUND =
'A lbry.tv account could not be found for the referrer you provided.';

View file

@ -0,0 +1,11 @@
export const YOUTUBE_SYNC_NOT_TRANSFERRED = 'not_transferred';
export const YOUTUBE_SYNC_PENDING = 'pending';
export const YOUTUBE_SYNC_PENDING_EMAIL = 'pendingemail';
export const YOUTUBE_SYNC_PENDING_TRANSFER = 'pending_transfer';
export const YOUTUBE_SYNC_COMPLETED_TRANSFER = 'completed_transfer';
export const YOUTUBE_SYNC_QUEUED = 'queued';
export const YOUTUBE_SYNC_SYNCING = 'syncing';
export const YOUTUBE_SYNC_SYNCED = 'synced';
export const YOUTUBE_SYNC_FAILED = 'failed';
export const YOUTUBE_SYNC_PENDINGUPGRADE = 'pendingupgrade';
export const YOUTUBE_SYNC_ABANDONDED = 'abandoned';

71
extras/lbryinc/index.js Normal file
View file

@ -0,0 +1,71 @@
import * as LBRYINC_ACTIONS from 'constants/action_types';
import * as YOUTUBE_STATUSES from 'constants/youtube';
import * as ERRORS from 'constants/errors';
import Lbryio from './lbryio';
export { Lbryio };
// constants
export { LBRYINC_ACTIONS, YOUTUBE_STATUSES, ERRORS };
// utils
export { doTransifexUpload } from 'util/transifex-upload';
// actions
export { doGenerateAuthToken } from './redux/actions/auth';
export { doFetchCostInfoForUri } from './redux/actions/cost_info';
export { doBlackListedOutpointsSubscribe } from './redux/actions/blacklist';
export { doFilteredOutpointsSubscribe } from './redux/actions/filtered';
export { doFetchViewCount, doFetchSubCount } from './redux/actions/stats';
export {
doCheckSync,
doGetSync,
doSetSync,
doSetDefaultAccount,
doSyncApply,
doResetSync,
doSyncEncryptAndDecrypt,
} from 'redux/actions/sync';
// reducers
export { authReducer } from './redux/reducers/auth';
export { costInfoReducer } from './redux/reducers/cost_info';
export { blacklistReducer } from './redux/reducers/blacklist';
export { filteredReducer } from './redux/reducers/filtered';
export { statsReducer } from './redux/reducers/stats';
export { syncReducer } from './redux/reducers/sync';
// selectors
export { selectAuthToken, selectIsAuthenticating } from './redux/selectors/auth';
export {
selectFetchingCostInfoForUri,
selectCostInfoForUri,
selectAllCostInfoByUri,
selectFetchingCostInfo,
} from './redux/selectors/cost_info';
export {
selectBlackListedOutpoints,
selectBlacklistedOutpointMap,
} from './redux/selectors/blacklist';
export { selectFilteredOutpoints, selectFilteredOutpointMap } from './redux/selectors/filtered';
export {
selectViewCount,
selectViewCountForUri,
// makeSelectViewCountForUri, // deprecated
selectSubCountForUri,
// makeSelectSubCountForUri, // deprecated
} from './redux/selectors/stats';
export { selectBanStateForUri } from './redux/selectors/ban';
export {
selectHasSyncedWallet,
selectSyncData,
selectSyncHash,
selectSetSyncErrorMessage,
selectGetSyncErrorMessage,
selectGetSyncIsPending,
selectSetSyncIsPending,
selectSyncApplyIsPending,
selectHashChanged,
selectSyncApplyErrorMessage,
selectSyncApplyPasswordError,
} from './redux/selectors/sync';

238
extras/lbryinc/lbryio.js Normal file
View file

@ -0,0 +1,238 @@
import * as ACTIONS from 'constants/action_types';
import Lbry from 'lbry';
import querystring from 'querystring';
const Lbryio = {
enabled: true,
authenticationPromise: null,
exchangePromise: null,
exchangeLastFetched: null,
CONNECTION_STRING: 'https://api.lbry.com/',
};
const EXCHANGE_RATE_TIMEOUT = 20 * 60 * 1000;
const INTERNAL_APIS_DOWN = 'internal_apis_down';
// We can't use env's because they aren't passed into node_modules
Lbryio.setLocalApi = endpoint => {
Lbryio.CONNECTION_STRING = endpoint.replace(/\/*$/, '/'); // exactly one slash at the end;
};
Lbryio.call = (resource, action, params = {}, method = 'get') => {
if (!Lbryio.enabled) {
return Promise.reject(new Error(__('LBRY internal API is disabled')));
}
if (!(method === 'get' || method === 'post')) {
return Promise.reject(new Error(__('Invalid method')));
}
function checkAndParse(response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
if (response.status === 500) {
return Promise.reject(INTERNAL_APIS_DOWN);
}
if (response)
return response.json().then(json => {
let error;
if (json.error) {
error = new Error(json.error);
} else {
error = new Error('Unknown API error signature');
}
error.response = response; // This is primarily a hack used in actions/user.js
return Promise.reject(error);
});
}
function makeRequest(url, options) {
return fetch(url, options).then(checkAndParse);
}
return Lbryio.getAuthToken().then(token => {
const fullParams = { auth_token: token, ...params };
Object.keys(fullParams).forEach(key => {
const value = fullParams[key];
if (typeof value === 'object') {
fullParams[key] = JSON.stringify(value);
}
});
const qs = querystring.stringify(fullParams);
let url = `${Lbryio.CONNECTION_STRING}${resource}/${action}?${qs}`;
let options = {
method: 'GET',
};
if (method === 'post') {
options = {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: qs,
};
url = `${Lbryio.CONNECTION_STRING}${resource}/${action}`;
}
return makeRequest(url, options).then(response => response.data);
});
};
Lbryio.authToken = null;
Lbryio.getAuthToken = () =>
new Promise(resolve => {
if (Lbryio.authToken) {
resolve(Lbryio.authToken);
} else if (Lbryio.overrides.getAuthToken) {
Lbryio.overrides.getAuthToken().then(token => {
resolve(token);
});
} else if (typeof window !== 'undefined') {
const { store } = window;
if (store) {
const state = store.getState();
const token = state.auth ? state.auth.authToken : null;
Lbryio.authToken = token;
resolve(token);
}
resolve(null);
} else {
resolve(null);
}
});
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
Lbryio.authenticate = (domain, language) => {
if (!Lbryio.enabled) {
const params = {
id: 1,
primary_email: 'disabled@lbry.io',
has_verified_email: true,
is_identity_verified: true,
is_reward_approved: false,
language: language || 'en',
};
return new Promise(resolve => {
resolve(params);
});
}
if (Lbryio.authenticationPromise === null) {
Lbryio.authenticationPromise = new Promise((resolve, reject) => {
Lbryio.getAuthToken()
.then(token => {
if (!token || token.length > 60) {
return false;
}
// check that token works
return Lbryio.getCurrentUser()
.then(user => user)
.catch(error => {
if (error === INTERNAL_APIS_DOWN) {
throw new Error('Internal APIS down');
}
return false;
});
})
.then(user => {
if (user) {
return user;
}
return Lbry.status()
.then(
status =>
new Promise((res, rej) => {
const appId =
domain && domain !== 'lbry.tv'
? (domain.replace(/[.]/gi, '') + status.installation_id).slice(0, 66)
: status.installation_id;
Lbryio.call(
'user',
'new',
{
auth_token: '',
language: language || 'en',
app_id: appId,
},
'post'
)
.then(response => {
if (!response.auth_token) {
throw new Error('auth_token was not set in the response');
}
const { store } = window;
if (Lbryio.overrides.setAuthToken) {
Lbryio.overrides.setAuthToken(response.auth_token);
}
if (store) {
store.dispatch({
type: ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS,
data: { authToken: response.auth_token },
});
}
Lbryio.authToken = response.auth_token;
return res(response);
})
.catch(error => rej(error));
})
)
.then(newUser => {
if (!newUser) {
return Lbryio.getCurrentUser();
}
return newUser;
});
})
.then(resolve, reject);
});
}
return Lbryio.authenticationPromise;
};
Lbryio.getStripeToken = () =>
Lbryio.CONNECTION_STRING.startsWith('http://localhost:')
? 'pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
: 'pk_live_e8M4dRNnCCbmpZzduEUZBgJO';
Lbryio.getExchangeRates = () => {
if (
!Lbryio.exchangeLastFetched ||
Date.now() - Lbryio.exchangeLastFetched > EXCHANGE_RATE_TIMEOUT
) {
Lbryio.exchangePromise = new Promise((resolve, reject) => {
Lbryio.call('lbc', 'exchange_rate', {}, 'get', true)
.then(({ lbc_usd: LBC_USD, lbc_btc: LBC_BTC, btc_usd: BTC_USD }) => {
const rates = { LBC_USD, LBC_BTC, BTC_USD };
resolve(rates);
})
.catch(reject);
});
Lbryio.exchangeLastFetched = Date.now();
}
return Lbryio.exchangePromise;
};
// Allow overriding lbryio methods
// The desktop app will need to use it for getAuthToken because we use electron's ipcRenderer
Lbryio.overrides = {};
Lbryio.setOverride = (methodName, newMethod) => {
Lbryio.overrides[methodName] = newMethod;
};
export default Lbryio;

View file

@ -0,0 +1,38 @@
import * as ACTIONS from 'constants/action_types';
import { Lbryio } from 'lbryinc';
export function doGenerateAuthToken(installationId) {
return dispatch => {
dispatch({
type: ACTIONS.GENERATE_AUTH_TOKEN_STARTED,
});
Lbryio.call(
'user',
'new',
{
auth_token: '',
language: 'en',
app_id: installationId,
},
'post'
)
.then(response => {
if (!response.auth_token) {
dispatch({
type: ACTIONS.GENERATE_AUTH_TOKEN_FAILURE,
});
} else {
dispatch({
type: ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS,
data: { authToken: response.auth_token },
});
}
})
.catch(() => {
dispatch({
type: ACTIONS.GENERATE_AUTH_TOKEN_FAILURE,
});
});
};
}

View file

@ -0,0 +1,52 @@
import { Lbryio } from 'lbryinc';
import * as ACTIONS from 'constants/action_types';
const CHECK_BLACK_LISTED_CONTENT_INTERVAL = 60 * 60 * 1000;
export function doFetchBlackListedOutpoints() {
return dispatch => {
dispatch({
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED,
});
const success = ({ outpoints }) => {
const splitOutpoints = [];
if (outpoints) {
outpoints.forEach((outpoint, index) => {
const [txid, nout] = outpoint.split(':');
splitOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
});
}
dispatch({
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED,
data: {
outpoints: splitOutpoints,
success: true,
},
});
};
const failure = ({ message: error }) => {
dispatch({
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED,
data: {
error,
success: false,
},
});
};
Lbryio.call('file', 'list_blocked', {
auth_token: '',
}).then(success, failure);
};
}
export function doBlackListedOutpointsSubscribe() {
return dispatch => {
dispatch(doFetchBlackListedOutpoints());
setInterval(() => dispatch(doFetchBlackListedOutpoints()), CHECK_BLACK_LISTED_CONTENT_INTERVAL);
};
}

View file

@ -0,0 +1,35 @@
import * as ACTIONS from 'constants/action_types';
import { Lbryio } from 'lbryinc';
import { selectClaimForUri } from 'redux/selectors/claims';
// eslint-disable-next-line import/prefer-default-export
export function doFetchCostInfoForUri(uri) {
return (dispatch, getState) => {
const state = getState();
const claim = selectClaimForUri(state, uri);
if (!claim) return;
function resolve(costInfo) {
dispatch({
type: ACTIONS.FETCH_COST_INFO_COMPLETED,
data: {
uri,
costInfo,
},
});
}
const fee = claim.value ? claim.value.fee : undefined;
if (fee === undefined) {
resolve({ cost: 0, includesData: true });
} else if (fee.currency === 'LBC') {
resolve({ cost: fee.amount, includesData: true });
} else {
Lbryio.getExchangeRates().then(({ LBC_USD }) => {
resolve({ cost: fee.amount / LBC_USD, includesData: true });
});
}
};
}

View file

@ -0,0 +1,47 @@
import { Lbryio } from 'lbryinc';
import * as ACTIONS from 'constants/action_types';
const CHECK_FILTERED_CONTENT_INTERVAL = 60 * 60 * 1000;
export function doFetchFilteredOutpoints() {
return dispatch => {
dispatch({
type: ACTIONS.FETCH_FILTERED_CONTENT_STARTED,
});
const success = ({ outpoints }) => {
let formattedOutpoints = [];
if (outpoints) {
formattedOutpoints = outpoints.map(outpoint => {
const [txid, nout] = outpoint.split(':');
return { txid, nout: Number.parseInt(nout, 10) };
});
}
dispatch({
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,
data: {
outpoints: formattedOutpoints,
},
});
};
const failure = ({ error }) => {
dispatch({
type: ACTIONS.FETCH_FILTERED_CONTENT_FAILED,
data: {
error,
},
});
};
Lbryio.call('file', 'list_filtered', { auth_token: '' }).then(success, failure);
};
}
export function doFilteredOutpointsSubscribe() {
return dispatch => {
dispatch(doFetchFilteredOutpoints());
setInterval(() => dispatch(doFetchFilteredOutpoints()), CHECK_FILTERED_CONTENT_INTERVAL);
};
}

View file

@ -0,0 +1,32 @@
// @flow
import { Lbryio } from 'lbryinc';
import * as ACTIONS from 'constants/action_types';
export const doFetchViewCount = (claimIdCsv: string) => (dispatch: Dispatch) => {
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_STARTED });
return Lbryio.call('file', 'view_count', { claim_id: claimIdCsv })
.then((result: Array<number>) => {
const viewCounts = result;
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_COMPLETED, data: { claimIdCsv, viewCounts } });
})
.catch(error => {
dispatch({ type: ACTIONS.FETCH_VIEW_COUNT_FAILED, data: error });
});
};
export const doFetchSubCount = (claimId: string) => (dispatch: Dispatch) => {
dispatch({ type: ACTIONS.FETCH_SUB_COUNT_STARTED });
return Lbryio.call('subscription', 'sub_count', { claim_id: claimId })
.then((result: Array<number>) => {
const subCount = result[0];
dispatch({
type: ACTIONS.FETCH_SUB_COUNT_COMPLETED,
data: { claimId, subCount },
});
})
.catch(error => {
dispatch({ type: ACTIONS.FETCH_SUB_COUNT_FAILED, data: error });
});
};

View file

@ -0,0 +1,289 @@
import * as ACTIONS from 'constants/action_types';
import { Lbryio } from 'lbryinc';
import Lbry from 'lbry';
import { doWalletEncrypt, doWalletDecrypt } from 'redux/actions/wallet';
const NO_WALLET_ERROR = 'no wallet found for this user';
export function doSetDefaultAccount(success, failure) {
return dispatch => {
dispatch({
type: ACTIONS.SET_DEFAULT_ACCOUNT,
});
Lbry.account_list()
.then(accountList => {
const { lbc_mainnet: accounts } = accountList;
let defaultId;
for (let i = 0; i < accounts.length; ++i) {
if (accounts[i].satoshis > 0) {
defaultId = accounts[i].id;
break;
}
}
// In a case where there's no balance on either account
// assume the second (which is created after sync) as default
if (!defaultId && accounts.length > 1) {
defaultId = accounts[1].id;
}
// Set the default account
if (defaultId) {
Lbry.account_set({ account_id: defaultId, default: true })
.then(() => {
if (success) {
success();
}
})
.catch(err => {
if (failure) {
failure(err);
}
});
} else if (failure) {
// no default account to set
failure('Could not set a default account'); // fail
}
})
.catch(err => {
if (failure) {
failure(err);
}
});
};
}
export function doSetSync(oldHash, newHash, data) {
return dispatch => {
dispatch({
type: ACTIONS.SET_SYNC_STARTED,
});
return Lbryio.call('sync', 'set', { old_hash: oldHash, new_hash: newHash, data }, 'post')
.then(response => {
if (!response.hash) {
throw Error('No hash returned for sync/set.');
}
return dispatch({
type: ACTIONS.SET_SYNC_COMPLETED,
data: { syncHash: response.hash },
});
})
.catch(error => {
dispatch({
type: ACTIONS.SET_SYNC_FAILED,
data: { error },
});
});
};
}
export function doGetSync(passedPassword, callback) {
const password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
function handleCallback(error, hasNewData) {
if (callback) {
if (typeof callback !== 'function') {
throw new Error('Second argument passed to "doGetSync" must be a function');
}
callback(error, hasNewData);
}
}
return dispatch => {
dispatch({
type: ACTIONS.GET_SYNC_STARTED,
});
const data = {};
Lbry.wallet_status()
.then(status => {
if (status.is_locked) {
return Lbry.wallet_unlock({ password });
}
// Wallet is already unlocked
return true;
})
.then(isUnlocked => {
if (isUnlocked) {
return Lbry.sync_hash();
}
data.unlockFailed = true;
throw new Error();
})
.then(hash => Lbryio.call('sync', 'get', { hash }, 'post'))
.then(response => {
const syncHash = response.hash;
data.syncHash = syncHash;
data.syncData = response.data;
data.changed = response.changed;
data.hasSyncedWallet = true;
if (response.changed) {
return Lbry.sync_apply({ password, data: response.data, blocking: true });
}
})
.then(response => {
if (!response) {
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
handleCallback(null, data.changed);
return;
}
const { hash: walletHash, data: walletData } = response;
if (walletHash !== data.syncHash) {
// different local hash, need to synchronise
dispatch(doSetSync(data.syncHash, walletHash, walletData));
}
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
handleCallback(null, data.changed);
})
.catch(syncAttemptError => {
if (data.unlockFailed) {
dispatch({ type: ACTIONS.GET_SYNC_FAILED, data: { error: syncAttemptError } });
if (password !== '') {
dispatch({ type: ACTIONS.SYNC_APPLY_BAD_PASSWORD });
}
handleCallback(syncAttemptError);
} else if (data.hasSyncedWallet) {
const error =
(syncAttemptError && syncAttemptError.message) || 'Error getting synced wallet';
dispatch({
type: ACTIONS.GET_SYNC_FAILED,
data: {
error,
},
});
// Temp solution until we have a bad password error code
// Don't fail on blank passwords so we don't show a "password error" message
// before users have ever entered a password
if (password !== '') {
dispatch({ type: ACTIONS.SYNC_APPLY_BAD_PASSWORD });
}
handleCallback(error);
} else {
// user doesn't have a synced wallet
dispatch({
type: ACTIONS.GET_SYNC_COMPLETED,
data: { hasSyncedWallet: false, syncHash: null },
});
// call sync_apply to get data to sync
// first time sync. use any string for old hash
if (syncAttemptError.message === NO_WALLET_ERROR) {
Lbry.sync_apply({ password })
.then(({ hash: walletHash, data: syncApplyData }) => {
dispatch(doSetSync('', walletHash, syncApplyData, password));
handleCallback();
})
.catch(syncApplyError => {
handleCallback(syncApplyError);
});
}
}
});
};
}
export function doSyncApply(syncHash, syncData, password) {
return dispatch => {
dispatch({
type: ACTIONS.SYNC_APPLY_STARTED,
});
Lbry.sync_apply({ password, data: syncData })
.then(({ hash: walletHash, data: walletData }) => {
dispatch({
type: ACTIONS.SYNC_APPLY_COMPLETED,
});
if (walletHash !== syncHash) {
// different local hash, need to synchronise
dispatch(doSetSync(syncHash, walletHash, walletData));
}
})
.catch(() => {
dispatch({
type: ACTIONS.SYNC_APPLY_FAILED,
data: {
error:
'Invalid password specified. Please enter the password for your previously synchronised wallet.',
},
});
});
};
}
export function doCheckSync() {
return dispatch => {
dispatch({
type: ACTIONS.GET_SYNC_STARTED,
});
Lbry.sync_hash().then(hash => {
Lbryio.call('sync', 'get', { hash }, 'post')
.then(response => {
const data = {
hasSyncedWallet: true,
syncHash: response.hash,
syncData: response.data,
hashChanged: response.changed,
};
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
})
.catch(() => {
// user doesn't have a synced wallet
dispatch({
type: ACTIONS.GET_SYNC_COMPLETED,
data: { hasSyncedWallet: false, syncHash: null },
});
});
});
};
}
export function doResetSync() {
return dispatch =>
new Promise(resolve => {
dispatch({ type: ACTIONS.SYNC_RESET });
resolve();
});
}
export function doSyncEncryptAndDecrypt(oldPassword, newPassword, encrypt) {
return dispatch => {
const data = {};
return Lbry.sync_hash()
.then(hash => Lbryio.call('sync', 'get', { hash }, 'post'))
.then(syncGetResponse => {
data.oldHash = syncGetResponse.hash;
return Lbry.sync_apply({ password: oldPassword, data: syncGetResponse.data });
})
.then(() => {
if (encrypt) {
dispatch(doWalletEncrypt(newPassword));
} else {
dispatch(doWalletDecrypt());
}
})
.then(() => Lbry.sync_apply({ password: newPassword }))
.then(syncApplyResponse => {
if (syncApplyResponse.hash !== data.oldHash) {
return dispatch(doSetSync(data.oldHash, syncApplyResponse.hash, syncApplyResponse.data));
}
})
.catch(console.error);
};
}

View file

@ -0,0 +1,29 @@
import * as ACTIONS from 'constants/action_types';
const reducers = {};
const defaultState = {
authenticating: false,
};
reducers[ACTIONS.GENERATE_AUTH_TOKEN_FAILURE] = state =>
Object.assign({}, state, {
authToken: null,
authenticating: false,
});
reducers[ACTIONS.GENERATE_AUTH_TOKEN_STARTED] = state =>
Object.assign({}, state, {
authenticating: true,
});
reducers[ACTIONS.GENERATE_AUTH_TOKEN_SUCCESS] = (state, action) =>
Object.assign({}, state, {
authToken: action.data.authToken,
authenticating: false,
});
export function authReducer(state = defaultState, action) {
const handler = reducers[action.type];
if (handler) return handler(state, action);
return state;
}

View file

@ -0,0 +1,37 @@
import * as ACTIONS from 'constants/action_types';
import { handleActions } from 'util/redux-utils';
const defaultState = {
fetchingBlackListedOutpoints: false,
fetchingBlackListedOutpointsSucceed: undefined,
blackListedOutpoints: undefined,
};
export const blacklistReducer = handleActions(
{
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED]: state => ({
...state,
fetchingBlackListedOutpoints: true,
}),
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED]: (state, action) => {
const { outpoints, success } = action.data;
return {
...state,
fetchingBlackListedOutpoints: false,
fetchingBlackListedOutpointsSucceed: success,
blackListedOutpoints: outpoints,
};
},
[ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED]: (state, action) => {
const { error, success } = action.data;
return {
...state,
fetchingBlackListedOutpoints: false,
fetchingBlackListedOutpointsSucceed: success,
fetchingBlackListedOutpointsError: error,
};
},
},
defaultState
);

View file

@ -0,0 +1,38 @@
import { handleActions } from 'util/redux-utils';
import * as ACTIONS from 'constants/action_types';
const defaultState = {
fetching: {},
byUri: {},
};
export const costInfoReducer = handleActions(
{
[ACTIONS.FETCH_COST_INFO_STARTED]: (state, action) => {
const { uri } = action.data;
const newFetching = Object.assign({}, state.fetching);
newFetching[uri] = true;
return {
...state,
fetching: newFetching,
};
},
[ACTIONS.FETCH_COST_INFO_COMPLETED]: (state, action) => {
const { uri, costInfo } = action.data;
const newByUri = Object.assign({}, state.byUri);
const newFetching = Object.assign({}, state.fetching);
newByUri[uri] = costInfo;
delete newFetching[uri];
return {
...state,
byUri: newByUri,
fetching: newFetching,
};
},
},
defaultState
);

View file

@ -0,0 +1,34 @@
import * as ACTIONS from 'constants/action_types';
import { handleActions } from 'util/redux-utils';
const defaultState = {
loading: false,
filteredOutpoints: undefined,
};
export const filteredReducer = handleActions(
{
[ACTIONS.FETCH_FILTERED_CONTENT_STARTED]: state => ({
...state,
loading: true,
}),
[ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
const { outpoints } = action.data;
return {
...state,
loading: false,
filteredOutpoints: outpoints,
};
},
[ACTIONS.FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
const { error } = action.data;
return {
...state,
loading: false,
fetchingFilteredOutpointsError: error,
};
},
},
defaultState
);

View file

@ -0,0 +1,55 @@
import { handleActions } from 'util/redux-utils';
import * as ACTIONS from 'constants/action_types';
const defaultState = {
fetchingViewCount: false,
viewCountError: undefined,
viewCountById: {},
fetchingSubCount: false,
subCountError: undefined,
subCountById: {},
};
export const statsReducer = handleActions(
{
[ACTIONS.FETCH_VIEW_COUNT_STARTED]: state => ({ ...state, fetchingViewCount: true }),
[ACTIONS.FETCH_VIEW_COUNT_FAILED]: (state, action) => ({
...state,
viewCountError: action.data,
}),
[ACTIONS.FETCH_VIEW_COUNT_COMPLETED]: (state, action) => {
const { claimIdCsv, viewCounts } = action.data;
const viewCountById = Object.assign({}, state.viewCountById);
const claimIds = claimIdCsv.split(',');
if (claimIds.length === viewCounts.length) {
claimIds.forEach((claimId, index) => {
viewCountById[claimId] = viewCounts[index];
});
}
return {
...state,
fetchingViewCount: false,
viewCountById,
};
},
[ACTIONS.FETCH_SUB_COUNT_STARTED]: state => ({ ...state, fetchingSubCount: true }),
[ACTIONS.FETCH_SUB_COUNT_FAILED]: (state, action) => ({
...state,
subCountError: action.data,
}),
[ACTIONS.FETCH_SUB_COUNT_COMPLETED]: (state, action) => {
const { claimId, subCount } = action.data;
const subCountById = { ...state.subCountById, [claimId]: subCount };
return {
...state,
fetchingSubCount: false,
subCountById,
};
},
},
defaultState
);

View file

@ -0,0 +1,89 @@
import * as ACTIONS from 'constants/action_types';
const reducers = {};
const defaultState = {
hasSyncedWallet: false,
syncHash: null,
syncData: null,
setSyncErrorMessage: null,
getSyncErrorMessage: null,
syncApplyErrorMessage: '',
syncApplyIsPending: false,
syncApplyPasswordError: false,
getSyncIsPending: false,
setSyncIsPending: false,
hashChanged: false,
};
reducers[ACTIONS.GET_SYNC_STARTED] = state =>
Object.assign({}, state, {
getSyncIsPending: true,
getSyncErrorMessage: null,
});
reducers[ACTIONS.GET_SYNC_COMPLETED] = (state, action) =>
Object.assign({}, state, {
syncHash: action.data.syncHash,
syncData: action.data.syncData,
hasSyncedWallet: action.data.hasSyncedWallet,
getSyncIsPending: false,
hashChanged: action.data.hashChanged,
});
reducers[ACTIONS.GET_SYNC_FAILED] = (state, action) =>
Object.assign({}, state, {
getSyncIsPending: false,
getSyncErrorMessage: action.data.error,
});
reducers[ACTIONS.SET_SYNC_STARTED] = state =>
Object.assign({}, state, {
setSyncIsPending: true,
setSyncErrorMessage: null,
});
reducers[ACTIONS.SET_SYNC_FAILED] = (state, action) =>
Object.assign({}, state, {
setSyncIsPending: false,
setSyncErrorMessage: action.data.error,
});
reducers[ACTIONS.SET_SYNC_COMPLETED] = (state, action) =>
Object.assign({}, state, {
setSyncIsPending: false,
setSyncErrorMessage: null,
hasSyncedWallet: true, // sync was successful, so the user has a synced wallet at this point
syncHash: action.data.syncHash,
});
reducers[ACTIONS.SYNC_APPLY_STARTED] = state =>
Object.assign({}, state, {
syncApplyPasswordError: false,
syncApplyIsPending: true,
syncApplyErrorMessage: '',
});
reducers[ACTIONS.SYNC_APPLY_COMPLETED] = state =>
Object.assign({}, state, {
syncApplyIsPending: false,
syncApplyErrorMessage: '',
});
reducers[ACTIONS.SYNC_APPLY_FAILED] = (state, action) =>
Object.assign({}, state, {
syncApplyIsPending: false,
syncApplyErrorMessage: action.data.error,
});
reducers[ACTIONS.SYNC_APPLY_BAD_PASSWORD] = state =>
Object.assign({}, state, {
syncApplyPasswordError: true,
});
reducers[ACTIONS.SYNC_RESET] = () => defaultState;
export function syncReducer(state = defaultState, action) {
const handler = reducers[action.type];
if (handler) return handler(state, action);
return state;
}

View file

@ -0,0 +1,7 @@
import { createSelector } from 'reselect';
const selectState = state => state.auth || {};
export const selectAuthToken = createSelector(selectState, state => state.authToken);
export const selectIsAuthenticating = createSelector(selectState, state => state.authenticating);

View file

@ -0,0 +1,73 @@
// @flow
// TODO: This should be in 'redux/selectors/claim.js'. Temporarily putting it
// here to get past importing issues with 'lbryinc', which the real fix might
// involve moving it from 'extras' to 'ui' (big change).
import { createCachedSelector } from 're-reselect';
import { selectClaimForUri, makeSelectIsBlacklisted } from 'redux/selectors/claims';
import { selectMutedChannels } from 'redux/selectors/blocked';
import { selectModerationBlockList } from 'redux/selectors/comments';
import { selectBlacklistedOutpointMap, selectFilteredOutpointMap } from 'lbryinc';
import { getChannelFromClaim } from 'util/claim';
import { isURIEqual } from 'util/lbryURI';
export const selectBanStateForUri = createCachedSelector(
selectClaimForUri,
selectBlacklistedOutpointMap,
selectFilteredOutpointMap,
selectMutedChannels,
selectModerationBlockList,
(state, uri) => makeSelectIsBlacklisted(uri)(state),
(claim, blackListedOutpointMap, filteredOutpointMap, mutedChannelUris, personalBlocklist, isBlacklisted) => {
const banState = {};
if (!claim) {
return banState;
}
const channelClaim = getChannelFromClaim(claim);
if (isBlacklisted) {
banState['blacklisted'] = true;
}
// This will be replaced once blocking is done at the wallet server level.
if (blackListedOutpointMap) {
if (
(channelClaim && blackListedOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) ||
blackListedOutpointMap[`${claim.txid}:${claim.nout}`]
) {
banState['blacklisted'] = true;
}
}
// We're checking to see if the stream outpoint or signing channel outpoint
// is in the filter list.
if (filteredOutpointMap) {
if (
(channelClaim && filteredOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) ||
filteredOutpointMap[`${claim.txid}:${claim.nout}`]
) {
banState['filtered'] = true;
}
}
// block stream claims
// block channel claims if we can't control for them in claim search
if (mutedChannelUris.length && channelClaim) {
if (mutedChannelUris.some((blockedUri) => isURIEqual(blockedUri, channelClaim.permanent_url))) {
banState['muted'] = true;
}
}
// Commentron blocklist
if (personalBlocklist.length && channelClaim) {
if (personalBlocklist.some((blockedUri) => isURIEqual(blockedUri, channelClaim.permanent_url))) {
banState['blocked'] = true;
}
}
return banState;
}
)((state, uri) => String(uri));

View file

@ -0,0 +1,20 @@
import { createSelector } from 'reselect';
export const selectState = state => state.blacklist || {};
export const selectBlackListedOutpoints = createSelector(
selectState,
state => state.blackListedOutpoints
);
export const selectBlacklistedOutpointMap = createSelector(
selectBlackListedOutpoints,
outpoints =>
outpoints
? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
acc[outpoint] = 1;
return acc;
}, {})
: {}
);

View file

@ -0,0 +1,16 @@
// @flow
type State = { costInfo: any };
export const selectState = (state: State) => state.costInfo || {};
export const selectAllCostInfoByUri = (state: State) => selectState(state).byUri;
export const selectFetchingCostInfo = (state: State) => selectState(state).fetching;
export const selectCostInfoForUri = (state: State, uri: string) => {
const costInfos = selectAllCostInfoByUri(state);
return costInfos && costInfos[uri];
};
export const selectFetchingCostInfoForUri = (state: State, uri: string) => {
const fetchingByUri = selectFetchingCostInfo(state);
return fetchingByUri && fetchingByUri[uri];
};

View file

@ -0,0 +1,20 @@
import { createSelector } from 'reselect';
export const selectState = state => state.filtered || {};
export const selectFilteredOutpoints = createSelector(
selectState,
state => state.filteredOutpoints
);
export const selectFilteredOutpointMap = createSelector(
selectFilteredOutpoints,
outpoints =>
outpoints
? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
acc[outpoint] = 1;
return acc;
}, {})
: {}
);

View file

@ -0,0 +1,20 @@
// @flow
import { createSelector } from 'reselect';
import { selectClaimIdForUri } from 'redux/selectors/claims';
type State = { claims: any };
const selectState = state => state.stats || {};
export const selectViewCount = createSelector(selectState, state => state.viewCountById);
export const selectSubCount = createSelector(selectState, state => state.subCountById);
export const selectViewCountForUri = (state: State, uri: string) => {
const claimId = selectClaimIdForUri(state, uri);
const viewCountById = selectViewCount(state);
return claimId ? viewCountById[claimId] || 0 : 0;
};
export const selectSubCountForUri = (state: State, uri: string) => {
const claimId = selectClaimIdForUri(state, uri);
const subCountById = selectSubCount(state);
return claimId ? subCountById[claimId] || 0 : 0;
};

View file

@ -0,0 +1,40 @@
import { createSelector } from 'reselect';
const selectState = state => state.sync || {};
export const selectHasSyncedWallet = createSelector(selectState, state => state.hasSyncedWallet);
export const selectSyncHash = createSelector(selectState, state => state.syncHash);
export const selectSyncData = createSelector(selectState, state => state.syncData);
export const selectSetSyncErrorMessage = createSelector(
selectState,
state => state.setSyncErrorMessage
);
export const selectGetSyncErrorMessage = createSelector(
selectState,
state => state.getSyncErrorMessage
);
export const selectGetSyncIsPending = createSelector(selectState, state => state.getSyncIsPending);
export const selectSetSyncIsPending = createSelector(selectState, state => state.setSyncIsPending);
export const selectHashChanged = createSelector(selectState, state => state.hashChanged);
export const selectSyncApplyIsPending = createSelector(
selectState,
state => state.syncApplyIsPending
);
export const selectSyncApplyErrorMessage = createSelector(
selectState,
state => state.syncApplyErrorMessage
);
export const selectSyncApplyPasswordError = createSelector(
selectState,
state => state.syncApplyPasswordError
);

View file

@ -0,0 +1,17 @@
// util for creating reducers
// based off of redux-actions
// https://redux-actions.js.org/docs/api/handleAction.html#handleactions
// eslint-disable-next-line import/prefer-default-export
export const handleActions = (actionMap, defaultState) => (state = defaultState, action) => {
const handler = actionMap[action.type];
if (handler) {
const newState = handler(state, action);
return Object.assign({}, state, newState);
}
// just return the original state if no handler
// returning a copy here breaks redux-persist
return state;
};

View file

@ -0,0 +1,10 @@
export function swapKeyAndValue(dict) {
const ret = {};
// eslint-disable-next-line no-restricted-syntax
for (const key in dict) {
if (dict.hasOwnProperty(key)) {
ret[dict[key]] = key;
}
}
return ret;
}

View file

@ -0,0 +1,78 @@
const apiBaseUrl = 'https://www.transifex.com/api/2/project';
const resource = 'app-strings';
export function doTransifexUpload(contents, project, token, success, fail) {
const url = `${apiBaseUrl}/${project}/resources/`;
const updateUrl = `${apiBaseUrl}/${project}/resource/${resource}/content/`;
const headers = {
Authorization: `Basic ${Buffer.from(`api:${token}`).toString('base64')}`,
'Content-Type': 'application/json',
};
const req = {
accept_translations: true,
i18n_type: 'KEYVALUEJSON',
name: resource,
slug: resource,
content: contents,
};
function handleResponse(text) {
let json;
try {
// transifex api returns Python dicts for some reason.
// Any way to get the api to return valid JSON?
json = JSON.parse(text);
} catch (e) {
// ignore
}
if (success) {
success(json || text);
}
}
function handleError(err) {
if (fail) {
fail(err.message ? err.message : 'Could not upload strings resource to Transifex');
}
}
// check if the resource exists
fetch(updateUrl, { headers })
.then(response => response.json())
.then(() => {
// perform an update
fetch(updateUrl, {
method: 'PUT',
headers,
body: JSON.stringify({ content: contents }),
})
.then(response => {
if (response.status !== 200 && response.status !== 201) {
throw new Error('failed to update transifex');
}
return response.text();
})
.then(handleResponse)
.catch(handleError);
})
.catch(() => {
// resource doesn't exist, create a fresh resource
fetch(url, {
method: 'POST',
headers,
body: JSON.stringify(req),
})
.then(response => {
if (response.status !== 200 && response.status !== 201) {
throw new Error('failed to upload to transifex');
}
return response.text();
})
.then(handleResponse)
.catch(handleError);
});
}

3
extras/recsys/index.js Normal file
View file

@ -0,0 +1,3 @@
import Recsys from './recsys';
export default Recsys;

View file

@ -1,10 +1,12 @@
import { selectUser } from 'redux/selectors/user';
import { makeSelectRecommendedRecsysIdForClaimId } from 'redux/selectors/search';
import { v4 as Uuidv4 } from 'uuid';
import { parseURI, SETTINGS, makeSelectClaimForUri } from 'lbry-redux';
import { parseURI } from 'util/lbryURI';
import * as SETTINGS from 'constants/settings';
import { makeSelectClaimForUri } from 'redux/selectors/claims';
import { selectPlayingUri, selectPrimaryUri } from 'redux/selectors/content';
import { makeSelectClientSetting, selectDaemonSettings } from 'redux/selectors/settings';
import { history } from './store';
import { history } from 'ui/store';
const recsysEndpoint = 'https://clickstream.odysee.com/log/video/view';
const recsysId = 'lighthouse-v0';
@ -92,7 +94,8 @@ const recsys = {
createRecsysEntry: function (claimId, parentUuid) {
if (window.store && claimId) {
const state = window.store.getState();
const { id: userId } = selectUser(state);
const user = selectUser(state);
const userId = user ? user.id : null;
if (parentUuid) {
// Make a stub entry that will be filled out on page load
recsys.entries[claimId] = {

10
flow-typed/Blocklist.js vendored Normal file
View file

@ -0,0 +1,10 @@
declare type BlocklistState = {
blockedChannels: Array<string>
};
declare type BlocklistAction = {
type: string,
data: {
uri: string,
},
};

251
flow-typed/Claim.js vendored Normal file
View file

@ -0,0 +1,251 @@
// @flow
declare type Claim = StreamClaim | ChannelClaim | CollectionClaim;
declare type ChannelClaim = GenericClaim & {
value: ChannelMetadata,
};
declare type CollectionClaim = GenericClaim & {
value: CollectionMetadata,
};
declare type StreamClaim = GenericClaim & {
value: StreamMetadata,
};
declare type GenericClaim = {
address: string, // address associated with tx
amount: string, // bid amount at time of tx
canonical_url: string, // URL with short id, includes channel with short id
claim_id: string, // unique claim identifier
claim_sequence: number, // not being used currently
claim_op: 'create' | 'update',
confirmations: number,
decoded_claim: boolean, // Not available currently https://github.com/lbryio/lbry/issues/2044
timestamp?: number, // date of last transaction
height: number, // block height the tx was confirmed
is_channel_signature_valid?: boolean,
is_my_output: boolean,
name: string,
normalized_name: string, // `name` normalized via unicode NFD spec,
nout: number, // index number for an output of a tx
permanent_url: string, // name + claim_id
short_url: string, // permanent_url with short id, no channel
txid: string, // unique tx id
type: 'claim' | 'update' | 'support',
value_type: 'stream' | 'channel' | 'collection',
signing_channel?: ChannelClaim,
reposted_claim?: GenericClaim,
repost_channel_url?: string,
repost_url?: string,
repost_bid_amount?: string,
purchase_receipt?: PurchaseReceipt,
meta: {
activation_height: number,
claims_in_channel?: number,
creation_height: number,
creation_timestamp: number,
effective_amount: string,
expiration_height: number,
is_controlling: boolean,
support_amount: string,
reposted: number,
trending_global: number,
trending_group: number,
trending_local: number,
trending_mixed: number,
},
};
declare type GenericMetadata = {
title?: string,
description?: string,
thumbnail?: {
url?: string,
},
languages?: Array<string>,
tags?: Array<string>,
locations?: Array<Location>,
};
declare type ChannelMetadata = GenericMetadata & {
public_key: string,
public_key_id: string,
cover_url?: string,
email?: string,
website_url?: string,
featured?: Array<string>,
};
declare type CollectionMetadata = GenericMetadata & {
claims: Array<string>,
}
declare type StreamMetadata = GenericMetadata & {
license?: string, // License "title" ex: Creative Commons, Custom copyright
license_url?: string, // Link to full license
release_time?: number, // linux timestamp
author?: string,
source: {
sd_hash: string,
media_type?: string,
hash?: string,
name?: string, // file name
size?: number, // size of file in bytes
},
// Only exists if a stream has a fee
fee?: Fee,
stream_type: 'video' | 'audio' | 'image' | 'software',
// Below correspond to `stream_type`
video?: {
duration: number,
height: number,
width: number,
},
audio?: {
duration: number,
},
image?: {
height: number,
width: number,
},
software?: {
os: string,
},
};
declare type Location = {
latitude?: number,
longitude?: number,
country?: string,
state?: string,
city?: string,
code?: string,
};
declare type Fee = {
amount: string,
currency: string,
address: string,
};
declare type PurchaseReceipt = {
address: string,
amount: string,
claim_id: string,
confirmations: number,
height: number,
nout: number,
timestamp: number,
txid: string,
type: 'purchase',
};
declare type ClaimErrorCensor = {
address: string,
amount: string,
canonical_url: string,
claim_id: string,
claim_op: string,
confirmations: number,
has_signing_key: boolean,
height: number,
meta: {
activation_height: number,
claims_in_channel: number,
creation_height: number,
creation_timestamp: number,
effective_amount: string,
expiration_height: number,
is_controlling: boolean,
reposted: number,
support_amount: string,
take_over_height: number,
},
name: string,
normalized_name: string,
nout: number,
permanent_url: string,
short_url: string,
timestamp: number,
txid: string,
type: string,
value: {
public_key: string,
public_key_id: string,
},
value_type: string,
}
declare type ClaimActionResolveInfo = {
[string]: {
stream: ?StreamClaim,
channel: ?ChannelClaim,
claimsInChannel: ?number,
collection: ?CollectionClaim,
errorCensor: ?ClaimErrorCensor,
},
}
declare type ChannelUpdateParams = {
claim_id: string,
bid?: string,
title?: string,
cover_url?: string,
thumbnail_url?: string,
description?: string,
website_url?: string,
email?: string,
tags?: Array<string>,
replace?: boolean,
languages?: Array<string>,
locations?: Array<string>,
blocking?: boolean,
}
declare type ChannelPublishParams = {
name: string,
bid: string,
blocking?: true,
title?: string,
cover_url?: string,
thumbnail_url?: string,
description?: string,
website_url?: string,
email?: string,
tags?: Array<string>,
languages?: Array<string>,
}
declare type CollectionUpdateParams = {
claim_id: string,
claim_ids?: Array<string>,
bid?: string,
title?: string,
cover_url?: string,
thumbnail_url?: string,
description?: string,
website_url?: string,
email?: string,
tags?: Array<string>,
replace?: boolean,
languages?: Array<string>,
locations?: Array<string>,
blocking?: boolean,
}
declare type CollectionPublishParams = {
name: string,
bid: string,
claim_ids: Array<string>,
blocking?: true,
title?: string,
thumbnail_url?: string,
description?: string,
tags?: Array<string>,
languages?: Array<string>,
}

29
flow-typed/CoinSwap.js vendored Normal file
View file

@ -0,0 +1,29 @@
declare type CoinSwapInfo = {
chargeCode: string,
coins: Array<string>,
sendAddresses: { [string]: string},
sendAmounts: { [string]: any },
lbcAmount: number,
status?: {
status: string,
receiptCurrency: string,
receiptTxid: string,
lbcTxid: string,
},
}
declare type CoinSwapState = {
coinSwaps: Array<CoinSwapInfo>,
};
declare type CoinSwapAddAction = {
type: string,
data: CoinSwapInfo,
};
declare type CoinSwapRemoveAction = {
type: string,
data: {
chargeCode: string,
},
};

33
flow-typed/Collections.js vendored Normal file
View file

@ -0,0 +1,33 @@
declare type Collection = {
id: string,
items: Array<?string>,
name: string,
type: string,
updatedAt: number,
totalItems?: number,
sourceId?: string, // if copied, claimId of original collection
};
declare type CollectionState = {
unpublished: CollectionGroup,
resolved: CollectionGroup,
pending: CollectionGroup,
edited: CollectionGroup,
builtin: CollectionGroup,
saved: Array<string>,
isResolvingCollectionById: { [string]: boolean },
error?: string | null,
};
declare type CollectionGroup = {
[string]: Collection,
}
declare type CollectionEditParams = {
uris?: Array<string>,
remove?: boolean,
replace?: boolean,
order?: { from: number, to: number },
type?: string,
name?: string,
}

View file

@ -45,6 +45,7 @@ declare type CommentsState = {
isLoading: boolean,
isLoadingById: boolean,
isLoadingByParentId: { [string]: boolean },
isCommenting: boolean,
myComments: ?Set<string>,
isFetchingReacts: boolean,
myReactsByCommentId: ?{ [string]: Array<string> }, // {"CommentId:MyChannelId": ["like", "dislike", ...]}
@ -177,7 +178,7 @@ declare type CommentCreateParams = {
claim_id: string,
parent_id?: string,
signature: string,
signing_ts: number,
signing_ts: string,
support_tx_id?: string,
};

369
flow-typed/Lbry.js vendored Normal file
View file

@ -0,0 +1,369 @@
// @flow
declare type StatusResponse = {
blob_manager: {
finished_blobs: number,
},
blockchain_headers: {
download_progress: number,
downloading_headers: boolean,
},
dht: {
node_id: string,
peers_in_routing_table: number,
},
hash_announcer: {
announce_queue_size: number,
},
installation_id: string,
is_running: boolean,
skipped_components: Array<string>,
startup_status: {
blob_manager: boolean,
blockchain_headers: boolean,
database: boolean,
dht: boolean,
exchange_rate_manager: boolean,
hash_announcer: boolean,
peer_protocol_server: boolean,
stream_manager: boolean,
upnp: boolean,
wallet: boolean,
},
stream_manager: {
managed_files: number,
},
upnp: {
aioupnp_version: string,
dht_redirect_set: boolean,
external_ip: string,
gateway: string,
peer_redirect_set: boolean,
redirects: {},
},
wallet: ?{
connected: string,
best_blockhash: string,
blocks: number,
blocks_behind: number,
is_encrypted: boolean,
is_locked: boolean,
headers_synchronization_progress: number,
available_servers: number,
},
};
declare type VersionResponse = {
build: string,
lbrynet_version: string,
os_release: string,
os_system: string,
platform: string,
processor: string,
python_version: string,
};
declare type BalanceResponse = {
available: string,
reserved: string,
reserved_subtotals: ?{
claims: string,
supports: string,
tips: string,
},
total: string,
};
declare type ResolveResponse = {
// Keys are the url(s) passed to resolve
[string]: { error?: {}, stream?: StreamClaim, channel?: ChannelClaim, collection?: CollectionClaim, claimsInChannel?: number },
};
declare type GetResponse = FileListItem & { error?: string };
declare type GenericTxResponse = {
height: number,
hex: string,
inputs: Array<{}>,
outputs: Array<{}>,
total_fee: string,
total_input: string,
total_output: string,
txid: string,
};
declare type PublishResponse = GenericTxResponse & {
// Only first value in outputs is a claim
// That's the only value we care about
outputs: Array<Claim>,
};
declare type ClaimSearchResponse = {
items: Array<Claim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type ClaimListResponse = {
items: Array<ChannelClaim | Claim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type ChannelCreateResponse = GenericTxResponse & {
outputs: Array<ChannelClaim>,
};
declare type ChannelUpdateResponse = GenericTxResponse & {
outputs: Array<ChannelClaim>,
};
declare type CommentCreateResponse = Comment;
declare type CommentUpdateResponse = Comment;
declare type MyReactions = {
// Keys are the commentId
[string]: Array<string>,
};
declare type OthersReactions = {
// Keys are the commentId
[string]: {
// Keys are the reaction_type, e.g. 'like'
[string]: number,
},
};
declare type CommentReactListResponse = {
my_reactions: Array<MyReactions>,
others_reactions: Array<OthersReactions>,
};
declare type CommentHideResponse = {
// keyed by the CommentIds entered
[string]: { hidden: boolean },
};
declare type CommentPinResponse = {
// keyed by the CommentIds entered
items: Comment,
};
declare type CommentAbandonResponse = {
// keyed by the CommentId given
abandoned: boolean,
};
declare type ChannelListResponse = {
items: Array<ChannelClaim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type ChannelSignResponse = {
signature: string,
signing_ts: string,
};
declare type CollectionCreateResponse = {
outputs: Array<Claim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
}
declare type CollectionListResponse = {
items: Array<Claim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type CollectionResolveResponse = {
items: Array<Claim>,
total_items: number,
};
declare type CollectionResolveOptions = {
claim_id: string,
};
declare type CollectionListOptions = {
page: number,
page_size: number,
resolve?: boolean,
};
declare type FileListResponse = {
items: Array<FileListItem>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type TxListResponse = {
items: Array<Transaction>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type SupportListResponse = {
items: Array<Support>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type BlobListResponse = { items: Array<string> };
declare type WalletListResponse = Array<{
id: string,
name: string,
}>;
declare type WalletStatusResponse = {
is_encrypted: boolean,
is_locked: boolean,
is_syncing: boolean,
};
declare type SyncApplyResponse = {
hash: string,
data: string,
};
declare type SupportAbandonResponse = GenericTxResponse;
declare type StreamListResponse = {
items: Array<StreamClaim>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type StreamRepostOptions = {
name: string,
bid: string,
claim_id: string,
channel_id?: string,
};
declare type StreamRepostResponse = GenericTxResponse;
declare type PurchaseListResponse = {
items: Array<PurchaseReceipt & { claim: StreamClaim }>,
page: number,
page_size: number,
total_items: number,
total_pages: number,
};
declare type PurchaseListOptions = {
page: number,
page_size: number,
resolve: boolean,
claim_id?: string,
channel_id?: string,
};
//
// Types used in the generic Lbry object that is exported
//
declare type LbryTypes = {
isConnected: boolean,
connectPromise: any, // null |
connect: () => any, // void | Promise<any> ?
daemonConnectionString: string,
alternateConnectionString: string,
methodsUsingAlternateConnectionString: Array<string>,
apiRequestHeaders: { [key: string]: string },
setDaemonConnectionString: string => void,
setApiHeader: (string, string) => void,
unsetApiHeader: string => void,
overrides: { [string]: ?Function },
setOverride: (string, Function) => void,
// getMediaType: (?string, ?string) => string,
// Lbry Methods
stop: () => Promise<string>,
status: () => Promise<StatusResponse>,
version: () => Promise<VersionResponse>,
resolve: (params: {}) => Promise<ResolveResponse>,
get: (params: {}) => Promise<GetResponse>,
publish: (params: {}) => Promise<PublishResponse>,
claim_search: (params: {}) => Promise<ClaimSearchResponse>,
claim_list: (params: {}) => Promise<ClaimListResponse>,
channel_create: (params: {}) => Promise<ChannelCreateResponse>,
channel_update: (params: {}) => Promise<ChannelUpdateResponse>,
channel_import: (params: {}) => Promise<string>,
channel_list: (params: {}) => Promise<ChannelListResponse>,
channel_sign: (params: {}) => Promise<ChannelSignResponse>,
stream_abandon: (params: {}) => Promise<GenericTxResponse>,
stream_list: (params: {}) => Promise<StreamListResponse>,
channel_abandon: (params: {}) => Promise<GenericTxResponse>,
support_create: (params: {}) => Promise<GenericTxResponse>,
support_list: (params: {}) => Promise<SupportListResponse>,
support_abandon: (params: {}) => Promise<SupportAbandonResponse>,
stream_repost: (params: StreamRepostOptions) => Promise<StreamRepostResponse>,
purchase_list: (params: PurchaseListOptions) => Promise<PurchaseListResponse>,
collection_resolve: (params: CollectionResolveOptions) => Promise<CollectionResolveResponse>,
collection_list: (params: CollectionListOptions) => Promise<CollectionListResponse>,
collection_create: (params: {}) => Promise<CollectionCreateResponse>,
collection_update: (params: {}) => Promise<CollectionCreateResponse>,
// File fetching and manipulation
file_list: (params: {}) => Promise<FileListResponse>,
file_delete: (params: {}) => Promise<boolean>,
blob_delete: (params: {}) => Promise<string>,
blob_list: (params: {}) => Promise<BlobListResponse>,
file_set_status: (params: {}) => Promise<any>,
file_reflect: (params: {}) => Promise<any>,
// Preferences
preference_get: (params?: {}) => Promise<any>,
preference_set: (params: {}) => Promise<any>,
// Commenting
comment_update: (params: {}) => Promise<CommentUpdateResponse>,
comment_hide: (params: {}) => Promise<CommentHideResponse>,
comment_abandon: (params: {}) => Promise<CommentAbandonResponse>,
comment_list: (params: {}) => Promise<any>,
comment_create: (params: {}) => Promise<any>,
// Wallet utilities
wallet_balance: (params: {}) => Promise<BalanceResponse>,
wallet_decrypt: (prams: {}) => Promise<boolean>,
wallet_encrypt: (params: {}) => Promise<boolean>,
wallet_unlock: (params: {}) => Promise<boolean>,
wallet_list: (params: {}) => Promise<WalletListResponse>,
wallet_send: (params: {}) => Promise<GenericTxResponse>,
wallet_status: (params?: {}) => Promise<WalletStatusResponse>,
address_is_mine: (params: {}) => Promise<boolean>,
address_unused: (params: {}) => Promise<string>, // New address
address_list: (params: {}) => Promise<string>,
transaction_list: (params: {}) => Promise<TxListResponse>,
txo_list: (params: {}) => Promise<any>,
account_set: (params: {}) => Promise<any>,
account_list: (params?: {}) => Promise<any>,
// Sync
sync_hash: (params?: {}) => Promise<string>,
sync_apply: (params: {}) => Promise<SyncApplyResponse>,
// syncGet
// The app shouldn't need to do this
utxo_release: () => Promise<any>,
};

99
flow-typed/LbryFirst.js vendored Normal file
View file

@ -0,0 +1,99 @@
// @flow
declare type LbryFirstStatusResponse = {
Version: string,
Message: string,
Running: boolean,
Commit: string,
};
declare type LbryFirstVersionResponse = {
build: string,
lbrynet_version: string,
os_release: string,
os_system: string,
platform: string,
processor: string,
python_version: string,
};
/* SAMPLE UPLOAD RESPONSE (FULL)
"Video": {
"etag": "\"Dn5xIderbhAnUk5TAW0qkFFir0M/xlGLrlTox7VFTRcR8F77RbKtaU4\"",
"id": "8InjtdvVmwE",
"kind": "youtube#video",
"snippet": {
"categoryId": "22",
"channelId": "UCXiVsGTU88fJjheB2rqF0rA",
"channelTitle": "Mark Beamer",
"liveBroadcastContent": "none",
"localized": {
"title": "my title"
},
"publishedAt": "2020-05-05T04:17:53.000Z",
"thumbnails": {
"default": {
"height": 90,
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/default.jpg?sqp=CMTQw_UF&rs=AOn4CLB6dlhZMSMrazDlWRsitPgCsn8fVw",
"width": 120
},
"high": {
"height": 360,
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/hqdefault.jpg?sqp=CMTQw_UF&rs=AOn4CLB-Je_7l6qvASRAR_bSGWZHaXaJWQ",
"width": 480
},
"medium": {
"height": 180,
"url": "https://i9.ytimg.com/vi/8InjtdvVmwE/mqdefault.jpg?sqp=CMTQw_UF&rs=AOn4CLCvSnDLqVznRNMKuvJ_0misY_chPQ",
"width": 320
}
},
"title": "my title"
},
"status": {
"embeddable": true,
"license": "youtube",
"privacyStatus": "private",
"publicStatsViewable": true,
"uploadStatus": "uploaded"
}
}
*/
declare type UploadResponse = {
Video: {
id: string,
snippet: {
channelId: string,
},
status: {
uploadStatus: string,
},
},
};
declare type HasYTAuthResponse = {
HashAuth: boolean,
};
declare type YTSignupResponse = {};
//
// Types used in the generic LbryFirst object that is exported
//
declare type LbryFirstTypes = {
isConnected: boolean,
connectPromise: ?Promise<any>,
connect: () => void,
lbryFirstConnectionString: string,
apiRequestHeaders: { [key: string]: string },
setApiHeader: (string, string) => void,
unsetApiHeader: string => void,
overrides: { [string]: ?Function },
setOverride: (string, Function) => void,
// LbryFirst Methods
stop: () => Promise<string>,
status: () => Promise<StatusResponse>,
version: () => Promise<VersionResponse>,
upload: any => Promise<?UploadResponse>,
hasYTAuth: string => Promise<HasYTAuthResponse>,
ytSignup: () => Promise<YTSignupResponse>,
};

136
flow-typed/Notification.js vendored Normal file
View file

@ -0,0 +1,136 @@
// @flow
import * as ACTIONS from 'constants/action_types';
/*
Toasts:
- First-in, first-out queue
- Simple messages that are shown in response to user interactions
- Never saved
- If they are the result of errors, use the isError flag when creating
- For errors that should interrupt user behavior, use Error
*/
declare type ToastParams = {
message: string,
title?: string,
linkText?: string,
linkTarget?: string,
isError?: boolean,
};
declare type Toast = {
id: string,
params: ToastParams,
};
declare type DoToast = {
type: ACTIONS.CREATE_TOAST,
data: Toast,
};
/*
Notifications:
- List of notifications based on user interactions/app notifications
- Always saved, but can be manually deleted
- Can happen in the background, or because of user interaction (ex: publish confirmed)
*/
declare type Notification = {
id: string, // Unique id
dateCreated: number,
isRead: boolean, // Used to display "new" notifications that a user hasn't seen yet
source?: string, // The type/area an notification is from. Used for sorting (ex: publishes, transactions)
// We may want to use priority/isDismissed in the future to specify how urgent a notification is
// and if the user should see it immediately
// isDissmied: boolean,
// priority?: number
};
declare type DoNotification = {
type: ACTIONS.CREATE_NOTIFICATION,
data: Notification,
};
declare type DoEditNotification = {
type: ACTIONS.EDIT_NOTIFICATION,
data: {
notification: Notification,
},
};
declare type DoDeleteNotification = {
type: ACTIONS.DELETE_NOTIFICATION,
data: {
id: string, // The id to delete
},
};
/*
Errors:
- First-in, first-out queue
- Errors that should interupt user behavior
- For errors that can be shown without interrupting a user, use Toast with the isError flag
*/
declare type ErrorNotification = {
title: string,
text: string,
};
declare type DoError = {
type: ACTIONS.CREATE_ERROR,
data: ErrorNotification,
};
declare type DoDismissError = {
type: ACTIONS.DISMISS_ERROR,
};
/*
NotificationState
*/
declare type NotificationState = {
notifications: Array<Notification>,
errors: Array<ErrorNotification>,
toasts: Array<Toast>,
};
declare type WebNotification = {
active_at: string,
created_at: string,
id: number,
is_app_readable: boolean,
is_device_notified: boolean,
is_emailed: boolean,
is_read: boolean,
is_seen: boolean,
notification_parameters: {
device: {
analytics_label: string,
image_url: string,
is_data_only: boolean,
name: string,
placeholders: ?string,
target: string,
text: string,
title: string,
type: string,
},
dynamic: {
comment_author: string,
reply_author: string,
hash: string,
claim_title: string,
comment?: string,
channel_url: string,
},
email: {},
},
notification_rule: string,
type: string,
updated_at: string,
user_id: number,
group_count?: number,
};
declare type NotificationCategory = {
name: string,
types: ?Array<string>,
};

View file

@ -25,7 +25,7 @@ declare type UpdatePublishFormData = {
licenseType?: string,
uri?: string,
nsfw: boolean,
isMarkdownPost: boolean,
isMarkdownPost?: boolean,
};
declare type PublishParams = {

6
flow-typed/Redux.js vendored Normal file
View file

@ -0,0 +1,6 @@
// @flow
/* eslint-disable no-use-before-define */
declare type GetState = () => any;
declare type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;
declare type Dispatch = (action: {} | Promise<*> | Array<{}> | ThunkAction) => any; // Need to refer to ThunkAction
/* eslint-enable */

5
flow-typed/Reflector.js vendored Normal file
View file

@ -0,0 +1,5 @@
declare type ReflectingUpdate = {
fileListItem: FileListItem,
progress: number | boolean,
stalled: boolean,
};

13
flow-typed/Settings.js vendored Normal file
View file

@ -0,0 +1,13 @@
declare type CommentServerDetails = {
name: string,
url: string,
}
declare type WalletServerDetails = {
};
declare type DiskSpace = {
total: number,
free: number,
};

21
flow-typed/Tags.js vendored Normal file
View file

@ -0,0 +1,21 @@
declare type TagState = {
followedTags: FollowedTags,
knownTags: KnownTags,
};
declare type Tag = {
name: string,
};
declare type KnownTags = {
[string]: Tag,
};
declare type FollowedTags = Array<string>;
declare type TagAction = {
type: string,
data: {
name: string,
},
};

28
flow-typed/Transaction.js vendored Normal file
View file

@ -0,0 +1,28 @@
// @flow
declare type Transaction = {
amount: number,
claim_id: string,
claim_name: string,
fee: number,
nout: number,
txid: string,
type: string,
date: Date,
};
declare type Support = {
address: string,
amount: string,
claim_id: string,
confirmations: number,
height: string,
is_change: string,
is_mine: string,
name: string,
normalized_name: string,
nout: string,
permanent_url: string,
timestamp: number,
txid: string,
type: string,
};

27
flow-typed/Txo.js vendored Normal file
View file

@ -0,0 +1,27 @@
declare type Txo = {
amount: number,
claim_id: string,
normalized_name: string,
nout: number,
txid: string,
type: string,
value_type: string,
timestamp: number,
is_my_output: boolean,
is_my_input: boolean,
is_spent: boolean,
signing_channel?: {
channel_id: string,
},
};
declare type TxoListParams = {
page: number,
page_size: number,
type: string,
is_my_input?: boolean,
is_my_output?: boolean,
is_not_my_input?: boolean,
is_not_my_output?: boolean,
is_spent?: boolean,
};

10
flow-typed/file-data.js vendored Normal file
View file

@ -0,0 +1,10 @@
// @flow
declare type FileData = {
file?: Blob,
path: string,
duration?: number,
size?: number,
mimeType: string,
error?: string,
}

9
flow-typed/file-with-path.js vendored Normal file
View file

@ -0,0 +1,9 @@
// @flow
declare type FileWithPath = {
file: File,
// The full path will only be available in
// the application. For browser, the name
// of the file will be used.
path: string,
}

View file

@ -22,6 +22,7 @@ declare type RowDataItem = {
channelIds?: Array<string>,
limitClaimsPerChannel?: number,
pageSize?: number,
languages?: Array<string>,
},
route?: string,
hideForUnauth?: boolean,

2
flow-typed/i18n.js vendored Normal file
View file

@ -0,0 +1,2 @@
// @flow
declare function __(a: string, b?: {}): string;

21
flow-typed/lbryURI.js vendored Normal file
View file

@ -0,0 +1,21 @@
// @flow
declare type LbryUrlObj = {
// Path and channel will always exist when calling parseURI
// But they may not exist when code calls buildURI
isChannel?: boolean,
path?: string,
streamName?: string,
streamClaimId?: string,
channelName?: string,
channelClaimId?: string,
primaryClaimSequence?: number,
secondaryClaimSequence?: number,
primaryBidPosition?: number,
secondaryBidPosition?: number,
startTime?: number,
// Below are considered deprecated and should not be used due to unreliableness with claim.canonical_url
claimName?: string,
claimId?: string,
contentName?: string,
};

View file

@ -1,43 +0,0 @@
// @flow
declare type WebNotification = {
active_at: string,
created_at: string,
id: number,
is_app_readable: boolean,
is_device_notified: boolean,
is_emailed: boolean,
is_read: boolean,
is_seen: boolean,
notification_parameters: {
device: {
analytics_label: string,
image_url: string,
is_data_only: boolean,
name: string,
placeholders: ?string,
target: string,
text: string,
title: string,
type: string,
},
dynamic: {
comment_author: string,
reply_author: string,
hash: string,
claim_title: string,
comment?: string,
channel_url: string,
},
email: {},
},
notification_rule: string,
type: string,
updated_at: string,
user_id: number,
group_count?: number,
};
declare type NotificationCategory = {
name: string,
types: ?Array<string>,
};

3
flow-typed/redux.js vendored
View file

@ -1,3 +0,0 @@
// @flow
declare type Dispatch = any;

View file

@ -29,8 +29,10 @@ declare type SearchOptions = {
declare type SearchState = {
options: SearchOptions,
resultsByQuery: {},
results: Array<string>,
hasReachedMaxResultsLength: {},
searching: boolean,
mentionQuery: string,
};
declare type SearchSuccess = {
@ -41,6 +43,7 @@ declare type SearchSuccess = {
size: number,
uris: Array<string>,
recsys: string,
query: string,
},
};

View file

@ -1,6 +0,0 @@
// @flow
declare type WebFile = File & {
path?: string,
title?: string,
}

View file

@ -1,6 +1,6 @@
{
"name": "lbry",
"version": "0.51.2",
"version": "0.53.9",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [
"lbry"
@ -22,53 +22,48 @@
"scripts": {
"analyze": "source-map-explorer --only-mapped dist/electron/webpack/ui*.js --html dist/sourceMap.html",
"compile:electron": "node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --config webpack.electron.config.js",
"compile: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": "copyfiles ./.env* web/",
"compile": "cross-env NODE_ENV=production yarn compile:electron",
"dev": "yarn dev:electron",
"dev:electron": "cross-env NODE_ENV=development node ./electron/devServer.js",
"dev:web": "yarn copyenv && cd web && yarn dev",
"dev:web-server": "cross-env NODE_ENV=development yarn compile:web && concurrently \"cross-env NODE_ENV=development yarn compile:web --watch\" \"cd web && yarn dev:server\"",
"dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev:electron",
"dev:iatv": "LBRY_API_URL='http://localhost:15400' SDK_API_URL='http://localhost:15100' yarn dev:web",
"run:web-server": "cross-env NODE_ENV=production yarn compile:web && cd web && yarn dev:server",
"pack": "electron-builder --dir",
"dist": "electron-builder",
"build": "cross-env NODE_ENV=production yarn compile:electron && electron-builder build",
"build:dir": "yarn build -- --dir -c.compression=store -c.mac.identity=null",
"crossenv": "./node_modules/cross-env/dist/bin/cross-env",
"crossenv": "cross-env",
"flow": "flow",
"lint": "eslint 'ui/**/*.{js,jsx}' && eslint 'web/**/*.{js,jsx}' && eslint 'electron/**/*.js' && flow",
"lint-fix": "eslint --fix --quiet 'ui/**/*.{js,jsx}' && eslint --fix --quiet 'web/**/*.{js,jsx}' && eslint --fix --quiet 'electron/**/*.js'",
"lint": "eslint 'ui/**/*.{js,jsx}' && eslint 'electron/**/*.js' && flow",
"lint-fix": "eslint --fix --quiet 'ui/**/*.{js,jsx}' && eslint --fix --quiet 'electron/**/*.js'",
"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": "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": "electron-builder install-app-deps && node ./build/downloadDaemon.js",
"postinstall:warning": "echo '\n\nWARNING\n\nNot all node modules were installed because NODE_ENV is set to \"production\".\nThis should only be set after installing dependencies with \"yarn\". The app will not work.\n\n'"
},
"dependencies": {
"@electron/remote": "^2.0.1",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/material": "^5.2.1",
"@ungap/from-entries": "^0.2.1",
"auto-launch": "^5.0.5",
"electron-dl": "^1.11.0",
"electron-log": "^2.2.12",
"electron-dl": "^3.2.0",
"electron-log": "^4.4.8",
"electron-notarize": "^1.0.0",
"electron-updater": "^4.2.4",
"express": "^4.17.1",
"ffmpeg-probe": "^1.0.6",
"humanize-duration": "^3.27.0",
"if-env": "^1.0.4",
"match-sorter": "^6.3.0",
"mime": "^3.0.0",
"node-html-parser": "^5.1.0",
"parse-duration": "^1.0.0",
"react-datetime-picker": "^3.2.1",
"react-plastic": "^1.1.1",
"react-top-loading-bar": "^2.0.1",
"remove-markdown": "^0.3.0",
"rss": "^1.2.2",
"proxy-polyfill": "0.1.6",
"re-reselect": "^4.0.0",
"react-beautiful-dnd": "^13.1.0",
"react-datetime-picker": "^3.4.3",
"source-map-explorer": "^2.5.2",
"tempy": "^0.6.0",
"videojs-contrib-ads": "^6.9.0",
"videojs-ima": "^1.11.0",
"videojs-logo": "^2.1.4"
"sudo-prompt": "^9.2.1",
"tempy": "^0.6.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
@ -79,18 +74,17 @@
"@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/polyfill": "^7.12.1",
"@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.13",
"@reach/auto-id": "^0.13.0",
"@meetfranz/electron-cookies": "^3.0.2",
"@reach/combobox": "^0.12.1",
"@reach/menu-button": "0.7.4",
"@reach/rect": "^0.13.0",
"@reach/menu-button": "0.8.6",
"@reach/rect": "^0.16.0",
"@reach/tabs": "^0.1.5",
"@reach/tooltip": "^0.12.1",
"@reach/utils": "^0.12.1",
@ -98,21 +92,17 @@
"@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.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",
"chalk": "^4.1.0",
"classnames": "^2.2.5",
"codemirror": "^5.39.2",
"concurrently": "^4.1.2",
"connected-react-router": "^6.8.0",
"copy-webpack-plugin": "^5.1.2",
"copyfiles": "^2.4.1",
"copy-webpack-plugin": "^6.4.1",
"country-data": "^0.0.31",
"cross-env": "^7.0.3",
"crypto-js": "^4.0.0",
@ -123,11 +113,10 @@
"decompress": "^4.2.1",
"del": "^3.0.0",
"devtron": "^1.4.0",
"dom-scroll-into-view": "^1.2.1",
"dotenv-defaults": "^2.0.1",
"dotenv-webpack": "^1.8.0",
"electron": "9.4.0",
"electron-builder": "^22.9.1",
"electron": "17.2.0",
"electron-builder": "^22.10.5",
"electron-devtools-installer": "^3.1.1",
"electron-is-dev": "^0.3.0",
"electron-webpack": "^2.8.2",
@ -149,24 +138,19 @@
"eslint-plugin-standard": "^4.0.1",
"file-loader": "^4.2.0",
"flow-bin": "^0.97.0",
"flow-typed": "^2.3.0",
"flow-typed": "^3.7.0",
"formik": "^0.10.4",
"hast-util-sanitize": "^3.0.2",
"history": "^4.9.0",
"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#0f930c4a7bfc7f164e6b3c6044050c1bc73f6ab8",
"lbryinc": "lbryio/lbryinc#0b4e41ef90d6347819dd3453f2f9398a5c1b4f36",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",
"lodash-es": "^4.17.14",
"lodash-es": "^4.17.21",
"mammoth": "^1.4.16",
"moment": "^2.22.0",
"node-abi": "^2.5.1",
"node-fetch": "^2.6.1",
"node-libs-browser": "^2.1.0",
"moment": "^2.29.2",
"node-fetch": "^2.6.7",
"node-loader": "^0.6.0",
"node-wget": "^0.4.3",
"nodemon": "^1.19.1",
@ -181,7 +165,6 @@
"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-draggable": "^3.3.0",
"react-google-recaptcha": "^2.0.1",
@ -192,7 +175,6 @@
"react-router": "^5.1.0",
"react-router-dom": "^5.1.0",
"react-simplemde-editor": "^4.1.3",
"react-spring": "^8.0.20",
"reakit": "^1.0.0-beta.13",
"redux": "^3.6.0",
"redux-persist": "^5.10.0",
@ -209,23 +191,17 @@
"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.125.0",
"three-full": "^17.1.0",
"tiny-relative-date": "^1.3.0",
"tree-kill": "^1.1.0",
"terser-webpack-plugin": "^4.2.3",
"three-full": "^28.0.2",
"unist-util-visit": "^2.0.3",
"uuid": "^8.3.2",
"vast-client": "^3.1.1",
"video.js": "^7.13.3",
"video.js": "^7.14.3",
"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": "^4.44.2",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.3.10",
"webpack-config-utils": "^2.3.1",
@ -234,21 +210,17 @@
"webpack-hot-middleware": "^2.24.3",
"webpack-merge": "^4.2.1",
"webpack-node-externals": "^1.7.2",
"y18n": "^4.0.1",
"yarnhook": "^0.2.0"
},
"engines": {
"node": ">=7",
"node": ">=16.13",
"yarn": "^1.3"
},
"lbrySettings": {
"lbrynetDaemonVersion": "0.99.0",
"lbrynetDaemonVersion": "0.113.0",
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
"lbrynetDaemonDir": "static/daemon",
"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"
}
"lbrynetDaemonFileName": "lbrynet"
},
"packageManager": "yarn@3.2.0"
}

View file

@ -2184,5 +2184,143 @@
"From comments": "From comments",
"From search": "From search",
"Manage tags": "Manage tags",
"No Reposts": "No Reposts",
"You haven't reposted anything yet. Do it.": "You haven't reposted anything yet. Do it.",
"Claiming credits...": "Claiming credits...",
"%totalComments% comments": "%totalComments% comments",
"(%lbc_balance% available)": "(%lbc_balance% available)",
"Sending...": "Sending...",
"Trending for #Art": "Trending for #Art",
"Trending for #Btc": "Trending for #Btc",
"Trending for #Music": "Trending for #Music",
"You sent %lbc% as a tip, Mahalo!": "You sent %lbc% as a tip, Mahalo!",
"Export All": "Export All",
"Default share url (%name%)": "Default share url (%name%)",
"Custom share url": "Custom share url",
"Share url": "Share url",
"Odysee Connect": "Odysee Connect",
"Log in to %CLOUD_CONNECT_SITE_NAME%": "Log in to %CLOUD_CONNECT_SITE_NAME%",
"Cloud Connect": "Cloud Connect",
"Connect your wallet to Odysee": "Connect your wallet to Odysee",
"Minimum time gap in seconds between comments.": "Minimum time gap in seconds between comments.",
"Enabling a minimum amount to comment will force all comments to have tips associated with them. This can help prevent spam.": "Enabling a minimum amount to comment will force all comments to have tips associated with them. This can help prevent spam.",
"Comments containing these words will be blocked.": "Comments containing these words will be blocked.",
"Enter the full channel name or URL to search.\n\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8": "Enter the full channel name or URL to search.\n\nExamples:\n - @channel\n - @channel#3\n - https://odysee.com/@Odysee:8\n - lbry://@Odysee#8",
"Enable Data Hosting": "Enable Data Hosting",
"Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.": "Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.",
"Choose %asset%": "Choose %asset%",
"Showing %filtered% results of %total%": "Showing %filtered% results of %total%",
"filtered": "filtered",
"View All Playlists": "View All Playlists",
"Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.",
"Sending": "Sending",
"You sent %lbc%": "You sent %lbc%",
"Buy LBC": "Buy LBC",
"This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)": "This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)",
"Use official LBRY wallet servers": "Use official LBRY wallet servers",
"Enable Prerelease Updates": "Enable Prerelease Updates",
"Enable Upgrade to Test Builds": "Enable Upgrade to Test Builds",
"Prereleases may break things and we may not be able to fix them for you.": "Prereleases may break things and we may not be able to fix them for you.",
"A channel is required to repost on LBRY": "A channel is required to repost on LBRY",
"Admin": "Admin",
"Stickers": "Stickers",
"Different Sticker": "Different Sticker",
"LBC": "LBC",
"Add a Card": "Add a Card",
" To Tip Creators": " To Tip Creators",
"Nothing found": "Nothing found",
"From Comments": "From Comments",
"This support is priced in $USD.": "This support is priced in $USD.",
"The current exchange rate for the submitted LBC amount is ~ $%exchange_amount%.": "The current exchange rate for the submitted LBC amount is ~ $%exchange_amount%.",
"Amount of $%input_amount% LBC in USB is lower than price of $%price_amount%": "Amount of $%input_amount% LBC in USB is lower than price of $%price_amount%",
"Hosting for content you have downloaded": "Hosting for content you have downloaded",
"Hosting content selected by the network": "Hosting content selected by the network",
"Remove all unavailable claims": "Remove all unavailable claims",
"Drag": "Drag",
"Move Top": "Move Top",
"Move Bottom": "Move Bottom",
"Move Up": "Move Up",
"Move Down": "Move Down",
"Trending for #Game": "Trending for #Game",
"Remove custom comment server": "Remove custom comment server",
"Use Https": "Use Https",
"Server URL": "Server URL",
"Use https": "Use https",
"Custom Servers": "Custom Servers",
"Add A Server": "Add A Server",
"Autoplay Next is off.": "Autoplay Next is off.",
"Shuffle is on.": "Shuffle is on.",
"Shuffle is off.": "Shuffle is off.",
"Loop is on.": "Loop is on.",
"Loop is off.": "Loop is off.",
"View History Hosting lets you choose how much storage to use helping content you've consumed.": "View History Hosting lets you choose how much storage to use helping content you've consumed.",
"Clean Now": "Clean Now",
"Enable Automatic Hosting": "Enable Automatic Hosting",
"Download and serve arbitrary data on the network.": "Download and serve arbitrary data on the network.",
"View History Hosting": "View History Hosting",
"Disable automatic updates": "Disable automatic updates",
"Preven't new updates to be downloaded automatically in the background (we will keep notifying you if there is an update)": "Preven't new updates to be downloaded automatically in the background (we will keep notifying you if there is an update)",
"Unlimited View Hosting": "Unlimited View Hosting",
"Choose View Hosting Limit": "Choose View Hosting Limit",
"View Hosting Limit (GB)": "View Hosting Limit (GB)",
"%free% of %total% available": "%free% of %total% available",
"Short (< 4 min)": "Short (< 4 min)",
"Medium (4 - 20 min)": "Medium (4 - 20 min)",
"Rename List": "Rename List",
"New Name": "New Name",
"Rename": "Rename",
"New Collection Name": "New Collection Name",
"In %collection%": "In %collection%",
"Add to %collection%": "Add to %collection%",
"Show this channel your appreciation by sending a donation of Credits. ": "Show this channel your appreciation by sending a donation of Credits. ",
"You've entered the land of content freedom! Let's make sure everything is ship shape.": "You've entered the land of content freedom! Let's make sure everything is ship shape.",
"By continuing, you agree to the %terms%": "By continuing, you agree to the %terms%",
"Privacy": "Privacy",
"LBRY takes privacy and choice seriously. Is it ok if we monitor performance and help creators track their views?": "LBRY takes privacy and choice seriously. Is it ok if we monitor performance and help creators track their views?",
"Yes, share with LBRY": "Yes, share with LBRY",
"Search Uploads": "Search Uploads",
"This refundable boost will improve the discoverability of this %claimTypeText% while active. ": "This refundable boost will improve the discoverability of this %claimTypeText% while active. ",
"Show less": "Show less",
"Elements": "Elements",
"Icons": "Icons",
"Go to": "Go to",
"Clearing...": "Clearing...",
"Clear Views": "Clear Views",
"Show Video View Progress": "Show Video View Progress",
"Display view progress on thumbnail. This setting will not hide any blockchain activity or downloads.": "Display view progress on thumbnail. This setting will not hide any blockchain activity or downloads.",
"Content Hosting": "Content Hosting",
"Hosting": "Hosting",
"Viewed Hosting": "Viewed Hosting",
"Auto Hosting": "Auto Hosting",
"Help creators and improve the P2P data network by hosting content.": "Help creators and improve the P2P data network by hosting content.",
"I'm happy with my settings": "I'm happy with my settings",
"We've noticed you already have some settings.": "We've noticed you already have some settings.",
"You choose how much data to host.": "You choose how much data to host.",
"Go back": "Go back",
"Custom Hosting": "Custom Hosting",
"Automatic Hosting (GB)": "Automatic Hosting (GB)",
"* Note that as peer-to-peer software, your IP address and potentially other system information can be sent to other users, though this information is not stored permanently.": "* Note that as peer-to-peer software, your IP address and potentially other system information can be sent to other users, though this information is not stored permanently.",
"Help improve the P2P data network (and make LBRY users happy) by hosting data.": "Help improve the P2P data network (and make LBRY users happy) by hosting data.",
"View History Hosting lets you choose how much storage to use hosting content you've consumed.": "View History Hosting lets you choose how much storage to use hosting content you've consumed.",
"Automatic Hosting downloads a small portion of content active on the network.": "Automatic Hosting downloads a small portion of content active on the network.",
"Publishes --[legend, storage category]--": "Publishes",
"Auto Hosting --[legend, storage category]--": "Auto Hosting",
"View Hosting --[legend, storage category]--": "View Hosting",
"%spaceUsed% of %limit% GB": "%spaceUsed% of %limit% GB",
"%spaceUsed% of %limit% Free GB": "%spaceUsed% of %limit% Free GB",
"Disabled": "Disabled",
"Free --[legend, unused disk space]--": "Free",
"Top content in %language%": "Top content in %language%",
"Apply": "Apply",
"Disable background": "Disable background",
"Installing, please wait...": "Installing, please wait...",
"There was an error during installation. Please, try again.": "There was an error during installation. Please, try again.",
"Odysee Connect --[Section in Help Page]--": "Odysee Connect",
"Your hub has blocked this content because it subscribes to the following blocking channel:": "Your hub has blocked this content because it subscribes to the following blocking channel:",
"Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.": "Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.",
"Autoplay Next is on.": "Autoplay Next is on.",
"This will be visible in a few minutes after you submit this form.": "This will be visible in a few minutes after you submit this form.",
"Anon --[used in <%anonymous% Reposted>]--": "Anon",
"Your update is now pending. It will take a few minutes to appear for other users.": "Your update is now pending. It will take a few minutes to appear for other users.",
"--end--": "--end--"
}

3
static/app-update.yml Normal file
View file

@ -0,0 +1,3 @@
owner: lbryio
repo: lbry-desktop
provider: github

Some files were not shown because too many files have changed in this diff Show more