Commit graph

475 commits

Author SHA1 Message Date
saltrafael cc76a4a665
Fix video embeds in comments not playing and resize issues (#7163) 2021-09-24 11:53:17 -04:00
infinite-persistence 3b47edc3b9
Livestream category improvements (#7115)
*  Remove old method of displaying active livestreams

Completely remove it for now to make the commit deltas clearer.
We'll replace it with the new method at the end.

* Fetch and store active-livestream info in redux

* Tiles can now query active-livestream state from redux instead of getting from parent.

*  ClaimTilesDiscover: revert and cleanup

## Simplify
- Simplify to just `uris` instead of having multiple arrays (`uris`, `modifiedUris`, `prevUris`)
- The `prevUris` is for CLS prevention. With this removal, the CLS issue is back, but we'll handle it differently later.
- Temporarily disable the view-count fetching. Code is left there so that I don't forget.

## Fix
- `shouldPerformSearch` was never true when `prefixUris` is present. Corrected the logic.
- Aside: prefix and pin is so similar in function. Hm ....

* ClaimTilesDiscover: factor out options

## Change
Move the `option` code outside and passed in as a pre-calculated prop.

## Reason
To skip rendering while waiting for `claim_search`, we need to add `React.memo(areEqual)`. However, the flag that determines if we are fetching `claim_search` (fetchingClaimSearchByQuery[]) depends on the derived options as the key.

Instead of calculating `options` twice, we moved it to the props so both sides can use it.

It also makes the component a bit more readable.

The downside is that the prop-passing might not be clear.

* ClaimTilesDiscover: reduce ~17 renders at startup to just 2.

* ClaimTilesDiscover: fill with placeholder while waiting for claim_search

## Issue
Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed).

## Fix
Fill up the space with placeholders to prevent layout shift.

* Add 'useFetchViewCount' to handle fetching from lists

This effect also stashes fetched uris, so that we won't re-fetch the same uris during the same instance (e.g. during infinite scroll).

*  ClaimListDiscover: revert and cleanup

## Revert
- Removed the 'finalUris' stuff that was meant to "pause" visual changes when fetching. I think it'll be cleaner to use React.memo to achieve that.

## Alterations
- Added `renderUri` to make it clear which array that this component will render.
- Re-do the way we fetch view counts now that 'finalUris' is gone. Not the best method, but at least correct for now.

* ClaimListDiscover: add prefixUris, similar to ClaimTilesDiscover

This will be initially used to append livestreams at the top.

*  Re-enable active livestream tiles using the new method

* doFetchActiveLivestreams: add interval check

- Added a default minimum of 5 minutes between fetches. Clients can bypass this through `forceFetch` if needed.

* doFetchActiveLivestreams: add option check

We'll need to support different 'orderBy', so adding an "options check" when determining if we just made the same fetch.

* WildWest: limit livestream tiles + add ability to show more

Most likely this behavior will change in the future, so we'll leave `ClaimListDiscover` untouched and handle the logic at the page level.

This solution uses 2 `ClaimListDiscover` -- if the reduced livestream list is visible, it handles the header; else the normal list handles the header.

* Use better tile-count on larger screens.

Used the same method as how the homepage does it.
2021-09-24 10:26:21 -04:00
infinite-persistence f38a15ee0d
Blocklist page: fix perpetual spinner when trying to refresh with no channels
There's nothing to do when you don't have a channel, so hide the button and ensure redux fails gracefully.
2021-09-24 15:04:59 +08:00
infinite-persistence 63fd867757
Fix moderator data misalignment. (#7139)
## Issue
Closes 7121 Missing mod block option (large number of moderated channels?)

## Notes
It was bad to assume `channelSignatures` would be the same length as the promise result -- any failure in signing would cause a misalignment.

For my case, an accidentally-merged channel couldn't be signed due to a missing private key. I think it's the same for Drew.
2021-09-21 10:40:44 -04:00
saltrafael 1c59913e7a
Recommended changes (#7089)
* Fix floating

* Change makeSelectRecommendedContentForUri behavior
2021-09-16 16:00:44 -04:00
infinite-persistence 65902f6d58
Commentron err replacement: fix readability + added link support.
- Hopefully this is easier to understand, and easier to add/remove entries.
- The link support will be needed by the upcoming Appeal process.
2021-09-15 16:02:02 +08:00
saltrafael 539cf780d7
Fix floating player issues (#7073)
* Fix Floating Player stopping on certain files

* Dont show additional player buttons from markdown and comments

* Fix markdown resizing for the same video playing

* Update changelog
2021-09-13 11:24:35 -04:00
infinite-persistence af4ff29b23
Fix: Can't unblock if delegator deleted their channel
## Issue
7003 Can't unblock if delegator deleted their channel

## Changes
- Changed the function parameter from 'creatorId' to 'creatorUri'
    - It got short-circuited because we don't resolve deleted channels. But the client already have the full creator URI (containing the needed 'name' and 'id'), so there is no need to actually look at the resolved list -- just pass the uri like all the other functions.
2021-09-11 21:04:21 +08:00
saltrafael e8d8dfa76b
Playlist fall out fixes (#7032)
* Add snack bar notification

* Fix and improve code

* Better handle paid content on playlists

* Fix menu options that show for unauth users
2021-09-10 13:27:21 -04:00
saltrafael 160d8fe4b8
Make autoplay_next pushPrefs and set default value to autoplay setting (#7051) 2021-09-09 12:53:27 -04:00
infinite-persistence f8e9047359
Allow moderators to perform Timeout as well. 2021-09-03 23:50:34 +08:00
infinite-persistence 04f3dfbb9f
Corrected logic that was bypassing the muted list. 2021-09-03 23:50:06 +08:00
infinite-persistence bf8ab2e9ce
Run the extra app-side comment filter only if the claim is not ours.
## Preamble
- The app-side uses a cached blocklist, so when a Timeout expires, it doesn't know that the ban has been lifted.
- Meanwhile, we are doing extra comment filtering using this blocklist (so that we don't see comments that we have blocked, regardless of whose claim we are viewing).

## Issue
In a livestream, if a new message from an ex-offender comes in after their ban has been lifted, we do get the websocket message but it's being filtered out locally as mentioned above. So, the msg ended up being visible for everyone except the owner.

## Fix (band aid)
- Don't run the extra filter if the claim we are viewing is ours -- commentron would have filtered it for us anyways, and is the right logic to use even before this Timeout feature is introduced.
    - For the case of Timeout, this only serves as a band-aid until Commentron Issue 80 is available for us to detect the ban has been lifted. This is because it doesn't handle the case where I am a viewer and I decided to timeout someone for a few minutes. Because I am not the owner of the claim, the offender will continue to be blocked due to the same issue mentioned above.
2021-09-03 22:36:58 +08:00
infinite-persistence 0c1554e453
Blocklist Page: show the timeout ban duration
- 'humanize-duration' is used because 'moment''s humanizer sucks.
2021-09-03 07:17:57 +08:00
infinite-persistence 663376e970
Block timeout was changed from "hours" to "seconds" in Commentron 2021-09-03 07:17:57 +08:00
infinite-persistence a05ccdd44f
Comment Moderation - time based bans
## Issue
6712 Comment Moderation - time based bans

## Approach
- Consolidated the 3 types of blocking buttons in the comment content menu (i.e. Block, Moderator Block, Admin Block) into 1 regular Block button.
- Show a modal when Block is clicked.
    - Let user choose the blocklist.
    - Let user choose the timeout duration (this PR's impetus).
2021-09-03 07:17:56 +08:00
jessopb 049fb2878e
recsys v0.2 (#6977)
* recsys wip

better logging

fix floating player popout playing uri bug with recsys

lint

add empty entries to create

use beacon; fire on visibilitychange

cleanup, not record recs if not seen

ifweb recsys beacon

recsys handle embeds, cleanup

use history.listen to trigger events

fix recsys embed bug

bugfix

more default data

cleaner

cleaner

* remove tentative

* disable recsys debug logging
2021-09-02 18:39:40 -04:00
saltrafael 64cbd4ae8d
Expanded Playback and List controls (#6921)
* Dont show countdown on Lists

* Add Repeat icon

* Add Shuffle icon

* Add Replay Icon

* Add Replay Option to autoplayCountdown

* Add Loop Control for Lists

* Add Shuffle control for Lists

* Improve View List Link and Fetch action

* Add Play Button to List page

* Add Shuffle Play Option on List Page and Menus

* Fix Modal Remove Collection I18n

* CSS: Fix Large list titles

* Fix List playback on Floating Player

* Add Theater Mode to its own class and fix bar text display

* Add Play Next VJS component

* Add Play Next Button

* Add Play Previous VJS Component

* Add Play Previous Button

* Add Autoplay Next Button

* Add separate control for autoplay next in list

* Bump redux

* Update CHANGELOG.md
2021-09-02 16:05:32 -04:00
infinite-persistence ebfd648a88
Fix "linked-comment not found" msg not appearing
## Issue
6914 "Linked comment not found" message is gone

## Notes
Commentron updated the message, so the string comparison failed.
2021-08-30 14:12:12 +08:00
saltrafael 02a39e693b
Handle deleted comments 2021-08-28 20:48:49 +08:00
infinite-persistence 74986a8b3a
Comments: simplify blocked replies display
Previously, we decide when to display "Show More" based on the current fetched reply count vs. total replies in Commentron. It was already troublesome as `comment.List` and `comment.replies` give different values (one includes blocked content, while another does not).

Now, we are further filtering the list with Commentron blocklists (personal, admin, moderator), so it is not feasible to run the logic based on reply count.

## Solution
- Keep track of number of remaining pages instead and use that to determine when to display "Show More".
  - While it doesn't solve the "Show N replies" mismatch (YT has this problem too), it prevents the button from lingering.
- In the event that all replies are blocked, just show an empty space (same as YT). I didn't like the previous version that cluttered the space with "comment(s) blocked".
2021-08-24 16:55:36 +08:00
infinite-persistence e899a5de65
Comments: include Commentron blocklists when filtering.
## Issue
When you block Channel-X, Channel-X's comments will still be visible on someone else's content. This feels odd.

## Change
In addition to the blacklist, filter-list and muted-list, we now include the Commentron blocklists (personal, admin, moderator) when filtering out comments.

## Specifics
`makeSelectCommentsForUri`, `makeSelectTopLevelCommentsForUri` and `makeSelectRepliesForParentId` all perform the same filtering code. Factor that out to `makeSelectFilteredComments` and add the Commentron lists into the mix.

## Downsides
This probably adds to the already-high CPU usage in rendering comments.
2021-08-24 16:55:35 +08:00
infinite-persistence 882c9ca022 Fix double linked-comment if it was also pinned
## Issue
If the linked-comment is also a pinned comment, it was displayed twice.

## Fix
When separating out pinned comments, I forgot that `comment.ByID` was another place where we fetch comments.
2021-08-19 02:22:33 -07:00
Franco Montenegro bd92110d1f
Automatically claim initial rewards (new_user & email_verified) when … (#6807)
* Automatically claim initial rewards (new_user & email_verified) when accessing creating channel, edit channel and upload

* Do not try to get initial rewards if already claimed.
2021-08-18 12:34:24 -04:00
infinite-persistence 58773ede91
Reload when auth token mismatch is detected (#6897)
## Tickets
- 5504 Signing out of account causes page to break in other tabs
- 6829 merged accounts - force log out / fail sync when x-auth-token and cookie auth token are different

## Steps to replicate
1. Login to odysee with account-A.
2. Open another tab, and split both tabs on the screen.
3. Logout from the 1st tab. Do not activate (focus) the 2nd tab.
4. On the 1st tab, login with account-B.
5. Activate (focus) the 2nd tab. The wallet would have been merged, and we are still logged in as account-A.

## Approach
Reload when the LBRY API token no longer matches the auth token.
2021-08-18 10:49:09 -04:00
infinite-persistence 4688b4bf58
Livestream: stop pinned comments from appearing as latest (#6888)
## Ticket
6879: Previously pinned livestream comments show as latest

## Issue
`comment.List` will always display the pinned comment first, hence the problem when the chat is refreshed.

## Approach
Completely split pinned comments from top-level comments in the Reducer, and the let the GUI (e.g. regular comments, livestream comments) decide how they want to display it.

For the case of livestream, there is no need to repeat the pinned comments in the regular chat area, since there is a dedicated area on top.
2021-08-17 12:09:55 -04:00
jessopb 5f55603fb2
send recsys powered-by (#6875)
* send recsys powered-by

* update lighthouse call in useLighthouse

* rename select selectors

* update channel search too
2021-08-17 10:03:25 -04:00
infinite-persistence 474da87c11
Commentron: min tip API now uses float again 2021-08-12 14:51:41 +08:00
infinite-persistence e9a2f44899
Commentron: incorporate 'setting.Get' into 'doFetchCreatorSettings'
## General
- `setting.List`: returns full creator settings. Requires signature (i.e. you own the channel)
- `setting.Get`: returns a public subset of the creator settings. No signature required, and it is mainly used by the GUI to determine the constraints of a channel (e.g. comments enabled? min tip requirements? etc.). Does not include private settings like "blocked words list".

`doFetchCreatorSettings` will handle both of these. Clients that uses the stashed results (`settingsByChannelId`) just needs to be aware the result might not contain everything, depending on whether you own the channel or not.

## Misc Related Changes
- Finally fix the reducer for COMMENT_FETCH_SETTINGS_COMPLETED to not purge the data on each call.
- Change `doFetchCreatorSettings` to operate on a single channel instead of multiple. We ended up not using the multple mode anyway, so it was wasteful code trying to batch the promises.
- `commentsDisabledChannelIds` is no longer needed. Previously, this was created just to differentiate between Creator (full) and Channel (subset) settings. It's cleaner to just use one object, so eliminated this.
- Remove unused 'commentingEnabled'.

## Aside
- There are now 2 ways to know if a channel has disabled comments: (1) from `comment.list` and `setting.Get|List`. Both of them updates `settingsByChannelId`, so it'll still be a single place for the GUI to check against.
2021-08-12 14:51:41 +08:00
infinite-persistence 658e9bd1db
Enable min_tip setting 2021-08-12 14:51:40 +08:00
infinite-persistence ff9ca662f2
Option to change commments-server (desktop)
## Issue
> 5459 Add setting for changing your comment server. Visible on desktop (and possibly defaulting to Odysee URL), hidden on odysee.

## Comments
Not sure how this would actually work properly without the user recompiling the app to handle server differences. For example, even when we use our own server but switch between v1 and v2, some code changes are need to handle the differences. At that point, it seems easier for the user to just change the .env file? Anyway...

## Changes
- Added Desktop-only options to define custom server. [Settings > Advanced Settings > "Comment server" section].
2021-08-12 14:01:22 +08:00
infinite-persistence 4731786a3f
Livestream: implement Pinned Comments 2021-08-12 10:39:21 +08:00
saltrafael 445566c915 Fix delete option broken / missing 2021-08-11 10:07:43 -04:00
infinite-persistence fd66e6b9b1
Refactor Commentron error msg handling
## Issue
6832: Pass through commenting error if it fails current error list

## Changes
- Refactor the error-msg-replacing code to make it easier to add new ones in the future.
- Made the new error message localizable (i.e. extract the variable value, pass to `__()`)
- Fallback to Commentron original message for those unhandled ones (usually fresh messages from Commentron).
2021-08-10 10:26:58 +08:00
zeppi 5b4d8065e6 fix dislike crash when no claim 2021-08-06 14:10:05 -04:00
infinite-persistence 34368760de Fill in remaining Recsys fields
## Issue
6366 Recsys Evaluation Telemetry

The recommended list from lighthouse is obtained from `makeSelectRecommendedContentForUri`. This list is further tweaked by the GUI (e.g. move autoplay next item to top, remove blocked content, etc.). Recsys wants the final recommendation list and the clicked index (in exact order), so we need pass these info to the videojs recsys plugin somehow. Also, Recsys wants a recommendation list ID as well as the parent (referrer) ID, we so need to track the clicks and navigation.

## General Approach
- It seems easiest to just spew back the final (displayed) list and all the required info to Redux, and the recsys plugin (or anyone else in the future) can grab it.
- Try to touch few files as possible. The dirty work should all reside in `<RecommendedContent>` only.

## Changes
- `ClaimPreview`: add optional parameters to store an ID of the container that it is in (for this case, it is `ClaimList`) as well as the index within the container.
  - When clicked, we store the container ID in the navigation history `state` object.
    - For general cases, anyone can check this state from  `history.location.state` to know which container referred/navigated to the current page. For the recsys use case, we can use this as the `parentUUID`.
- `ClaimList`: just relay `onClick` and set IDs.
- `RecommendedContent`: now handles the uuid generation (for both parent and child) and stores the data in Redux.
2021-08-03 09:34:36 -04:00
Baltazar Gomez 79e39da47f update sockety api urls 2021-08-01 09:47:44 -04:00
Baltazar Gomez 9dd065a595 update lighthouse search api 2021-07-30 11:47:28 -04:00
infinite-persistence 76a6c0441c Beautify/elaborate comment spam-check message 2021-07-23 13:33:10 -04:00
zeppi ad3fd5700f default search types from config 2021-07-23 10:31:07 -04:00
infinite-persistence ffad52d5b7 Remove console.log
Seems like lint is being bypassed recently?
2021-07-23 08:42:58 -04:00
infinite-persistence 6e402240b0
Fix muted-words now returning null instead of ""
## Issue
Creating Settings suddenly start to stop loading correctly for some of my channels.

## Change
`settings.List` now returns null instead of empty array. Double-checked the Commentron repo and this is indeed the case.

Updated the code to handle null.
2021-07-23 15:46:38 +08:00
saltrafael b164a5d1f4 Pop up Menu Fixes and Improvements
Pop up Menu Fixes and Improvements

Improve re-directs

Fix file deletion

Improve code, and more

Fix List Layout collection popup

Allow to edit list

Fix blocking when not logged or no channel

Fix Edit and Delete showing for not owned Lists

Fix actions breaking when not logged in

Fix List options not showing

Lint

Shorten logic

Lint
2021-07-21 14:40:44 -04:00
infinite-persistence e5f32b21c4
Reaction-fetch: handle "no results"
If there are no API errors but no reactions returned, consider the requested IDs as "done" and stop requesting again. When a channel is being confirmed, Commentron doesn't return the reaction object.

Also added extra guard in case Commentron does return an object in the future, but an empty one.
2021-07-20 15:22:51 +08:00
zeppi 9b03f5a1d0 more 2021-07-19 13:52:15 -04:00
zeppi 1d021fc8e0 more 2021-07-19 13:52:15 -04:00
infinite-persistence abe32e5f5c
Revert "Reactions: consider failures as "fetched""
This reverts commit 84a2a74c8c.
2021-07-18 10:55:11 +08:00
Anthony 7bb5df97fd Stripe 2
show visible card and add remove card button

show your transactions even if you dont have a card

fix presentational issues

show your transactions even if you dont have a card

fix presentational issues

add link to channel section

update yarn

show donation location

add remove card modal still needs completion and also changed how stripe is used on settings stripe card page

add confirm remove card modal to router

move bank account stuff to settings page

move account functionality to settings page

continuing to move account transactions to settings

list transactions for creator

updating copy

touchup tip error

do a better job autofocusing

bugfix

show an error on the card page if api returns 500

building out frontend for comment tip

display dollar sign if its a fiat tip

more frontend work

more frontend work

more frontend bug fixes

working with hardcoded payment intent id

working but with one bug

bugfixed

add toast if payment fails

add add card button

cant get claim id but otherwise done

more frontend work

call is working

show fiat for livestream comments

add is fiat on comments

round and show values properly

dont allow review if tiperror

copy displaying properly

disable buttons conditionally properly

remove card button working

remove card working with a workaround by refreshing page

bugfix

send toast when tip on comment

jeremy frontend changes

only show cart on lbc
2021-07-17 13:19:33 -04:00
infinite-persistence 84a2a74c8c
Reactions: consider failures as "fetched"
In the event that Commentron returned an empty object, we'll end up re-requesting the same IDs again. Haven't seens this happen before, but since we don't know what's causing the spike, we'll just consider failures and "fetched" to stop the loop.

User can always click Refresh to repopulate the values.
2021-07-17 21:53:23 +08:00
infinite-persistence cb0222981c Reactions: switch from SDK to Commentron
## Issue
- Closes 6481 "Use Commentron for react.List, react.React calls".
- 5459 "Interact directly with commenting servers".
2021-07-16 13:41:41 -04:00
infinite-persistence a13708f4dd Handle the case of all replies are blocked.
In this scenario, `comment.List` does not return `comment`. I was expecting an empty array.

Handled accordingly.
2021-07-16 10:54:12 -04:00
infinite-persistence 08c701ba19 Restore comment pagination
This reverts commit e6addb8c2a, reversing
changes made to 47b594107a.
2021-07-16 10:54:12 -04:00
zeppi 637c01750a clean 2021-07-15 17:48:02 -04:00
zeppi b2b88b466e fix colon handling 2021-07-15 17:48:02 -04:00
zeppi 0e589c0401 bump 2021-07-15 17:48:02 -04:00
infinite-persistence a2a1ddb403
Revert "Comments Pagination #6390"
This reverts commit 16ef013025, reversing
changes made to fba8b89b3b.
2021-07-15 22:23:26 +08:00
zeppi d612b86a8c homepages v2
homepages served without cache

error catching

memo homepagedata

support auto limit

no more config pins
2021-07-14 14:09:46 -04:00
infinite-persistence 5742e1c2ca
Handle representation of blocked replies
## Issue
- `Comment.replies` currently represent all replies, while `comment.List` returns a filtered version, so the actual replies could be less.
- The actual replies is represented by `total_filtered_items`, but we only get that after making a fetch. So, users could click "Show more" but get nothing.

## Fix
- Stop showing "Show more" based on `total_filtered_items`.
- If there is a balance, display 1 dummy comment to represent all blocked replies. This handles the case of "Show more" being displayed but ended up with 0 replies if all replies were blocked.

## Future
Note that `Comment.replies` might be changed to represented filtered comments in the near future (refer to Beamer), so the GUI is made such that the dummy just won't appear when that change happens.
2021-07-14 15:11:44 +08:00
infinite-persistence 4731588a3c
Tell user when linked-comment is not available. 2021-07-14 13:00:26 +08:00
infinite-persistence f8bdd0704f
Handle temporary Commentron bugs
Can be removed when bugs are fixed, but would still work if left there.
2021-07-14 12:58:27 +08:00
infinite-persistence 0cf6fe3df5
Comments Pagination
## Issue
6158 - Support Comment Pagination
2021-07-14 12:58:25 +08:00
infinite-persistence b822ae39e1
Remove hardcoded filters in doSearch
## Issue
6414 <Don't use "exact match" setting outside of main search - cuases no results in related>

`doSearch` was used in Wunderbar and Recommended, but it was adding in Wunderbar options all the time.

## Changes
- Fix `doSearch` to not use hardcoded options (take from arguments).
- Refactors the searchOption-creation code so that we don't duplicate the logic in both .js and .jsx.
2021-07-14 11:16:19 +08:00
saltrafael 4bd5beb2f6 Fix notification bell toast 2021-07-12 11:03:11 -04:00
infinite-persistence 52cba611b3
Cleaned up notification constants
- Organized under an object.
- Removed old unused ones.
2021-07-08 11:21:24 +08:00
infinite-persistence 5769a27151
Fix slow mode error message
It won't work with the hardcoded value.

Still waiting for commentron (error code + data) enhancement. It's pretty weird having to parse the number, then add it back in.
2021-07-08 09:51:18 +08:00
Thomas Zarebczan 7175e40d61 update error message 2021-07-07 19:31:15 -04:00
infinite-persistence 26efe9fd45 Enable 'slow mode' in comments
## Issue
Sub item in <6119 Creator Settings: beyond "Muted Words">

## Changes
- Removed the existing 5s min gap on livestreams.
- Enabled the 'slow mode min gap' in Creator Settings

This change now affects both comments in claims and livestream comments.
2021-07-07 19:31:15 -04:00
zeppi 9af3380af7 use ENABLE_MATURE 2021-07-06 16:06:58 -04:00
infinite-persistence d1ee904dab Fix notifications "mark all" not working on Desktop
## Issue
6343
2021-07-06 12:10:03 +08:00
zeppi 59f0c85aca improve pending over refreshes 2021-07-05 10:22:13 -04:00
infinite-persistence 10c04a7991 Show comment failure reason
## Issue
6370
2021-07-03 13:07:05 -04:00
zeppi eed4793799 fix null claim on reactions selector 2021-06-25 16:29:58 -04:00
infinite-persistence 3db845b9bf
Allow creators to assign moderators from a comment context-menu. 2021-06-19 18:00:02 +08:00
infinite-persistence f02dcb7fe7 No need to resolve as the uri should have all we need 2021-06-19 10:44:28 +08:00
infinite-persistence b4b45ffbdc Commentron Moderation Delegation API 2021-06-18 15:46:51 -04:00
infinite-persistence d6ac2c7954 Comments: enable 'enable_comments' flag
## Issue
Closes 6159 "Support Comments Enabled/Disabled for comment.List API"

## New behavior
- `disable-comments` tag will block the comments component entirely.
- `settings.commentsEnabled`:
  - When false, will pause comment fetching, posting and replying.
  - Any already-fetched comments will stay on screen (unless user reloads/F5).
2021-06-18 15:46:51 -04:00
zeppi 42a9024ab8 youpos 2021-06-18 10:57:19 -04:00
zeppi 2268ab01fb app works when id api fails 2021-06-18 10:57:19 -04:00
zeppi 03e921e6df use commentron for live view counts 2021-06-17 14:58:55 -04:00
saltrafael 3cd2548206 delete repost 2021-06-15 13:47:56 -04:00
saltrafael 2aaa9f358b Additional pop up menu options 2021-06-15 13:47:56 -04:00
zeppi ca116ba010 wip
wip

wip - everything but publish, autoplay, and styling

collection publishing

add channel to collection publish

cleanup

wip

bump

clear mass add after success

move collection item management controls

redirect replace to published collection id

bump

playlist selector on create

bump

use new collection add ui element

bump

wip

gitignore

add content json

wip

bump

context add to playlist

basic collections page style pass wip

wip: edits, buttons, styles...

change fileAuthor to claimAuthor

update, pending bugfixes, delete modal progress, collection header, other bugfixes

bump

cleaning

show page bugfix

builtin collection headers

no playlists, no grid title

wip

style tweaks

use normal looking claim previews for collection tiles

add collection changes

style library previews

collection menulist for delete/view on library

delete modal works for unpublished

rearrange collection publish tabs

clean up collection publishing and items

show on odysee

begin collectoin edit header and css renaming

better thumbnails

bump

fix collection publish redirect

view collection in menu does something

copy and thumbs

list previews, pending, context menus, list page

enter to add collection, lists page empty state

playable lists only, delete feature, bump

put fileListDownloaded back

better collection titles

improve collection claim details

fix horiz more icon

fix up channel page

style, copy, bump

refactor preview overlay properties,
fix reposts showing as floppydisk
add watch later toast,
small overlay properties on wunderbar results,
fix collection actions buttons

bump

cleanup

cleaning, refactoring

bump

preview thumb styling, cleanup

support discover page lists search

sync, bump

bump, fix sync more

enforce builtin order for now

new lists page empty state

try to indicate unpublished edits in lists

bump

fix autoplay and linting

consts, fix autoplay

bugs

fixes

cleanup

fix, bump

lists experimental ui, fixes

refactor listIndex out

hack in collection fallback thumb

bump
2021-06-08 13:25:52 -04:00
infinite-persistence 15015dacd7 Performance: don't spread in 'reduce' 2021-06-02 08:21:43 +08:00
infinite-persistence 8da7ddf6e6 Parallelize 'channel_sign' calls.
## Issue
If the account has lots of channels, each channel name was sequentially signed, delaying the final action.
2021-06-01 13:39:53 -04:00
zeppi a6e76bab31 fix: ignore flow linter promise allsettled 2021-05-27 12:17:23 -04:00
infinite-persistence f8e1274c38 Fix broken Comments API due to surfacing of error
## Issue
The "Muted Words" PR elevated Comment-API errors so we can handle it (previously, it goes unnoticed). This broke the other Comment functions because the spammer mitigation might return an error, causing `Promise.all` to bail early.

## Fix
Changed to `Promise.allSettled` and reconstructed the results. This will make it equivalent to the code prior to the "Muted Words" PR.
2021-05-27 00:54:12 -04:00
infinite-persistence 06c6018047 Creator Settings now require a minimum staked LBC. 2021-05-26 15:38:29 -04:00
infinite-persistence 8050fa24b2 Relay and beautify 'blocked words' error message 2021-05-26 15:38:29 -04:00
infinite-persistence 54b17ee739 Commentron Settings API 2021-05-26 15:38:29 -04:00
Sean Yesmunt 3808c61148 fetch notofication/categories for notification types dropdown 2021-04-30 12:45:46 -04:00
zeppi b9fc9b6319 allow unsubscribe from deleted channels by navigating from sidebar 2021-04-30 11:06:34 -04:00
Sean Yesmunt d4fa45b257 fix hyperchat size when thumbanil is gif and fix totalAmount calculation 2021-04-26 00:32:52 -04:00
Sean Yesmunt 0c71059bf0 fix comment websocket from connecting more than once per claim 2021-04-23 16:58:23 -04:00
Sean Yesmunt 6d89f0df7e hyperchats 2021-04-23 16:20:17 -04:00
zeppi bd62a55608 review 2021-04-23 14:51:09 -04:00
zeppi f3463ebdeb use redux for livestream claim setup 2021-04-23 14:51:09 -04:00
Sean Yesmunt 0653dbde04 update notification websocket to sockety 2021-04-21 20:18:25 -04:00
Sean Yesmunt 13b6cc413b add category param 2021-04-21 11:19:23 -04:00
infinite-persistence bcbb1c8185 Add 'ReportContent' actions/reducers/selectors 2021-04-21 10:49:31 -04:00
Sean Yesmunt dad75f76bd new comment websocket url 2021-04-20 14:28:45 -04:00
Sean Yesmunt a841fd6206 fix typo 2021-04-19 15:55:11 -04:00
zeppi 1b6c217226 support brazilian portugese 2021-04-16 11:16:25 -04:00
Sean Yesmunt 942c85c9f1 Reconnect when comment websocket loses connection 2021-04-14 00:08:19 -04:00
jessopb 989126c603
Feat publish replays on master (#5863)
* provide livestream replay publish via url
2021-04-14 00:06:11 -04:00
infinite-persistence f94f98e0f3 ViewPastSwaps: limit to 10 entries + other fixes
(1) Due to IAPI/commerce query limit, and also to not pollute the wallet with infinite chargeCodes, we'll only show the last 10 swaps. Beamer mentioned that it's possible to tracked back the past chargeCodes of the user, and potential provide a `list` endpoint to handle disputes.

(2) If a user explicitly removed an entry, don't repopulate that entry even if websocket returned an updated status for it. While it might be useful to handle accidental removals, it looks weird when the list gets repopulated with 'Expired' entries.

(3) Add sanitization when repopulating the chargeCodes from the wallet data (i.e. remove 'null' entries).

(4) Always repopulate the list per wallet data so every instance looks the same.
2021-04-13 14:02:25 -04:00
infinite-persistence 7cf5c1f6fe CoinSwap: websocket + multi-coin
- For the active swap, switch from polling to websocket. The returned data is now the Charge data from the commerce, so some parsing will be required.

- Allow the user to send other coins that the commerce supports.

- Only save the 'chargeCode' to the wallet. The other data can be repopulated from this.

- Store the receipt currency. I'm not sure if the commerce supports sending bits from various coins. Take the coin that came with the 'COMPLETED' message for now.

- Fix 'lbc' calculation to match IAPI side.

- Allow users to see full detauls from "View Past Swaps".

- String cleanup

- GUI cleanup.
2021-04-13 14:02:25 -04:00
infinite-persistence d1e83fcee2 Run doNotificationSocketConnect for CoinSwapStatus 2021-04-13 14:02:25 -04:00
infinite-persistence b2630f6f21 Save entire swap info instead of just the address.
- Users should be able to see the entered and promised amount, otherwise they might forget how much to send over.
- This change also prepares for the future upgrade to support multiple coins.
2021-04-13 14:02:25 -04:00
infinite-persistence 9c808e2b5e Implement Swap BTC page 2021-04-13 14:02:25 -04:00
seanyesmunt f5125b25c2 update livestream eligibilty
add CHANNEL_STAKED_LEVEL_LIVESTREAM to config set to level 5
use odysee_live_enabled tag on users insead of experimental_ui
2021-04-12 11:17:17 -04:00
infinite-persistence b8ec0c9967 Augment doNotificationList to get a filtered list.
Initially, the filtered list was done at the component level, and the list was simply a subset of `notifications`. But due to the limit issue explained in 5694, we now query the filtered list instead.

Considerations:
- The filtered list could contain items not listed in the 'All' list. We could add a string at the bottom of 'All' that says "not all items retrieved" if this confuses the user.
- The unseen count needs to be based on 'All' and not the filtered one, so that data needs to be stashed somehow (can't re-use the array).

Use 2 arrays for now instead of trying to accumulate "all" and "filtered" into 1 array.
2021-04-08 14:28:21 -04:00
infinite-persistence 8111b8d9dc Only concatenate results if 'from !== 0' 2021-04-07 12:08:17 -04:00
infinite-persistence 855ae15a27 Search: infinite scroll 2021-04-07 12:08:17 -04:00
seanyesmunt 0d41e6d88d Revert "Simplify language lists"
This reverts commit 27d43b2b41.
2021-04-06 15:42:27 -04:00
Stefan Sundin 039264531f Add 24-hour clock setting. 2021-04-06 13:00:10 -04:00
Sean Yesmunt 64928213bf fix websockets not reconnecting
When it gets closed, even for errors, it doesn't always go into Socket.onerror. Add the reconnection logic back to just onclose (like it was before)
2021-04-05 14:33:37 -04:00
zeppi 9468f2b0f2 update master with some odysee changes 2021-04-05 13:26:52 -04:00
infinite-persistence 81e4730037 Simplify language lists
- SUPPORTED_SUB_LANGUAGE_CODES[] that I introduced was pretty redundant when SUPPORTED_LANGUAGES[] already hold the information. The logic to ignore sub-languages (i.e. reduce the locale's "en-GB" to "en" is now located in getDefaultLanguage()).

- SUPPORTED_BROWSER_LANGUAGES[] and SUPPORTED_LANGUAGES[] look so similar and hard to tell what the former is for at first glance. The functionality to map 'zh-CN' to 'zh-Hans' is now handled by resolveLanguageAlias(), which makes the intention clearer.

This leaves us with a single list -- SUPPORTED_LANGUAGES[], whose key also tells us the desired language code to use.
Also, clients now need to call `resolveLanguageAlias` to map any language code aliases, as they differ depending on how it is queried (e.g. `navigator.language` vs. `app.getLocal()` uses different standards).

I think we no longer need to explicitly migrate existing user's 'zh-CN' into 'zh-Hans' because the rest of the system will always use the desired language code as long as 'resolveLanguageAlias' is called appropriately. e.g. the system uses `selectLanguage` and `selectLanguage` calls `resolveLanguageAlias`.
2021-04-04 22:54:33 -04:00
infinite-persistence f0d0992d20 Fix broken video embed
## Issue
Closes 5811: Video-embed in markdown-post is broken

- Revert "Fix 'makeSelectIsPlaying' to look at 'playing' instead of 'primary'." dabdc980a1.
- Revert "Fix 'isPlaying' to reflect 'playing' instead of 'primary' URI" 351890decf.

Reverting means "Deleting MD from downloads list causes spinning icon to run forever 4959" gets re-opened, but this is a way less severe issue to leave in.
2021-04-02 14:44:22 -04:00
infinite-persistence d279d70770 Fix autoplay in floating mode
Closes 5000: AutoPlay in Floating Player only works one time

Factor out the code that queries the recommendation. It needs to be called in two places:
(1) `RecommendedContent` - need to cover the case of floating player + visit another video page.
(2) When video is floating and autoplayed the next video.
2021-04-02 14:35:18 -04:00
jessopb 9cd86be04f
use show mature selector (#5803) 2021-03-31 16:55:26 -04:00
zeppi ad10250e16 review changes 2021-03-26 18:43:09 -04:00
zeppi 9e86cab4eb fix livestream redirect to dashboard 2021-03-26 18:43:09 -04:00
zeppi 33c325031d check simplesite for notifications 2021-03-25 15:54:30 -04:00
Sean Yesmunt 64e8c8e095 use comment component for livestream comments 2021-03-25 15:08:05 -04:00
zeppi 4269a63f62 no mature on simple site 2021-03-25 01:56:21 -04:00
zeppi 81b9b0d801 copy for buttons and modals for livestream
redirect on success to dashboard
2021-03-24 13:36:50 -04:00
Sean Yesmunt dcd0528fda disconnect from comment websocket when leaving livestream page 2021-03-22 15:30:14 -07:00
Sean Yesmunt 3644eed49b fix first livestream comment not being displayed 2021-03-22 15:30:13 -07:00
Sean Yesmunt 73f593ddb3 bring in livestream changes from odysee 2021-03-22 15:30:01 -07:00
infinite-persistence ede83f358d Fix autoplay infinite loop
## Issue
Closes 3661: Autoplay + Related go into loops ( infinite ) sometimes

## GUI
Push the actual "next" item into the top of the list.

## History search
1. Skip if the next item is itself.
2. The URL stored in the history comes in various forms, so a direct comparison won't work.
  - There's also a weird case where the URL differs by just a little (p.09 vs p-09), but with the same claim ID:

lbry://vacuum-tube-computer-p.09-–-building#5212bc8bc63c373e2bf1ebc5b765595ed7b6514d
lbry://vacuum-tube-computer-p-09-–-building#5212bc8bc63c373e2bf1ebc5b765595ed7b6514d

Check the claim_id as well to cover cases like these.
2021-03-21 20:15:33 -04:00
infinite-persistence 1e4c79cf06 Don't clear all notifications when only 1 is clicked.
## Issue:
Closes 5515: All videos marked as read when clicking a single notification from notification list

## Change:
- Augment `doReadNotifications` to only clear the given IDs. If the argument is `null` or is not a valid array (e.g. when used as a click handlers, the click event object is passed in), all notifications will be cleared.

- Augment `NOTIFICATION_READ_COMPLETED` to only clear the given IDs.

## Notes:
- Wasn't sure of the API will fail if the ID is invalid, so I start from `unreadNotifications` first, then only filtering it further with the given ID. Otherwise, we could just skip the `unreadNotifications` filtering.
2021-03-08 11:41:04 -05:00
infinite-persistence 2e49421960 Lint - separated commit to make the next diff clearer 2021-03-08 11:41:04 -05:00
Sean Yesmunt 84bab875bc improve mobile style and initial blocked screen loading 2021-03-05 16:51:38 -05:00
Sean Yesmunt ea74a66dbd
New moderation tools: block & mute (#5572)
* initial support for block/mute

* hide blocked + muted content everywhere

* add info message for blocked/muted characteristics

* sort blocked list by most recent block first

* add 'blocked' message on channel page for channels that you have blocked

* cleanup

* delete unused files

* always pass mute/block list to claim_search on homepage

* PR cleanup
2021-03-03 13:50:16 -05:00
infinite-persistence 94fe68eb45 Fix URI comparison in 'doDeleteFileAndMaybeGoBack'
## Issue
4959: Deleting MD from downloads list causes spinning icon to run forever

5077: player doesn't close when video deleted
2021-02-25 15:38:04 -05:00
infinite-persistence dabdc980a1 Fix 'makeSelectIsPlaying' to look at 'playing' instead of 'primary'.
## Issue
4959: Deleting MD from downloads list causes spinning icon to run forever

5077: player doesn't close when video deleted
2021-02-25 15:38:04 -05:00
infinite-persistence 891207df3d Lint
Separating out the lint fixes just to make the next commmit clearer.
2021-02-25 15:38:04 -05:00
zeppi 05740cad75 send perm url for referrals 2021-02-25 14:44:40 -05:00
Sean Yesmunt 09b689ba1c add channel staked amount indicator on channel thumbnails 2021-02-18 01:14:39 -05:00
Sean Yesmunt 1f117e43bd add initial support for comment API outside of SDK 2021-02-11 10:45:34 -05:00
Sean Yesmunt db87125dc8 refactor 'active' channel usage across the app 2021-02-11 10:45:34 -05:00
zeppi 6a16d8e0cd fix bad lighthouse results 2021-01-28 15:35:15 -05:00
infiinte-persistence 912489cce0 Make zoom level persistent on Desktop
- uses local storage.
- for 'web', the browser is already handling that.
2021-01-26 10:20:59 -05:00
zeppi 2adfa8b6b6 sync again 2021-01-25 10:39:40 -05:00
jessopb 2f1fae23cf
vanity referrals (#5353) 2021-01-22 10:47:21 -05:00
zeppi 6ed103b33f shorter timeout 2021-01-19 13:41:10 -05:00
zeppi a2d93bc7cc fix embed loading hang 2021-01-19 13:41:10 -05:00
infiinte-persistence 95b4f89e50 Make 'playback rate' persistent
## Issue
5308: Ability to choose default play speed and theatre mode or regular playback size

## Comments
Initially, I used the local storage, as per 'muted' and 'volume' -- I thought that would be appropriate.
Later, I saw that Theater Mode is already using Client Settings, so I re-did everything to match that.

Also, there is an accompanying commit in lbyr-redux.
2021-01-19 10:16:46 -05:00
zeppi ccd13f2233 put auth in progress back with timeout 2021-01-15 10:40:34 -05:00