Commit graph

2891 commits

Author SHA1 Message Date
Rafael
14fc7bae50 Use a single setting 2022-04-26 08:18:41 -04:00
Rafael
f1dbfa01ea lint 2022-04-26 08:18:41 -04:00
Rafael
90e20b94a8 Fix app strings 2022-04-26 08:18:41 -04:00
Rafael
69671a93d1 Fix console error 2022-04-26 08:18:41 -04:00
Rafael
ef7e6a56b4 Only change default from settings page 2022-04-26 08:18:41 -04:00
Rafael
ebad2d746a Fix Original to Auto switch 2022-04-26 08:18:41 -04:00
Rafael
b5f8a849a1 Attempt to show auto video quality 2022-04-26 08:18:41 -04:00
Rafael
73f27cc67e Add ability to store quality settings as default 2022-04-26 08:18:41 -04:00
Rafael
7390c464ac Fix undefined value case 2022-04-25 14:00:55 -04:00
infinite-persistence
7445063405 Use videojs::http-streaming for all except iPhones
## Ticket
31: "quality selector not available on safari browsers"

## Notes
The quality selector isn't populated in some Apple products -- a known issue with videojs as the platform doesn't relay the info.

But it seems like only iPhone is affected, so let's enable the override for all platforms except iPhone.
2022-04-25 09:14:24 -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
Thomas Zarebczan
a6106f7427 Remove old apis 2022-04-22 12:59:34 -04: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
Thomas Zarebczan
e29f26958c
fix channel > channel edit 2022-04-21 14:57:48 -04:00
infinite-persistence
5249e46179 Comment: ignore minAmount when in Fiat 2022-04-21 12:22:26 -04:00
infinite-persistence
a9a2270ae9 LivestreamLink: fix flicker when a child updates
## Ticket
1358 - flicker on livestream tile when viewers updates

## Change
Defining the component that way results in unique Card wrapper on each resolve, so everything gets torn down and re-mounted, causing the flicker.

There is a css side-effect though: the tags changed from red to black. But tags are inconsistent through the app ... sometimes black, sometimes red (I think it should always be red + smaller font from the body).
2022-04-21 10:31:31 -04: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
b832f56929
encode channel names 2022-04-20 16:40:03 -04: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
Raphael Wickihalder
575b8f5aac
Fix theater mode on audio file pages 2022-04-20 18:05:01 +02:00
infinite-persistence
d84d11bc24
f2a63668 broke placeholder tiles 2022-04-20 23:45:39 +08: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
9ad73c9878
Hide the "results filtered by language" hint if the Category forced the language-specific search.
The user won't be able to anything about it anyway.
2022-04-20 22:56:15 +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
d52593f3b2
Move "Wild West" as part of a Category definition
- Router: no need to specify the route directly anymore (will come from definition), but we still need to disable it for certain regions.
- Sidebar: no need to custom addition anymore.

## Ticket
`odysee-homepages :: 1318`
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
infinite-persistence
f2a63668b7 ClaimPreviewTiles: hide abandoned tiles by default
## Ticket
1308, 1363 - "Hide/skip "removed" recsys entries"

## Change
Ported the `isAbandoned` handling from the list-layout to the tile-layout (yet another grumble on why tile vs. list is not just a css difference but an entire different component).

## Misc
Because "ClaimList + tileLayout" was showing abandoned claims by default, search around to see if it was still needed. I think only collectionsListMine would require that (or maybe not, can remove later).
2022-04-20 09:38:53 -04:00
Rafael
0dccabe692 Selector change
- and remove from where it was unused
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
Rafael
20c610e8c9 Fix NaN Tipped 2022-04-19 19:33:12 -04:00
infinite-persistence
f7beffaa06
Support callback method to inject items
1341
2022-04-18 19:08:09 +08:00
infinite-persistence
0e233e04a8
Generalize useGetLastVisibleSlot
It was meant to be general-purpose in the first-place, but ended being tied to ads due to time constraint and also bad documentation.

No functional change.
2022-04-18 19:06:02 +08:00
infinite-persistence
f5a0f39f59
Rename file: use-last-visible-item => use-get-last-visible-slot
No functional change, just renaming for clarity.
2022-04-18 19:06:01 +08:00
infinite-persistence
65789a26ed
Re-use existing string 2022-04-18 18:24:34 +08:00
infinite-persistence
3f805a6189 doCheckPublishNameAvailability: case-insensitive version
## Issue
??

## Behavioral Changes
- Use `claim_search` instead of `claim_list` to retrieve all all own claims with the same name (case-insensitive).
  - Caveat: annonymous posts will be excluded.
- When a clash occurs, there is a possibility that we have multiple existing entries (e.g. "xxX", "xXx"). Since we don't know which one is best to fall back, I removed the "edit" button for this and replaced with a simpler text

## Code Note
- If not mistaken, the rest of the code still needs `selectMyClaimForUri` to be case-sensitive, so augment the selector to support both through an optional parameter.
2022-04-18 00:44:11 -04:00
infinite-persistence
389b0ad834
i18n update 2022-04-17 09:19:58 +08:00
infinite-persistence
6e34282cdc Livestream tile/list: show viewer count if data is available
As of this commit, only the Channel Page is fetching the data through the new API, which has the viewer count correctly populated.

For both "0" and "undefined", continue to show as "LIVE".
2022-04-15 08:24:30 -04:00
Rave | 図書館猫
175f85995d
Design Fallout Patch 10 (#1340)
* Design Fallout Patch 10
2022-04-15 10:56:50 +02:00
Thomas Zarebczan
eaf1b093ae
Odysee updates 2022-04-14 20:31:16 -04:00
infinite-persistence
934f627c19 Remove isTouch from use-screensize.js -- it's not an effect
It will be confusing for the next person to look at the effects folder for `isTouch`.

Use `platform.isTouch()` instead.
2022-04-14 10:29:01 -04:00
infinite-persistence
49db1fe83b Replace IS_IOS and IS_ANDROID with platform 2022-04-14 10:29:01 -04:00
infinite-persistence
dca6c2ebf8 Disable "switch optimized-auto to original" for now.
It might be a user option in the future.
2022-04-14 02:41:23 -04:00
infinite-persistence
257011b62d Use non-VHS link when "auto" matches non-VHS quality
The ideas is that the "optimized" version (same height as original) is badly done, so display the original instead behind the scenes.
2022-04-14 02:41:23 -04:00
external
6478da923f Port bandwidth selector from http-streaming @ v2.0.0
Reference:
https://github.com/videojs/http-streaming/issues/749#issuecomment-606972884

This is a direct copy of the necessary files to replicate `lastBandwidthSelector`. Irrelevant code was removed.
2022-04-14 02:41:23 -04:00
infinite-persistence
c1fb160452 Use non-VHS link when "original" is selected.
Ticket: 638
2022-04-14 02:41:23 -04:00
infinite-persistence
33adf7aab2 Add "original" quality button 2022-04-14 02:41:23 -04:00
infinite-persistence
4f600fbc8e Cleanup; no functional change.
- Handle null `vjsPlayer` so we don't need to add FlowFixMe everywhere.
- Remove redundant comments.
2022-04-14 02:41:23 -04:00
Thomas Zarebczan
17d5d5c73b partial new livestream api support 2022-04-13 11:52:00 -04:00
Bradley
d7506850b3
removed remaining refs to PAGES.REPOST 2022-04-12 21:07:40 +08:00
Bradley
98154a1921
changed repost to open a modal instead of new page 2022-04-12 21:07:39 +08:00
Raphael Wickihalder
f3ff88d74e
Adjust recommended grid 2022-04-12 09:54:11 +02:00
Raphael Wickihalder
096185d424
Adjust collapsed recommendation grid 2022-04-11 18:54:15 +02:00
Raphael Wickihalder
19a4b87225
Adjust tile grid for HiRes screens 2022-04-11 16:05:41 +02:00
infinite-persistence
b03d3305c1 ClaimTilesDiscover: stop repeating claim_search on failure
Just like ClaimListDiscover, stop `claim_search`-ing if the result is a failure (null).

Leaving the placeholder tiles as is for now. Can show the timed out message like ClaimListDiscover -- just toggle SHOW_TIMEOUT_MSG.
2022-04-11 07:45:27 -04:00
infinite-persistence
b79b7f9bde Re-enable 'Purchases' page
Closes 1284

## Notes
- Re-used the Library page, but disabled the [Downloads | Purchases] tabs.
- Access from Settings > Accounts > Purchases
2022-04-07 14:28:12 -04:00
Raphael Wickihalder
010b5c81f4
Adjust tile grid in categories and channel pages 2022-04-07 19:54:41 +02:00
infinite-persistence
fc50095b36 Make notification titles translatable
## Issue
Desktop 7022: i18n: Notification title localization lost

## Approach
The current code breaks up the string into an array of strings, so i18n is somewhat impossible.

Since 99%¹ of dynamic notifications come with a `dynamic` property for all the replaceable values, we can actually reconstruct the string however we want.

¹ <sub>_as far as I can find, only `fiat_tip` does not provide the value via `dynamic`, i.e. hardcoded in the string. Boo._</sub>

### Benefits of this approach:
- able to localize the string again
- able to customize the string (e.g. making claim titles italic, fix typos, use more concise strings, etc.)

### Problems with this approach:
- if the api overloads a particular notification type with several strings, then the approach is broken.
    - Ex. For the case of `comment` type, the overload is whether the comment is a normal comment or hyperchat. But I was able to replicate the logic to differentiate them, so all is good.
    - For the case of "livestream reminder in 30 minutes", we would have to inspect the string to differentiate against "is live streaming". I think this reminder is not being used, so I didn't do it yet.
- some work is needed to maintain the code when the server side updates something.  But we are already manually maintaining the i18n strings anyway, so it shouldn't be too much of a burden.
- With the exception of the overload problem, any new notification type will simply pass through as un-localized, so things should continue to work, i.e. no need to update the front-end immediately 🤞
2022-04-07 12:30:07 -04:00
Rafael
dff64f5a47 Improve plugins format 2022-04-07 11:44:25 -04:00
Rafael
b0f091a589 Fix iPad landscape 2022-04-07 11:44:25 -04:00
Rafael
de93a97af0 Fix icon cutoff 2022-04-07 11:44:25 -04:00
Rafael
800e735115 Mobile file page, comments and player improvements for rotated landscape view
undo plugin changes
2022-04-07 11:44:25 -04:00
Rafael
35c933e7e4 Fix miniplayer size issues
Add another comment
2022-04-07 11:44:25 -04:00
Rafael
9f04370516 Improve resizing screen until it switches to/from Mobile 2022-04-07 11:44:25 -04:00
Rafael
65b9906086 Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
David Granado
c2b3904e32 Disable spellchecker which is both broken and has unusual behavior 2022-04-07 10:27:45 -04:00
David Granado
393aba0385 Fix spellcheck in comment simple editor 2022-04-07 10:27:45 -04:00
infinite-persistence
564beb7c90
Medium-layout: more "comment section collapse" fixes
- When collapsing, scroll back to the first comment instead of hanging in the Recommended section.

- Enhancement for 5380bc04: don't show "Collapse/Expanse" if there's only 1 comment. The comment itself is already collapsed to 3 lines, so it won't take up too much height.

- Fix css: recalling what Dan mentioned: if following BEM right (modifiers shouldn't be used standalone), we wouldn't incorrectly use `@extend` in this case and confuse the reader.

- Enlarged the empty spacing to make it symmetrical with the Recommended section below it.
2022-04-07 13:14:49 +08:00
Rafael
30cbe009bc Fix sports icon 2022-04-06 13:08:28 -03:00
infinite-persistence
4f4803c638 Crisper file thumbnails for mobile
## Issue
Thumbnails in mobile, especially tablets, is blurry

## Change
Account for the larger thumbnail width in mobile.
Approximation is based on `$breakpoint-small: 900px;`
2022-04-06 06:56:54 -04:00
infinite-persistence
5380bc04f2 Comments: don't show Expand button if no comments
## Issue
In Medium layout, the Expand/Collapse button would still appear even for 0 comments.

## Approach
Hide the button when comments = 0, but didn't hide the section because the separator line feels useful as a visual guide to mark the sections.
2022-04-06 06:47:02 -04:00
infinite-persistence
59a0b9d490 Better non-clickable implementation
## Issue
- Adding `content__non-clickable` everywhere probably isn't the right way when we move forward to separating `all.scss`.
- Not intuitive -- easier to use if it's an attribute to `ClaimPreview`.

## Change
- Consolidate to a re-usable `non-clickable` class.
- Made Wallet Send search preview non-clickable as a temporary band aid until the channel-finder is consolidated.
- `listBlocked`: something is overriding the pointer, so non-clickable isn't working. Removed for now -- doesn't really matter.
2022-04-05 19:44:09 -07:00
infinite-persistence
5d22688acf Watch Later: fix capitalization so we don't need to re-translate 2022-04-05 09:52:29 -07:00
infinite-persistence
97dd01ed38 Uploads Page: fix Repost tab when count is 0
## Issue
The page becomes blank without the filter header when Repost is selected + 0 results.

## Change
Grabbed and modified lbry-desktop's 390bb6df
2022-04-05 12:47:47 -04:00
Rave | 図書館猫
a0254740bc
Design patch 7 (#1286)
* Adjust thumbnail hover effect

* Increase thumbnail border transparency
2022-04-05 16:59:38 +02:00
Thomas Zarebczan
aad06cdde0
Fix fee estmation 2022-04-05 09:36:06 -04:00
infinite-persistence
e68bba1dc6 Exclude outbrain in certain pages
I don't think these pages should be serving ads.
2022-04-05 08:54:37 -04:00
Raphael Wickihalder
bb868777f8
Fix controls for mini player on mobile 2022-04-04 13:02:27 +02:00
infinite-persistence
234bd2526a
Add backdrop to progress indicator 2022-04-04 17:27:00 +08:00
Raphael Wickihalder
57edddb058 Merge branch 'master' of https://github.com/OdyseeTeam/odysee-frontend 2022-04-03 17:03:12 +02:00
Raphael Wickihalder
85d9de60ca
Add dragging offset exception for Firefox 2022-04-03 17:02:18 +02:00
infinite-persistence
5631c10306
Fix context for translators 2022-04-03 22:13:18 +08:00
Raphael Wickihalder
052c602742
Fix element position when dragged in homepage customizer 2022-04-03 15:51:52 +02:00
Raphael Wickihalder
a6169a80a9
Fix element position when dragged in homepage customizer 2022-04-03 15:19:05 +02:00
Thomas Zarebczan
b7b27136fd Let's try 95... 2022-04-01 23:36:56 -04:00
infinite-persistence
7ccaf06527 Round optimized img dimension to next 100px for better caching.
Doing double `Math.ceil()` just to make it easier to disable the 100px thing in the future.
2022-04-01 23:36:56 -04:00
Rafael
8dcac30767 Add sports icon 2022-04-01 21:49:03 -04:00
infinite-persistence
4e63849061 Don't clear on position on dispose
Otherwise, we'll never see a full progress indicator. The "reset when too near end of video" should only happen when opening a file.
2022-04-01 15:37:26 -04:00
infinite-persistence
84b9bd617a Watch-progress indicator 2022-04-01 15:37:26 -04:00
infinite-persistence
e0415ec493 Fix post-editor preview mode
## Cause
It broke because lack of awareness that we can't use our components in preview mode. For some reason, we don't have redux access in SimpleMDE's preview mode.

## Change
- Restore the stub for iframes
- Fix preview for images, and apply the same styling as in posts.
2022-04-01 12:36:49 -04:00
infinite-persistence
a61f943465 inline-attachment: move to local copy + handle xhr errors
(1) Move from Node to local copy
(2) Handle xhr errors more gracefully. Instead of erasing the syntax, we should say that it failed through the URL.
2022-04-01 12:36:49 -04:00
inline-attachment
c41c6bc2bb inline-attachment v2.0.3
Partial copy from https://github.com/Rovak/InlineAttachment

We need to make some changes to handle xhr errors.  Given than the repo hasn't been updated in 7 years, and it's a hassle to push the changes or fork the repo, just copy over the required files.
2022-04-01 12:36:49 -04:00
Thomas Zarebczan
8d4a05157d Paste/drop images directly to markdown editor
Ticket: 1135

- Changed `FileDrop` to only cover the upper 20% of the page, otherwise it will clash with markdown image drop.
2022-04-01 12:36:49 -04:00
Rafael
e765a74eb0 Fix claim switch comment.List fetch behavior 2022-04-01 11:55:30 -04:00
infinite-persistence
491c934119 Fix makeSelectContentPositionForUri memo
- Move away from the leaky makeSelect* pattern.
- No memoization since it's pretty light.
2022-04-01 09:58:09 -04:00
infinite-persistence
f5034f74ca Batch resolve pin urls in 2 ways
Expanded homepage pins to support 2 types of input (if both are passed in, pinnedUrls take precedence):
  (1) pinnedUrls     --> uses doResolveUris (resolve)
  (2) pinnedClaimIds --> uses doResolveClaimIds (claim_search)

Instead of injecting the pinned URLs directly, we inject from `resolvedPinUris`, which will be blank until the uris are resolved, thus preventing it from being resolved individually from the tiles.

There's additional complexity with the `claim_search` method, as the rest of the code deals with uris instead of IDs. Fortunately, it's all contained with `useResolvePins`, so removal would be easier when the batch `resolve` issue is fixed.
2022-03-31 15:58:10 -04:00
infinite-persistence
dd5f4872fc Minor cleanup, no functional change
- Self-documenting variable.
- Remove incorrect comments.
- Remove redundant variables.
2022-03-31 15:58:10 -04:00
Niko Storni
8c20d516cd replace cdn url 2022-03-31 21:28:33 +02:00
Thomas Zarebczan
db687204a4 livestream for all 2022-03-31 10:35:24 -04:00
infinite-persistence
1a2fefa6ec Option to hide notification count in title bar 2022-03-31 10:23:31 -04:00