Commit graph

301 commits

Author SHA1 Message Date
Thomas Zarebczan
27d8f4174c
fix thumbnail URLs 2021-11-29 19:31:23 -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
infinite-persistence
6bbf310348 GA: browser notification subscription 2021-11-24 07:28:25 -08: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
eb83a834a1
TUS: handle remaining locked file error messages 2021-11-23 11:28:32 +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
b6e9c7aabf
TUS: handle URL removal on 4xx errors
## Issue
The TUS client automatically removes the upload fingerprint whenever there is a 4xx error. When we try to resume later, we couldn't find the the fingerprint and ended up creating a new upload ID.

## Changes
Since we are also storing the uploadUrl ourselves, provided that to override the tus client's default behavior of restarting a new session on 4xx errors.
2021-11-22 16:12:10 +08:00
infinite-persistence
d48a7c7295
TUS: reduce chunk size from 100MB to 25MB.
The stalling behavior has changed a bit, probably with the removal of CF.

The stall difference between 10MB and 50MB is not too noticable, so picking 25MB as a start.
2021-11-19 14:40:03 +08:00
jessopb
4cf9309ee1
facilitate admin temp files (#313) 2021-11-17 13:28:36 -05:00
infinite-persistence
73f208923a
Optimize makeSelectClaimIsNsfw (and it's surrounding friends) 2021-11-16 10:14:01 +08:00
Dan Peterson
cb104017ad
adjust livestream interval (#294) 2021-11-15 12:34:21 -06:00
Dan Peterson
c242c37869
Add initialization status to push notification hook. Can be used to better control render strategy in cmpnts utilizing it. (#284) 2021-11-12 12:06:07 -05:00
infinite-persistence
b0509bc990
Band-aid: wait a while before sending notify
## Issue
The status = 0 is due to unresponsive backend right after the tus-upload. No root-cause found yet.

## Change
It may or may not help, but adding a delay to account for the unresponsive stage for now.
2021-11-12 18:43:57 +08:00
infinite-persistence
d8080a9fda
Notify: log retry attempts 2021-11-12 16:30:41 +08:00
infinite-persistence
62e7fe06a5
TUS: Don't retry on 4xx
## Issue/Steps
From Randy:
- started the upload then open a new tab of the same page
- one of the tab finished the upload and successfully published the file, and the other tab received 404 error on patch and head request, because the file is already removed on the server

## Changes
Use the default onRetry code that ignores all 4xx, except for LOCKED and CONFLICT. Had to duplicate some code from tus because I still need to inject the 'retry' progress for the GUI to update the string.
2021-11-12 14:32:41 +08:00
infinite-persistence
dfe30b6d78
TUS: fix parallel uploads of the same file
## Issue
If you make 2 claims from the same source file, the second upload thinks it's trying to resume from the first one. They should be unique uploads.

## Approach
Stash the upload url for comparison when looking up existing uploads to resume.

Stash that in `params` to minimize code changes. We'll just need to ensure it is cleared before we generate the SDK payload.
2021-11-12 14:32:40 +08:00
infinite-persistence
861aaf4cde Notify: Re-enable delay but only for initial connection problem
We want to avoid the double `notify`, and also to confirm whether the SDK is timing out.
2021-11-12 11:19:26 +08:00
infinite-persistence
9bfa1a3577
Notify: Disable retry + try to report status code 2021-11-12 09:01:36 +08:00
mayeaux
d047a748b7
Test ads (#277)
display ad in related sidebar for video view page

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2021-11-11 17:15:50 -05:00
infinite-persistence
7ef5975ee8
Notify: auto-retry once after 10 seconds
Also:
- Show the resume button on notify errors.
- Changed the error message to differentiate against v1's.
2021-11-11 09:55:48 +08:00
infinite-persistence
b5f1ae1291
Tus-retry: widen delay gap + add 1 more retry 2021-11-11 09:54:25 +08:00
Dan Peterson
5639e4c1ff
Adjust some initial states to optimize initial render (#265) 2021-11-10 14:15:40 -05: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
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
infinite-persistence
d7fc5069be
Remove .env.ody again
Accidentally brought back in when porting over the Redux consolidation PR.
2021-11-09 15:57:13 +08:00
infinite-persistence
1426dd5b83
Remove skin support and lbry.tv scss
## Issue
211 - CSS load-order problem

## Notes
It is unlikely that we'll need to support different brands in the future, so simplifying the code and number of files so that we don't have to handle the various import paths. Will probably make things easier for the css-splitting work too.
2021-11-09 10:36:08 +08:00
Thomas Zarebczan
db12a4b991
Odysee specific changes and other misc improvements (#219) 2021-11-03 15:47:19 -04:00
Dan Peterson
704452732a
Add hints if an error occurs subscribing to notifications (#143)
* Add hints if an error occurs subscribing to notifications

* Update import (type/linting issue)

* disable optimization for debugging

* Revert "disable optimization for debugging"

This reverts commit 5b837f94e97b7488a7dc565e7f74d399e19c286f.

* improve detection of notification support + improve ux / ui surrounding that

* update translations
2021-11-01 14:51:23 -04:00
saltrafael
c24153c6ca
[New Feature] Comment Emotes (#125)
* Refactor form-field

* Create new Emote Menu

* Add Emotes

* Add Emote Selector and Emote Comment creation ability

* Fix and Split CSS
2021-10-27 14:20:47 -04:00
Dan Peterson
762bddb158
Don't instantiate messaging SDK if service worker is unavailable (Firefox/Private) (#142) 2021-10-27 13:34:50 -04:00
Dan Peterson
03f69eff86
Browser push notifications (#133)
* fix type error

fix is subscribed check

- Persist subscription data locally
- add / remove subscription during log in / out
- Use store directly in hook

Add toast error if subscription fails

Revert removal of v2

hotfix linting issue

Add custom notification handler

- fix isSupported flag
- make icon color compatible with light/dark theme
- fix icon on notifications blocked banner

wip: add push notification banner to notifications page.

- ignore failed deletions via internal API
- add ua parsing package
- add more robust meta data to token save

refactor naming + add push toggle to notification button

shift some code around

update css naming o proper BEM notation

update notifications UI

remove now unneeded util function

Update push notification system to sue firebase sdk

separate service worker webpack bundling

update service worker to use firebase sdk

Add firebase config

Add firebase and remove filemanager

Stub out the basics for browser push notifications.

* fix safari

* try smaller image for badge

* add token validation with server, refactor code

* remove param

* add special icon for web notification badge

* add translations

* add missing trans for toast error

* add pushRequest method that will not prompt users who have subscribed but since disabled notifications in the settings.
2021-10-27 10:38:10 -04:00
Merge
30023422b8
Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
Thomas Zarebczan
02a8099514
Take 99 2021-10-12 22:30:05 -04:00
Thomas Zarebczan
9dbee19961
Add test embed domain to rule out cards 2021-10-12 20:55:33 -04:00
Thomas Zarebczan
b49fed4cf5
fix config for thumbs
whoops

Fix encoded URLs
2021-10-12 20:31:10 -04:00
Thomas Zarebczan
2b5d32c313
Use cards.odysee.com (#56) 2021-10-12 19:16:39 -04:00
saltrafael
7c518aa712
[Comment/Livestream] Markdown and style fixes (#55)
* Fix CSS for live chat embeds

* Fix Markdown Lists in Comments

* Disable copy link menu option on livestream comments

* Fix nested indents in Live Chat

* Fix mentions and timestamps not parsed in bullet lists

* Highlight livestream comment and menu button on hover

* Fix mention parsing
2021-10-12 17:06:20 -04:00
Thomas Zarebczan
eaa32e4df4
Odysee references revamp, part1 2021-10-08 15:22:07 -04:00
Thomas Zarebczan
1bb491857e
lint fix, return url always
fix lint
2021-10-08 11:06:51 -04:00
Thomas Zarebczan
3077c778c3
Test more twitter thumbnail stuff 2021-10-08 10:44:22 -04:00
Thomas Zarebczan
88794761d0
use thumbnails.odysee.com
f
2021-10-07 16:38:59 -04:00
mayeaux
e3791aefdc
Send video bitrate and user bandwidth to Watchman (#7145)
* adding functionality to detect user download speed

* calculating bandwidth speed more intelligently

* saving download speed and updating it every 30s

* all the functionality should be done needs testing

* fix linting

* use a 1mb file for calculating bandwidth

* add optional chaining plugin to babel and get bitrate from texttrack

* allow optional chaining for flow

* ignore flow error

* disable bandwidth checking functionality

* fix flow error
2021-10-06 14:59:33 -04:00
infinite-persistence
401f7fec17
Revert "Add sitemap to influence Sitelinks"
Seems like I messed up robots.txt?

This reverts commit 95654955b1.
2021-10-06 13:05:36 +08:00
infinite-persistence
95654955b1
Add sitemap to influence Sitelinks
## Issue
Part of `7166 improve search metadata`

## Notes
This is an experiment to influence the Sitelinks in our search results. Our current sitemap only consists of claims, so claims appear in Sitelinks more often. We (Julian) want categories to have higher priority, if possible.

For now, the sitemap will be defined in Google Console instead of robots.txt.

If it works, the file should be uploaded to sitemap.odysee.com, alongside the claim list sitemap.
2021-10-06 11:56:13 +08:00
infinite-persistence
5ed9e3e3ae
OG: Technology category missing due to rename
- 'technology' was renamed to 'tech'.
- Leave both entries there for now. Not sure if other homepages still use the old link or not.
2021-10-04 11:21:13 +08:00
infinite-persistence
5757eb7036
OG: fix url for categories
## Issue
Category cards are showing up as "odysee.com" cards in Facebook.

## Change
- `og:url` is supposed to be the canonical URL. It was hardcoded to "odysee.com", so every category was being redirected when the card is being generated.
- Removed `twitter:url`. The documentation says it will fall back to `og:url`, so there is not need to define both if it's the same.
2021-10-04 10:27:49 +08:00
infinite-persistence
4f07867f8f
Corrected meta for "description" (patch for #7206)
It should be `name`, not `property`. Copy-paste error from the OG version.
2021-10-02 08:42:19 +08:00
infinite-persistence
d3be8726fc
Add favicon for Google Search results (#7205)
- A side-quest from "7166 improve search metadata".
- The favicon must be from the same domain as the homepage, so the CDN URL couldn't be used, hence the additional upload.
- The favicon also needs to be multiples of 48x48 and above.
    - Wanted to use SVG for the smallest size possible, but seems like Safari does not fully support it. Got Dejan to give me a reasonably-sized PNG.

## Reference
https://developers.google.com/search/docs/advanced/appearance/favicon-in-search#guidelines
2021-10-01 08:09:02 -04:00
infinite-persistence
dac8d711d1
Prevent random description in Google Search results for "odysee" (#7206)
## Issue
7166 improve search metadata

Depending on the search term and timing, Google extracts data from the sidebar or page content to use as the search-result description.

## Change
Defined `description` (on top of the existing `og:description` and `twitter:description`.

While I couldn't find a definitive doc saying that this is the solution, this is present in all other sites (and matches their description in a Google Search results).
2021-10-01 08:08:39 -04:00
saltrafael
2f4dedfba2
Add Channel Mention selection ability (#7151)
* Add Channel Mention selection ability

* Fix mentioned user name being smaller than other text

* Improve logic for locating a mention

* Fix mentioning with enter on livestream

* Fix breaking for invalid URI query

* Handle punctuation after mention

* Fix name display and appeareance

* Use canonical url

* Fix missing search
2021-09-30 17:30:32 -04:00
Thomas Zarebczan
3e8172af13
force mp3 extension vs mpga 2021-09-27 12:40:06 -04:00
infinite-persistence
e23e9e1387
Localize sunset nag
Changed the text a bit so that we can re-use the existing 'Learn more'.
2021-09-23 20:19:23 +08:00
jessopb
8a277e767a
revert embedNoEnd and modify preferEmbed end display (#7144) 2021-09-21 12:47:56 -04:00
infinite-persistence
aefa889ee4
Embed: add replay button + msg resizing (#7141)
* Embed: add replay button

Also, changed "Rewatch or Discuss" to "Discuss + external arrow" since there is a dedicated re-watch button.

* Embed: resize "ended message" based on container height
2021-09-21 11:48:05 -04:00
jessopb
6ca058c3a1
support embed preference (#7114)
* support embed preference

* title color
2021-09-18 10:23:30 -04:00
jessopb
91fbd615e2
fix embed end logo (#7106) 2021-09-15 11:28:45 -04:00
infinite-persistence
d5e8f2d18c
Fix scrollbar in upgrade modal (#7076)
## Issue
5848 Remove scroll-bar in update prompt

## Changes
- Make scrollbars appear only when necessary.
- Style the scrollbar. Similar to other areas, we skip this for Mac (can't recall why we need to skip).
2021-09-13 11:35:26 -04:00
dependabot[bot]
2cd06fcd00
Bump tar from 4.4.15 to 4.4.19 in /web (#6996)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.15...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-01 12:17:03 -04:00
zeppi
3b94ecaf80 redirect activate page 2021-08-31 15:46:20 -04:00
mayeaux
529ad258fe
fix overflow text on meme div (#6987) 2021-08-30 13:58:21 -04:00
infinite-persistence
90c469454a
Fix Category-Metadata path parsing
## Issue
6849 category metadata shows in place of creator channel when using vanity URL
2021-08-30 12:51:01 +08:00
infinite-persistence
1124125578
Fix Facebook meta warnings (#6965) 2021-08-25 15:10:00 -04:00
infinite-persistence
e1223d0d02
Convert setting sub-pages to new style
"Creator Settings", "Blocked and Muted", "Manage notifications", "Stripe"
2021-08-23 23:45:26 +08:00
dependabot[bot]
c0fbc412ae Bump minimist from 1.2.0 to 1.2.5 in /web
Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.5.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.5)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 16:26:06 -04:00
dependabot[bot]
76296de079 Bump path-parse from 1.0.6 to 1.0.7 in /web
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 13:47:40 -04:00
dependabot[bot]
4937baad20 Bump url-parse from 1.5.1 to 1.5.3 in /web
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 13:47:30 -04:00
Baltazar Gomez
926d76de07 fix lint: operator '=' must be spaced 2021-08-10 13:47:15 -04:00
Baltazar Gomez
5e239f48c9 fix lint 2021-08-10 13:47:15 -04:00
Baltazar Gomez
017ec11737 fix og error ( truncated unicode character ) - closes #6839 2021-08-10 13:47:15 -04:00
Thomas Zarebczan
7312badc18
use website URL if exists for RSS 2021-08-10 12:56:23 -04:00
Baltazar Gomez
dbaa702888
fix wrong embed og metadata: #6814 2021-08-08 09:10:01 +08:00
btzr-io
c85e448499
fix redirection and normalization of claim urls 2021-08-07 19:23:14 +08:00
btzr-io
68e4684ccd
use better resolve url 2021-08-07 19:23:00 +08:00
btzr-io
2c812da785
fix embed claim url 2021-08-07 10:16:10 +08:00
btzr-io
722f933052
use value.release_time 2021-08-07 10:16:09 +08:00
btzr-io
45fcf0d518
use value.audio for google video metadata 2021-08-07 10:16:08 +08:00
Baltazar Gomez
6d91d1c799
use resolve for og metadata 2021-08-07 10:16:07 +08:00
Thomas Zarebczan
6db75f8a66 rss tests
Various fixes and improvements to work with Apple Podcasts

f

f

image support
2021-08-06 17:05:36 -04:00
zeppi
4b64c35360 sunset link 2021-08-06 13:30:33 -04:00
zeppi
2a19f9f63c lrytv sunset nag 2021-08-06 12:27:37 -04:00
dependabot[bot]
ceb1b91273 Bump tar from 4.4.13 to 4.4.15 in /web
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-04 12:20:10 -04:00
infinite-persistence
f2e583f314 RSS: change from 'download' to 'stream' url to pass Media Test
This apparently ensures the media is playable across all devices and apps.
2021-08-04 12:07:14 -04:00
infinite-persistence
0af1dfe282 RSS: podcast support
## Issue
`https://github.com/lbryio/lbry-desktop/issues/6369#issuecomment-882081892`

## Changes
- Replace 'feed' with 'node-rss' for itunes spec support.
- Replace content type from 'rss+xml' to 'xml' so that the browser will display it nicely using the document tree without us having to re-format it ('node-rss' does not). Seems like all feeds that I found does it this way.
- There is no need to escape characters now that 'node-rss' does it. Nice.
2021-08-04 12:07:14 -04:00
zeppi
e3e5c50a13 style logo in embed 2021-08-03 13:38:17 -04:00
infinite-persistence
4156e83f57 Fix: OG messed up if $" is in title
## Issue
5951: OG messed up if `$"` is in title

The replacement string would contain `...$&quot...`. The character `$&` has special meaning in `replace`, so the output was messed up.

## Approach
Use a direct slice approach. A bit less elegant.
2021-08-03 11:36:26 -04:00
btzr-io
fa1b1737bb fix inconsistent theme css vars: fixes #6738 2021-07-29 22:26:26 -07:00
zeppi
c4639934d1 better... 2021-07-29 11:28:19 -04:00
zeppi
e09199d331 stylesRecon 2021-07-29 11:28:19 -04:00
zeppi
3f4c601428 logo component on embeds/embeds ended 2021-07-27 15:13:29 -04:00
zeppi
1e9dabe6e2 favicon custom
html fav tag remove

basic meta favi

missing favicon

recon
2021-07-23 17:12:18 -04:00
zeppi
aed3e98c79 footer recon 2021-07-23 16:20:11 -04:00
zeppi
20b7b24203 meme component2 2021-07-23 14:56:42 -04:00
Thomas Zarebczan
26e2dc16ec
Reinstate music category metadata 2021-07-23 11:49:44 -04:00
infinite-persistence
c62c667436
CLS: reserve space for injected video ads 2021-07-23 13:23:51 +08:00
infinite-persistence
28e9aea290 Improve cache for hashed js files 2021-07-21 08:13:27 -04:00
infinite-persistence
47c41b436d RSS: Add enclosure for media
- Moved the thumbnail from 'enclosure' to 'description' by appending the thumbnail in front.
- Generate enclosure for media. It's up to readers on how they will handle it. Some will display the inline video player, some will just provide a download link.
2021-07-20 15:27:24 -04:00
Andrey Beletsky
8e3aee5813 Change API server address to odysee-api 2021-07-20 10:23:00 -04:00
zeppi
90e2a225e4 use meme component 2021-07-19 14:00:35 -04:00