Commit graph

932 commits

Author SHA1 Message Date
Rafael
b693925fe5 Fix missing uri param for fetchReplies 2022-04-27 08:50:23 -04:00
infinite-persistence
d6a395f9a8 Fix 'content=any' not producing Channels in result
## Issue
1378
> "Content Type: Any" uses `claim_type: [streams, reposts, channels]`,  with `stream_types: ["video", "audio"]`, so channels aren't returned, and not any types of streams either.  Probably shouldn't have `stream_type` filter there.
(This also happens in categories, but maybe wanted in there?)

## Root
Due to this line in `ClaimListDiscover`:
`defaultStreamType = SIMPLE_SITE ? [CS.FILE_VIDEO, CS.FILE_AUDIO] : undefined, // add param for DEFAULT_STREAM_TYPE`

Wanted to check if this fallback was meant for Categories only or any list, but the git history is not preserved because Odysee was a squashed single-commit back in the `SIMPLE_SITE` days.

## Change
Will assume it was meant for Category Page only and moved that line from the component and into the client-side.

This also means that clients of `ClaimListDiscover` without `streamTypes` and `defaultStreamTypes` defined will no longer have `stream_types: ['video', 'audio']` as the automatic fallback (they must define `defaultStreamTypes` themselves). I think this modal is clearer -- it doesn't make sense to have filters like "content=any" but overridden quietly to `video|audio`.
2022-04-27 08:32:30 -04:00
infinite-persistence
1ad66fccd0 Category: Hide "Repost" from ContentType filter, except for WildWest
## Ticket
1368
> can we remove the repost filter option on categories outside of wildwest/following?

## Approach
Using `context` to:
- reduce the amount of files that need to change.
- avoid prop-drilling.
- allow the ability to dynamically define the Filter's allowed values in a contained manner.

Clients that don't need customization simply does not need to wrap their component with the context.

The context only contains Content Type for now, but can include anything that future clients need to dynamically adjust.
2022-04-25 08:49:46 -04:00
Rave | 図書館猫
56a7ad47c4
Design patch 2022-04-25 (#1392) 2022-04-25 10:10:45 +02:00
infinite-persistence
20b5653f95
Fix missing repost ribbon for Tags
Ribbon:
- hide: category pages, except Wild West
- show: Following, Tags, Wild West
2022-04-25 09:42:46 +08:00
infinite-persistence
e4a88a5e9b SearchInLanguage: honor user's setting before category's setting.
## Ticket
Part of 1368 ("if user overrides the category homepage language with a different language setting + use 'search this language' option, use that instead. It's not typical this will happen, but probably expected.")

## Change
- Refactored to move more logic into `resolveLangForClaimSearch`
- Replaced the ternary version to make it more readable (hopefully).
- Inverted the language filter precedence by honoring the user's setting first.
  - Note: for both User and Category, URLSearchParams will always take precedence.
2022-04-22 09:39:23 -04:00
infinite-persistence
6651663a00
Discover: fix release_time for Tag and Wild West
- I got the previous logic completely wrong.

- Wild West's release time now comes from the homepage definition, but since the definition currently does not support "start of week", continue to hardcode the customization here.

- This logic also fixes the release_time for Tags.
2022-04-22 18:01:18 +08:00
Rave | 図書館猫
126ecd38fa
Fix theater mode related issues (#1377)
* Adjust theater mode and image pages
2022-04-21 09:31:58 +02:00
Thomas Zarebczan
8144a9bb87 livestream new api
Re-used lots of Anthony's code + made fixes to a few areas including the publish page.

a

new videojs

video.js@7.18.1 + http-streaming@2.14.2

remove console log
2022-04-20 15:53:28 -04:00
infinite-persistence
e64d661dcd
Support not_channel_ids through Category definition
Mainly only useful for Wild West, which doesn't use `channel_ids` (otherwise, the homepage maintainer could just exclude the id from `channel_ids` directly).
2022-04-20 22:56:16 +08:00
infinite-persistence
7b85d7a585
Allow Category definitions to specify language to search in.
This will be entirely up to the homepage maintainer, and will override the user's "Search only in the this language" setting.
2022-04-20 22:56:15 +08:00
infinite-persistence
778ef649e8
Wild West is now a real category, so can't use dynamicRouteProps === null to identify it.
A bit troublesome to handle, but at least the code is clearer now.
2022-04-20 22:56:14 +08:00
infinite-persistence
f27b68587e
Restore original way to exclude categories in Homepage
It was previously done in `GetLinkData`, but accidentally removed in d854a992.
It is DRY-er to do it here rather than at the client side.

Also needed to filter in the homepage-sort dialog, so move the definition to a constant array.
2022-04-20 22:56:13 +08:00
Rafael
cbb6e2afe4 Add missing FileGet call 2022-04-20 09:18:43 -04:00
Rave | 図書館猫
089fc52a7d
Filepage theater fix (#1366)
* Disable theater mode for non-video files

* Add black background to image container
2022-04-20 10:20:15 +02:00
infinite-persistence
07463312f0 Ad: change to 'insert' mode in Mobile layout.
## Ticket
1074
In mobile, the second livestream tile in Following gets missing because of the Ad being in 'replace' mode.

## Change
Switch from 'replace' to 'insert' mode in Mobile layout.

If missing (replaced) tiles is not a desired behavior, the true fix would be to always use 'insert' mode, and either live with the uneven tiles or wait for our design master's solution.
2022-04-19 10:18:51 -04:00
infinite-persistence
cfc34c5dba
Fix hidden purchases through embeds
## Issue
1345

## Change
The refactor in  04c5ac46 broke the logic, because `!hasCost` would incorrectly include an undefined `costInfo` (haven't fetched) as free content.
2022-04-18 13:48:11 +08:00
Thomas Zarebczan
7622e7aaf2 Fix release time on category pages 2022-04-14 14:23:22 -04:00
Bradley
233a2b27ba
pass in contentName to repost modal 2022-04-12 21:07:41 +08:00
Bradley
d7506850b3
removed remaining refs to PAGES.REPOST 2022-04-12 21:07:40 +08:00
Bradley
98154a1921
changed repost to open a modal instead of new page 2022-04-12 21:07:39 +08:00
infinite-persistence
95df6fedc0 Fix new categories not showing until Customize is opened
## Ticket
1307 newly added categories aren't adding to existing customized homepage

## Change
In Customize, new categories were appended at the bottom, but forgot to repeat the behavior on the actual homepage itself.
2022-04-08 09:35:43 -04:00
infinite-persistence
5a400ca2fa
Clean homepage and export copy/paste issues, (no functional change) 2022-04-08 18:56:17 +08:00
infinite-persistence
b79b7f9bde Re-enable 'Purchases' page
Closes 1284

## Notes
- Re-used the Library page, but disabled the [Downloads | Purchases] tabs.
- Access from Settings > Accounts > Purchases
2022-04-07 14:28:12 -04:00
Rafael
800e735115 Mobile file page, comments and player improvements for rotated landscape view
undo plugin changes
2022-04-07 11:44:25 -04:00
Rafael
65b9906086 Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
infinite-persistence
7e65062613 Skip 'include_is_my_output' for Incognito
Ticket: 1180

I believe the original intention was "if a claim was previously resolved, but without authentication (no `is_my_output` data), then resolve again with `include_is_my_output`"

Update to exclude that logic for Incognito.

## Aside
The check for `!canonicalUrl` is interesting:
- Are there claims that really don't have `canonical_url`?  If yes, would that end up in an infinite `resolve` loop?
2022-04-07 10:48:07 -04:00
infinite-persistence
a11d8279be ShowPage: remove unused props 2022-04-06 13:18:47 -04:00
infinite-persistence
351eee76b3 VerifyPage: don't enter Sign Up page on failure
Entering the page causes the Sign Up flow to run, which is confusing.
2022-04-06 09:15:45 -04:00
infinite-persistence
13f9f24af7 Fix double email_user/confirm due to language render (patch)
Patches previous attempt at f0ef9261

- The flag needs to be set immediately, not in the `then` block.
- Renamed the flag for clarity.
2022-04-06 09:15:45 -04:00
infinite-persistence
59a0b9d490 Better non-clickable implementation
## Issue
- Adding `content__non-clickable` everywhere probably isn't the right way when we move forward to separating `all.scss`.
- Not intuitive -- easier to use if it's an attribute to `ClaimPreview`.

## Change
- Consolidate to a re-usable `non-clickable` class.
- Made Wallet Send search preview non-clickable as a temporary band aid until the channel-finder is consolidated.
- `listBlocked`: something is overriding the pointer, so non-clickable isn't working. Removed for now -- doesn't really matter.
2022-04-05 19:44:09 -07:00
infinite-persistence
97dd01ed38 Uploads Page: fix Repost tab when count is 0
## Issue
The page becomes blank without the filter header when Repost is selected + 0 results.

## Change
Grabbed and modified lbry-desktop's 390bb6df
2022-04-05 12:47:47 -04:00
infinite-persistence
1e6f64f235 Uploads: show placeholder when loading 2022-04-04 08:40:41 -04:00
infinite-persistence
c36fd425a7 Fix failing video position reset
## Issue
Maybe related to https://github.com/OdyseeTeam/odysee-frontend/issues/99#issuecomment-1042384649

## Notes
`fileInfo` does not contain `metadata` anymore -- not sure what happened. With zero duration, `videoPlayedEnoughToResetPosition` was never true.

But the claim usually contains the duration already, so we can use that. There are some audio/video claims that don't, but those are a minority.
2022-04-01 09:58:09 -04:00
infinite-persistence
491c934119 Fix makeSelectContentPositionForUri memo
- Move away from the leaky makeSelect* pattern.
- No memoization since it's pretty light.
2022-04-01 09:58:09 -04:00
infinite-persistence
f5034f74ca Batch resolve pin urls in 2 ways
Expanded homepage pins to support 2 types of input (if both are passed in, pinnedUrls take precedence):
  (1) pinnedUrls     --> uses doResolveUris (resolve)
  (2) pinnedClaimIds --> uses doResolveClaimIds (claim_search)

Instead of injecting the pinned URLs directly, we inject from `resolvedPinUris`, which will be blank until the uris are resolved, thus preventing it from being resolved individually from the tiles.

There's additional complexity with the `claim_search` method, as the rest of the code deals with uris instead of IDs. Fortunately, it's all contained with `useResolvePins`, so removal would be easier when the batch `resolve` issue is fixed.
2022-03-31 15:58:10 -04:00
infinite-persistence
d482b2d35a Second attempt at preventing "empty homepage" flash
The delay in fetching homepages causes the "empty homepage" splash to appear briefly for the authenticated case.

Part 2 of 61630930
2022-03-31 10:55:11 -04:00
Thomas Zarebczan
8c7c1cfd5c fixes from review
remove config, remove unused app strings + add new, add disabled message
2022-03-31 10:35:24 -04:00
Thomas Zarebczan
db687204a4 livestream for all 2022-03-31 10:35:24 -04:00
infinite-persistence
3b98f73a0f Fix livestream countdown i18n
Ticket: 1228

## Code changes
- Pass through `getTimeAgoStr` so that the value gets localized.
- Pass the simpler `number` around instead of the `moment` object for better memoization.

## Notable differences
Due to how `getTimeAgoStr` is written, we now get to see the time actually counting down, vs "in a few seconds" currently in production.  I think the counting-down behavior was the original intentional, since a 1s timer was used (otherwise, a 1-minute timer could be used) ... or maybe not since streams may not start on the dot.
2022-03-31 08:25:32 -04:00
infinite-persistence
c232981f0c
Catch up on string changes 2022-03-31 17:54:20 +08:00
infinite-persistence
fae8c6dff4
Don't translate product names
...at least, that is the current decision.
2022-03-31 17:46:12 +08:00
Rave | 図書館猫
2c6fb66206
patch 3 (#1251) 2022-03-31 11:19:32 +02:00
infinite-persistence
1366f8d3ce Force reposts in Homepage + Category Page, except Following & WW
Ticket: 1220
2022-03-30 09:39:06 -04:00
Anthony
beaf425068 fix some flow errors and other pointers 2022-03-29 23:00:55 -04:00
Anthony
13a7785315 fix css bug 2022-03-29 12:23:20 -04:00
infinite-persistence
b40160a939 Remove the desktop Welcome Page 2022-03-29 10:05:58 -04:00
Anthony
4fffb035de reverse string changes 2022-03-28 15:30:36 -04:00
Anthony
d64f1c5cc2 bold more text in popup dialog 2022-03-28 15:30:36 -04:00
Anthony
d88b14ccc7 add back to premium button 2022-03-28 15:30:36 -04:00
Anthony
5a2684643e allow user to save currency on client 2022-03-28 15:30:36 -04:00
Anthony
fed8fafe6c allow user to select preferred currency 2022-03-28 15:30:36 -04:00
Thomas Zarebczan
157b6d3f19
fix recommended showing blank on homepage 2022-03-28 10:01:55 -04:00
Thomas Zarebczan
79aa098484 fix: always inject FYP 2022-03-26 16:01:27 -04:00
infinite-persistence
616309301d Homepage: don't wait for prefs if incognito
It causes the "empty homepage" splash to briefly appear.
2022-03-25 09:14:37 -04:00
infinite-persistence
093594de3f
OptimizedImage: clean up attribute removal
Cleanup for 1e0da661
2022-03-25 10:54:18 +08:00
infinite-persistence
f1ea0b20dd
Fix i18n issues reported
- Changed to "Add a Card" to reuse existing string.
2022-03-24 15:36:09 +08:00
Thomas Zarebczan
56ae81198a Shorten title
Mobile was cutting off, otherwise worked okay!
2022-03-23 15:35:27 -04:00
infinite-persistence
5b16b3b058 Ability to customize homepage
Ticket: 1145

- Limited to premium for now (early access).
- Needed to handle custom categories from non-English homepages.
2022-03-23 15:35:27 -04:00
Anthony
2e8039c3d0 fixes for KP 2022-03-22 16:07:05 -04:00
Anthony
7508dc2970 use window instead of component state 2022-03-22 16:07:05 -04:00
Anthony
620e5023a8 add livestream icon and channel selector 2022-03-22 16:07:05 -04:00
saltrafael
05b228400e
Fix referrer on embed (#1181)
* Fix referrer on embed

* Fix override

* Fix condition
2022-03-22 14:13:19 -04:00
infinite-persistence
71e9837002 Repost: hide ribbon in Category Pages and Home Section
Allow in Following and Wild West

`index === 0` is not always Following, so compare link instead.
2022-03-22 08:54:22 -04:00
Thomas Zarebczan
9af32a0024
move recommendations below following
Until we have the reordering option. Recommended will require it's own page most liklely , the show more is strange in the middle of the page.
2022-03-21 18:53:09 -04:00
infinite-persistence
1e0da66110 OptimizedImage: simplify implementation
It has been broken for a while, probably since the theme changes?

- Anyway, removed the effort to get the exact mounted size before requesting the image from CDN.
    - When it works, it does prevent blurry image in different screen resolutions, but it's hard to maintain and too expensive.

ChannelThumbnail: use 64 to cover both the 64 and 40 case (the cached image will work on both, potentially reducing a call). I think the size is close enough to not trigger a Core Vital size warning.
2022-03-21 13:13:25 -04:00
Thomas Zarebczan
75478ad18f Thumbnail improvements
- always pass to optimizer, even for speech

- default channel thumb to optimized at 5
50px, original on channel page

- fix misc analytics bug
2022-03-21 13:13:25 -04:00
Rafael
52c15fc004 Fix double call on livestream page 2022-03-21 10:22:02 -04:00
infinite-persistence
3900d9a049
Following Page: fix redundant livestream data passed in
Clean up for 17a9b84d

We are now using `subSection` for livestreams, so no point passing in `prefixUris`, which causes additional processing.

(It wasn't visible because `showNoSourceClaims` was removed, but processing still happens).
2022-03-21 15:03:47 +08:00
infinite-persistence
f0ef92614d Fix double email_user/confirm due to language render
Add a persistent (per session) flag to skip any actions sparked by future renders after it has already been authenticated.
2022-03-18 08:56:39 -04:00
Thomas Zarebczan
8ae17adde1 update subtitle 2022-03-17 11:42:46 -04:00
infinite-persistence
74345da0fb Go Live: fix missing channel selector
If the active channel doesn't have 50 LBC support, we are stuck in the "you can't stream" state. But I have other channels that are eligible.
2022-03-17 11:42:46 -04:00
infinite-persistence
51079ea611 Consolidate legal/requirements fetch
Ticket: 1128

Requirements:
- Fetch once per refresh. This is to cover the case of switching to VPNs, etc.
- 1 call per refreshed session.
2022-03-17 10:25:59 -04:00
Rafael
ae56058384 Consolidate timeout thumbnail effect 2022-03-17 10:06:50 -04:00
Rafael
57ff910bbb Re-fix layout shift 2022-03-16 18:39:09 -03:00
Rafael
9ac64eb6a7 Fix layout shift 2022-03-16 16:36:50 -04:00
Rafael
04c5ac460b refactor 2022-03-16 16:36:50 -04:00
Rafael
0682f52d45 fix embed fetching state and geoblocking 2022-03-16 16:36:50 -04:00
Rafael
d3576315f3 Fix button 2022-03-16 16:36:50 -04:00
Rafael
7400b9c12f improve embed events 2022-03-16 16:36:50 -04:00
Rafael
b02f0736fc Fix embed call 2022-03-16 16:36:50 -04:00
Rafael
777937c7d8 Fix thumbnail 2022-03-16 16:36:50 -04:00
Rafael
0934b2fb88 fix embedWrapper liveChannel fetch 2022-03-16 16:36:50 -04:00
Rafael
e93d734fa3 Fix full url 2022-03-16 16:36:50 -04:00
Rafael
f4fdee8331 socket improvements 2022-03-16 16:36:50 -04:00
Thomas Zarebczan
60c317dedf various fixes 2022-03-16 16:36:50 -04:00
Rafael
ebfe644cb8 Add miniplayer 2022-03-16 16:36:50 -04:00
Rafael
b7f9152dca Improve livestream external embeds 2022-03-16 16:36:50 -04:00
Rafael
b096aad70e Improve livestream claimLink embeds
- Remove embedPlayButton for fileRenderInitiator
- getThumbnailFromClaim from utils function instead of redux
- Improve playingUri
2022-03-16 16:36:50 -04:00
Rafael
6dea79819d livestream + old APIs 2022-03-16 16:36:50 -04:00
infinite-persistence
bffc27e8d0
Just always show homepage segment titles.. (#1116)
## Issue
- "Following" was showing up in place of "Featured"
- "Following" doesn't appear until livestreams are fetched, causing shifts.

When "Upcoming Livestreams" was implemented, it was trying to retain the original behavior of not showing "Following" title if that was the first in the list.

Not only is it a chicken-and-egg problem, but it causes extra renders due to the need to check if the other guys was rendered.

With FYP, there are now more combinations to handle.

## Change
Just show the title...
2022-03-16 08:49:44 -04:00
infinite-persistence
745e40a83e
Move blocker flag to redux
Was trying to save 1 state by assuming the homepage will be in a busy state and the ad-detection code will finish first. But this is not true for those with a small Following count.
2022-03-16 16:48:26 +08:00
infinite-persistence
98d653a8f8
Membership: i18n fixes + add strings
- Variable names are for translators to determine the context, so choose more relevant names. e.g 'displayedInterval' and 'date_range' will not make much sense to a non-programmer.

- No need to localize dev-only strings.

- Various other fixes.
2022-03-16 15:22:19 +08:00
infinite-persistence
1e67a5cc7f
[on hold recsys work] Recommended For You (#782)
* Factor out lighthouse-result processing code for FYP re-use.

The FYP results will be in the same format as LH.

* Recsys: add ability to pass in specific uuid to use

For FYP, we want to pass the UUID as a param when searching for recommendations. The search comes before the recsys entry creation, so we need to generate the UUID first when searching, and then tell recsys to use that specific ID.

* Redux: fetch and store FYP

Note that the gid cannot be used as "hash" for the uri list -- it doesn't necessarily change when the list changes, so we can't use it to optimize redux.  For now, just always update/render when re-fetched.

* UI for FYP

* Mark rendered FYPs

* Pass the FYP ID down the same way as Collection ID

Not ideal, but at least it's in the same pattern as existing code for now. The whole prop-drilling problem with the claim components will be fixed together later.

* Include 'gid' and 'uuid' in recommendation search

* Allow users to mark recommendations that they dislike

* Pass auth-token to all FYP requests + remove beacon use

beacons are unreliable and often blocked

* Only show FYP for members

* FYP readme page

* small fixes

* fyp

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-03-15 15:07:31 -04:00
mayeaux
4a9ba6555b
Various touchups/fixes of membership functionality (#1066)
* various cleanups

* more touchups

* select currency to use based on location

* fix sidebar

* fixing strings and other touchups

* refactor and do proper string interpolation

* fix stripe error

* text bugfix

* Adjust help

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-03-14 22:38:45 -04:00
infinite-persistence
99f87e95e3
Geo blocklist - reimplement with backend support (#1089)
Ticket: 1079 Support geoblocking channels/videos

## Changes
- Replaced the .env version with iapi version.
- Includes 'videos' blocking and custom messages.
2022-03-14 15:15:30 -04:00
infinite-persistence
de29e323a8
Homepage-Following: insert instead of replace when ad-blocker is detected (#1092)
* Homepage-Following: insert instead of replace when ad-blocker is detected.

`window.odysee_ad_blocker_detected` was not meant to be used outside of `<Ads>`, since it wouldn't spark a GUI update. But since homepages are rendered several times, perhaps it doesn't matter and we can skip adding to redux for now.

* Handle uBlock origin

If refreshed via "Clear Cache and Hard Reload", the detection method fails, but it does perform an internal redirect, so treat that as a failure.
2022-03-14 14:25:51 -04:00
infinite-persistence
f7b598a6e0
Fix total comment count selector
- Move away from `makeSelect*`. This selector doesn't need caching since there is no transformation.
2022-03-11 12:27:28 +08:00
infinite-persistence
ca7b98ecf5
Support for creator-requested geoblocking (#1063)
Attempt to fix logic + case

Fix logic

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-03-10 14:28:54 -05:00
infinite-persistence
2dd0fc283d
Simplify ad-injection logic
Since `<Ads>` is already checking against SHOW_ADS and membershipship details, there is no need for all clients to repeat the same thing.
2022-03-10 21:54:11 +08:00