Commit graph

4464 commits

Author SHA1 Message Date
zeppi
e55cae9496 fix top on search page 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
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
zeppi
2d008899b6 clean up file page and reactions 2021-10-16 16:42:29 -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
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
saltrafael
620de2e6b7
Batch resolve replies 2021-10-11 08:35:50 +08:00
saltrafael
cafefb2a33
Refactor commentsReplies 2021-10-11 08:35:50 +08:00
saltrafael
f7cb39c496
Batch resolve comment list channels 2021-10-11 08:35:49 +08:00
infinite-persistence
9d48d9924d
Comments: expand replies for LC chain before mount instead of after
## Issue
40 Linked comments doesn't scroll for deep replies

## Notes
Don't need an effect for this, plus it was causing the parent to not pick it up for auto-scrolling.
2021-10-09 15:38:38 +08:00
Thomas Zarebczan
fc657d98d2
Sync language 2021-10-08 16:21:50 -04:00
Thomas Zarebczan
eaa32e4df4
Odysee references revamp, part1 2021-10-08 15:22:07 -04:00
infinite-persistence
b455e807bc
Disable timestamp parsing in livestream chat
## Issues
- The current version of the link handler doesn't seem able to control the livestream player's position.
- The "live" position is always 0:00 and everything behind it is a negative timestamp. The current timestamp parser doesn't handle negative values.
2021-10-08 17:59:05 +08:00
Thomas Zarebczan
88794761d0
use thumbnails.odysee.com
f
2021-10-07 16:38:59 -04:00
mayeaux
e3791aefdc
Send video bitrate and user bandwidth to Watchman (#7145)
* adding functionality to detect user download speed

* calculating bandwidth speed more intelligently

* saving download speed and updating it every 30s

* all the functionality should be done needs testing

* fix linting

* use a 1mb file for calculating bandwidth

* add optional chaining plugin to babel and get bitrate from texttrack

* allow optional chaining for flow

* ignore flow error

* disable bandwidth checking functionality

* fix flow error
2021-10-06 14:59:33 -04:00
zeppi
b44be39252 move file actions from lbry-redux 2021-10-06 10:22:49 -04:00
jessopb
4bc4a965d9
fix notifications page on unauthed app (#7226) 2021-10-06 10:13:37 -04:00
infinite-persistence
0be3154cbe
Fix playlist strings 2021-10-06 08:39:05 +08:00
Branko Tomic
a04c69f787 Prevent comment content from breaking the layout on mobile 2021-10-05 09:55:14 +08:00
saltrafael
256ed6a106
Remove expand/collapse from channel discussion page 2021-10-05 09:19:56 +08:00
saltrafael
fc2e08c882
Refactor commentsList 2021-10-05 09:19:56 +08:00
Dan Peterson
905a52ea61
adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213) 2021-10-04 09:21:59 -04:00
saltrafael
d6e14b84db
Add copy comment link menu option (#7224) 2021-10-04 09:20:37 -04:00
saltrafael
2ba6023926
Fix spacing / centering live stream + comments section (#7225) 2021-10-04 09:19:52 -04:00
zeppi
f7b942fa42 patch hubs claims_in_channel temporarily 2021-10-02 14:01:22 -04:00
zeppi
d54976e461 patch creator analytics with hub without channel claim count 2021-10-02 13:29:46 -04:00
Thomas Zarebczan
aa0db24d0d
Temp workaround claims in channel count 0 2021-10-02 11:48:45 -04:00
Thomas Zarebczan
1cb0461991
Temp workaround SDK 0 count 2021-10-02 11:44:25 -04:00
infinite-persistence
11c9a53872
Fix 'pinnedUrl' error.
Part of "6989 Fix console spam in dev"

EXTRA_SIDEBAR_LINKS should be a `SideNavLink` object, so trim down the return object from `GetLinksData`.
2021-10-02 15:08:19 +08:00
jessopb
4c72a563da
Update icons.js 2021-10-01 13:41:00 -04:00
saltrafael
56817d4e69
Fix resolving invalid claims (#7210) 2021-10-01 12:00:57 -04:00
infinite-persistence
de6c6f9bfd
List own comments (#7171)
* Add option to pass in url-search params.

Impetus: allow linked comment ID and setting the discussion tab when clicking on the `ClaimPreview`.

* comment.list: fix typos and renamed variables

- Switch from 'author' to 'creator' to disambiguate between comment author and content author. For comment author, we'll use 'commenter' from now on.
- Corrected 'commenterClaimId' to 'creatorClaimId' (just a typo, no functional change).

* doCommentReset: change param from uri to claimId

This reduces one lookup as clients will always have the claimID ready, but might not have the full URI.

It was using URI previously just to match the other APIs.

* Add doCommentListOwn -- command to fetch own comments

Since the redux slice is set up based on content or channel ID (for Channel Discussion page), re-use the channel ID for the case of "own comments". We always clear each ID when fetching page-0, so no worries of conflict when actually browsing the Channel Discussion page.

* Comment: add option to hide the actions section

* Implement own-comments page

* Use new param to remove sort-pins-first.

comment.List currently always pushes pins to the top to support pagination. This new param removes this behavior.
2021-10-01 08:10:27 -04:00
infinite-persistence
c71b90cecf
Fix linked-comment scrolling
I think this the best solution so far, at the expense of a slight delay in scrolling if the network call stalls.

- Added "fetching by ID" state so that we don't need to use the ugly N-retries method.
- `scrollIntoView` doesn't work if the element is already in the viewport, and the `scrollBy` adjustment doesn't take into account the y-position restoration that we perform on certain type of pages. Use `window.scrollTo` instead and taking into account current scroll position.
2021-10-01 15:51:05 +08:00
infinite-persistence
2cebdc3113
Fix wrong 'recsysId' sent due to search-key mismatch
## Issue
.../archives/C02FQBM00Q0/p1633044695010600

## Changes
When querying a search key, it has to be an exact match. This was broken by the insertion of `free_only` in the fetch.

Added a function to generate the options, so that all clients stay in sync.
2021-10-01 10:46:26 +08:00
infinite-persistence
dd7c56a324
i18n - ChannelMention and other fixes 2021-10-01 08:12:37 +08:00
saltrafael
2f4dedfba2
Add Channel Mention selection ability (#7151)
* Add Channel Mention selection ability

* Fix mentioned user name being smaller than other text

* Improve logic for locating a mention

* Fix mentioning with enter on livestream

* Fix breaking for invalid URI query

* Handle punctuation after mention

* Fix name display and appeareance

* Use canonical url

* Fix missing search
2021-09-30 17:30:32 -04:00
saltrafael
81abae875f
Fix plant icon (#7195)
* Fix plant icon

* Also change phone icon name
2021-09-30 14:05:39 -04:00
Bradley Ray
819bdea0c6
fix playlist resolving collectionurls (#7178)
* fix playlist resolving collectionurls

* Update CHANGELOG.md

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
2021-09-30 09:03:50 -04:00
saltrafael
26f80b0ec5
Add icons (#7194) 2021-09-30 09:01:24 -04:00
infinite-persistence
0984fe8370
Fix page titles for SiteLinks
Part of `7166 improve search metadata`, where page titles are important clues for Google to generate Site-Links.
2021-09-30 14:47:18 +08:00
infinite-persistence
87636fc887
Commentron now includes replies for ByID request
Wasn't aware of that, and that was causing 7146 ("show replies" visible when there are no replies).
2021-09-30 09:22:21 +08:00
jessopb
fdd2d503d9
use homepage LATEST for following discover (#7185) 2021-09-29 15:22:46 -04:00
mayeaux
25b56ada48
Fix issue where channel upload viewcounts were creating a new line (#7154)
* fix issue where viewcounts were creating a new line

* conditionally add large view css

* conditionally apply class based on if view count should be shown

* last couple touchups

* clean up the css

* add scss to flow config

* add scss component to flow config
2021-09-29 15:04:43 -04:00
Branko Tomic
b1d4f119a7
Fix “Your Account” popup on mobile (#5652) (#7172)
* Fix “Your Account” popup on mobile (#5652)

* Update changelog

Co-authored-by: Branko Tomic <branko@spicefactory.co>
2021-09-29 11:20:36 -04:00
infinite-persistence
a8149fe9bb
Memoize 'mutedAndBlockedChannelIds'
It was being recalculated repeatedly.

This memoizes it, although it still re-calculates occasionally despite none of the source arrays changed. I think it is due to the state change in the Preference Sync.

Note: input selectors to `createSelector` needs to be extractions-only (i.e. must not have transformations). I think most of our `makeSelect*` selectors violate this and broke memoization.
2021-09-29 21:55:01 +08:00
infinite-persistence
b796ab3207
Fix missed render when blocklist is fetched
## Issue
7176

## Changes
Pitfalls of pausing render via React.memo:
  - We'll miss the `doClaimSearch()` since that is sparked by an `useEffect`.

Seems like we can't avoid having a redundant copy of the previously-displayed URIs.
2021-09-29 16:33:18 +08:00
saltrafael
ddc29ac853
Fix autoplay next default value (#7173) 2021-09-27 15:10:41 -04:00
infinite-persistence
78d0ff9793
Adjust comment fade-out height
## Issue
6944 Comment expansion sometimes doesn't reveal extra text (already showing everything)

## Fix
Reconcile some constants between JS and CSS.
2021-09-27 11:01:44 +08:00
infinite-persistence
3c0750a2a0
Fix homepage tiles not filtering blocked channels
## Ticket
7165 homepage queries don't take into account blocked channel ids (mute does)

## Changes
resolveSearchOptions: was not grabbing redux data correctly.
2021-09-25 13:14:08 +08:00
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
0e391a3d78
Comment: Swap the order of "Edit" and "Remove"
This order is more common.
2021-09-24 10:00:37 +08:00
infinite-persistence
65d7e478ac
Don't allow assigning yourself as moderator
Also fixed split-string (hard to localize).
2021-09-24 09:57:24 +08:00
infinite-persistence
6658217865
Restore "Stream Key Button (#7127)" + lint and modifications
- Consolidate functionality into existing component.
- Use proper strings.
2021-09-23 20:13:02 +08:00
infinite-persistence
8bc8c4bcae
Revert "Stream Key Button (#7127)"
I forgot to lint before merging. Reverting for now, will fix in a bit.

This reverts commit 5c8878353f.
2021-09-23 17:57:49 +08:00
GG2015
5c8878353f
Stream Key Button (#7127)
* Added streamkey button.

* Added streamkey button.

* Updated changes

* Removed unused code.

* Removed copyableStreamkeyUnmask component.

* Rewrote StreamKeyMask to enableMask/enableMaskType

* Updated changelog and bumped version to 0.51.3

* Reverted changes

* Updated to correct area.

* Renamed CopyableText to CopyableStreamKey

* See commit notes.

* Fixed Show/Hide button
2021-09-23 14:17:59 +08:00
saltrafael
de6eb99d41
Fix channel name issue (#7153) 2021-09-22 11:28:32 -04:00
jessopb
8a277e767a
revert embedNoEnd and modify preferEmbed end display (#7144) 2021-09-21 12:47:56 -04:00
infinite-persistence
aefa889ee4
Embed: add replay button + msg resizing (#7141)
* Embed: add replay button

Also, changed "Rewatch or Discuss" to "Discuss + external arrow" since there is a dedicated re-watch button.

* Embed: resize "ended message" based on container height
2021-09-21 11:48:05 -04: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
infinite-persistence
fcea4005eb
Fix incorrect context for 'New' string 2021-09-21 16:48:20 +08:00
infinite-persistence
31523d769a ClaimPreviewTile: render optimization
The `Date` object and blocklist arrays causes unnecessary render since their references are always different in the shallow-compare.
2021-09-21 09:15:41 +08:00
jessopb
432c40fb0c
embed preferred no end (#7138) 2021-09-20 18:37:27 -04:00
jessopb
7303abcda6
fix (#7137) 2021-09-20 17:06:55 -04:00
Alexander Schrier
eca9b2fcbf
Fix theater mode layout on small and medium screens (#7108)
* Fix theater mode layout on small and medium screens

* Make comments expandable on medium screens
2021-09-20 10:20:28 -04:00
infinite-persistence
0fc9cb9e73
Disable adv filters in "Find channels to follow" (#7130)
## Issue
7118 advanced filtering adjustments for channel related context
2021-09-20 10:19:34 -04:00
infinite-persistence
a199432b5c
Fix view-count showing up in non-Channel pages
## Issue
If you navigated to a Channel Page and returned to the homepage (or any page with ClaimPreview), the view-count is shown because we have that data.

## Fix
Instead of passing props around through the long "list" component chain (`ChannelContent -> ClaimListDiscover -> ClaimList -> ClaimPreview`) to indicate whether we should display it , just check the pathname at the lowest component level;  I believe eventually we would display it everywhere anyways, so this we'll be the easiest to clean up.
2021-09-20 09:28:58 +08:00
jessopb
6ca058c3a1
support embed preference (#7114)
* support embed preference

* title color
2021-09-18 10:23:30 -04:00
saltrafael
1c59913e7a
Recommended changes (#7089)
* Fix floating

* Change makeSelectRecommendedContentForUri behavior
2021-09-16 16:00:44 -04:00
infinite-persistence
f251ad999e
Handle view_count formatting on old browsers
## Issue
7102 Failed to initialize numberformat on some browsers

## Changes
Just revert to the non-SI notation (but still locale aware) for browsers that does not support the `compactDisplay` option.

I thought of adding an English-only abbreviation for that corner-case, but I think it's not worth the effort maintaining. There are worse issues happening on older browsers, such as icons not aligning properly in buttons and functions that require polyfilling.
2021-09-16 17:11:09 +08:00
Alexander Schrier
5d06d4e254
Fix dropdown caret spacing (#7096)
* Move dropdown caret away from edge

* Set dropdown padding-right to spacing-xl
2021-09-15 15:18:17 -04:00
infinite-persistence
d1c74ec997
Revert "Use SI notation for view_count ... bbcdcfe4"
It is breaking in old Safari 10. Revert for until; will get to a cleaner solution later.
2021-09-15 23:30:43 +08:00
jessopb
91fbd615e2
fix embed end logo (#7106) 2021-09-15 11:28:45 -04:00
jessopb
21ba7840ca
refactor collection thumbs and fix list channel updates (#7095)
* refactor collection thumbs

* collection update handle channels

* collection update handle channels more better

* bugfix
2021-09-15 10:11:01 -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
infinite-persistence
3e6743f3f4
Fix missing localization macro during refactoring
## Issues
https://discord.com/channels/362322208485277697/646840786662719488/887345736033918997

## Changes
I meant to only add the macro at the client call during the refactoring, but forgot.

Having said that, I now think it's cleaner to put the macro where it is defined, and it's easier for Translators to find, so I added the macro in the definition instead of at the client call.
2021-09-15 10:12:24 +08:00
infinite-persistence
9d1ff4e8ae
Wunderbar: fix popup dismissed despite a child is in focus
## Issue
1. Type something in the wunderbar.
2. While the spinner is running, press Tab to focus on "View results" button.
3. If the spinner is still running, the entire popup gets dismissed (it should not). If the spinner isn't running, the popup stays active.

## Change
It was explicitly dismissed when the <input> loses focus. It shouldn't do that if any child of the popup is in focus.
2021-09-14 15:07:30 +08:00
infinite-persistence
939d26801a
Wunderbar: re-arrange static buttons to the top
## Issue
7075 Move "explore tags" to a stable position

## Changes
Move the buttons in the suggestions popup to the top row so that it's position won't be constantly changing depending on the number of results.
2021-09-14 15:07:30 +08:00
jessopb
20bd9644e9
Revert "fix recommended follows (#7081)" (#7085)
This reverts commit b83fe995c5.
2021-09-13 15:50:28 -04:00
jessopb
b83fe995c5
fix recommended follows (#7081) 2021-09-13 12:48:17 -04:00
saltrafael
69def916a8
Fix list thumbnail upload (#7074)
* Bump redux

* Fix thumbnail upload

* Update changelog
2021-09-13 11:40:31 -04:00
infinite-persistence
d5e8f2d18c
Fix scrollbar in upgrade modal (#7076)
## Issue
5848 Remove scroll-bar in update prompt

## Changes
- Make scrollbars appear only when necessary.
- Style the scrollbar. Similar to other areas, we skip this for Mac (can't recall why we need to skip).
2021-09-13 11:35:26 -04: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
30fedf6b45
Channel Page: enable filters; add "sort by" filter (#7069)
* Sort props to clarify "client vs. redux". No functional change.

* ClaimListHeader: remove SIMPLE_SITE gating

* Channel Page: enable filters; add "sort by" filter.

## Issue
7059 Add option to sort oldest first on channel page

## Changes
- Enabled filters for Odysee.
- Added a new "Sort By" filter, which will only appear for "New" ordering. It doesn't make sense for "Trending" or "Top".
2021-09-13 11:23:53 -04:00
Alexander Schrier
67d9f3907f
Hide overflow on search suggestion thumbnails (#7067) 2021-09-13 11:21:46 -04:00
infinite-persistence
40ed8059b7
Fix jumpy ui when changing language
Closes 7070 Spinner at wrong location when changing language
2021-09-13 15:44:29 +08:00
infinite-persistence
c2a2068926
Sort props to clarify "client vs. redux". No functional change. 2021-09-13 15:02:45 +08:00
infinite-persistence
43564c8b45
Settings: use 'smooth' instead of 'instant' scroll.
With 'instant', it is not clear that we are actually scrolling within the existing page (not opening a new page).
2021-09-13 09:59:11 +08:00
infinite-persistence
bbcdcfe4c1
Use SI notation for view_count in tiles (locale aware) 2021-09-12 17:20:32 +08:00
jessopb
579230d135
Test langs (#7062)
* fix languages

* bump

* bump
2021-09-11 13:32:25 -04:00
infinite-persistence
be725639d3
Blocklist: don't show pagination widget when searching.
Also, re-use existing strings instead.
2021-09-11 21:16:42 +08: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
40a82838b6
Fix collection delete breaking 2021-09-11 08:14:32 -03:00
infinite-persistence
2277d89f64
Add missing strings 2021-09-11 10:55:57 +08:00
infinite-persistence
f5fb5c87c4
Fix i18n word used as variables.
This is the same as concatenating strings, which we must avoid. It will be hard for translators to handle as they see strings as individual entries, not programmable strings. Untranslated variable values are fine.

https://www.linkedin.com/pulse/internationalization-localization-tips-concatenation-daniel-neumann
2021-09-11 10:54:03 +08:00
infinite-persistence
058b8f82ab
i18n + Fix autoplay string
- Rephrased the autoplay help text (https://discord.com/channels/362322208485277697/646840786662719488/885903447243780096)
- Weekly i18n update.
2021-09-11 10:54:02 +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
Thomas Zarebczan
f6683d3c49
re-enable views for now 2021-09-10 13:25:53 -04:00
infinite-persistence
345d9e76b5
Blocklist: paginate + search (#7055)
* Paginate: add option to disable history and url param

* Refactored blocklists into `BlockList`; no functional change

Reason:
- With each list (Personal, Admin, Mod, Muted), there's a bunch of useEffects and variables needed to handle the state. All of them are doing 99% similar things.

* Paginate blocklists

6834

* Improve 'moderator-block' list visuals

- Added "Blocked on behalf of" to make things clearer.
- Use smaller ClaimPreview for delegators to save space (there might be lots of delegators)

* Add search bar to BlockList

6834

- Only supports channel-name search, per 6834. Channel-title search would probably be too heavy on the client side.
- Fuzzy search is possible, but is too slow on huge lists. Ended up with a simpler `matchSorter.rankings.CONTAINS`, which I think would cover typical cases.
2021-09-10 11:36:08 -04:00
infinite-persistence
bc0a4bdeea
Fix missing and broken "Follow" button on reposts (#7056)
## Issue
6776 Missing follow button on channel reposts

- Missing:
    - Fix: For reposts, `parseURI` will fail to determine if it's a channel because the URL doesn't have enough info. Determine from the claim object instead.
- Not working in Channel Page:
    - Fix: The repost uri doesn't link back to the source channel, so we'll need to handle it.
2021-09-10 11:01:12 -04:00
infinite-persistence
8afab7dbba
Disable view_count on Channel Page due to layout (wrap) issue. 2021-09-10 16:59:01 +08:00
infinite-persistence
4259d6fc17
Consolidate keycode constants 2021-09-10 09:00:44 +08:00
saltrafael
160d8fe4b8
Make autoplay_next pushPrefs and set default value to autoplay setting (#7051) 2021-09-09 12:53:27 -04:00
mayeaux
737c06f33d
Fiat tip improvements (#7038)
* show error from backend properly

* cleanup code and add documentation

* persist active tab but force people to boost tab if it's on their own upload

* set tip lbc as default when none is saved in state
2021-09-09 12:52:03 -04:00
infinite-persistence
663ae2762f
Don't fetch view_count on empty list.
Also guard against null array.
2021-09-09 22:05:48 +08:00
infinite-persistence
093c427b83
Show content view counts on channel pages
## Issue
3587 Show content view counts on channel pages

## Notes
Limited to just "channel pages" for now as specified in the ticket.

Can be enabled for all claim previews, as long as there's an efficient spot to run the batch fetching. Either make `fetchViewCount` prop default to true, or add the parameter in places that need it.
2021-09-09 18:31:48 +08:00
infinite-persistence
89a0d5e597
Reorganize; no functional change 2021-09-09 17:09:28 +08:00
Anthony
afb352e3bb
change display of donations to chronological order 2021-09-08 22:25:49 +02:00
infinite-persistence
23f273356a
Explain that "Block" leads to modal with more options. (#7039)
## Issue
7035 Make it clearer that delegated mods can block via Block menu
2021-09-08 12:31:45 -04:00
infinite-persistence
de90d2fda6
Convert "moderator search" to use the new widget 2021-09-08 21:27:25 +08:00
infinite-persistence
d370cc37a8
SearchChannelField
- Factor out for re-use in upcoming Shared Blocklist
- Improvements:
    - Uses floating popup to show the suggestion/result rather than inline.
    - Users can now press Enter to select the suggestion, instead of having to use the mouse.
    - Users now don't need to enter '@' for channel names. They will still need to enter the full channel name, and disambiguate with claim_id if necessary.
    - Fix jumpiness in position as the user types.
2021-09-08 21:23:50 +08:00
infinite-persistence
2a3fa58e11
Swap "Moderator" and "Muted words" location.
Quick fix for the lack of scroll lines for the upcoming "moderator search popup". The proper fix would be to move the popup above the input when we are at the extreme bottom.
2021-09-08 21:22:08 +08:00
infinite-persistence
124aa90525
Fix Duration widget error-message logic
- It didn't remove the error msg when the input is cleared.
- It didn't update to the latest error msg if one already existed.
2021-09-07 16:12:22 +08:00
infinite-persistence
6a5ea5d3c6
Vertically center 'icon--help' (redo)
A better fix with extra specificity, since the main issue was with form-fields only. The previous fix was too wide and broke other areas with column flex.
2021-09-07 16:12:21 +08:00
infinite-persistence
a6ece46be4
Vertically center 'icon--help'
Reasons:
- Better symmetry.
- When used on a form-field label, the off-centeredness causes an extra offset at the top. Since the icon goes away when there is an input error, the form-field shifts a bit. (An alternative is to use a smaller icon, but I think size 16 is the best for legibility).
2021-09-07 14:43:26 +08:00
infinite-persistence
a227e6a979
i18n + vjs i18n fixes
- Reverted #7004 as it ended up preventing the rest of the components from being localized when there is an error. Replaced that with a `setLabel` that simply checks if the component exists before setting the label.

- Fix "Autoplay Next On" not localized on initial load -- it was only localized when the setting changes. It is unfortunate that we need to also set the label in an additional `useEffect` instead of just using vjs events, but so be it.
2021-09-07 10:34:28 +08:00
saltrafael
aceb8b89ce
Fix autoplay not saving (#7028)
* Fix autoplay not saving

* Bump redux
2021-09-06 13:33:53 -04:00
saltrafael
f246992615
Fix auto downloads (#7021) 2021-09-06 10:06:07 -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
jessopb
91ef5456de
Fix stale recsys and fix watchman uncaught promise when videoPlayer is not initialized (#7014)
* do not set stale recsys id

* no watchman send if videoplay not initialized
2021-09-03 11:29:23 -04:00
infinite-persistence
03d56d1445
#6872 Comment Moderation - time based bans 2021-09-03 22:42:26 +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
804edd3308
Restrict "Timeout" feature to content owners
The main reason to do this is because we are doing extra comment filtering using our blocklist (so that we don't see people we blocked regardless on who's content we are at), but we are also using a cached blocklist so we don't know when a Timeout will be lifted to allow new livestream messages. We will need Commentron Issue-80 to truly fix this.

For the case of when we are the owner of the content, we don't run the extra filtering (since it is equivalent to Commentron's filtering), hence the issue doesn't exist. Any new livestream messages received through websocket won't be locally filtered.
2021-09-03 22:36:55 +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
061e4ddd55
vjs: hide errors when updating i18n (#7004)
## Issue
6989 console errors and warnings are getting out of hand!

## Notes
This method was previously criticized in 5643. But given that no better solution has been submitted after a long while, nor is there a new solution for doing i18n, I'm reviving it again. It'll be no worse from the status quo.

Despite try-catch being overkill, I think the code-clarity outweighs the performance issues (if any, in the first place). Also, we are only suppressing the error in a very specialized function which even if it fails, will simply be a no-op and the GUI falling back to English.
2021-09-02 12:38:58 -04:00