lbry-desktop/ui/constants
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
..
abandon_states.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
action_types.js Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
claim.js Remove duplicate claim utilities 2021-11-16 08:59:07 +08:00
claim_search.js Channel Page: enable filters; add "sort by" filter (#7069) 2021-09-13 11:23:53 -04:00
classnames.js Fix linked-comment auto scroll 2021-09-01 16:02:54 +08:00
collections.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
comment.js List own comments (#7171) 2021-10-01 08:10:27 -04:00
daemon_settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
email.js simpler email regex 2019-11-18 14:50:29 -05:00
emotes.js Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
errors.js Odysee specific changes and other misc improvements (#219) 2021-11-03 15:47:19 -04:00
file_render_modes.js Enable PDF Viewer in App 2021-01-28 10:21:35 -05:00
form-field.js some recon (#6532) 2021-07-18 13:06:52 -04:00
icons.js Add Pop Culture Icon (#355) 2021-11-23 15:31:28 -05:00
keycodes.js Consolidate keycode constants 2021-09-10 09:00:44 +08:00
language-migrations.js Revert "Simplify language lists" 2021-04-06 15:42:27 -04:00
languages.js Tagalog Language Fix (#6951) 2021-08-25 10:19:16 -04:00
licenses.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
livestream.js Reduce livestream chat size to 50 2021-11-17 21:04:17 +08:00
modal_types.js General-purpose "Confirm" modal 2021-10-29 13:36:27 +08:00
moonpay.js moonpay 2020-06-03 14:16:43 -04:00
navigation.js Fill in remaining Recsys fields 2021-08-03 09:34:36 -04:00
notifications.js Skin fiat-tip notification 2021-07-08 11:21:58 +08:00
pages.js i18n fixes for new category and page titles 2021-11-24 11:11:46 +08:00
pageTitles.js i18n fixes for new category and page titles 2021-11-24 11:11:46 +08:00
publish_types.js livestream related publish fixes 2021-04-22 10:59:03 -04:00
reactions.js creator only like reactions 2020-10-27 12:27:30 -04:00
report_content.js Rick constants 2021-04-21 10:49:31 -04:00
search.js Recommended changes (#7089) 2021-09-16 16:00:44 -04:00
searchable_languages.js claim-search by language 2020-10-29 15:20:18 -04:00
settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
shape_shift.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
shared_preferences.js Post-merge updates and fixes 2021-10-19 20:40:07 +08:00
sort_options.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
speech_urls.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
stickers.js Add new stickers (#347) 2021-11-22 17:52:46 -05:00
storage.js Upload: tab sync and various fixes (#428) 2021-12-07 09:48:09 -05:00
stripe.js Chore desktop cleanup (#6896) 2021-08-17 18:34:16 -04:00
subscriptions.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
supported_browser_languages.js Restore lost languages (#5972) 2021-04-28 20:27:04 -04:00
supported_languages.js Tagalog Language Fix (#6951) 2021-08-25 10:19:16 -04:00
supported_sub_languages.js support brazilian portugese 2021-04-16 11:16:25 -04:00
tags.js support embed preference (#7114) 2021-09-18 10:23:30 -04:00
themes.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
thumbnail_upload_statuses.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
token.js Un-authenticated resolve (#341) 2021-11-24 09:33:34 -05:00
transaction_list.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
transaction_types.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
txo_list.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
user.js wip 2021-06-08 13:25:52 -04:00
youtube.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00