cb6a044584
* 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.
54 lines
2.2 KiB
JavaScript
54 lines
2.2 KiB
JavaScript
import { combineReducers } from 'redux';
|
|
import { connectRouter } from 'connected-react-router';
|
|
import { costInfoReducer, blacklistReducer, filteredReducer, statsReducer } from 'lbryinc';
|
|
import { claimsReducer } from 'redux/reducers/claims';
|
|
import { fileInfoReducer } from 'redux/reducers/file_info';
|
|
import { walletReducer } from 'redux/reducers/wallet';
|
|
import { publishReducer } from 'redux/reducers/publish';
|
|
import { collectionsReducer } from 'redux/reducers/collections';
|
|
import appReducer from 'redux/reducers/app';
|
|
import tagsReducer from 'redux/reducers/tags';
|
|
import contentReducer from 'redux/reducers/content';
|
|
import settingsReducer from 'redux/reducers/settings';
|
|
import subscriptionsReducer from 'redux/reducers/subscriptions';
|
|
import notificationsReducer from 'redux/reducers/notifications';
|
|
import rewardsReducer from 'redux/reducers/rewards';
|
|
import userReducer from 'redux/reducers/user';
|
|
import commentsReducer from 'redux/reducers/comments';
|
|
import blockedReducer from 'redux/reducers/blocked';
|
|
import coinSwapReducer from 'redux/reducers/coinSwap';
|
|
import livestreamReducer from 'redux/reducers/livestream';
|
|
import searchReducer from 'redux/reducers/search';
|
|
import reactionsReducer from 'redux/reducers/reactions';
|
|
import syncReducer from 'redux/reducers/sync';
|
|
import reportContentReducer from 'redux/reducers/reportContent';
|
|
|
|
export default (history) =>
|
|
combineReducers({
|
|
router: connectRouter(history),
|
|
app: appReducer,
|
|
blacklist: blacklistReducer,
|
|
filtered: filteredReducer,
|
|
claims: claimsReducer,
|
|
comments: commentsReducer,
|
|
content: contentReducer,
|
|
costInfo: costInfoReducer,
|
|
fileInfo: fileInfoReducer,
|
|
livestream: livestreamReducer,
|
|
notifications: notificationsReducer,
|
|
publish: publishReducer,
|
|
reactions: reactionsReducer,
|
|
reportContent: reportContentReducer,
|
|
rewards: rewardsReducer,
|
|
search: searchReducer,
|
|
settings: settingsReducer,
|
|
stats: statsReducer,
|
|
subscriptions: subscriptionsReducer,
|
|
tags: tagsReducer,
|
|
blocked: blockedReducer,
|
|
coinSwap: coinSwapReducer,
|
|
user: userReducer,
|
|
wallet: walletReducer,
|
|
sync: syncReducer,
|
|
collections: collectionsReducer,
|
|
});
|