lbry-desktop/ui/util
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
..
autoLaunch.js fix autolaunch after changing linux cmd capitalization 2019-12-17 13:38:09 -05:00
batch-actions.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
buildHomepage.js Revert "Code-split homepages" 2021-10-28 01:33:46 +08:00
claim.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
comments.js Use replace instead of replaceAll for browser compatibility (#222) 2021-11-04 00:56:29 -04:00
context-menu.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
country.js Util to get list of countries 2021-04-21 10:49:31 -04:00
debounce.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
deep-equal.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
default-languages.js Revert "Code-split homepages" 2021-10-28 01:33:46 +08:00
detect-typing.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
detect-user-bandwidth.js Send video bitrate and user bandwidth to Watchman (#7145) 2021-10-06 14:59:33 -04:00
downloadClaim.js Move 'Download' and 'Report Content' into overflow menu. 2021-06-18 15:50:13 -04:00
enhanced-layout.js mobile view 2019-12-20 15:03:18 -05:00
fetch.js add 10 second timeout to lbrytv status call 2020-03-16 17:59:24 -04:00
file.js Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
form-validation.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
format-bytes.js use new buffer analytics api 2020-08-07 22:54:29 -04:00
format-credits.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
formatAriaLabel.js fix typo 2021-07-29 11:52:34 -05:00
formatMediaDuration.js add more info for claim-preview-tile aria label 2021-07-15 18:12:11 -05:00
full-screen.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
generate-thumbnail-name.js style pass for channel edit 2020-07-01 22:04:23 -04:00
handle-fetch.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
hex.js hyperchats 2021-04-23 16:20:17 -04:00
lazyImport.js ChunkLoadError: ask user to reload instead of automatically reloading (#139) 2021-10-27 11:07:06 -04:00
lbryURI.js Add option to hide buildUri warnings 2021-11-03 13:01:13 +08:00
livestream.js Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
merge-claim.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
number.js show total balance on wallet page/header 2021-01-22 11:46:27 -05:00
object.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
parse-data.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
publish.js wip 2021-06-08 13:25:52 -04:00
query-params.js Recommended changes (#7089) 2021-09-16 16:00:44 -04:00
redux-utils.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
remark-emote.js Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
remark-lbry.js channel parsing bugfix (#199) 2021-11-01 09:58:28 -04:00
remark-timestamp.js [Comment/Livestream] Markdown and style fixes (#55) 2021-10-12 17:06:20 -04:00
saved-passwords.js allow signin on local using non-production SameSite=Lax 2020-07-24 16:48:05 -04:00
search.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
set-operations.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
shuffle-array.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
string.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
stripe.js Chore desktop cleanup (#6896) 2021-08-17 18:34:16 -04:00
swap-json.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
sync-settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
throttle.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
thumbnail.js use thumbnails.odysee.com 2021-10-07 16:38:59 -04:00
time.js Allow video sharing with start timestamp 2020-05-08 14:00:59 -04:00
transifex-upload.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
url.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
web-file-system.js Support drag-and-drop file publishing (#4170) 2020-05-25 10:27:36 -04:00
web.js rss tests 2021-08-06 17:05:36 -04:00
zoomWindow.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00