Commit graph

5816 commits

Author SHA1 Message Date
Thomas Zarebczan
5fe5f7599f Revert "DRY: fix duplicate code for Recommended key generation"
This reverts commit 05376490a8.
2022-06-01 09:55:56 -04:00
Thomas Zarebczan
4cf531b8ad Revert "Recommendations: factor out a selector for raw results"
This reverts commit 2edf1ca564.
2022-06-01 09:55:56 -04:00
Thomas Zarebczan
b6eb580c82 Revert "Recsys: determine the clicked index based on raw results instead of rendered order"
This reverts commit e4214b1c1b.
2022-06-01 09:55:56 -04:00
Raphael Wickihalder
6ee3b34b10 gdpr-theme 2022-06-01 09:13:53 -04:00
infinite-persistence
32f0d1d7a1 Tip: show modal instead of toast when timeout
## Issue
The toast wasn't good enough as the user might miss it and attempt to re-send.

## Change
- Change the tip timeout from Toast to Modal.
- For the case of Comments, add additional info about being unable to re-link the txid to the comment for now. Not really useful to the user, but better than nothing.
2022-06-01 08:40:39 -04:00
infinite-persistence
cfa59507ba doSendTip: pass the err back to the callback
No real users for now, but an error callback so should do that.
2022-06-01 08:40:39 -04:00
infinite-persistence
e4214b1c1b Recsys: determine the clicked index based on raw results instead of rendered order
## Ticket
1606

## Issue
The displayed order of the recs are often re-adjusted -- viewed content are pushed to the bottom to avoid auto-play-next from picking it up again. This was causing recsys to be confused, because the click order does not correspond the results.

## Change
Refactored the selector we can grab the raw results and use that as the index reference.
2022-06-01 08:32:37 -04:00
infinite-persistence
2edf1ca564 Recommendations: factor out a selector for raw results
1606
2022-06-01 08:32:37 -04:00
infinite-persistence
05376490a8 DRY: fix duplicate code for Recommended key generation
Must use `getRecommendationSearchOptions`, otherwise there is a chance of some clients deriving the wrong key.
2022-06-01 08:32:37 -04:00
Rave | 図書館猫
67d0655314
Adjust toggle buttons in modal (#1615) 2022-06-01 12:39:32 +02:00
Rave | 図書館猫
0a3d47edce
Design patch 22 06 01 (#1613)
* Adjust autofill icon color
2022-06-01 09:26:36 +02:00
Raphael Wickihalder
78509a92c4 Fix close button in footer banner 2022-06-01 13:13:49 +08:00
Thomas Zarebczan
487d5c4a86
Add twitch sticker 2022-05-31 15:47:03 -04:00
Raphael Wickihalder
d66bd72b22
Adjust meme position 2022-05-31 18:46:02 +02:00
Rave | 図書館猫
2baddb1b1e
Adjust meme text spacing & fix ad tile title size (#1602) 2022-05-31 17:37:10 +02:00
Myzel394
d4f2236ea3
fixed nudge styling (#1597) 2022-05-31 17:04:43 +02:00
Raphael Wickihalder
a4834706e3
Adjust meme text margin bottom 2022-05-31 17:02:44 +02:00
Anthony
9b2cc7eb79 dont show subs for ios and correct position for actual subs 2022-05-31 10:41:31 -04:00
infinite-persistence
0bcea943d5 Re-implement/enable sticky ad
## Ticket
1583: "add incontent ads to category/channel pages (break up every X claims?), or add back bottom ad in those areas."

## Behavioral changes
- Hide when in homepage (as currently we have ads between categories).
- Fix the light theme (it was transparent).

## Code changes
- While an Effect is the 'right' choice given that there is no jsx to mount, the need to prop-drill from the parent was getting a bit annoying, so converted to a Component instead.
- Remove the delay for Core Vitals avoidance for now -- seems to make the sticky less likely to serve an ad.
- Now that the membership state is correctly populated for incognito (see 9d830615), there is no more need to check for `isAuthenticated`.
2022-05-31 10:34:38 -04:00
infinite-persistence
4ea6b848d1
Fix stray floater in mobile
Oddly, it only appears in Channel Page, not the Home Page. Should be the same thing...
2022-05-31 18:39:14 +08:00
infinite-persistence
a2f15b8348
Player: fix i18n for 'Auto' 2022-05-31 18:12:51 +08:00
Rave | 図書館猫
ea3d8e01ef
Design patch 22-05-31 (#1598)
* Redesign form elements with background

* Adjust list ads

* Fix progress bar in mini player

* Fix progress bar on mobile

* Fix progress bar in theater mode

* Redesign repost modal

* Update channel selector in modal

* Remove border radius from embedded media

* Adjust quality selector

* Adjust updated player theme for light mode

* Rename wrapper class
2022-05-31 11:14:59 +02:00
Raphael Wickihalder
9eda81db58 Replace state with ref for uriBuffer 2022-05-31 10:38:39 +08:00
Raphael Wickihalder
99a36b6bd6 Clean code 2022-05-31 10:38:39 +08:00
Raphael Wickihalder
c6c824c059 Fix grid with adnimation 2022-05-31 10:38:39 +08:00
infinite-persistence
29431b1074
Revert "Test 'Rich Test' error screenshot"
This reverts commit 8f35f53e7a.
2022-05-30 22:50:40 +08:00
infinite-persistence
8f35f53e7a
Test 'Rich Test' error screenshot
Verifying whether the result screenshot for errors are cached.
2022-05-30 22:28:22 +08:00
infinite-persistence
9d830615fd
Fix user membership state for incognito.
Run the membership reducer even for incognito.

The GUI needs to differentiate between 'unfetched' (`undefined`) and 'no membership' (`''`), so we must call the action/reducer for the incognito case as well.
2022-05-30 19:03:21 +08:00
infinite-persistence
deb95cd443
Fix stale-closure in ad-detection code
Using that global variable was a bad idea. Stick to redux as the source of truth.

The flag is not listed for rehydration, so it will always start off as `undefined`, which is what we need anyways.

`undefined` indicates we haven't tested for ad-blockers, so we'll run the fetch and update the store with a true|false value.
2022-05-30 19:03:20 +08:00
infinite-persistence
1768e4a5cd
Remove vidcrunch hacks
These are mostly supression of the video floaters.
2022-05-30 16:01:38 +08:00
infinite-persistence
9ff88ecdd1
Ad: fix stray video floaters outside our container.
This was tested to be removed during evaluation, but seems like there are cases where it comes back.

This solution should be more robust: hide for all, except when in our designated container.
2022-05-30 15:55:20 +08:00
infinite-persistence
7dc9c983f8
resolveAdVisibility: wait for premium+ (a fetched status) 2022-05-30 14:15:28 +08:00
infinite-persistence
bd7d2ad621
Revert "Fix ads near recommended on Premium"
This reverts commit f56e552764.

Would like to consolidate logic into resolveAdVisibility, so the fix should be there instead.
2022-05-30 14:15:27 +08:00
Raphael Wickihalder
8b1927b5dd
Move channelTitle to view 2022-05-30 07:27:41 +02:00
Raphael Wickihalder
e4db2d401b
Remove channelName prop 2022-05-30 07:15:07 +02:00
kt programs
c16fb8c906 Fix spelling of SORT_ASCENDING in search constants 2022-05-30 12:04:20 +08:00
infinite-persistence
ba62170ef7
Don't limit livestreams for Following section
https://odysee-workspace.slack.com/archives/C02G20Z2AEL/p1653779545610999
2022-05-30 11:21:33 +08:00
Raphael Wickihalder
a7bbb464d6 Clean code 2022-05-29 09:18:57 -04:00
Raphael Wickihalder
ca135cc7f8 Integrate media session api 2022-05-29 09:18:57 -04:00
Raphael Wickihalder
2b60fe957f Get rid of 'content not found' page in categories 2022-05-29 09:11:35 -04:00
Thomas Zarebczan
f56e552764
Fix ads near recommended on Premium 2022-05-27 15:28:09 -04:00
Raphael Wickihalder
816c0d9e79
Fix ob-widget position 2022-05-27 20:49:57 +08:00
infinite-persistence
c71c8e1cd0
Remove bottom-ad for now
- Light theme issues
2022-05-27 20:49:56 +08:00
infinite-persistence
8303856a06
Remove country check
Per Tom, this was just a temporary thing due to vidcrunch.
2022-05-27 20:48:54 +08:00
infinite-persistence
3557e72419
Remount banner on theme-change as their ad can't change theme on the fly.
It would be nice if the individual components can handle the remounting of the ad-script, but there is currently a need to synchronize the cleanup of the `window.OBR` object.

The quickest solution for now is to add a key at the parent side to synchronize the mount-unmounting. Not ideal -- revisit later.
2022-05-27 20:48:53 +08:00
infinite-persistence
551c13251a
Update AR_6 to AR_18
- This increases the amount of ads, filling up the entire width. No more need to restrict with `max-width` ourself.

- Changed the ad-driver to top-right since the "Powered by Outbrain" text is now locked in bottom-right. Also made the container having a minimum height, as the method to "display the driver after ads are loaded" is not future proof -- it depends on the IDs being used by the ad. Reserving some space seems to be easiest, and it also reduces shifts as well.
2022-05-27 20:48:53 +08:00
infinite-persistence
bf7dcbe344
Bottom-Ad: change to only hide for Premium+
Previously, we hide when authenticated.

We still need the `isAuthenticated` flag, because `hasPremiumPlus` stays at the unfetched (`undefined`) state for Incognito.
2022-05-27 20:48:52 +08:00
infinite-persistence
4ae3fe7ea0
Make Category & Channel pages re-fill ads after scrolling every 2 pages 2022-05-27 20:48:52 +08:00
infinite-persistence
327a574982
Create banner ads and add to homepage
## Behavior in homepage
- Mobile: show after every other category
- Desktop: show after first category, then every 2 categories.

## Known issue:
- "FYP" is not part of the categories array at the moment, so it does mess up the behavior.

## Notes
I think this is also called "in-content" by adnim (not 100% sure of the terminology).
2022-05-27 20:48:51 +08:00
infinite-persistence
b1dbac8f9b
Factor out ad-blocker detection into useShouldShowAds
... for it to be re-used on other ad components.
2022-05-27 20:48:51 +08:00
infinite-persistence
7504cf07b3
Geoblock: fix anonymous claims passing through
My bad, added an unnecessary check in the previous change that shorted the logic too early.

Accessing an object using 'null' or 'undefined' as the key won't cause trouble (and is expected in this case), so just suppress flow instead of fixing it using
  `channelId && geoBlockLists.livestreams[channelId]`

https://github.com/OdyseeTeam/odysee-frontend/issues/1100#issuecomment-1138928520
2022-05-27 12:51:47 +08:00
infinite-persistence
f0bf6fa9a0 Homepage: limit livestreams in categories to 3 ...
... but leave Following as "no limit"

The primary reason for this case is due to News and Wild West having lots of livestreams. But instead of just applying the limit to these 2 and polluting the loop, just limit it for all Categories.
2022-05-26 10:59:31 -04:00
infinite-persistence
cc0ed44bf6 Homepage: add "reset" + 'hideByDefault' categories
Requires a related commit from the homepages repo.

## Changes
- Add ability to reset the sort order.
- Make 'News' and 'Wild West' a "hideByDefault" category. It can be made visible in the homepage from the customization dialog.
2022-05-26 10:59:31 -04:00
Thomas Zarebczan
786d9d0253
optimize premium image + add smaller 2022-05-26 09:22:23 -04:00
infinite-persistence
a73694deb4 Fix localStorage crash
## Ticket
1572
Always check for availability before use.

## Changes
- Consolidated the keys into one place for easier tracking.
  - It'll also be easier to code using constant autocomplete.
- Cleaned up the wrapper to be as close as the original.
- Updated existing code to use the wrapper (even if they already handled the availability) to encourage future code to just use the wrapper.
2022-05-26 08:27:35 -04:00
infinite-persistence
3ed05e62a5 Resolve: store repost's original channel too
## Issue
- Closes "1535 bunch of channels (from featured?) resolved on page load"
- It was due to the use of reposts in the Category. As we did not store the repost's original channel claim, `ChannelThumbnail` couldn't find the author and requested a separate `resolve`.

## Change
Store the repost's original channel claim as well.
2022-05-26 08:00:58 -04:00
Rafael
11bdb6a872 Fix wait for prefs on default channel set 2022-05-25 11:52:48 -04:00
Rafael
1dccc1ac64 Fix uploads page cleared/reloaded on each navigation 2022-05-25 09:10:24 -04:00
infinite-persistence
58167210ea Geoblock: show warning for own content
## Issue
Contents aren't block if you own them, but need to tell creator that is it blocked for others.

## Change
- Show a banner on Content and Channel Page for this scenario.
- Hover tooltip is available for the full text. For mobile, tapping it reveals the message.

Note that this only applies to the locale from where the creator is viewing it from. We can ignore locale, but would then need to display _all_ geo-restrictions related to the content in a list.
2022-05-25 08:51:08 -04:00
infinite-persistence
a4add6eab6
Fix geoblocked items appearing in wunderbar suggestion popup
This list is not using ClaimPreview or ClaimPreviewTile, so the filtering was missed.
2022-05-25 14:37:09 +08:00
infinite-persistence
4aa94a7bfd
Fix variable name confusion
Per convention, 'ByUri' would mean it's the array/object that is storing the entire list, but this is actually the specific entry.
2022-05-25 14:30:41 +08:00
Anthony
b1516a904d fix list view 2022-05-24 13:55:30 -04:00
Anthony
26bde0a390 fix list view and allow s pen to use 2022-05-24 13:55:30 -04:00
Anthony
ca1515bfa3 fix hover bug on ipad needing double click 2022-05-24 13:55:30 -04:00
infinite-persistence
6d6d95237a 1318: Persist recsys data for send after tab close
- Add ability to store `entries` into Redux.
- Sync to redux in the same interval as when playing position is saved (re-use timer).
- On startup, send any stashed entries and clear them.
2022-05-24 13:52:50 -04:00
infinite-persistence
13729a2ed4 Comment: filter geo-restricted channels 2022-05-24 12:53:40 -04:00
infinite-persistence
426d1ea0c9 Factor out geo-restriction logic
No functional change.

Impetus is to make the logic re-usable for comment-blocking.
2022-05-24 12:53:40 -04:00
infinite-persistence
ce9a1c128c
Show-page: fix "no content found" flicker (#1546)
* Show-page: split out some effects

Break apart the large effect for easier tweaking, abiding by the 1-action-per-effect guideline.

This also fixes the dependency list. After checking with Haffa, the exclusion of `pathname` and `hash` from the list is probably to avoid hitting `doResolveUri`. This should no longer be an issue after the split, so no suppression needed.

* Show-page: fix "no content found" flicker

## Issue
1539: "Recently been seeing a flicker of "content not found" when direct loading content or channel links on mobile"

## Cause
`doResolveUri` can only be called after the initial mount (in the effect), so at first render, `isResolvingUri` won't be set yet, so we briefly ended up in the "no content found" path.

## Change
Factor out the logic that determines if we should send `doResolveUri`. This allows us to know that the upcoming effect will be sending `doResolveUri`, so we can hold off displaying "no content found".

* Show-page: don't delay the spinner when resolving

## Reason
The delay causes a blank page + footer, which looks bad.
2022-05-24 06:39:21 -04:00
saltrafael
f9d1b8de8e
Automatically set default channel on sign up (#1559) 2022-05-24 06:18:26 -04:00
saltrafael
3918906605
Remove clearPosition functions for playlists (#1560)
- Let the position be cleared at the end like regular videos
2022-05-24 06:07:46 -04:00
infinite-persistence
d5c964c208
Additional geoblock support (#1552)
* Remove claim from channel page when geoblock conditions hits

Ticket: 1100

* Handle geoblocked channel page

## Ticket
1100

## Issue
"If a channel is geoblocked, the entire channel page (even showing titles, etc. would be against the law)"
2022-05-24 00:15:18 -04:00
Rafael
600d9a0f94 Fix Drag-and-drop error 2022-05-23 14:31:43 -03:00
saltrafael
b854e32f5c
Fix comment sort change (#1556) 2022-05-23 11:34:32 -03:00
infinite-persistence
cf700c3627 Comment: remove the muted prop
Since the comment list is pre-filtered and includes the muted list, I think this prop will never be true?
2022-05-23 18:37:19 +08:00
Rave | 図書館猫
d207117e5d
Grid patch v1 (#1555)
* Patch v1
2022-05-23 11:32:57 +02:00
infinite-persistence
8c06dab10f
ClaimPreviewTile: fix render violations and onHidden logic
## Issues
- Not safe to call the parent callback from the render function. It must be called from an effect or
- `onHidden` is only called when blacklisted, but it can also be hidden from other circumstances.
  - While those other circumstances doesn't apply for FYP (the first client that relies on `onHidden`, it's incorrect from a code perspective, unless it is renamed to `onBlacklisted`.

## Change
- Move the callback execution into an effect.
- Ensure `onHidden` is for all situations that it is hidden.
2022-05-23 14:49:53 +08:00
infinite-persistence
cde0c0b2a8
ClaimPreview: restructure
Try to gather the hide/show logic
2022-05-23 14:49:52 +08:00
infinite-persistence
287eb38e7a
ClaimPreviewTile: restructure (no functional change)
Effects cannot be defined after the render function returns early, so it was not possible to add new effects when the derived variables that it depends on are way down below.
2022-05-23 14:01:54 +08:00
infinite-persistence
104dafc1e7
Clean up @odysee membership channel definition 2022-05-23 10:53:24 +08:00
infinite-persistence
8eb6ffd2b9
Rename 'community_channels.js' -> 'channels.js' for re-use
Re-using this file to put more hardcoded channels.
2022-05-23 10:53:23 +08:00
infinite-persistence
676f461a9f
Hide membership debug logs behind a flag
General error logs are ok, but not logs like these ... not helpful for other devs.
2022-05-23 10:53:22 +08:00
infinite-persistence
8e08320e7d
'Show less livestreams' -> 'Show fewer livestreams'
https://discord.com/channels/721806979928162404/936318782085935155/977673908222320670
2022-05-23 10:20:59 +08:00
infinite-persistence
2803323524
Remove relative paths in sass (#1540) 2022-05-20 09:07:32 -04:00
Rafael
e045d7a2ad Fix iframe class 2022-05-20 09:36:29 -03:00
saltrafael
6136ae7d73
Fix touch overlay max-height on mobile (#1541) 2022-05-20 08:23:37 -04:00
infinite-persistence
178b0d751d
astronaut_n_friends.png: fix src and caching
1. Hardcoding breaks any image changes done on dev instances or locally.
2. The relative path is bad, and there are few more instances of it. But continue as is for now, will file a ticket to fix this.
3. Fix caching.
2022-05-20 19:04:35 +08:00
Thomas Zarebczan
9a247d3c9f
Mature fixes 2022-05-19 17:40:31 -04:00
saltrafael
28b9e2a4d3
Fix fetch behavior when switching claims (#1533) 2022-05-19 13:54:45 -04:00
infinite-persistence
14a11aa78a
Clear announcement history using window.clearLastViewedAnnouncement()
This helps testing, and can be eventually removed. No harm leaving it there, though.
2022-05-20 00:04:07 +08:00
infinite-persistence
d70f0f1d6d
Add "What's New" button in the Help Page
This allows user to re-access the modal if they accidentally dismissed it, never got it (bug?), or simply just want to see it again.
2022-05-20 00:04:07 +08:00
infinite-persistence
3719a73c81
Add announcement modal and open it after prefs sync'd.
- Don't want to show it in Incognito.
- Only show it in when entered from homepage, or in the Help page.
- Record the hash of the viewed announcement and update the wallet with it.
2022-05-20 00:04:06 +08:00
infinite-persistence
79eb28cc55
Add 'lastViewedAnnouncement' into wallet.
This stores the hash for the last viewed announcement.

The intention is so that the announcement won't re-appear when logging into another device.

However, this does mean that announcements would need to wait until the first sync to decide whether to appear or not, which can be quite a delay.
2022-05-20 00:04:06 +08:00
infinite-persistence
245eb39892
Add 'announcement' to v2 homepage api
This requires an accompanying commit in the homepages repo (see "Add announcement support").

Using `raw-loader` to import markdown files as a string works for the app-side, but didn't work well in web-side. Falling back to copying the announcement files to `dist` and reading them via `readFileSync`. Don't really like this -- will return with an alternative.
2022-05-20 00:04:05 +08:00
infinite-persistence
b5dd24ff56
ModalRouter: change dispatch map to object
Moving away from the function version to the object version. Trying to track down why the effect that closes the modal ran when the pathname did not change. My only guess is the unstable hideModal reference due to the function mapping. There is no customization needed, so the object version is preferred anyways.

`doOpenModal` isn't used, so I just removed that.
2022-05-19 23:56:34 +08:00
infinite-persistence
5e3effc94d
Wrapper for localStorage 2022-05-19 23:56:33 +08:00
infinite-persistence
b733215c5f
PublishFile: fix render function violation (#1518)
* PublishFile: fix render function violation

Per doc:
> A React component should not cause side effects in other components during rendering.

Even in own render function (allowed to call), it should be avoided as it could cause infinite loops.

* PublishFile: fix useEffect infinite loop due to bad dependency

## Issue
One of the effects was adding an internal wrapper function as a dependency. As this is a functional component, the wrapper is re-created on every render and would spark the effect. That effect also updates redux (depending on the code path), so we end up in a loop.

## Change 1
Two options to fix the dependency:
1. Just remove the wrappers from the list, since we "know" it is essentially the same function (i.e. it's not function-variable that could point to something else at runtime).
2. Peek into the wrapper and determine what are the actual dependencies (usually props or data derived from props).

Solution 2 is the norm.

Aside: wrappers are usually the root-cause of incorrect dependencies, because they mask away the actual code. Need to always peek into it.

## Change 2
Next, change the dispatch-to-props map from function version to object version so that we have stable references to the actions. The object version is also preferred when we don't need to make any customizations to the actions.
2022-05-19 10:41:32 -04:00
saltrafael
0998e3d48c
Support stream updates via claim_id parameter (#1465)
* Support stream updates via claim_id parameter

* Pass claim_id on v2
2022-05-19 08:13:48 -04:00
infinite-persistence
64225d2b80
Fix selector naming convention
ByUri - returns the storage variable (array or object).
ForUri - returns the specific entry in the storage variable.
2022-05-19 13:10:37 +08:00
infinite-persistence
f245f09d1c
Revert "Temporarily prevent invalid get calls until we figure it out" (#1529)
This reverts commit f6f15531d4.

The root-cause was known (8dd0982f), and I don't think it worked because:
1. The issue happened at the web side which didn't have logging.
2. The `[object Promise]` came after the `get`, not before.
2022-05-18 20:37:53 -04:00
mayeaux
bb065eb408
dont run image preview on mobile (#1527) 2022-05-18 16:50:30 -04:00
Rave | 図書館猫
746d321dfe
Remove Premium+ Tiles when Premium+ is active (#1525) 2022-05-18 20:51:15 +02:00
Rafael
c46184e6b3 Add bottom right desktop chat resize indicator 2022-05-18 14:53:17 -03:00
infinite-persistence
53079d92b6
Move PremiumPlusTile into Ads (#1522)
* Move `PremiumPlusTile` into `Ads`

This saves the need to repeat the logic everywhere.

* Add option to disable fallback.
2022-05-18 19:52:46 +02:00
infinite-persistence
855d3dae01
ClaimList: fix infinite effect loop (#1523)
`tileUris` is being used as an effect dependency, but it gets re-created on every render (same content, different reference), so the `setUriBuffer` effect ended up in a loop.
2022-05-18 13:30:07 -04:00
saltrafael
b0b2056d78
Allow chat to be resized (#1517)
* Allow drawer to be resized

- Basically re-writes the drag behavior into the Drawer component instead of using SwipeableDrawer, getting more flexibility of where to stop and what to do
- More improvements like the backdrop effect, animations and window resize behavior

* Fix console errors

* Close drawer on unmount so other pages dont load open

* Allow livestream chat to be resized horizontally

* Fix mobile browser size

- address bar etc could be on the way

* Handle popout chat

* Fix pause with floating player
2022-05-18 12:15:12 -04:00
mayeaux
0cf8c181df
Preview image thumbnails (#1514)
working example

use my forked package

touchups to presentation

Make progress bar thumbnail sprite pixel perfect

add vtt path

fix progress bar a bit

add a black background

use odysee team package

fix two issues for merge
2022-05-18 18:02:02 +02:00
Raphael Wickihalder
77163f5aec
Fix footer ad on mobile 2022-05-18 16:26:10 +02:00
Rave | 図書館猫
c16516fab5
Show premium ads for users outside the US (#1521) 2022-05-18 10:05:58 -04:00
Rave | 図書館猫
ffdb5abf63
Tile Grid Revamp (#1502)
* Save

* Save

* Add pulse

* Adjust footer ad

* Adjust tile ad

* Adjust tile ad hover

* Fix premium badge alignment in tile grid

* Adjust livestream icon

* Adjust livestream icon

* Save scheduled livestreasm & tile ad

* Fix scheduled callback

* Fix playlist icon size on file page

* Fix grid distortion in 3 & 4 column layout

* -

* Fix grid on category & channel page

* Fix Premium Plus Grid

* Add custom tile for adblockers

* Reset env

* Remove collapsed tiles

* Remove setLoaded on scheduled livestreams page

* -

* Make isHidden optional

* Remove px

* Review adjustments

* Inject Premium+ ads

* Fix injection

* Fix injection when using the last tile

* Fix injection when using the last tile

* Enable stripe dev

* Create PremiumPlusTile component and add list view design

* Create PremiumPlusTile component and add list view design

* Adjust ads in list view

* Remove setState from render loop

* Clean code

* Fix livestream margin in list view

* Rewrite & tune some logic - Homepage & Channel page

* Clean details...

* Clean details...

* Requested review changes

Signed-off-by: Raphael Wickihalder <raphael.wickihalder@odysee.com>

* Requested review changes

Signed-off-by: Raphael Wickihalder <raphael.wickihalder@odysee.com>
2022-05-18 13:16:35 +02:00
infinite-persistence
96e704e5d9
Fix ContentState type 2022-05-18 14:32:30 +08:00
Thomas Zarebczan
1d61d80009
more analytics + fixes (#1476)
more analytics + refactor

- passes player with time to start (until we move this api to watchman)
- supports livestream metrics for buffering
- fixes bug with buffering over 10 second period
- less head calls by moving to videojs-events

* review fixes
2022-05-17 10:47:44 -04:00
infinite-persistence
be7193382c
Fix remaining untranslated ctrls
Ticket: 1507
2022-05-17 16:33:11 +08:00
infinite-persistence
5e944499f3
Refactor "Theather Mode" 2022-05-17 16:16:39 +08:00
infinite-persistence
535d02807a
Refactor "Autoplay Next" 2022-05-17 16:16:38 +08:00
infinite-persistence
36ddc69c13
videojs: refactor i18n (breaking up 'events' file)
## Issue
I couldn't find where the i18n went because the "events" refactor is just as confusing as the original -- unrelated things are still lumped together in a file.

Also, factoring based on events isn't useful -- it is features that drive what events are needed, not the other way around. This forces features to register events here, and do other things elsewhere? It will be more intuitive to have a one-file-per-feature structure.

## Change
Use existing frameworks to encapsulate things to manageable units/features:
(1) the React useEffect files (can be used isolate out React features like 'tap-to-mute' handling).
(2) the videojs plugins framework.
2022-05-17 16:16:37 +08:00
infinite-persistence
a2099482b0 Batch-resolve Watch History
## Issue
Doing individual resolves, even on a small list, is taxing.

## Change
Add infinite scroll and batch-resolve each page.
2022-05-16 07:57:24 -04:00
infinite-persistence
51616956d4 ClaimList: Factor out infinite-scroll and batch-resolve handling into an effect.
It's also possible to move the use of `useClaimListInfiniteScroll` into `claimList` itself, but opted to keep them separate for now so that `claimList` doesn't end up a bloated file like `claimListDiscover`.
2022-05-16 07:57:24 -04:00
Rafael
a4bb276608 Fix crash 2022-05-16 07:41:53 -04:00
Rafael
75df2a5f13 Also add RSS Url 2022-05-16 06:36:50 -04:00
Rafael
7c68fd1e61 Remove active livestream condition
- meaningless since its supposed to be a permanent link either way
2022-05-16 06:36:50 -04:00
Rafael
26d7e9a2b6 Add share buttons on channel page 2022-05-16 06:36:50 -04:00
Rafael
239bde0752 Also add support for embeds 2022-05-16 06:36:50 -04:00
Rafael
6b2427768c Add ability to link to latest or current live channel file pages
- and some changes to activeLivestream redux since it would return undefined if fetching and no claim, so now it returns null when no activeLivestream is found
2022-05-16 06:36:50 -04:00
Rafael
bf158ad696 Refactor
- some cleanups
- uri was being parsed the same way in different places, so do it only once for simplicity
2022-05-16 06:36:50 -04:00
saltrafael
b75a4014b6
Re-design comment threads (#1489)
* Redesign threadline and fetching state

- threadline goes right below channel avatar, mimicking reddits implementation, has a increase effect on hover and is slimmer, creating more space for comments on screen
- fetching state now replaces show/hide button, also mimicking reddit, and now says that it is loading, instead of a blank spinner, and also improves space a bit

* Redesign comment threads

- Allow for infinite comment chains
- Can go back and forth between the pages
- Can go back to all comments or to the first comment in the chain
- Some other improvements, which include:
- add title on non-drawer comment sections (couldn't see amount of comments)
- fix Expandable component (would begin expanded and collapse after the effect runs, which looked bad and shifted the layout, now each comments greater than the set length begins collapsed)
- used constants for consistency

* Fix replying to last thread comment

* Fix buttons condition (only on fetched comment to avoid deleted case)

* Fix auto-scroll

* Bring back instant feedback for Show More replies

* Improve thread back links

- Now going back to all comments links the top-level comment for easier navigation
- Going back to ~ previous ~ now goes back into the chain instead of topmost level

* Clear timeouts due to unrelated issue

* Fix deep thread linked comment case and more scroll improvements

* More minor changes

* Flow

* Fix commentList tile style

* Fix long channel names overflowing on small screens

* More scroll changes

* Fix threadline

* Revert "Fix long channel names overflowing on small screens"

This reverts commit e4d2dc7da5861ed8136a60f3352e41a690cd4d33.

* Fix replies fetch

* Revert "Fix replies fetch"

This reverts commit ec70054675a604a7a5f3764ba07c36bf7b0f49c8.

* Cleanup and make smooth

* Always use linked comment on threads

* Cleanup

* Higlight thread comment

* Fix comment body styles
2022-05-16 06:22:13 -04:00
infinite-persistence
f6f15531d4 Temporarily prevent invalid get calls until we figure it out
No analytics for the server side.
2022-05-13 12:08:28 -04:00
infinite-persistence
de206162f9
getHtml/routes/rss: fetch streaming_url instead of generating it.
## Issues from the initial attempt
- There are 2 versions of `Lbry` and `buildURI` -- the app and web-server version.  There are subtle differences between them, and for the app case, importing the web-server version results in a query into an invalid URL.
- It changed the function from returning a string to returning a promise.

## Changes
- Since the new function (renamed to `fetchStreamUrl` for clarity) is currently only needed for web-server, I moved it into the `web` folder to avoid misuse in app.
- Await on the promise. Unfortunately, this also means the entire chain of function calls need to be adjusted to be `async`.
2022-05-13 20:23:17 +08:00
infinite-persistence
251187de06
useGetThumbnail: fetch streaming_url instead of generating it.
In the first attempt (PR 1497, 4d44d81f), the `generateStreamUrl` was tweaked to fetch a `Lbry.get`, which returns a promise.  On top of a few async issues on its own, we also can't just simply `await` here since render functions need to be pure.

Fortunately, there is already redux structure for `get`, and Sean happened to already be passing all the required stuff here (sight beyond sight!), so it's just a matter of calling it.

Again, render functions need to be pure, so the fetch has be in an effect, so the component might take several renders to get the image painted. But oddly this seems to avoid the occurrence of showing the fallback spaceman image (just an observation, no proof of correlation).
2022-05-13 18:19:20 +08:00
infinite-persistence
d5e56d20b6
Remove 'app' code to reduce clutter 2022-05-13 16:16:39 +08:00
infinite-persistence
13b59037a6 1317: Log and send totalPlayingTime
The current time is quantized to 1s, and `lastTimestamp` is used to prevent duplicate counts because `timeupdate` is fired at ~250ms intervals.
2022-05-12 18:35:20 -04:00
infinite-persistence
72b0977817 Recsys: pass isFollowing and incognito
Additional data requested.

isFollowing - is the user following the creator
incognito - authenticated or not
2022-05-12 18:35:20 -04:00
Thomas Zarebczan
6e9b07ec6f Revert "Replace generateStreamUrl for Lbry get call"
This reverts commit 4d44d81f59.
2022-05-12 18:16:03 -04:00
Thomas Zarebczan
4d44d81f59 Replace generateStreamUrl for Lbry get call
+ remove unused config
2022-05-12 15:24:58 -04:00
Thomas Zarebczan
ac0ec4794a
Fix quality selector 2022-05-12 11:48:21 -04:00
Rafael
b2763e4bf0 Fix Kebab 2022-05-12 11:34:05 -04:00
infinite-persistence
b2b1692525 Restore SDK error logging, limiting to support_create.
v1 publishing timeout is already being recorded. Look for the string `publish-v1: timed out after`
2022-05-12 08:43:59 -04:00
infinite-persistence
c4f88ac7e8
Fix 'freshness' filter not working in Category Pages
## Issue
Ticket: 1484

The commit `7622e7a: Fix release time on category pages` passes in the `releaseTime` prop, which usually means we want that value to be override.

## Change
Only pass the prop when there 'freshness' filter is not active.
2022-05-12 15:37:01 +08:00
infinite-persistence
123496e734
Remove old comment - Wild West is now a proper category 2022-05-12 14:51:53 +08:00
infinite-persistence
40a59c53d4
Don't show wallet value until prefs are ready
... because preference might be "Hide wallet = true". This eliminates the gap during login or boot up that temporarily shows the wallet balance.

Ticket: 1365
2022-05-12 14:36:06 +08:00
Raphael Wickihalder
4fcaf7ba2f
Fix timestamp input type 2022-05-11 18:56:33 +02:00
Raphael Wickihalder
57eae71d12
Fix timestamp input pattern 2022-05-11 18:44:01 +02:00
Raphael Wickihalder
b0e213a2b5
Fix timestamp input pattern 2022-05-11 18:31:18 +02:00
infinite-persistence
6ade6611d9 Suppress latest floater ad 2022-05-11 10:24:43 -04:00
infinite-persistence
c572891590 Update /$/live to use latest API
1480
2022-05-11 07:57:44 -04:00
infinite-persistence
bf6a2e51c1
Band-aid: hide video ad close button until next update is ready 2022-05-11 16:26:27 +08:00
Thomas Zarebczan
18ec09c5b0
clear up about page 2022-05-10 14:10:31 -04:00
Thomas Zarebczan
71894daf49
Fix crash on middle click (and others?) 2022-05-10 13:25:47 -04:00
infinite-persistence
8874008245 Support homepage-specific memes
1446

- Requires an accompanying commit in `odysee-frontend`.
- The change assumes that the `odysee-frontend` is the only project that uses these files directly, i.e. other clients will use the API instead.
2022-05-10 21:43:14 +08:00
Rafael
17868635bd Bring back default channel functionality
- consolidate cases that need to auto set an active channel (like edit page) into channelSelector component
- also for consistency since some components would do it with button click and others on page mount
- prevent clear function on those pages (kind of a manual process to insert each page into the router condition)
2022-05-10 09:06:10 -04:00
Rafael
0afeaa6223 Remove active channel cleanup function
- reverts active channel functionality back to how it was previously, making the default channel simply a sync fallback and removing all complexity and confusion
2022-05-09 07:50:44 -04:00