lbry-desktop/ui/scss/component
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
..
_ads.scss CLS: reserve space for injected video ads 2021-07-23 13:23:51 +08:00
_animation.scss Revert "Make dropdown menus actually dropdown" 2021-01-29 11:54:39 -05:00
_badge.scss theme orginization and cleanup 2021-04-30 15:05:58 -04:00
_block-list.scss Blocklist: paginate + search (#7055) 2021-09-10 11:36:08 -04:00
_button.scss [New Feature] Comment Emotes (#125) 2021-10-27 14:20:47 -04:00
_card.scss Mobile view: Make comments expandable 2021-08-03 11:05:32 -04:00
_channel-mention.scss Add Channel Mention selection ability (#7151) 2021-09-30 17:30:32 -04:00
_channel.scss Fix cover upload ux (#184) 2021-10-29 10:53:46 -04:00
_claim-list.scss Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
_claim-search.scss Fix dropdown caret spacing (#7096) 2021-09-15 15:18:17 -04:00
_collection.scss improve playlists display (#232) 2021-11-05 21:00:27 -04:00
_comment-create.scss Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
_comments.scss Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
_content.scss Fixes the play/pause on drag issue with the floating player. (#221) 2021-11-08 12:51:03 +01:00
_dat-gui.scss Fix and enable 3D viewer: #4035 2020-04-27 14:27:04 -04:00
_embed-player.scss support embed preference (#7114) 2021-09-18 10:23:30 -04:00
_emote-selector.scss [New Feature] Comment Emotes (#125) 2021-10-27 14:20:47 -04:00
_empty.scss winning claim style pass 2020-12-16 14:58:30 -05:00
_expandable.scss Adjust comment fade-out height 2021-09-27 11:01:44 +08:00
_file-drop.scss moonpay 2020-06-03 14:16:43 -04:00
_file-list.scss moonpay 2020-06-03 14:16:43 -04:00
_file-price.scss [New Feature] Stickers (#131) 2021-10-28 16:25:34 -04:00
_file-properties.scss unify some styles with master 2021-04-27 11:20:41 -04:00
_file-render.scss Embed: add replay button + msg resizing (#7141) 2021-09-21 11:48:05 -04:00
_footer.scss Fix footer in master 2021-06-08 01:19:41 +08:00
_form-field.scss improve playlists display (#232) 2021-11-05 21:00:27 -04:00
_form-row.scss moonpay 2020-06-03 14:16:43 -04:00
_header.scss fix logo size on firefox 2021-08-01 14:26:59 -04:00
_icon.scss Vertically center 'icon--help' (redo) 2021-09-07 16:12:21 +08:00
_item-list.scss moonpay 2020-06-03 14:16:43 -04:00
_livestream.scss Limit to 10 superchats initially; batch-resolve when opening full list. 2021-11-04 16:30:51 +08:00
_main.scss Fix spacing / centering live stream + comments section (#7225) 2021-10-04 09:19:52 -04:00
_markdown-editor.scss Fix broken markdown editor border color 2021-02-26 11:04:25 -05:00
_markdown-preview.scss Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
_media.scss Fix mobile view with long descriptions 2021-05-14 13:51:55 -04:00
_meme.scss meme style 2021-07-19 14:17:43 -04:00
_modal.scss Revert "Open the actual image when clicking on the image viewer" 2021-02-19 14:05:51 -05:00
_navigation.scss adjust channel staked indicator in side navigation 2021-06-17 10:28:16 -04:00
_notification.scss Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
_nudge.scss wip 2021-04-27 11:20:41 -04:00
_pagination.scss moonpay 2020-06-03 14:16:43 -04:00
_placeholder.scss fix placeholder tile margin 2021-03-08 14:05:02 -05:00
_post.scss Posts: restore "Tip unlock | Claim details" component (#6051) 2021-05-12 14:26:47 -04:00
_progress.scss add youtube sync to first run 2020-09-29 17:12:32 -04:00
_purchase.scss [New Feature] Stickers (#131) 2021-10-28 16:25:34 -04:00
_search.scss SearchChannelField 2021-09-08 21:23:50 +08:00
_share.scss use web share api 2020-03-30 15:49:45 -04:00
_snack-bar.scss adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213) 2021-10-04 09:21:59 -04:00
_spinner.scss moonpay 2020-06-03 14:16:43 -04:00
_splash.scss moonpay 2020-06-03 14:16:43 -04:00
_status-bar.scss Fix css "--spacing-?" renaming that recent PRs missed during the merge. 2020-06-04 10:53:32 -04:00
_sticker-selector.scss [New Feature] Stickers (#131) 2021-10-28 16:25:34 -04:00
_stripe-card.scss Move transactions from Settings to Wallet (#6871) 2021-08-13 13:59:43 -04:00
_superchat.scss hyperchats 2021-04-23 16:20:17 -04:00
_syntax-highlighter.scss Add integrated light theme 2020-02-07 09:21:28 -05:00
_table.scss theme orginization and cleanup 2021-04-30 15:05:58 -04:00
_tags.scss Moderator Delegation GUI 2021-06-18 15:46:51 -04:00
_tooltip.scss add channel staked amount indicator on channel thumbnails 2021-02-18 01:14:39 -05:00
_txo-list.scss finish button links 2021-08-23 19:52:56 +02:00
_utils.scss Add hints if an error occurs subscribing to notifications (#143) 2021-11-01 14:51:23 -04:00
_videojs.scss Fix lint/auto-formatting... 2021-11-01 15:23:08 +08:00
_view_count.scss Fix issue where channel upload viewcounts were creating a new line (#7154) 2021-09-29 15:04:43 -04:00
_wallet-tip-selector.scss [New Feature] Stickers (#131) 2021-10-28 16:25:34 -04:00
_wallet-tip-send.scss updated code 2021-07-03 14:42:37 -04:00
_wunderbar.scss Wunderbar: re-arrange static buttons to the top 2021-09-14 15:07:30 +08:00
_yrbl.scss New repost flow 2020-12-16 09:47:28 -05:00
claim-preview-reset.scss Revert claim preview + fix small css issue + export named function 2021-11-10 08:21:16 +08:00
expanding-details.scss moonpay 2020-06-03 14:16:43 -04:00
menu-button.scss Fix “Your Account” popup on mobile (#5652) (#7172) 2021-09-29 11:20:36 -04:00
nag.scss wip 2021-04-27 11:20:41 -04:00
notifications-banner.scss Browser push notifications (#133) 2021-10-27 10:38:10 -04:00
notifications-blocked.scss Add hints if an error occurs subscribing to notifications (#143) 2021-11-01 14:51:23 -04:00
section.scss improve playlists display (#232) 2021-11-05 21:00:27 -04:00
tabs.scss extra collection publish buttons, styling 2021-06-15 18:37:35 -04:00