Commit graph

5196 commits

Author SHA1 Message Date
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
Rafael
fea79d81fb Rename selector 2022-03-03 11:39:42 -05:00
Rafael
c1a67f6864 Fix comment discussion mounted state when switching uris 2022-03-03 11:39:42 -05:00
Rafael
c4a23ff856 Fix batch resolve 2022-03-03 11:39:42 -05:00
Rafael
7c3cbaca15 Fix subs resolving on file page when sidenav closed 2022-03-03 11:39:42 -05:00
Rafael
96e7fda26a Batch-resolve channels on doCommentList fetch 2022-03-03 11:39:42 -05:00
saltrafael
7c304702d6
Fix locale fetch (#1017) 2022-03-03 11:29:23 -05:00
infinite-persistence
66e0b84e12
Grab homepages from the content API (#1016)
Currently, homepages are still build as part of the app, so this change doesn't bring much benefit other than to support the wrapper app.

When the service is moved away from the app, we won't have to rebuild the app when homepages change, and also the ui.js bundle would be smaller without the need to code-split.
2022-03-03 09:22:59 -05:00
David Granado
7263bde491 Revert "Adjust logic to only run interval when video is playing."
This reverts commit 5ce6ab9689c1610f24869c7347b823cc2023b767.
2022-03-02 20:20:27 -08:00
David Granado
3631bdddbc Adjust logic to only run interval when video is playing. 2022-03-02 20:20:27 -08:00
David Granado
0f2eba8733 Switch unnecessary let to const 2022-03-02 20:20:27 -08:00
David Granado
abb92726ab Rename variable to include value units 2022-03-02 20:20:27 -08:00
David Granado
4d438ed62f Widen save interval 2022-03-02 20:20:27 -08:00
David Granado
38f00be231 When video is playing, save position intermittently 2022-03-02 20:20:27 -08:00
Thomas Zarebczan
c4ae797add
Remove deprecated migration 2022-03-02 21:48:40 -05:00
saltrafael
2e87c431ea
Improve logic for different scenarios (#1014) 2022-03-02 13:12:33 -05:00
Thomas Zarebczan
a01e4bad78
update iframe type + sentry 2022-03-02 12:45:26 -05:00
infinite-persistence
2eae20f0bd
Embedded images: serve via CDN for IP protection. (#1009)
## Ticket
536 "Embedding images without proxy is probably not in compliance with data protection regulations in Germany/Europe (GDPR)"
2022-03-02 11:23:34 -05:00
Raphael Wickihalder
fcbaa51df6
Fix OneTrust banner focus 2022-03-02 16:34:33 +01:00
infinite-persistence
5098b7cd87
RecommendedContent: fix ad-words filtering (#1007)
## Issues
Ad-filtering:
- Filtering was done whether or not ads are injected.
- Constants are repeatedly calculated.
- No short-circuiting in the for-loop.
- No memoization (being called 5-6 times on average due to redux updates, can't avoid that).

Others:
- Potentially passing null claimID to recsys (I think this is the issue that Johnny reported in Slack).

## Changes
- Moved 1-time calculations outside of the function.
- Optimized the filtering function and memoize it.
- Reduce unnecessary props since we are passing the whole `Claim` object already.
- Fix recsys being called when claim is not resolved yet (null claimId).
- Move away from the incorrect `makeSelect*` selectors.
2022-03-02 10:10:29 -05:00
saltrafael
712e02db16
Use locale/get response to suggest homepage and language switch (#839)
* Use locale/get response to suggest homepage and language switch

* Fix language modal condition

* Fixes from review

* Fixes from review

* Fix gdpr

* string

* Fix multiple options behavior

* Fix gdpr and use only one fetch

* Only show if no languages set or loaded

* pt-br

* Fix ad

* Fix homepage select

* Fix zh langs
2022-03-02 09:44:01 -05:00
infinite-persistence
f839e0c35d ClaimList: add default page-load indicator | Apply for Search and Following-Manage
Clients can still choose to roll their own way of showing "is fetching", like how ClaimListDiscover displays a whole bunch of placeholder tiles. This just serves as a default.
2022-03-02 09:16:43 -05:00
infinite-persistence
06f7cdbe25 Recommended section: add spinner while searching
It takes a while sometimes, so it feels like not doing anything.
2022-03-01 22:14:14 -08:00
infinite-persistence
83a816bf34 Following Page: make the 2 buttons flow with less space used 2022-03-01 22:07:04 -05:00
infinite-persistence
19dc09b262 ScheduledStreams: don't apply horiz scroll in Medium screen 2022-03-01 22:07:04 -05:00
infinite-persistence
82c4170e64 ScheduledStreams: force horizontal-swipe to tile-only
List-layout is not scrollable, and doesn't look good either. Force to tile-only until we can fix it. If we decide to always use tile-only, then remove the parameter for ScheduledStreams.
2022-03-01 22:07:04 -05:00
infinite-persistence
6c76cff2a0 Fix sidebar subs inefficiencies
- `filteredSubscriptions` was running the filter code whether or not it actually required filtering, because the `!subscriptionFilter` logic is placed in the predicate. While it is a clean one-liner, it is slow when the subs list is huge.
    - While at it, moved the code into `getSubscriptionSection` to isolate things.

- The sidebar was resolving the entire subs list, which is super slow for a list of 500+. Since we now have a "Manage Subscriptions" page, just batch-resolve the N visible subs.
    - TODO: the code should probably be moved from 'app' to 'sideNavigate'.
2022-03-01 10:50:07 -05:00
infinite-persistence
3edb00b99d Manage Subs: change from claim_search to batch-resolve
The idea of using claim_search to indirectly batch-resolve didn't work out well. There's something wrong with the claim_search pagination where some results are duplicated in multiple pages, while some are missing. It's also returning less results that than the given number of claim ids, so sometimes the infinite scroll breaks.
2022-03-01 10:50:07 -05:00
infinite-persistence
0090e9b1ae Manage Subs page 2022-03-01 10:50:07 -05:00
infinite-persistence
1249b0394e claim_search: support ordering by 'name' 2022-03-01 10:50:07 -05:00
infinite-persistence
54f8bd35b3 DebouncedSearch: add inline option + use FormField
Using FormField so that the existing css works.
2022-03-01 10:50:07 -05:00
infinite-persistence
17a9b84df1 Following Page: use horizontal livestream tiles for mobile 2022-03-01 10:27:09 -05:00
infinite-persistence
b99c83a13f Fix "Results boosted by LBC" wrapping unnecessarily 2022-03-01 10:27:09 -05:00
infinite-persistence
d15a0308b2 Category livestreams: re-implement using subSection + use horizontal scroll in mobile
The `useDualLayout` junk is super confusing to maintain and no longer extensible.

At the expense of making the "livestream + regular" list no longer seamlessly continuous when expanded (or when there just a handful of livestreams), use the new `subSection` feature to inject the livestream tiles.  This is far easier to manage and tweak.
2022-03-01 10:27:09 -05:00
infinite-persistence
5f92ccbf47 ClaimListDiscover: add subSection area
This will be an additional area under Header/Meta that clients can put anything with.

Primary impetus is to place the Livestream Tiles in Wild West.
2022-03-01 10:27:09 -05:00
infinite-persistence
6b2d83986b Moved "Dismiss Pin" to the top
If it's a pinned commented, dismissing it is probably the action that the user is looking for, so doesn't make sense to put at the bottom.
2022-03-01 08:53:40 -05:00
Rafael
802dfb0ba8 Fix floating player on auth page 2022-02-28 10:45:54 -05:00
infinite-persistence
fee8e16bd8 Restore spacing between Sort and Filter on mobile
## Ticket
950
2022-02-27 21:38:30 -05:00
infinite-persistence
79a25986ed
Fix ICONS.SUBMIT lost in a prior commit 2022-02-27 18:01:59 +08:00
Thomas Zarebczan
cfea97dd96
Claim title fixes
Also fixed bug on mentions
2022-02-26 13:48:22 -05:00
infinite-persistence
f88bfcd7f3 Render whole app on language change
## Issues
1. We were manually adding `selectLanguage(state)` as a prop to components used in Settings Page to trigger a render. Flaws:
    - Unclear that the unused prop is just to trigger a render.
    - Manually adding on a case-by-case basis will break over time, especially when language can now be changed outside of the Settings Page.

2. The translation file fetching is delayed and also takes time, so the GUI will end up having mixed strings on F5, depending on when the fetch completed.

## Approach
Make the app wrapper have a key that's tied to the language and translation data, so the entire app renders when language changes. Seems like a common design in most apps.

## Ticket
921 language refresh / selection issues
2022-02-26 13:08:17 -05:00
infinite-persistence
5c91d55cbc Fix sub/view count not in compact form for some components
## Ticket
968 Truncate views/subs in other areas

## Changes
- Corrected logic for `minThresholdToApply`, which was ignoring the case of "no threshold", causing it to not be truncated in Channel Page. We want to always truncate there due to the smaller cards.

- Missed out handling `ClaimPreviewSubtitle`.
2022-02-26 10:27:25 -05:00
infinite-persistence
7a59976a5d
i18n: context-split "Duration"
Request from Chinese translator.
2022-02-26 20:35:04 +08:00
infinite-persistence
241a6182a2
FormFieldDuration: 'mo' incorrectly hinted as 'month' + i18n fix
The unit is either 'month' or 'b', so the tooltip and placeholder was incorrect.

Also fixed the tooltip to make it localizable.
2022-02-26 20:25:56 +08:00
infinite-persistence
45181c61b8 Highlight the "Search in selected language" if coming from the hint 2022-02-25 16:53:45 -05:00
infinite-persistence
9665f7f4c2 Add ability to highlight a Settings Row 2022-02-25 16:53:45 -05:00
infinite-persistence
1777397f07 Add hint that results are being filtered by language 2022-02-25 16:53:45 -05:00
infinite-persistence
3974ca6322 ClaimListDiscover: if 'uris' is given, there is no need to perform a search
This was causing unnecessary calls that won't be used.
2022-02-25 16:53:45 -05:00
infinite-persistence
99d8d0dbee Discover: fetch livestreams "per-language", if enabled.
Fetch it using the same language parameters for claim_search that is used in the embedded ClaimListDiscover.
2022-02-25 16:53:45 -05:00
infinite-persistence
a14239a9dc Livestream fetch: add language option
The function argument order can be a bit ugly, but putting it at the back as optional param makes it easier to test without affecting existing clients.
2022-02-25 16:53:45 -05:00
infinite-persistence
c6d8687cfa ClaimListDiscover: pull out 'claim_search' language code for re-use, so all clients are sending the same value. No functional change. 2022-02-25 16:53:45 -05:00
Thomas Zarebczan
f1fdfcd329
Fix missing channel name
Easier to use channel name for now, we can add title later to notifications
2022-02-25 15:15:54 -05:00
infinite-persistence
49fc238e4c
Use titles vs names on channel claim previews, but show name in channel areas (#962)
* use titles

* Sidebar: show "title + name"

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-02-25 09:04:23 -05:00
Max Kotlan
d5a91b5917
fixed mobile scrolling issue on settings page (#953) 2022-02-24 12:14:01 -05:00
Rafael
ea43f84347 Fix search replacing 2022-02-24 12:42:43 -03:00
saltrafael
2152583816
[Fix] linked uris (#959)
* Fix live claim uri being passed

* Refactor show page

* Fix linked comment being erased
2022-02-24 10:20:07 -05:00
infinite-persistence
2b271730cc
WildWest: always show boosting message (#957)
## Ticket
948 wildwest: always show boosting message, move next to category name

## Changes
1. Make "Show less livestreams" share the same space as "Boosted by LBC", instead of only showing either 1.
    - It's a bit troublesome to move it next to the filter without tweaking the generic `ClaimListDiscover`, so I think this would be a good compromise.

2. Fix "show less livestreams" being super tiny in mobile.
    - I think it is caused by some component-specific changes are being applied at the global level (not sure).
2022-02-23 23:24:41 -05:00
Thomas Zarebczan
c33f7338c7
Adjust open chat window 2022-02-23 18:26:23 -05:00
saltrafael
17e3fcc27c
[Fix] revert fileRenderFloating vs Mobile change (#937)
* Bump react-draggable

Old version was giving out console errors for outdated react functions

* Refactor fileRenderFloating

* Merge fileRenderMobile into fileRenderFloating

* Fixes from review

* Attempt fix failed to view live
2022-02-23 16:13:22 -05:00
infinite-persistence
51d4407002
Don't allow a duration that exceeds Feb 8th
> _Max date it can do is back to : 2022-02-08 - so don't allow a days value that's higher than this. (hint before selection / submission if possible)_

My initial understanding was that it is ok to set beyond this date (e.g. "1 year"), just that any channels created before Feb 7 will still be able to comment even if they are less than a year old.  That feels like ok behavior to me (easier for user to grasp), but turns out setting anything before that date will block all channels.

So, this commit changes the warning message and also blocks the user from finalizing.
2022-02-23 23:01:59 +08:00
infinite-persistence
2e26064d2f
Replace commentron's min-age error message
Hopefully this is more concise, but it's meant more as a placeholder for others to edit easily.
2022-02-23 23:01:58 +08:00
infinite-persistence
f70e631953
Add "min channel age" setting 2022-02-23 23:01:57 +08:00
infinite-persistence
8ace40522e
Add modal to change "min channel age"
It'll be easier to handle through a modal -- we won't need to debounce the values, and it also clears up the clutter from 'settingsCreator'
2022-02-23 23:01:56 +08:00
infinite-persistence
89577950c2
Factor out 'FormFieldDuration' for re-use 2022-02-23 23:01:55 +08:00