Commit graph

5259 commits

Author SHA1 Message Date
infinite-persistence
40bd160748
Fix membership splash cls
- Put their intrinsic sizes so the browser can pre-allocate space for them.
2022-03-18 13:19:35 +08:00
infinite-persistence
9482a7f986 Snack: sub-message, close button and duration setting
- Add close button to allow immediate dismissal.

- Add ability to support sub messages. Will be typically used for error codes, etc.

- Add ability to define 'long' auto-dismiss duration (15s) vs. the default of 5s.
    - I didn't add 'off' because there is a comment saying that this scenario should use the Error Modal instead, so respecting that for now.
2022-03-18 00:51:44 -04:00
infinite-persistence
d1d9b116d4 i18n: page titles; collection shortcut; string removals 2022-03-17 18:10:42 -07: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
35f0777320 FYP: fix "ignore" response handling (it's not a json) 2022-03-17 10:34:37 -04:00
infinite-persistence
a31ea6417a FYP: "Don't recommend channel" 2022-03-17 10:34:37 -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
infinite-persistence
f01004e9b6 FYP: setting to hide section 2022-03-17 10:11:50 -04:00
Rafael
ae56058384 Consolidate timeout thumbnail effect 2022-03-17 10:06:50 -04:00
Raphael Wickihalder
bc6ed5d483
Vertically center play button 2022-03-17 12:38:57 +01:00
Raphael Wickihalder
5632624cd9
Center play button 2022-03-17 10:30:50 +01:00
infinite-persistence
ec2bf26817
Fix flow for User/UserState 2022-03-17 13:12:18 +08:00
infinite-persistence
7dd7aac8d2 fileRenderInitiator: missing timer cleanup 2022-03-16 21:02:07 -04:00
infinite-persistence
32d5eaf8e1 Don't translate 'Premium/Premium+'
- Forgot that we've concluded to not translate 'Premium/Premium+' and keep that as a product name. This is the same as competitors.
- For other instances of "Premium" in a longer string, we'll just have to communicate with translators to not translate it.
- Remove a few old strings.
2022-03-16 20:56:40 -04:00
infinite-persistence
fdd83537a3 SettingsRow: add "members only" tag
Not using the membership icons because that has 2 colors for premium and premium+. Keeping it generic and simple.
2022-03-16 20:37:07 -04:00
infinite-persistence
d3109bd330 Update settings css, hopefully closer to bem 2022-03-16 20:37:07 -04:00
infinite-persistence
c8bdb33e65 Refactor modals; no functional change
This should be equivalent to the previous, just that the promises are stored in an object rather than variable. Benefits:

- Allows a single "prettier-ignore" to bypass the multiline import.
- Slightly less work when adding new modals by not having to create a named variable and handle the switch-case.

The webpack lazy-load syntax is unfortunately verbose, so this is the best I can come up with for now.
2022-03-16 18:24:32 -04:00
Rafael
57ff910bbb Re-fix layout shift 2022-03-16 18:39:09 -03:00
Thomas Zarebczan
fa1cfc4882 Fix player current time
undo

Fix play

fix play

hide play
2022-03-16 16:36:50 -04: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
d4cb51ff2a fix mobile embed 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
05b44fc4ab Fix fetch 2022-03-16 16:36:50 -04:00
Rafael
9298bf1e51 flow 2022-03-16 16:36:50 -04:00
Rafael
ebfe644cb8 Add miniplayer 2022-03-16 16:36:50 -04:00
Rafael
6ce9bd5cf7 Fixes 2022-03-16 16:36:50 -04:00
Rafael
93b70f5e92 unmount on end 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
f7bceb3734
Geo: fetch after authentication since it needs auth_token (#1119) 2022-03-16 11:09:43 -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
972429b391 FYP: allow mobile to reject + change phrasing
- This allows mobile to reject recommendations.
- Also changed from "I dislike this" to "Not interested". Less negative?
2022-03-15 20:57:28 -07:00
infinite-persistence
e9559efe10
FYP: batch resolve results 2022-03-16 10:57:26 +08:00
infinite-persistence
fc3e3ae844
Fix debug mode fetch of FYP + some formatting cleanup 2022-03-16 10:51:03 +08:00
Thomas Zarebczan
e62031f0a2
don't load FYP endpoint if not Premium 2022-03-15 15:25:08 -04: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
infinite-persistence
5445a95c9a
Geoblock: support content claim id as well (#1096) 2022-03-15 14:48:26 -04:00
Thomas Zarebczan
58c9209c96
Fix admin icon mouse over 2022-03-15 09:48:25 -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
Franco Montenegro
69a9245324
6205 remember last used playlist choice odysee (#967)
* Add last used collection to right click menu.

* Small fix for last used collection when it's a published collection.

* Update last used collection when a collection is pending or published.

* Small refactor to get the last used collection.
2022-03-14 09:07:27 -04:00
infinite-persistence
b9d392526c Fix #798: fix action dispatch order in doFetchItemsInCollections
We need to store the resolved claims first before marking COLLECTION_ITEMS_RESOLVE_COMPLETED, otherwise the GUI still sees undefined claims.

798 just accidentally flipped the order due to refactoring, I believe. It's now back to original.
2022-03-12 08:54:43 -05:00
infinite-persistence
5a1ad487f3 Handle case of missing effective_amount
Closes 916 "NaN in Total Staked Amount"

Contemplated putting the fallback into `<CreditAmount>` itself, but decided to minimize testing. Not sure if there are clients that would rely on NaN being used.
2022-03-12 01:02:03 -05:00
infinite-persistence
de9b3b641d Notification bubble: add border since it's the same color as an active button
950 "notifications count clashes with color of the expand button in top right"
2022-03-12 00:56:56 -05:00
infinite-persistence
59591c7695 Playlist: reduce show count to half in mobile.
This is for performance reasons on the horizontal view.
2022-03-12 00:53:03 -05:00
infinite-persistence
2e3f9f94ce ListOverlay: don't loop through all items if we just want 2
`map` does not short-circuit
2022-03-12 00:53:03 -05:00
infinite-persistence
5b2c901496
List Page: use swipe layout for mobile (#1069)
* Add swipe layout support for Collection Tiles

* Lists: use swipe layout for mobile

Ticket: 950 "playlists page - right now we show watch later on top, and if you have stuff here, you have to scroll down to other playlists. Show a selector on top? Whatever other improvements we can make here to improve UX."
2022-03-11 06:53:49 -05:00
infinite-persistence
a3ef81cded
Remove "comment acknowledge" modal + unused strings
Commenting is probably no longer in alpha, but the modal is definitely no longer used.
2022-03-11 12:41:22 +08: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
6b77cb2bfa
Fix comment count not incremented when it was previously 0
It was causing the nudge to add a comment to still appear after one has just entered a comment.

Ticket: 928
2022-03-11 12:27:27 +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
Raphael Wickihalder
d52fd8e26e
Fix badge alignment on channels page on mobile 2022-03-10 20:19:55 +01:00
Raphael Wickihalder
1f12cc594c
Realign & resize premium badges on channels page & channel page 2022-03-10 17:44:54 +01:00
infinite-persistence
ea8af5aa89
Handle case where ad-cleanup fails (redo)
The solution didn't work 100%, only reduces the chances of happening significantly. So far, still can happen on hot-reload during development.

- Reverted 15bd26399f.
- Fix by just hiding the unoccupied aniBox
2022-03-10 21:54:12 +08: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
infinite-persistence
803a779e9e
Fix usages of I18nMessage + missed sign-in verification strings 2022-03-10 13:21:46 +08:00
Raphael Wickihalder
ef28514686
Align premium badge in header 2022-03-09 22:28:37 +01:00
Raphael Wickihalder
d5100b4bf7
Adjust icons in premium splash 2022-03-09 20:30:28 +01:00
Raphael Wickihalder
d1995fa053
Adjust icon size in micro navigation on HiDPI desktop 2022-03-09 20:23:47 +01:00
Raphael Wickihalder
c72f4fe2a1
Adjust icon size in micro navigation 2022-03-09 20:10:39 +01:00
Raphael Wickihalder
03685048f8
Adjust icon size in micro navigation 2022-03-09 20:05:46 +01:00
mayeaux
fb3a73d8a7
Membership subscriptions (#812)
Enter: Odysee Premium.
2022-03-09 13:05:37 -05:00
infinite-persistence
a34e07e970 uriIndicator: calling normalizeURI called without a try-catch
Closes 1048 - "There was a bad URL without a letter after #, and this failed on resolve + crashed the app. Maybe a try/catch for each URL?"
2022-03-09 09:47:31 -05:00
Raphael Wickihalder
ea827b2d31
Replace play icon in playlist 2022-03-09 15:42:35 +01:00
Raphael Wickihalder
d68b869469
Adjust play icon size in active element on playlist page on mobile 2022-03-09 14:48:25 +01:00
Rave | 図書館猫
df04f727da
Design patch v2 (#1058)
* Fix design & UI issues

* Fix play icon on active element in playlist
2022-03-09 14:38:59 +01:00
Rave | 図書館猫
2c34e0d857
Fix design & UI issues (#1056) 2022-03-09 14:21:18 +01:00
infinite-persistence
a98dc18fc6
Fix EU ad and minor tweaks
- Initially, we did a bunch of forceful CSS to make the ad tile resize properly when the browser resizes. This was causing the EU ad to display incorrectly. Turns out, that css is no longer needed after the BEM-style re-write.

- Changed the floating ad selector to cover both EU and non-EU version. It's probably still not the best given it relies on style rather than ID, but the ID seems dynamic.
2022-03-09 18:44:38 +08:00
infinite-persistence
efbbba6958 Channel Search pagination
Closes 605 "Add pagination support to channel search"

## Previous Attempt
The previous attempt (69de63c4) didn't work because the wunderbar is part of the list component, so it is unmounted when we switch between the Normal and Filtered list, causing it to lose focus while typing.

Also, creating another full-blown ClaimList* component is really redundant (we should be consolidating instead).

## Approach
ClaimListDiscover recently added a new `subSection`, so we can place the filtered `ClaimList` here without causing the wunderbar to unmount.

Wrapped the "lighthouse search with channel_id" into `searchResults.jsx` for now as a quick and isolated solution. When we refactor ClaimList*, we can then consider incorporating into `doSearch`.
2022-03-08 19:50:44 -05:00
infinite-persistence
7904e751ac Use the same default spinner style for both Tile and List
The tile placeholder method didn't work well because the component doesn't know how big the page size is, so we always end up rendering 1 placeholder tile, followed by N (= page size) placeholders (if not yet resolved). It's pretty ugly.

Removed comments:
- Incorrect/misleading: "injected item" does not mean "ads". It can be any React component that you want to put at a specific index.
- Redundant: don't explain the syntax. It's very annoying having to maintain the comment when the logic changes.
2022-03-08 19:50:44 -05:00
Anthony
af8d742b75 add some comments for documentation 2022-03-08 10:53:52 -05:00
infinite-persistence
f24f6783d4 Removed background highlight for tile ads
- For https://github.com/OdyseeTeam/odysee-frontend/pull/1046#issuecomment-1061874612
2022-03-08 10:53:52 -05:00
infinite-persistence
0143b63c74 Ads: replace DOM manipulations with React components
- Instead of 2 ways to display ads (DOM injection + React method) and having both of them clash, just do it the predictable React way.
    - Augment the existing React version to support tile layout + ability to place in last visible slot.
    - Consolidate styling code to scss ... DOM manipulations were making it even harder to maintain.
    - Removed the need to check for ad-blockers for now. It was being executed every time an ad is displayed, and now that we are displaying ads in more places, the gains doesn't justify the performance loss. Also, it wasn't being done for Recommended ads anyway, so the inconsistency probably means it's not needed in the first place.

Other known issues fixed:
- double ad injection when changing language via nag.
- additional "total-blocking-time" due to ads at startup removed.
- fixed ads not appearing in mobile homepage until navigated away and back to homepage.
- enable ads in channel page.
- support for both List and Tile layout.
2022-03-08 10:53:52 -05:00
infinite-persistence
e2f73a30c6 Remove triggerBlacklist
Since `triggerBlacklist` is just a simple boolean and `<Ads>` is not doing any additional logic on top of it, it doesn't make sense to pass as a parameter. Just not mount the component -- it's more concise and obvious at the client side.
2022-03-08 10:53:52 -05:00
infinite-persistence
1b0b9cad94 Cleanup ad container css
- Non hardcoded way to reserve space.
- Replace hardcoded margin.
2022-03-08 10:53:52 -05:00
infinite-persistence
b0b0cd825b Recommended: restore ad location
Ticket: 1018
Reference: 2575c5d

- Restored position of the ad to the 4th slot.
- Moved repeated query out of the map predicate (`droppableProvided ?`)
- For draggables, make the injected item always on top for now. There are draggables with injected items at the moment.
2022-03-08 10:53:52 -05:00
infinite-persistence
65931202b0
Fix missing subs in sidebar on login
At least show the original list
2022-03-07 10:41:54 +08:00
infinite-persistence
5ba7b5e705
Following-Manage: increase size of 'Recently Active' entries for medium/large layout 2022-03-05 23:08:35 +08:00
infinite-persistence
1e7c9ab030 Hide comment thread-line when no replies
No replies when:
- haven't fetched yet
- replies blocked/muted

It's being displayed as a dot in these scenarios.
2022-03-05 08:59:53 -05:00
infinite-persistence
b5bd36839e Sidebar: show "last active subs" instead of "by name"
1003
2022-03-04 11:32:00 -05:00
infinite-persistence
4a5e967628 Recommended: fix "no results found" flashing after search
## Cause
When 'selectRecommendedContentForUri' is filtering results against the blocklist, it relies on claim data which could be unresolved yet. It filters to empty results for this scenario, hence the flashing message.

## Change
Just return raw results when claims are not resolved yet, so that the GUI knows it needs to show the placeholders while resolving. After resolving, it'll go through the blocklist filtering again.
2022-03-04 09:40:58 -05:00
infinite-persistence
de0bc8cf99 Recommended: optimize nextUri calculation
Instead of filtering the entire list for a suitable nextUri and then picking the first one, short-circuit when candidate is found.
2022-03-04 08:35:50 -05:00
infinite-persistence
cc780c95ae SignUp: don't show spinner when in focus (aka GetSync)
## Issue
Closes 1020 strange refresh on signup + youtube sync

It's due to the sync-on-focus.

## Change
Only show the spinner for the initial wallet sync. I thought we can do without the spinner for sync completely, but based on the comments below, better to retain that for the initial sync.  I think the rest of the stages don't need to block over a sync call.

```
// Don't claim the reward if sync is enabled until after a sync has been completed successfully
// If we do it before, we could end up trying to sync a wallet with a non-zero balance which will fail to sync
```
2022-03-04 08:28:32 -05:00
infinite-persistence
79978f026f
Localize the homepage selector too 2022-03-04 12:21:34 +08:00
infinite-persistence
76493d48ee
Missed remaining 'homepages' imports
This is a follow-up for #1016

Still doesn't affect anything at the moment, but this reduce the amount of work needed when we yank out the homepages from our bundle later.
2022-03-04 11:10:08 +08:00
Rafael
5dd457d045 Fix live chat 2022-03-03 11:39:42 -05:00