Commit graph

917 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Thomas Zarebczan
463e6f5687
Fix wildwest types, add doc to category 2022-05-06 12:00:20 -04:00
Rafael
9325a3e03e String change 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
7045f4ed45 Clean code 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
ae1bed8135 Update label 2022-05-05 09:42:24 -04:00
Raphael Wickihalder
4604bc4a28 Add help text to watch history 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
infinite-persistence
7500f15fc2
Fix missing txoList when balance is 0
799

## Issue
`TxoList` is not shown when balance is zero. A zero balance doesn't always mean zero transactions.

## Fix
Just like in other components, don't make `YrblWalletEmpty` a mutually-exclusive thing.
2022-05-05 17:15:36 +08: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
Rafael
a770e0a8a9 Add sync yt button on channels page 2022-05-03 11:00:06 -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
129a5819d9 Refactor and fix websocket connection behavior 2022-04-29 10:43:30 -04:00
Rafael
b693925fe5 Fix missing uri param for fetchReplies 2022-04-27 08:50:23 -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
infinite-persistence
1ad66fccd0 Category: Hide "Repost" from ContentType filter, except for WildWest
## Ticket
1368
> can we remove the repost filter option on categories outside of wildwest/following?

## Approach
Using `context` to:
- reduce the amount of files that need to change.
- avoid prop-drilling.
- allow the ability to dynamically define the Filter's allowed values in a contained manner.

Clients that don't need customization simply does not need to wrap their component with the context.

The context only contains Content Type for now, but can include anything that future clients need to dynamically adjust.
2022-04-25 08:49:46 -04:00
Rave | 図書館猫
56a7ad47c4
Design patch 2022-04-25 (#1392) 2022-04-25 10:10:45 +02:00
infinite-persistence
20b5653f95
Fix missing repost ribbon for Tags
Ribbon:
- hide: category pages, except Wild West
- show: Following, Tags, Wild West
2022-04-25 09:42:46 +08:00
infinite-persistence
e4a88a5e9b SearchInLanguage: honor user's setting before category's setting.
## Ticket
Part of 1368 ("if user overrides the category homepage language with a different language setting + use 'search this language' option, use that instead. It's not typical this will happen, but probably expected.")

## Change
- Refactored to move more logic into `resolveLangForClaimSearch`
- Replaced the ternary version to make it more readable (hopefully).
- Inverted the language filter precedence by honoring the user's setting first.
  - Note: for both User and Category, URLSearchParams will always take precedence.
2022-04-22 09:39:23 -04:00
infinite-persistence
6651663a00
Discover: fix release_time for Tag and Wild West
- I got the previous logic completely wrong.

- Wild West's release time now comes from the homepage definition, but since the definition currently does not support "start of week", continue to hardcode the customization here.

- This logic also fixes the release_time for Tags.
2022-04-22 18:01:18 +08:00
Rave | 図書館猫
126ecd38fa
Fix theater mode related issues (#1377)
* Adjust theater mode and image pages
2022-04-21 09:31:58 +02:00
Thomas Zarebczan
8144a9bb87 livestream new api
Re-used lots of Anthony's code + made fixes to a few areas including the publish page.

a

new videojs

video.js@7.18.1 + http-streaming@2.14.2

remove console log
2022-04-20 15:53:28 -04:00
infinite-persistence
e64d661dcd
Support not_channel_ids through Category definition
Mainly only useful for Wild West, which doesn't use `channel_ids` (otherwise, the homepage maintainer could just exclude the id from `channel_ids` directly).
2022-04-20 22:56:16 +08:00
infinite-persistence
7b85d7a585
Allow Category definitions to specify language to search in.
This will be entirely up to the homepage maintainer, and will override the user's "Search only in the this language" setting.
2022-04-20 22:56:15 +08:00
infinite-persistence
778ef649e8
Wild West is now a real category, so can't use dynamicRouteProps === null to identify it.
A bit troublesome to handle, but at least the code is clearer now.
2022-04-20 22:56:14 +08:00
infinite-persistence
f27b68587e
Restore original way to exclude categories in Homepage
It was previously done in `GetLinkData`, but accidentally removed in d854a992.
It is DRY-er to do it here rather than at the client side.

Also needed to filter in the homepage-sort dialog, so move the definition to a constant array.
2022-04-20 22:56:13 +08:00
Rafael
cbb6e2afe4 Add missing FileGet call 2022-04-20 09:18:43 -04:00
Rave | 図書館猫
089fc52a7d
Filepage theater fix (#1366)
* Disable theater mode for non-video files

* Add black background to image container
2022-04-20 10:20:15 +02:00