Commit graph

2993 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
c572891590 Update /$/live to use latest API
1480
2022-05-11 07:57:44 -04:00
Thomas Zarebczan
18ec09c5b0
clear up about page 2022-05-10 14:10:31 -04: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
Rafael
adc3c06803 Fix header icon active channel 2022-05-09 07:50:44 -04:00
Thomas Zarebczan
86819b6876
update background URL 2022-05-06 14:28:04 -04:00
infinite-persistence
dae78c488f Stacked toast view
From the previous commit, we are now showing toasts in the reverse order (latest to oldest).

Next, extend the "hide snack" timer to handle multiple snacks. It will dismiss them one by one, restarting itself until no more toasts.

Show a stacked GUI when there are multiple toasts.

Users can still manually dismiss the toasts.
2022-05-06 13:53:39 -04:00
infinite-persistence
208b701998 Fix comment channel not checked in Livestreams
## Change
Moved the fetch from `CommentList` to `CommentCreate` instead, which is used by both Content and Livestreams comments.
2022-05-06 11:31:42 -04:00
infinite-persistence
26f9cf3a4f Undo the channel-clamping and let user figure out from Toast
Several issues with the clamping behavior:
- Problems trying to sync with the activeChannel setting.
- Corner-cases like unable to un-react because the comment and react channel was different; global mods not be able to change channels to do certain actions.

Just let the user know what are the channel(s) that they used to comment previously in the Toast.
2022-05-06 11:31:42 -04:00
Thomas Zarebczan
6cc85cd39d minor copy changes 2022-05-05 15:47:01 -04:00
Raphael Wickihalder
4022273408 Add code review requests 2022-05-05 15:47:01 -04:00
Raphael Wickihalder
42b456307f Save new signup flow 2022-05-05 15:47:01 -04:00
Raphael Wickihalder
4c1bf27dc1 Save thumbnail uploader 2022-05-05 15:47:01 -04:00
Rafael
f191cf0b88 Fix default channel changing with active channel on header 2022-05-05 11:24:22 -04:00
Rafael
371ce4a7ff Style fixes 2022-05-05 11:24:22 -04:00
Rafael
33826ea652 Fix style shift 2022-05-05 11:24:22 -04:00
Rafael
ca755d37b3 Fix console errors 2022-05-05 11:24:22 -04:00
Rafael
5e7fac563f Move clear function to page switch 2022-05-05 11:24:22 -04:00
Rafael
aa86815418 Fix menu link 2022-05-05 11:24:22 -04:00
Rafael
f2558f19f9 Add a clear function when a channel selector component is used
- this way, you can choose an active channel for something like commenting but when that component is unmounted, you always go back to the default channel (like leaving page)
2022-05-05 11:24:22 -04:00
Rafael
7eb5eb9996 Add channel selector on HeaderMenuButton
- Moved from reach/ui to material/ui menu components, because reach ui wouldn't work with 2 menus
- This channel selector stores the default on settings
- setActiveChannelIfNotSet was deprecated, if the account has channels, it will always return a channel even if there is no active channel or stored channel
2022-05-05 11:24:22 -04:00
Rafael
fa1f3abbdc Allow selecting an active channel by default 2022-05-05 11:24:22 -04:00
Raphael Wickihalder
9ff4578eb1 Add requested review changes (2) 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
d3fc96d961 Replace local sorage with redux 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
f3fd0ba08f Add requested review changes 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
bf8199dd05 Update watch history icon & add astronaut to empty list 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
e9b1a32779 Add watch history icon 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
ea686474fc Remove individual entries 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
1a7b92c4fa Save and load watch history 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
6d4c15f72c Create history page and navigation entry 2022-05-05 09:42:24 -04:00
Rafael
bfb8f0dd28 Fix embed logo links 2022-05-05 09:12:47 -04:00
infinite-persistence
511097cd67
Player: chapter follow-up tweaks
- Make the chapters button appear consistently.
  - Previously, it was only appearing for Original.
  - We still hide it for mobile, as per previous explanation.
- Changed the Chapters button position and popup aesthetics.
2022-05-05 18:20:59 +08:00
infinite-persistence
30977cae96
Fix component naming
Doesn't affect functionality, but shows confusing result in text search.
2022-05-05 17:02:08 +08:00
Thomas Zarebczan
f550be4306
fix extra "1" appearing on chapters 2022-05-04 13:08:51 -04:00
infinite-persistence
4b6e4db7cd Disable chapters for mobile for now...
- Deemed not useful in mobile, unless you have an S-pen that can hover.
- The chapters button (that invokes the chapters popup) would make more sense in Mobile, but we need to deal with the limited controlbar space first (e.g. overflow menu system)
2022-05-04 10:02:22 -04:00
infinite-persistence
f2495df615 Player: chapter markers 2022-05-04 10:02:22 -04:00
infinite-persistence
9fd890cfc2 Remove orphaned comment and unnecessary flow marker
Was confused on which part of the code this was referring to, but turns our `subCaps` was recently removed.
2022-05-04 10:02:22 -04:00
infinite-persistence
c5e185fa6d DRY: VIDEO_PLAYBACK_RATES 2022-05-04 10:02:22 -04:00
infinite-persistence
cd2998d695
Membership-name state updates
- Corrected flow definitions.
- Properly differentiate between "not yet fetched" and "no membership" as "undefined" and "<empty string>", respectively. There are GUI elements that need to know the unfetched case.
2022-05-04 10:45:58 +08:00
Thomas Zarebczan
ff238978e9
remove old replay apis 2022-05-03 10:19:23 -04:00
Rafael
0a962b1884 Allow direct linking a repost create component 2022-05-03 09:36:25 -04:00
Rafael
e60813de03 Bring back repost page from previous changes for direct link 2022-05-03 09:36:25 -04:00
Rafael
d79ce20802 Fix polling from fileRenderInitiator logic 2022-05-03 08:12:20 -04:00
Rafael
9c342f56a0 Add Sync youtube channel button on New Channel page 2022-05-02 17:23:22 -04:00
infinite-persistence
a74dbe1e43 1075: Clamp comment channel-selector to commented channels only
## New behavior:
- If you have commented on a claim before, the channel selector will be clamped to that channel.
  - There might be more than 1 channel if commented in the past.
- This includes blocked comments, i.e. if the creator blocked you, you will not see your comment, yet your channel-selector is clamped to the used channel.
- EXCEPTION: you can use other channels if it's your own claim (for now).

## Approach
- Run `comment.List` over all your channels on the specific content. This covers nested replies and pagination (sweet).
  - So, if the total is non-zero, mark that channel(s) as having commented on the claim.
  - Only fetch this once per content claim.
- In the comment channel-selector, clamp the list to this value.
2022-05-02 16:07:00 -04:00
infinite-persistence
29a68eb992 1075: Fetch list of my channels that have commented on a claim 2022-05-02 16:07:00 -04:00
Rafael
129a5819d9 Refactor and fix websocket connection behavior 2022-04-29 10:43:30 -04:00
infinite-persistence
05ec4e5fbe Video-quality string cleanup
- Prevent resolution strings from appearing in `new_strings`.
- Removed unused strings.
- Added missing ones.
2022-04-29 09:42:29 -04:00
infinite-persistence
8dedbe88ec Auto-populate category page titles
Completely remove any need to update things on our side when a Category is added or changed.

Will need to inform homepage owners to directly translate the 'label' field, so we don't need to use our translation system.
2022-04-29 08:35:44 -04:00
tonybaca
9b68f936ad added setTextValue to handlePaginateKeyUp function 2022-04-28 10:27:48 -04:00
Rafael
0e8b7d6b4a Show upload menu for no-auth but redirect to sign up 2022-04-27 12:45:42 -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
Rafael
4669246b55 Fix switch again 2022-04-26 20:28:54 -04:00
Rafael
3ac57776e9 Revert "Revert "Fix original and livestream quality switch behavior""
This reverts commit 7effcd69e8.
2022-04-26 20:28:54 -04:00
Thomas Zarebczan
7effcd69e8 Revert "Fix original and livestream quality switch behavior"
This reverts commit 7a86d7a895.
2022-04-26 17:35:30 -04:00
Rafael
62fecf0403 Fix broken player state when app is updated and resize failed 2022-04-26 16:37:47 -04:00
Rafael
7a86d7a895 Fix original and livestream quality switch behavior 2022-04-26 16:19:59 -04:00
Rafael
8b443d343c Change logic for original option on livestream 2022-04-26 08:18:41 -04:00
Rafael
daaa787f97 Initial quality notify based on already set setting 2022-04-26 08:18:41 -04:00
Rafael
753c47ace5 Add initial change Toast notify 2022-04-26 08:18:41 -04:00
Rafael
02ac8810d9 Fix auto quality display 2022-04-26 08:18:41 -04:00