Commit graph

2575 commits

Author SHA1 Message Date
Dan Peterson
2eb6af10ba Update date/time cmpnts to reset any chnages they made on umount. Update schedule date/time cmpnt to clear release time when selecting anytime option. 2022-01-05 11:20:57 -05:00
Dan Peterson
fef289e4fe Reset any set release time if switching to live stream mode. 2022-01-05 11:20:57 -05:00
Dan Peterson
4ec4942d8c move publish source state up, when editing livestream only show scheduling option when source is none. 2022-01-05 11:20:57 -05:00
Dan Peterson
6da73f6bc4 Fix bug where upload tools may remain visible upon switching upload type, even when no option to upload is available. 2022-01-05 11:20:57 -05:00
Dan Peterson
7671d12e42 Update publish form when editing livestream + update to radios for liveststream release time 2022-01-05 11:20:57 -05:00
Rafael
caff432c0b Use generic string for seconds ago when needed 2022-01-05 09:27:52 -05:00
Rafael
18a054747a Fix some scheduled live string localization 2022-01-05 09:27:52 -05:00
Rafael
78e7eaa689 Fix scheduled live stream 2022-01-05 09:27:52 -05:00
Rafael
350aa8240a Update timestamps in background 2022-01-05 09:27:52 -05:00
Rafael
ab9252e06f Refactor dateTime component and getTimeAgoStr function to prevent displaying comments as 'in a few seconds' 2022-01-05 09:27:52 -05:00
Rafael
2c8ad2b89a Use Memo on markdown-preview component to avoid re-render 2022-01-05 09:27:52 -05:00
Rafael
f568f97e5e Fix content toggles and Header Title 2022-01-05 09:27:52 -05:00
Rafael
09ba036380 Improve header title and change icon to cog 2022-01-05 09:27:52 -05:00
Rafael
6f3dbad6e2 Remove unnecessary class for stickers 2022-01-05 09:27:52 -05:00
Rafael
ec68f102a7 Add toggle for timestamps 2022-01-05 09:27:52 -05:00
Rafael
4a73fbf688 Add timestamp on mouseover 2022-01-05 09:27:52 -05:00
Anthony
cac05d5714 more touchups 2022-01-04 18:05:10 -05:00
Anthony
e3395e31ba refactor ad implementation 2022-01-04 18:05:10 -05:00
Dan Peterson
5cf78e792b
Make sure view count fetch runs when claim ID changes. (#617) 2022-01-04 12:40:31 -06:00
Rafael
b0dbdeae27 Allow to remove my superchats 2022-01-04 09:04:59 -05:00
infinite-persistence
1f5f8f1213 Remove unused firebase and domain parameter 2022-01-04 08:54:30 -05:00
Thomas Zarebczan
ce37e06e10 Revert "Fix publish form when editing livestream (#565)"
This reverts commit da06c14e60.
2021-12-31 13:28:19 -05:00
Dan Peterson
da06c14e60
Fix publish form when editing livestream (#565)
* Update publish form when editing livestream + update to radios for liveststream release time

* Fix bug where upload tools may remain visible upon switching upload type, even when no option to upload is available.

* move publish source state up, when editing livestream only show scheduling option when source is none.

* Reset any set release time if switching to live stream mode.

* Update date/time cmpnts to reset any chnages they made on umount. Update schedule date/time cmpnt to clear release time when selecting anytime option.

* Additional filtering of internal tags

* Default to replay view when editing a liveststream
2021-12-31 11:20:54 -06:00
Rafael
e94f66a5fe Fix stakedLevel looking looking for wrong prop 2021-12-31 05:52:56 -08:00
Thomas Zarebczan
5d1e6a8f7c
fix crash
https://odysee.com/@ShapeShiftDAOLatam:e/giveth-es:a
2021-12-30 16:08:34 -05:00
Dan Peterson
78d8446a0b Strip internal tag prefix from form labels 2021-12-30 16:05:51 -05:00
Dan Peterson
a96d2a47be Create new anytime form state to explicitly set to release to now. Clear internal scheduled tag when editing. 2021-12-30 15:21:59 -05:00
Dan Peterson
399c4eb56d revert commit - wrong branch 2021-12-30 15:21:59 -05:00
Dan Peterson
a92e9c9973 clear/reset release time if switching to livestream mode 2021-12-30 15:21:59 -05:00
Dan Peterson
a8209ee38b Temporarily remove tag filter on upcoming (will be added back soon) 2021-12-30 15:21:59 -05:00
Dan Peterson
356c5bf30f - Add a system-level tag for scheduled live streams
- Query for that tag in the upcoming section
- Improve special tag organization
- Filter out the internal tags in the UI
- Add missing types to publish state
2021-12-30 15:21:59 -05:00
infinite-persistence
0ccf9f2c05 Handle removed livestream comments 2021-12-30 11:55:44 -05:00
infinite-persistence
12eeb06c40 LivestreamComment: pass Comment prop instead of individual values
The number of props to pass is getting out hand, so just pass the Comment object directly.

Also, moved the "is my comment" check into LivestreamComment, so we don't need to pass it as a prop from the parent.
2021-12-30 11:55:44 -05:00
Rafael
cd9dc5cf96 Highlight chat message if your channel is mentioned 2021-12-29 16:13:57 -05:00
Rafael
2c43076497 Fix header menu on password reset page 2021-12-29 15:40:15 -05:00
Rafael
2d1b876acc Improve Sticker Superchat display 2021-12-29 09:37:05 -05:00
Rafael
1578810013 Fix scroll re-rendering issues and improve superchats 2021-12-29 09:37:05 -05:00
infinite-persistence
c50cc422b7 Don't refresh tiles while fetching and if same results
## Ticket
555 Don't refresh tiles/claim search after blocking results are in + don't change
2021-12-29 09:32:01 -05:00
infinite-persistence
b0bea66b1d ClaimTilesDiscover: optimize props to reduce renders
Props: either use primitives, stable references or memoized objects to reduce renders. This update will simplify the existing `areEqual`. It is still needed though as some props are hard to memoize from where they are called, or should simply be ignore.
2021-12-29 09:32:01 -05:00
Thomas Zarebczan
283ea69a6e
Fix crash with no channel 2021-12-28 13:40:16 -05:00
infinite-persistence
98126e90b2 Fix 'weekly watch reminder' target path 2021-12-28 08:31:03 -05:00
infinite-persistence
06bfe60c54 Show view counts on uploads page
## Ticket
556
2021-12-23 03:16:11 -05:00
infinite-persistence
379b9341ef Render: must return null instead of undefined 2021-12-23 00:04:12 -08:00
infinite-persistence
198c191fd2 Skip connect until it is needed.
It seems to subscribe to the store if connected.
2021-12-23 00:04:12 -08:00
Dan Peterson
d382671616 Add stream start to active live streams, and refactor how data active claim is stored in redux 2021-12-22 13:50:49 -05:00
Rafael
f7a6a767ab Fix conflicting svg styles 2021-12-22 08:44:05 -05:00
infinite-persistence
7d6c91c15a
Fix "you are offline" nag being stuck
Was trying to save one event listener in the previous implementation and rely on other redux state-changes to spark a GUI update, but turns out there are scenarios where nothing is updated and the "offline" nag is stuck on screen.

## Change
Do it properly using the event listeners. The nag should now update promptly.
2021-12-22 12:41:05 +08:00
infinite-persistence
33ddccb3c5
i18n: revert string so translators don't need to redo
Changing the string means it will stay in English until retranslated. Reverting so that it can re-use existing translated database.

I don't think there is a clash in the `followingCount` variable, so the change was probably unnecessary.
2021-12-22 09:07:47 +08:00
Rafael
45de6ab822 Fix Yt sync page 2021-12-21 16:36:16 -05:00
Rafael
7757960d96 Fix wallet cut off on mobile 2021-12-21 16:36:16 -05:00
Rafael
f5ba2d5425 Switch Logo from images to icons 2021-12-21 16:36:16 -05:00
Rafael
4158b99453 Fix header profile button for no channels, use it as an icon for mobile unath instead of big login/signup buttons 2021-12-21 16:36:16 -05:00
Rafael
75a922b0c9 Add smaller Mobile size values 2021-12-21 16:36:16 -05:00
Rafael
79a4fa55e0 Set logo img width and height 2021-12-21 16:36:16 -05:00
Rafael
89d84e0776 Refactor Logo 2021-12-21 16:36:16 -05:00
Rafael
5c6fb9de66 Improve header components that need to be loaded in to display Skeleton and avoid layout shifting 2021-12-21 16:36:16 -05:00
Rafael
76147d89c6 Refactor and split Header CSS 2021-12-21 16:36:16 -05:00
Rafael
56603be2f9 Decrease --header-height by 20% 2021-12-21 16:36:16 -05:00
Rafael
75b441e7cb Add Tooltips to header buttons and replace reach/ui 2021-12-21 16:36:16 -05:00
Rafael
80a375fecb Refactor notificationHeaderButton 2021-12-21 16:36:16 -05:00
Rafael
254fff208d Refactor header Component, split into smaller components and remove what is unused 2021-12-21 16:36:16 -05:00
saltrafael
8c32b36aa0
Add language based channels to Auto follow (#523)
* Refactor userChannelFollowIntro

* Add community based channels to signup auto follow

* Add German channels

* Remove main english channels and leave only community ones for auto follow
2021-12-20 15:35:59 -05:00
Dan Peterson
350524114a
Fix the view more/less functionality by properly reporting the total number of claims (#530) 2021-12-17 16:28:11 -05:00
Dan Peterson
f0fdcb6a6e
Hotfix livestream datetime (#527)
* Temporarily adjust upcoming buffer to 15 min + 5 min cache time

* Make sure datetime is shown on regular claims
2021-12-17 10:23:49 -05:00
Dan Peterson
038692cafc
Feature livestream scheduling (#458)
Add livestream scheduling feature
Also supports back to back streams, and will notify on a non-active stream of an active one.
2021-12-16 16:59:13 -05:00
Anthony
c2c782f6e6 fix script data attribute 2021-12-16 16:07:54 -05:00
infinite-persistence
50d1d062ad
Revert "Switch thumbnail server: spee.ch --> vanwanet"
This reverts commit 1a0a62058c.
2021-12-16 16:16:22 +08:00
infinite-persistence
7d9e8bffae
Revert "Remove the delayed thumbnail message for ChannelEdit"
This reverts commit a7e571c3b9.
2021-12-16 16:16:16 +08:00
Max Kotlan
9503829e18 shouldRenderLargeMenu 2021-12-15 15:31:57 -05:00
Max Kotlan
9022ab6020 menu can close completely 2021-12-15 15:31:57 -05:00
Max Kotlan
f5ef6cdd57 remove livestream enabled 2021-12-15 15:31:57 -05:00
Max Kotlan
7418e27994 Added new menu animations 2021-12-15 15:31:57 -05:00
Anthony
bc514b1d5c fix lint errors 2021-12-15 15:00:28 -05:00
Anthony
c214209747 disable preroll ads 2021-12-15 15:00:28 -05:00
infinite-persistence
a7e571c3b9 Remove the delayed thumbnail message for ChannelEdit
Not necessary now that we don't need confirmations for thumbnails (direct upload to CDN)
2021-12-15 13:59:45 -05:00
infinite-persistence
1a0a62058c Switch thumbnail server: spee.ch --> vanwanet 2021-12-15 13:59:45 -05:00
infinite-persistence
1766b418c6
Remove old mobile chromecast css hack
lbry-desktop--6844

This negates 49abbecb.

Now that we have a dedicated chromecast button, we don't need to hack Chrome's default cast button to appear on top of vjs-mobile-ui.  The hack no longer works anyway, since the CSS exposure has been deprecated around mid 2020 -- it is still available, but its abilities has become less and less.
2021-12-15 09:44:09 +08:00
Anthony
d675d3234c use production script for odysee 2021-12-14 15:09:31 -05:00
Anthony
aef8e2eba7 sidebar ad hiding fixed 2021-12-14 15:09:31 -05:00
Anthony
cafc3d676f switch footer to onetrust 2021-12-14 15:09:31 -05:00
Anthony
561bcbe545 replace secureprivacy with onetrust 2021-12-14 15:09:31 -05:00
Anthony
1c20027b62 add onetrust widget 2021-12-14 15:09:31 -05:00
infinite-persistence
bbdab2274a Split MUI and Emoji-Lib
460

ui.js: 4.44MB -> 3.94MB
2021-12-14 12:59:36 -05:00
infinite-persistence
569ff3077f
UserSignUp: skip user fetch
Talking to Tom, we think this can be removed, since the regular startup could would eventually call `new` to get a token.
2021-12-14 17:40:44 +08:00
infinite-persistence
eccb542610
AuthPage: css fixes
- The graphic was meant to be 50% of the card width, but was squished.
- Try to reduce scrolling by making everything fit in a 100% zoom on a 1080p screen.
2021-12-14 17:25:05 +08:00
infinite-persistence
fea13bdc88
LoginGraphic: remove image resizing
The previous version was trying to fetch an optimized image with the exact size required, but the URL given was pre-optimized, so it wasn't working correctly. The additional work is also slow (seems to lock up mobile a bit), and since it wasn't functional, just removed it entirely.

It will be easier to just pre-reduce the image size to something suitable for a 1080p screen (the most common screen size at the moment).
2021-12-14 17:25:04 +08:00
infinite-persistence
3b87f0aba6 Remove content_tags and related functions
No longer necessary.

Also removed a few doToggleTagFollowDesktop props (unused by the View).
2021-12-13 11:54:53 -05:00
infinite-persistence
f3634c881d
Dev instance changelog button. 2021-12-13 16:46:29 +08:00
infinite-persistence
e3956150a3
Disable file selector when upload is locked from another tab. 2021-12-13 15:33:39 +08:00
Rafael
392e7c37a4 Fix replaceAll 2021-12-10 15:40:23 -05:00
infinite-persistence
561ed0ea23 -- experiment with forcefully closing the session on dispose 2021-12-10 14:16:03 -05:00
infinite-persistence
42a8f3180d Pass the title and channel name to Chromecast.
As noted in a comment, we need to be careful when adding props to `VideoJs` to avoid renders.

Used primitive strings (title, channelName) instead of passing the entire `claim`, which could have its reference invalidated.
2021-12-10 14:16:03 -05:00
infinite-persistence
4c84fde31b Add Chromecast support on Google Chrome. 2021-12-10 14:16:03 -05:00
Rafael
c7790693df Fix named capturing groups not supported in most browsers 2021-12-10 10:17:40 -05:00
Anthony
132d6ba50c only load ima when needed 2021-12-10 09:44:39 -05:00
infinite-persistence
224f10663d Prevent concurrent uploads with same lbry name
## Ticket
426

## Issue
Currently, we check if we have any existing claims with the same name when uploading, i.e. "lbry://<name>". It does not include claims that you are still uploading, so you might end up with duplicate claims.

In the ticket, there is also the issue of 2 uploads sharing the same slot, causing the progress indicator to jumpy between the uploads. That has been fixed by using a guid instead of using `name`.

## Aside
I think there is another request to allow the same name but on different channel ... next time, next time ....
2021-12-10 08:48:16 -05:00
infinite-persistence
9307511c88 Move MAIN_CLASS to constants file for better code-splitting.
Cross-importing was making things hard to code-split efficiently, because the entire file gets evaluated when imported.
2021-12-09 20:58:23 -08:00
Rafael
0d59ce4f8c Stickers display improvements 2021-12-09 23:49:35 -05:00
Rafael
d51b8cc670 Fix no name after @ error 2021-12-09 15:35:40 -05:00
Rafael
a729c7ab3a Fix blur and focus commentCreate events 2021-12-09 15:35:40 -05:00
Rafael
c9898ad833 Fix livestream updating state from both websocket and reducer and causing double of the same comments to appear 2021-12-09 15:35:40 -05:00
Rafael
cf23149ab4 Remove unused topSuggestion component 2021-12-09 15:35:40 -05:00
Rafael
37ee60aca1 Filter default emojis with the same name as emotes 2021-12-09 15:35:40 -05:00
Rafael
5feaa30e58 Add back support for Winning Uri 2021-12-09 15:35:40 -05:00
Rafael
c2a3698015 Fix and Improve searching 2021-12-09 15:35:40 -05:00
Rafael
e8e1c7e3b4 Fix Popper positioning to be consistent 2021-12-09 15:35:40 -05:00
Rafael
cdc1c0dce4 Fix dispatch props 2021-12-09 15:35:40 -05:00
Rafael
1751f78028 Add key to groups and options 2021-12-09 15:35:40 -05:00
Rafael
d2e4f46abd Fix non concatenated strings 2021-12-09 15:35:40 -05:00
Rafael
1695312833 Add support for suggesting emojis 2021-12-09 15:35:40 -05:00
Rafael
db5f24ae28 Add back and improved support for searching while mentioning 2021-12-09 15:35:40 -05:00
Rafael
6faaf78fc0 Improve label to display matching term 2021-12-09 15:35:40 -05:00
Rafael
4ce3881636 Add support for suggesting Emotes while typing ':' 2021-12-09 15:35:40 -05:00
Rafael
ea84d1af56 Move channel mentioning to use @mui/Autocomplete combobox without search functionality 2021-12-09 15:35:40 -05:00
Rafael
aeb9536a4e Refactor channelMention suggestions into new textareaSuggestions component 2021-12-09 15:35:40 -05:00
Rafael
fcd72799b7 Refactor scrollbar CSS for portal components outside of main 2021-12-09 15:35:40 -05:00
infinite-persistence
a9be97108c
Fix view count appearing in Recommended. 2021-12-09 16:53:51 +08:00
Anthony
f012ba7d73 dont run ads on channel page 2021-12-08 15:49:06 -05:00
Anthony
30cd0644fa only insert ad if its the content view 2021-12-08 15:49:06 -05:00
Anthony
1b6dc0fd8b add ad to channel page 2021-12-08 15:49:06 -05:00
infinite-persistence
ccf0d8e163 Fix double-render of Category Pages when unauthenticated
## Scenario
`selectHasUnclaimedRefereeReward` updated --> `AppRouter` re-render --> `dynamicRoutes` regenerates (re-mounts) list of `DiscoverPage`s

## Fix
I think `selectHasUnclaimedRefereeReward` can be moved elsewhere and would solve the problem, but avoided that since I'm not familiar with rewards enough to do minimal testing.

Memoize the Category Page routes instead.
2021-12-08 13:59:33 -05:00
infinite-persistence
eb5a6ccde9 Memoize GetLinksData for performance
`GetLinksData` is somewhat expensive.  The value won't change until user changes the window size or selects another homepage.

As we can't call an `effect` within a `memo`, we had to extract out `isLargeScreen` as an input parameter, which is fine as it makes `GetLinksData` more functional (functional programming).
2021-12-08 13:59:33 -05:00
saltrafael
9ec1b17515
Fix cancel sending sticker (#447) 2021-12-08 09:17:22 -05:00
saltrafael
fcf19a07e8
Fix some certain wordings breaking page (#440) 2021-12-07 14:03:19 -05:00
infinite-persistence
157b50c58e
Upload: tab sync and various fixes (#428)
* Upload: fix redux key clash

## Issue
`params` is the "final" value that will be passed to the SDK and  `channel` is not a valid argument (it should be `channel_name`). Also, it seems like we only pass the channel ID now and skip the channel name entirely.

For the anonymous case, a clash will still happen when since the channel part is hardcoded to `anonymous`.

## Approach
Generate a guid in `params` and use that as the key to handle all the cases above. We couldn't use the `uploadUrl` because v1 doesn't have it.

The old formula is retained to allow users to retry or cancel their existing uploads one last time (otherwise it will persist forever). The next upload will be using the new key.

* Upload: add tab-locking

## Issue
- The previous code does detect uploads from multiple tabs, but it was done by handling the CONFLICT error message from the backend. At certain corner-cases, this does not work well. A better way is to not allow resumption while the same file is being uploading from another tab.

- When an upload from 1 tab finishes, the GUI on the other tab does not remove the completed item. User either have to refresh or click Cancel. Clicking Cancel results in the 404 backend error. This should be avoided.

## Approach
- Added tab synchronization and locking by passing the "locked" and "removed" information through `localStorage`.

## Other considered approaches
- Wallet sync -- but decided not to pollute the wallet.
- 3rd-party redux tab syncing -- but decided it's not worth adding another module for 1 usage.

* Upload: check if locked before confirming delete

## Reproduce
Have 2 tabs + paused upload
Open "cancel" dialog in one of the tabs.
Continue upload in other tab
Confirm cancellation in first tab
Upload disappears from both tabs, but based on network traffic the upload keeps happening.
(If upload finishes the claim seems to get created)
2021-12-07 09:48:09 -05:00
mayeaux
e982d9c13c
fix linter (#438) 2021-12-06 13:46:45 -05:00
mayeaux
20ca590684
force everything to lower case (#437) 2021-12-06 13:22:09 -05:00
mayeaux
1bfe9e2eda
Ad blacklist terms (#434)
* coming along well

* working properly

* check claim name and dont have side effect if the environment vars are not set

* check against claim name
2021-12-06 13:01:40 -05:00
saltrafael
62122f6a96
Only allow to resubmit a tip when a previous has completed or failed (#429) 2021-12-06 09:51:07 -05:00
infinite-persistence
08ebedb4cc
Settings Page: add warning for unsaved settings (#430)
* Settings Page: add warning for unsaved settings

## Issue
When entering Settings Page, sync-loop is disable until user exist Settings Page.  If browser is closed, changes will be lost.

## Change
Add the usual browser-level modal popup.

Note that all modern browsers have stopped supporting customized messages, but I still left the message there for clarity.  Tried to use our own toast for it, but the handler locks all GUI until it is serviced.

* app: remove unused props

* app: use lighter selectors

When all we need is to know if something exists or their count, use the ID version instead of the url/claim version to avoid the heavy transformation.
2021-12-06 09:38:26 -05:00
mayeaux
82643b1f4a
Finish cleaning out DOM (#413)
* finish cleaning out dom

* lint
2021-12-02 13:22:51 -05:00
infinite-persistence
8eff3dca21
Use the lighter activeChannelId
- No need to generate the full claim since we are only using the ID.
2021-12-02 21:00:17 +08:00
infinite-persistence
36c10a9c78
Remove unused props 2021-12-02 20:41:02 +08:00
infinite-persistence
428c00901b
Fix double pause button in mobile (#408)
Restored css load-order that was changed from a recent refactor.
2021-12-01 22:06:22 -05:00
saltrafael
c492204e26
[oEmbed] some changes and fixes (#392)
* Fix query selection

* Fix xml format

* Fix link url and author_url

* Refactor repeated components

* Refactor repeated embed iframe string

* Add support for passing referrer queries to src

* Change iframe id from lbry to odysee

* Improve replace logic understanding

* Fix URL

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
2021-12-01 10:36:52 -05:00
infinite-persistence
7e9e213974
Add pinning in Category Pages's Trending Tab (#399)
Closes https://github.com/OdyseeTeam/odysee-homepages/issues/427
2021-12-01 10:18:57 -05:00
infinite-persistence
dcd93af6eb
Fix inability to unblock an abandoned claim
The recent change to parse the channel from a Repost using a `claim` ended up breaking the case for abandoned claims, which `claim` will be `null`.

Fix by looking at `claim` first (faster), and falling back to the `parseURI` method if it remains inconclusive.
2021-12-01 21:21:09 +08:00
saltrafael
4fd4309829
add Player.js Support (#378)
* Reorder video.js imports and props

* Install player.js

* Add player.js adapter for video.js
2021-11-30 15:46:03 -05:00
infinite-persistence
bfccca9aaf
Mobile: move 'Notifications' to the top (#389)
## Behavioral changes
- Moved Notifications to the top for mobile.
- Added separate lines between sections.

## Code changes
The array method is too restrictive (hard to move things with display logic around). It's also hard to read.

Instead of trying to populate an array, just directly populate the return tree. Added `getLink` to make things readable. It's now easier to see the sections in a glance.
2021-11-30 10:27:37 -05:00
infinite-persistence
e96807fa6d
Restore 'https' to dmca link and remove actual dup 2021-11-30 14:21:33 +08:00
Thomas Zarebczan
7613d07c35
Misc updates 2021-11-29 20:32:39 -05:00
infinite-persistence
f5f3b08cca
Debounce volume and muted state update.
## Ticket
189: Overall React Lag or Extra Re-renders / Volume slider laggy since v0.48

## The problem
Every redux update results in each mounted component's prop mapping function (the `select` and `perform` stuff) to be recalculated. This is normal per redux, but we do lots of heavy stuff there.

The slider was sending tons of redux update for the Volume and Muted setting.

## Changes
The redux volume/muted setting is just used to restore vjs to the user's setting on the next video, so it doesn't need to be updated immediately/constantly -- vjs keeps it's own video settings.  Debounced that action.
2021-11-29 23:12:38 +08:00
infinite-persistence
ac11dec484
Trailing spaces should not be part of translation. 2021-11-29 08:45:57 +08:00
infinite-persistence
c15a52cb46
i18n update 2021-11-29 08:45:57 +08:00
infinite-persistence
56ecdec2cb
Restore "don't run SP script on iframe (368)" + lint/format (#373) 2021-11-26 09:24:51 -05:00
Thomas Zarebczan
11c8024c2a
Revert "dont run on iframe (#368)" (#370)
This reverts commit 823fdcdd97.
2021-11-25 11:08:21 -05:00
mayeaux
823fdcdd97
dont run on iframe (#368) 2021-11-25 10:42:26 -05:00
infinite-persistence
fd17ab4c8b
Route recommendation search to recsys + add user_id (#353)
* Route recommendation search to recsys 5% of the time + add `user_id`

## Ticket
334 send some recommended requests to recsys

## Approach
`doSearch`:
    - If the search options include `related_to`, route that to the new `searchRecommendations` which performs the 5% check + appends `user_id` at the end. This way, we don't need to alter the function signature of `doSearch`.
    - Else, run proceed as normal.

* Always go to alt provider

f

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2021-11-24 15:25:22 -05:00
mayeaux
2adbbc2899
bugfix embed errors (#366) 2021-11-24 15:20:36 -05:00
infinite-persistence
5c643cc796
Re-enable reposts on homepages (#352)
* Add remove_duplicates to tile/list claim_search except for Channel Page

This removes the any duplicates from reposts.

* Re-activate the "Hide reposts" setting

* Category Rows: default to ['stream', 'repost'] unless specified otherwise.
2021-11-24 11:11:25 -05:00
infinite-persistence
7ea74cfa0d
Fix livestream tiles reloading placeholders then scrolled (#360)
## Issue
9: Wild west + scroll down tries to reload livestreams
2021-11-24 09:35:47 -05:00
infinite-persistence
4267c1ccf7
Un-authenticated resolve (#341)
* apiCall: add option to not send the auth header

## Why
Want an option to make un-authenticated `resolve` calls where appropriate, to improve caching.

## How
All `apiCall`s are authenticated by default, but when clients add NO_AUTH to the params, `apiCall` will exclude the X_LBRY_AUTH_TOKEN. It will also strip NO_AUTH from the param object before sending it out.

* Add hook for 'resolve' and 'claim_search' to check and skip auth...

... if the params does not contain anything that requires the wallet.

* doResolveUri, doClaimSearch: let clients decide when to include_my_output

- No more hardcoding 'include_purchase_receipt' and 'include_is_my_output'
- doResolveUri: include these params when opening a file page. This was the only place that was doing that prior to this PR.

* is_my_output: use the signing_channel as alternative

## Notes
`is_my_output` is more expensive to resolve, so it is not being requested all the time.

## Change
Looking at the signing channel as the additional fallback, on top of `myClaimIds`.

## Aside
I think using `myClaimIds` here is redundant, as it is usually populated from `is_my_ouput`. But leaving as is for now...
2021-11-24 09:33:34 -05:00
mayeaux
84e75fdfe8
Workaround for SecurePrivacy issues with VPNs (#357)
* workaround for secureprivacy issues with vpn

* fix flow issues
2021-11-23 17:26:23 -05:00
saltrafael
f8b694d7d7
Add Pop Culture Icon (#355) 2021-11-23 15:31:28 -05:00
saltrafael
bc64802f6e
Add Education Icons (#354) 2021-11-23 12:35:25 -05:00
mayeaux
f2715fa97b
Adds GDPR support (#311)
* add gdpr support

* only run on production

* testing implementation

* just needs last touches then ready

* ready for merge

* add cookies to sidebar

* hide button when secureprivacy not available

* switch over to loading script as a react hook

* conditionally add secureprivacy script

* save gdpr status on session

* better design
2021-11-23 10:21:33 -05:00
infinite-persistence
3c4ccdd2fe
Kill makeSelectClientSetting
## Why
- No memo required (no transformation).
- `makeSelect*` is an incorrect pattern.

## Changes
- Replaced makeSelectClientSetting with selectClientSetting.
- Remove unused selectShowRepostedContent.
2021-11-23 12:29:53 +08:00
infinite-persistence
87c3dcc057
SyncFatalError: show nag instead of hard-crashing. (#331)
* SyncFatalError: show nag instead of hard-crashing.

## Issue
When sync fails, we crash the app.

## Ticket
Maybe closes 39 "Better handle both internal and web backend interruptions / downtime"

## Approach
I'm tackling this from the standpoint that (1) sync errors are not that fatal -- we'll just lost a few recent changes (2) network disconnection is the common cause.

## Changes
- If we are offline:
    - Inform user through a nag. All other status is meaningless if we are offline.
- If we are online:
    - If api is STATUS_DOWN, show the existing crash page.
    - If there is a sync error, show a nag saying settings are now potentially unsynchronized, and add a button to retry sync.
    - If there is a chunk error, nag to reload.

* Attempt to detect `status=DOWN`

Previous code resolves the status to either "ok" or "not", which makes the app unable to differentiate between the "degraded" (nag) and "down" (crash) states.
2021-11-22 09:30:43 -05:00
infinite-persistence
2d3057d5cf
Detect concurrent uploads and stop it. 2021-11-22 16:12:11 +08:00
infinite-persistence
21cb405965
ClaimLink: skip blacklist check (#329)
## Issue
- It was checking the blacklist on every render.
- Finding opportunities to improve performance

## Changes
Since the final destination will be a dead end anyways, skip the blacklist check so that livestreams can render a bit faster when there lots of mentions.

The only downside is that a claim preview for a blacklisted item would now appear (vs. being a text previously)
2021-11-19 09:46:52 -05:00
infinite-persistence
0941667150
Cost Info selector fixes
- no memo required since they are just directly accessing the store.
2021-11-19 16:01:25 +08:00
Dan Peterson
314b63705d
get active viewers even when not live (we want waiting count) (#322) 2021-11-18 18:41:43 -05:00
Dan Peterson
3269b84385
Remove claim search long poll + introduce pending state that blocks render + avoid polling status for non-owned claim (#320) 2021-11-18 14:43:39 -05:00
infinite-persistence
e35069de1c
Cache the processing of ChannelMentionSuggestions (#309)
## Issue
One of the bottlenecks of livestream page.

The component probably needs a re-design:
- Don't perpetually mount -- only mount when activated by the user through "@". This would avoid the heavy processing entirely.
- Better way of resolving uris (too many arrays, too many loops).
- Tom also mentioned that we should not be resolving every commenter as we see encounter them in a livestream. This is currently the case because the component is always mounted.

## Changes
Until the re-design occurs, attempt to cache the heavy processing. Also, trimmed down the amount of loops.
2021-11-17 11:47:56 -05:00
infinite-persistence
75bde149cf
Fix url selectors
No memo required.
2021-11-17 19:57:04 +08:00
infinite-persistence
b69c1ec5fe
Reduce the chain of renders when Viewer Count is updated
3 layer of components were rendered because of the viewer-count update.  Only `fileViewCount` needs the value, so let it grab from redux directly.
2021-11-17 18:16:01 +08:00
infinite-persistence
01f771c6ca
Simplify makeSelectViewersForId 2021-11-17 18:16:00 +08:00
infinite-persistence
6b6879ba64
Cache subscription uris if we're gonna map it often. 2021-11-17 18:16:00 +08:00
infinite-persistence
5204bb366e
Fix ChannelMention double-constructing the comment list.
As long as the input parameters are the same, the selector will return the cached value so that we don't construct the list twice, which involves blocklist filtering.
2021-11-17 18:15:58 +08:00
infinite-persistence
ac93b379a9
Fix annoying hierarchy error with Yrbl
`<div>` cannot be a descendend of `<p>`, and `{subtitle}`s sometimes need to have `<div>`s.

Just switch from `<p>` to `<div>`, and let the client decide when the actual text paragraphs are.
2021-11-17 10:27:11 +08:00
infinite-persistence
201a826381
Simplify makeSelectIsUriResolving
- Memo not required. `resolvingUris` is very dynamic and is a short array anyways.
- Changeg from using `indexOf` to `includes`, which is more concise.
2021-11-16 14:32:58 +08:00
infinite-persistence
bf324a1b79
Simplify makeSelectTitleForUri
No need to memo given no transformation.
2021-11-16 12:23:18 +08:00
infinite-persistence
8deac56e40
Fix memo: isLivestream & isLivestreamActive 2021-11-16 11:52:35 +08:00
infinite-persistence
73f208923a
Optimize makeSelectClaimIsNsfw (and it's surrounding friends) 2021-11-16 10:14:01 +08:00
infinite-persistence
27dffaaf2f
Remove unused prop 2021-11-16 08:20:25 +08:00
infinite-persistence
652ec4b69b
Fix memo: makeSelectViewCountForUri, makeSelectSubCountForUri
- switch to a lighter selectClaimIdForUri
- also, these 2 don't need to memo because they are just simple accessors.
2021-11-16 08:15:24 +08:00
infinite-persistence
c8ad9718bb
Floating player position-listener fixes (#289)
## Issues
- 251 Dragging the floating player is super laggy

Recent changes and/or refactoring combined the effects or added dependancies into the effects, causing them to re-run excessively.

## Changes
- Restored effects to their original behavior.
- Don't perform the position check when dragging -- only do it when released.
- Do proper debouncing for the 'resize' listener -- the previous method was incorrect as a new function is created on each render.
2021-11-15 16:13:48 -05:00
infinite-persistence
38c13cf5ef Skip USER_STATE_POPULATE when sync_hash is the same
## Changes
- doHandleSyncComplete: only call doGetAndPopulatePreferences when there is new data.
- But for that to work, we'll need to populate preferences at least once. We'll do that in doSignIn.
- We can also remove the "sync/prefs ready" mechanism that was mainly meant for Desktop.

Then came another problem: while trying to spark changes between 2 tabs, `sync/get` was saying "no change" despite the local and server hash being different. I think it is because the both `sync_hash + sync/get` combo is operating on server data, so the hash is the same. I'm guessing this is why we ended up just running doGetAndPopulatePreferences every time before PR, since this flag wasn't correct in this scenario.

- Updated `data.changed` to consider both API results and comparison with local hash.
2021-11-15 07:06:39 -08:00
mayeaux
6546eaeb63
refactor ad code and dont show ads on embeds (#290) 2021-11-15 10:01:42 -05:00
infinite-persistence
93c28b24bb Remove desktop video start time analytics 2021-11-15 09:25:58 +08:00
infinite-persistence
6d217dbc50
Attempt to speed up sidebar menu for mobile (#283)
* Exclude default homepage data at compile time

The youtuber IDs alone is pretty huge, and is unused in the `CUSTOM_HOMEPAGE=true` configuration.

* Remove Desktop items and other cleanup

- Moved constants out of the component.
- Remove SIMPLE_SITE check.
- Remove Desktop-only items

* Sidebar: limit subscription and tag section

## Issue
Too slow for huge lists

## Change
Limit to 10 initially, and load everything on "Show more"

* Fix makeSelectThumbnailForUri

- Fix memo
- Expose function to extract directly from claim if client already have it.
2021-11-12 10:59:11 -05:00
mayeaux
529a9cbc40
Videojs component refactor (#240)
* pull out ads into its own file

* final touchup

* pull out lbry volume class

* using curried function

* coming along well

* almost done keyboard shortcuts

* pulling the guts out

* finishing keyboard shortcuts

* coming along well

* running but needs some testing

* almost done but could still use some testing

* all code working with some flow fixes needed

* fixing flow errors

* finishing flow errors
2021-11-12 09:56:46 -05:00
infinite-persistence
6f8758c819
Fix and optimize makeSelectIsSubscribed (#273)
## Issues with `makeSelectIsSubscribed`
- It will not return true if the uri provided is canonical, because the compared subscription uri is in permanent form. This was causing certain elements like the Heart to not appear in claim tiles.
- It is super slow for large subscriptions not just because of the array size + being a hot selector, but also because it is looking up the claim twice (not memo'd) and also calling `parseURI` to determine if it's a channel, which is unnecessary if you already have the claim.

## Changes
- Optimize the selector to only look up the claim once, and make operations using already-obtained info.
2021-11-12 09:47:07 -05:00
infinite-persistence
ef0329e03b Lazy-load comment components
## Issue
~300KB savings in `ui.js` size (production, uncompressed). Mostly coming from the emoji library.

## Notes
Most of the `Comment*` components are under `CommentsList` or `LivestreamComments`, so deferring these 2 covered most of it. The exceptions are Notification and OwnComments.
2021-11-11 15:09:28 -05:00
infinite-persistence
0f68bad3eb
Optimize selectClaimIsMine
## Why
Frequently used; top in perf profile

## Changes
Most of the time, you already have the claim object in the current context. `selectClaimIsMineForUri` will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time).

Break apart the logic and added the alternative `selectClaimIsMine` for faster lookup.
2021-11-11 16:10:06 +08:00
infinite-persistence
827a08ac26
Fix memo: stake indicator 2021-11-11 10:23:28 +08:00
infinite-persistence
6492fe1c66
Upload: remove "download app" suggestion for large files. 2021-11-11 10:16:31 +08:00
infinite-persistence
cb6a044584
Support resume-able upload via tus (#186)
* Publish button: use spinner instead of "Publishing..."

Looks better, plus the preview could take a while sometimes.

* Refactor `doPublish`. No functional change

This is to allow `doPublish` to accept a custom payload as an input (for resuming uploads), instead of always resolving it from the redux data.

* Add doPublishResume

* Support resume-able upload via tus

## Issue
38 Handle resumable file upload

## Notes
Since we can't serialize a File object, we'll need to the user to re-select the file to resume.

* Exclude "modified date" for Firefox/Android

## Issue
It appears that the modification date of the Android file changes when selected, so that file was deemed "different" when trying to resume upload.

## Change
Exclude modification date for now. Let's assume a smart user.

* Move 'currentUploads' to 'publish' reducer

`publish` is currently rehydrated, so we can ride on that and don't need to store the `currentUploads` in `localStorage` for persistence. This would allow us to store Markdown Post data too, as `localStorage` has a 5MB limit per app.

We could have also made `webReducer` rehydrate, but in this repo, there is no need to split it to another reducer. It also makes more sense to be part of publish anyway (at least to me).

This change is mostly moving items between files, with the exception of
1. An additional REHYDRATE in the publish reducer to clean up the tusUploader.
2. Not clearing `currentUploads` in CLEAR_PUBLISH.

* Restore v1 code for livestream replay, etc.

v2 (tus) does not handle `remote_url`, so the app still needs v1 for that. Since we'll still have v1 code, use v1 for previews as well.
2021-11-10 13:16:16 -05:00
infinite-persistence
d211450b5b
Fix selectCommentIdsForUri
- memo not required.
- start to not use the confusing and wrongly-named 'selectCommentsByUri' (per comment from Sean);  use the existing 'selectClaimIdForUri' instead.  This works because currently we do fetch any comments without first visiting a claim/uri, so we'll always have fetched the required claim, and can be queried in 'selectClaimIdForUri'.
2021-11-10 17:35:30 +08:00
infinite-persistence
7cefb0fadc
Simplify 'selectClaimIdForUri'
Memoization is not needed. But note that it is now a 2 parameter selector.
2021-11-10 16:50:26 +08:00
infinite-persistence
ece2312ec5 selectClaimIsMineForUri to replace makeSelectClaimIsMine
## Issue
`normalizeUri` | `parseURI` is expensive and has been causing sluggish operations when called repeatedly or within a loop.

## Change
Since I'm not confident enough to remove the call entirely from makeSelectClaimIsMine (although I've yet to find a scenario that the uri is not already normalized), we'll try caching the calls instead.

## Results
- in a simple test of toggling between 2 category pages, we saved 20ms from `parseURI` calls alone.

- in a test of opening all categories one time, the memory usage remained similar. This makes sense since we removed a `makeSelect*` (which creates a selector for each call + not memoizing), and replaced that with a cached selector that's actually memoizing.
2021-11-10 16:49:12 +08:00
Dan Peterson
baa15d0c42
add long polling to reset component 2021-11-10 08:21:16 +08:00
Dan Peterson
1d8753e2ba
Revert claim preview + fix small css issue + export named function 2021-11-10 08:21:16 +08:00
Dan Peterson
60f06dac52
Fix livestream state issues. Create unified long polling mechanism. 2021-11-10 08:21:15 +08:00
saltrafael
a7c7881795
Fix string (#257) 2021-11-09 15:25:19 -05:00
infinite-persistence
ef1ebfc491
Allow admins to delete comments as well. (#250)
This is a follow-up to #235
2021-11-09 09:47:49 -05:00
infinite-persistence
bc67379c26
Block: pass comment ID for deletion when being blocked. (#255)
* Simplify dispatch map

Since none of dispatches are doing any custom transformation, just use a direct map. The number of arguments for the comment function are getting crazy.

* Block: pass comment ID for deletion when being blocked.
2021-11-09 09:43:02 -05:00
infinite-persistence
0e2bb350c0
Remove mouse-back/forward listeners
- Not needed for web since the browser does it, and should have been gated under 'app'
- This reverts lbry-desktop 3744.
2021-11-09 16:53:11 +08:00
infinite-persistence
9fc417edfa
Remove 'web' preprocessor 2021-11-09 16:08:13 +08:00
infinite-persistence
45ad08ec32
Remove use-history-nav.js
For electron.js only
2021-11-09 16:03:37 +08:00