When Safari parses lbry:// URLs, it breaks them as they are not
compliant with the RFC 3986 URI syntax. This causes iframes in text
posts which link to a lbry:// URL to not display on Safari.
Instead, just use the lbry:// URL matched from the iframe regex instead
of parsing the iframe on Safari.
## Issue
If the reward-list fetch is slow, the selector assumes the weekly_watch hasn't been claimed yet, causing an unnecessary claim.
## Change
The selector now tells the caller if there is no data -- up to caller on what to do (in this case, don't claim the reward).
It should be harmless if the claim action was missed, since the user can still manually claim it.
## Issue
Hide reposts gets enabled on channel page by default, on a fresh browser session.
Open Odysee in private tab
Go to some channel page
Go back
Go to some channel page(same or different)
"Hide reposts" is enabled, and settings expanded
Above also works with logging in while having "hide reposts" disabled in global settings. (edited)
## Fix
Forgot to add default value.
## Issue
It's a split-string (both in sentence and html) that translators can't translate
## Change
Asked around, and it's not a design requirement to have 2 lines. Feel free to put in a better drive tagline.
* Re-organized per 'state->var->func->effect->return' structure.
* Add "Hide Repost" button in channel page
Ticket: 1762
## Change
For the placement of the button, putting it inside the expanded settings group feels the most natural, plus we then don't need to check whether the channel has reposts or not before displaying it (the expanded area is for stuff like this).
## Notes
The tricky part was making the code maintainable w.r.t to the global "Hide Repost" setting. Changed `forceShowReposts` to `hideRepostsOverride`, hopefully makes things more obvious.
- undefined = fallback to global setting
- true/false = use override
## Ticket
1329
The existing nudge to refresh the webpage only happens when the app cannot find the specific javascript file in the server. As we don't purge the files on each build, the browser typically uses the cached version of the app, which could be weeks behind (based on the error logs).
## Approach
Poll the current version periodically (set to 1 hour for now) and invoke the nudge when a newer version is detected.
We typically don't need to bump `MINIMUM_VERSION` unless there is an urgent need to make users move away from older versions (e.g. API changes, mistakes, etc.)
## Trade-offs
Wanted to put the value in a separate file called `.min.version` so that the env's history won't be polluted with version bumps, but not sure how to implement with minimal code without having to read from the file. Getting from the env is the easiest to implement (per my limited knowledge).
## Ticket
"1742 Notification popup: incorrect target"
Commentron uses old links for some of the notification types.
## Change
Factored out the code that determines the new target and use it both Notifications Page and Popup Menu.
## Ticket
1768 Check reward claiming logic
## Change
- Bump to >6.5 days
- Remove unnecessary `Math.ceil` -- not sure why I added that. It was causing diff to hit earlier than necessary.
> _and I'm 5 days away._
Not sure how to replicate/explain this, though -- the old code would have still covered this range. One possibility is when `last_claimed` is not defined, where we assume user hasn't claimed yet. We could flip this to assume "claimed" and just let the user manually claim as the fallback -- let me know.
* DRY up membership selector
Selectors should be chained up, not copy/pasted.
* PremiumBadge: retrieve membership db internally instead of from parent
## Ticket
1753 odyseeMembershipByUri function causing unnecessary renders
## Issue
While the rendering issue in the ticket is due to the way the props are defined, it also surfaced a prop-drilling issue with PremiumBadge.
Instead of asking the parent for the membership db, it can retrieve from Redux itself. This prevents the prop from polluting 2 levels of components and causing unnecessary renders.
## Approach
- Make `PremiumBadge` accept `uri` like most other components.
- I still leave the `membership` prop as (i.e. parent can still pass it directly). In some cases (e.g. `livestreamComment`, `page/odyseeMembership`), the parent itself needs the same data, so we don't need to derive it twice.
## Ticket
725
## Issue
Upload a video. When `notify` is sent at the end of the tus upload, refresh immediately. The GUI allowed the user to resume the upload, but the ID is no longer present in the server.
## Approach
Until the polling API for `notify` is available, we can only assume the best and let the user know how to handle it.
- Store the "notify was sent" state.
- Show a dialog explaining the situation.
Thought of trying to make `claim_list` calls behind the scenes to clear itself, but it doesn't handle the case of `notify` actually failing. The best is to just let the user handle it for now.
Note that for the case of `onerror` actually received, we still retry since a network error could be the culprit (`notify` wasn't sent).
## Issue
Depending on what the markdown content was, React crashes when unmounting the component if Google Translate is active.
## Change
It seems like the content is too dynamic to apply the same workaround used in 1772 for FileReactions (someone else can take a stab).
Until we have a better solution, just make the markdown component (posts, comments, file description, etc.) not participate in Chrome-level translations. It's not a good solution from a user standpoint, but it at least it doesn't crash.
This reverts commit 1dccc1ac64.
Closes 1770
Re-opens "1515 uploads page cleared/reloaded on each navigation"
1515 is just a minor annoyance, while the current issue is a non-functional page, so reverting for now and revisit later.
fix chapters button not being hidden
add back live ui
fix chapters button showing up when using miniplayer
bugfix race condition for removing chapters button
move chapter loading to videoviewer component
remove unnecessary claim being passed
* Remove dead-end selector
`playingUri` resides in the `content` slice, so this returns nothing.
Nobody is using it, so should be safe to remove.
* Recsys: add `isEmbed` to videos in Markdown (posts, comments)
It seems like the existing `embedded` needs to specifically mean `/$/embed` (external from odysee.com), so had to add another variable.
- Fixed value props being named like a function/selector.
- Fixed flow type for membership (should be `?string`).
- It might not matter in the current code, but the whole purpose of type checking to catch usage errors in the future.
- `hasXXX` indicates a boolean, so it doesn't make sense to force the client to input a string.
## Issue
The 15s saving interval (hijacking the position-saving code) is too far apart, causing rescys data to be lost when tab is closed/refreshed.
## Change
While I think it is fine to save to redux every second, it is still best to avoid that since a state change will always cause the map-to-props to evaluate.
Chose 5s as the interval and moved away from the position-saving code (the recsys videojs plugin is a better choice to handle this).
Also save it on `t=1` so that at least we know it played prior to the tab refreshing/closing.
## Considered
- Didn't want to do `beforeunload` again since it is unreliable and a pain to test in mobile.
Ticket: 1751
## Issue
The `totalPlayTime` resides in the videojs plugin and is only sent to the recsys object in `onPlayerDispose`, so it missed the redux rehydration in the browser close/refresh scenario.
## Change
Update the recsys value for `totalPlayTime` immediately so that it'll be part of the redux stashing (and later, rehydration).
Note that recsys data is currently being saved to redux in a 15s interval. Will change that in the next commit.
* adding preorder button
* adding preorder modal
* frontend mostly done
* check if its already purchased
* refresh page after purchase
* smooth out purchase process
* check if user has card saved
* handle case where its the users own upload
* fix transaction listing order bug
* cleaning up code for merge
* fix lint errors
* fix flow errors
* allow eur purchases
* support eur on customer transaction page
* fix css
And function name - was confusing that we had 2 with different paths.
Use 1280x720 to improve caching (used on mobile/tablets). There's no real spec for size.
* Remove ad-handling in videojs.jsx
Primary impetus is to remove unnecessary IntersectionObserver usage, but it should be removed anyway because:
- no longer relevant today with Adnimation's script.
- we also globally hide floating ads now, so no more invisible divs.
- the code is wrongly placed -- it's not the responsibility of the Videojs component.
* use-lazy-loaded: skip if IntersectionObserver is not supported
## Issue
Page not loading in older Safari (e.g. ipad air 2)
## Approach
Instead of using a polyfill (which comes with implementation caveats), just not apply the lazy-loading for those old browsers. Not lazy-loading is better than not loading at all, plus this is way easier to test (even by just reading the code) than testing out the polyfill implementation's caveats.
The cons is we would need the polyfill if we use it in other places in the future.
## Code Changes
Factor out the src-setting code, and use it directly when IntersectionObserver is not found.
* PublishReleaseDate: improve calendar error handling
Ticket: 1738
- Report invalid `minute` and `day`. The 3rd-party widget auto-corrects the other fields. Don't think there is a way to make it autocorrect for all.
- Report invalid range (cannot set to future date).
* Block form on releaseDate error instead of silently sending last valid value
which does not tally with what's on screen.
## Issue
1709 - If you sign in while reporting, you end up in the homepage
## Notes
The other option is to just make `<Header>` always redirect back to where it came from using the full path. But existing code elsewhere seem to always trim off any params (e.g. `location.search`, `location.hash`) when doing redirects.
So, ended up making it generic and let the caller decide where to redirect (and with what params).
In `doResolveUri`, if the `uri` is a collection, it will attempt to fetch all items in the collection.
Can't think of any special reason to keep the page-size small, and not seeing any notes in the commits either. It just ends up making several `claim_search` of 5's until all items are fetched.