From 6d39d22ac7d9160f4788fe78acf994e6770490c0 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 13 Nov 2017 15:47:10 -0500 Subject: [PATCH 1/4] move redux code into /redux --- ui/js/{ => redux}/actions/app.js | 0 ui/js/{ => redux}/actions/availability.js | 0 ui/js/{ => redux}/actions/content.js | 0 ui/js/{ => redux}/actions/cost_info.js | 0 ui/js/{ => redux}/actions/file_info.js | 0 ui/js/{ => redux}/actions/navigation.js | 0 ui/js/{ => redux}/actions/rewards.js | 0 ui/js/{ => redux}/actions/search.js | 0 ui/js/{ => redux}/actions/settings.js | 0 ui/js/{ => redux}/actions/user.js | 0 ui/js/{ => redux}/actions/wallet.js | 0 ui/js/{ => redux}/reducers/app.js | 0 ui/js/{ => redux}/reducers/availability.js | 0 ui/js/{ => redux}/reducers/claims.js | 0 ui/js/{ => redux}/reducers/content.js | 0 ui/js/{ => redux}/reducers/cost_info.js | 0 ui/js/{ => redux}/reducers/file_info.js | 0 ui/js/{ => redux}/reducers/navigation.js | 0 ui/js/{ => redux}/reducers/rewards.js | 0 ui/js/{ => redux}/reducers/search.js | 0 ui/js/{ => redux}/reducers/settings.js | 0 ui/js/{ => redux}/reducers/user.js | 0 ui/js/{ => redux}/reducers/wallet.js | 0 ui/js/{ => redux}/selectors/app.js | 0 ui/js/{ => redux}/selectors/availability.js | 0 ui/js/{ => redux}/selectors/claims.js | 0 ui/js/{ => redux}/selectors/content.js | 0 ui/js/{ => redux}/selectors/cost_info.js | 0 ui/js/{ => redux}/selectors/file_info.js | 0 ui/js/{ => redux}/selectors/navigation.js | 2 +- ui/js/{ => redux}/selectors/rewards.js | 0 ui/js/{ => redux}/selectors/search.js | 0 ui/js/{ => redux}/selectors/settings.js | 0 ui/js/{ => redux}/selectors/user.js | 0 ui/js/{ => redux}/selectors/wallet.js | 0 35 files changed, 1 insertion(+), 1 deletion(-) rename ui/js/{ => redux}/actions/app.js (100%) rename ui/js/{ => redux}/actions/availability.js (100%) rename ui/js/{ => redux}/actions/content.js (100%) rename ui/js/{ => redux}/actions/cost_info.js (100%) rename ui/js/{ => redux}/actions/file_info.js (100%) rename ui/js/{ => redux}/actions/navigation.js (100%) rename ui/js/{ => redux}/actions/rewards.js (100%) rename ui/js/{ => redux}/actions/search.js (100%) rename ui/js/{ => redux}/actions/settings.js (100%) rename ui/js/{ => redux}/actions/user.js (100%) rename ui/js/{ => redux}/actions/wallet.js (100%) rename ui/js/{ => redux}/reducers/app.js (100%) rename ui/js/{ => redux}/reducers/availability.js (100%) rename ui/js/{ => redux}/reducers/claims.js (100%) rename ui/js/{ => redux}/reducers/content.js (100%) rename ui/js/{ => redux}/reducers/cost_info.js (100%) rename ui/js/{ => redux}/reducers/file_info.js (100%) rename ui/js/{ => redux}/reducers/navigation.js (100%) rename ui/js/{ => redux}/reducers/rewards.js (100%) rename ui/js/{ => redux}/reducers/search.js (100%) rename ui/js/{ => redux}/reducers/settings.js (100%) rename ui/js/{ => redux}/reducers/user.js (100%) rename ui/js/{ => redux}/reducers/wallet.js (100%) rename ui/js/{ => redux}/selectors/app.js (100%) rename ui/js/{ => redux}/selectors/availability.js (100%) rename ui/js/{ => redux}/selectors/claims.js (100%) rename ui/js/{ => redux}/selectors/content.js (100%) rename ui/js/{ => redux}/selectors/cost_info.js (100%) rename ui/js/{ => redux}/selectors/file_info.js (100%) rename ui/js/{ => redux}/selectors/navigation.js (99%) rename ui/js/{ => redux}/selectors/rewards.js (100%) rename ui/js/{ => redux}/selectors/search.js (100%) rename ui/js/{ => redux}/selectors/settings.js (100%) rename ui/js/{ => redux}/selectors/user.js (100%) rename ui/js/{ => redux}/selectors/wallet.js (100%) diff --git a/ui/js/actions/app.js b/ui/js/redux/actions/app.js similarity index 100% rename from ui/js/actions/app.js rename to ui/js/redux/actions/app.js diff --git a/ui/js/actions/availability.js b/ui/js/redux/actions/availability.js similarity index 100% rename from ui/js/actions/availability.js rename to ui/js/redux/actions/availability.js diff --git a/ui/js/actions/content.js b/ui/js/redux/actions/content.js similarity index 100% rename from ui/js/actions/content.js rename to ui/js/redux/actions/content.js diff --git a/ui/js/actions/cost_info.js b/ui/js/redux/actions/cost_info.js similarity index 100% rename from ui/js/actions/cost_info.js rename to ui/js/redux/actions/cost_info.js diff --git a/ui/js/actions/file_info.js b/ui/js/redux/actions/file_info.js similarity index 100% rename from ui/js/actions/file_info.js rename to ui/js/redux/actions/file_info.js diff --git a/ui/js/actions/navigation.js b/ui/js/redux/actions/navigation.js similarity index 100% rename from ui/js/actions/navigation.js rename to ui/js/redux/actions/navigation.js diff --git a/ui/js/actions/rewards.js b/ui/js/redux/actions/rewards.js similarity index 100% rename from ui/js/actions/rewards.js rename to ui/js/redux/actions/rewards.js diff --git a/ui/js/actions/search.js b/ui/js/redux/actions/search.js similarity index 100% rename from ui/js/actions/search.js rename to ui/js/redux/actions/search.js diff --git a/ui/js/actions/settings.js b/ui/js/redux/actions/settings.js similarity index 100% rename from ui/js/actions/settings.js rename to ui/js/redux/actions/settings.js diff --git a/ui/js/actions/user.js b/ui/js/redux/actions/user.js similarity index 100% rename from ui/js/actions/user.js rename to ui/js/redux/actions/user.js diff --git a/ui/js/actions/wallet.js b/ui/js/redux/actions/wallet.js similarity index 100% rename from ui/js/actions/wallet.js rename to ui/js/redux/actions/wallet.js diff --git a/ui/js/reducers/app.js b/ui/js/redux/reducers/app.js similarity index 100% rename from ui/js/reducers/app.js rename to ui/js/redux/reducers/app.js diff --git a/ui/js/reducers/availability.js b/ui/js/redux/reducers/availability.js similarity index 100% rename from ui/js/reducers/availability.js rename to ui/js/redux/reducers/availability.js diff --git a/ui/js/reducers/claims.js b/ui/js/redux/reducers/claims.js similarity index 100% rename from ui/js/reducers/claims.js rename to ui/js/redux/reducers/claims.js diff --git a/ui/js/reducers/content.js b/ui/js/redux/reducers/content.js similarity index 100% rename from ui/js/reducers/content.js rename to ui/js/redux/reducers/content.js diff --git a/ui/js/reducers/cost_info.js b/ui/js/redux/reducers/cost_info.js similarity index 100% rename from ui/js/reducers/cost_info.js rename to ui/js/redux/reducers/cost_info.js diff --git a/ui/js/reducers/file_info.js b/ui/js/redux/reducers/file_info.js similarity index 100% rename from ui/js/reducers/file_info.js rename to ui/js/redux/reducers/file_info.js diff --git a/ui/js/reducers/navigation.js b/ui/js/redux/reducers/navigation.js similarity index 100% rename from ui/js/reducers/navigation.js rename to ui/js/redux/reducers/navigation.js diff --git a/ui/js/reducers/rewards.js b/ui/js/redux/reducers/rewards.js similarity index 100% rename from ui/js/reducers/rewards.js rename to ui/js/redux/reducers/rewards.js diff --git a/ui/js/reducers/search.js b/ui/js/redux/reducers/search.js similarity index 100% rename from ui/js/reducers/search.js rename to ui/js/redux/reducers/search.js diff --git a/ui/js/reducers/settings.js b/ui/js/redux/reducers/settings.js similarity index 100% rename from ui/js/reducers/settings.js rename to ui/js/redux/reducers/settings.js diff --git a/ui/js/reducers/user.js b/ui/js/redux/reducers/user.js similarity index 100% rename from ui/js/reducers/user.js rename to ui/js/redux/reducers/user.js diff --git a/ui/js/reducers/wallet.js b/ui/js/redux/reducers/wallet.js similarity index 100% rename from ui/js/reducers/wallet.js rename to ui/js/redux/reducers/wallet.js diff --git a/ui/js/selectors/app.js b/ui/js/redux/selectors/app.js similarity index 100% rename from ui/js/selectors/app.js rename to ui/js/redux/selectors/app.js diff --git a/ui/js/selectors/availability.js b/ui/js/redux/selectors/availability.js similarity index 100% rename from ui/js/selectors/availability.js rename to ui/js/redux/selectors/availability.js diff --git a/ui/js/selectors/claims.js b/ui/js/redux/selectors/claims.js similarity index 100% rename from ui/js/selectors/claims.js rename to ui/js/redux/selectors/claims.js diff --git a/ui/js/selectors/content.js b/ui/js/redux/selectors/content.js similarity index 100% rename from ui/js/selectors/content.js rename to ui/js/redux/selectors/content.js diff --git a/ui/js/selectors/cost_info.js b/ui/js/redux/selectors/cost_info.js similarity index 100% rename from ui/js/selectors/cost_info.js rename to ui/js/redux/selectors/cost_info.js diff --git a/ui/js/selectors/file_info.js b/ui/js/redux/selectors/file_info.js similarity index 100% rename from ui/js/selectors/file_info.js rename to ui/js/redux/selectors/file_info.js diff --git a/ui/js/selectors/navigation.js b/ui/js/redux/selectors/navigation.js similarity index 99% rename from ui/js/selectors/navigation.js rename to ui/js/redux/selectors/navigation.js index 0d3965f3c..04d5b4856 100644 --- a/ui/js/selectors/navigation.js +++ b/ui/js/redux/selectors/navigation.js @@ -111,7 +111,7 @@ export const selectPageTitle = createSelector( return params.query ? __("Search results for %s", params.query) : __("Search"); - case "discover": + case "discover": case false: case null: case "": diff --git a/ui/js/selectors/rewards.js b/ui/js/redux/selectors/rewards.js similarity index 100% rename from ui/js/selectors/rewards.js rename to ui/js/redux/selectors/rewards.js diff --git a/ui/js/selectors/search.js b/ui/js/redux/selectors/search.js similarity index 100% rename from ui/js/selectors/search.js rename to ui/js/redux/selectors/search.js diff --git a/ui/js/selectors/settings.js b/ui/js/redux/selectors/settings.js similarity index 100% rename from ui/js/selectors/settings.js rename to ui/js/redux/selectors/settings.js diff --git a/ui/js/selectors/user.js b/ui/js/redux/selectors/user.js similarity index 100% rename from ui/js/selectors/user.js rename to ui/js/redux/selectors/user.js diff --git a/ui/js/selectors/wallet.js b/ui/js/redux/selectors/wallet.js similarity index 100% rename from ui/js/selectors/wallet.js rename to ui/js/redux/selectors/wallet.js -- 2.45.2 From 8993c9524ed21a237ffba9254cd1efc6b15625ae Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 13 Nov 2017 16:02:23 -0500 Subject: [PATCH 2/4] update imports --- ui/js/component/app/index.js | 10 ++++---- ui/js/component/cardVerify/index.js | 2 +- ui/js/component/channelTile/index.js | 10 ++++---- ui/js/component/dateTime/index.js | 4 ++-- ui/js/component/fileActions/index.js | 8 +++---- ui/js/component/fileCard/index.js | 12 +++++----- ui/js/component/fileDetails/index.js | 6 ++--- ui/js/component/fileDownloadLink/index.js | 10 ++++---- ui/js/component/fileListSearch/index.js | 7 ++++-- ui/js/component/filePrice/index.js | 6 ++--- ui/js/component/fileTile/index.js | 12 +++++----- ui/js/component/header/index.js | 6 ++--- ui/js/component/inviteList/index.js | 2 +- ui/js/component/inviteNew/index.js | 6 ++--- ui/js/component/link/index.js | 2 +- ui/js/component/nsfwOverlay/index.js | 2 +- ui/js/component/rewardLink/index.js | 9 ++++--- ui/js/component/rewardListClaimed/index.js | 2 +- ui/js/component/rewardSummary/index.js | 2 +- ui/js/component/router/index.js | 2 +- ui/js/component/snackBar/index.js | 4 ++-- ui/js/component/splash/index.js | 7 ++++-- ui/js/component/subHeader/index.js | 7 ++++-- ui/js/component/theme/index.js | 2 +- ui/js/component/transactionList/index.js | 8 +++---- .../component/transactionListRecent/index.js | 4 ++-- ui/js/component/uriIndicator/index.js | 6 ++--- ui/js/component/userEmailNew/index.js | 4 ++-- ui/js/component/userEmailVerify/index.js | 4 ++-- ui/js/component/userVerify/index.js | 8 +++---- ui/js/component/video/index.js | 16 ++++++------- ui/js/component/walletAddress/index.js | 4 ++-- ui/js/component/walletBalance/index.js | 2 +- ui/js/component/walletSend/index.js | 4 ++-- ui/js/component/walletSendTip/index.js | 6 ++--- ui/js/component/wunderbar/index.js | 7 ++++-- ui/js/main.js | 6 ++--- ui/js/modal/modalAffirmPurchase/index.js | 6 ++--- ui/js/modal/modalAuthFailure/index.js | 2 +- ui/js/modal/modalCreditIntro/index.js | 12 +++++----- ui/js/modal/modalDownloading/index.js | 7 ++++-- ui/js/modal/modalError/index.js | 2 +- ui/js/modal/modalFileTimeout/index.js | 4 ++-- ui/js/modal/modalFirstReward/index.js | 4 ++-- ui/js/modal/modalIncompatibleDaemon/index.js | 2 +- ui/js/modal/modalInsufficientBalance/index.js | 4 ++-- ui/js/modal/modalInsufficientCredits/index.js | 4 ++-- ui/js/modal/modalRemoveFile/index.js | 11 +++++---- ui/js/modal/modalRevokeClaim/index.js | 6 ++--- .../modalRewardApprovalRequired/index.js | 4 ++-- ui/js/modal/modalRouter/index.js | 14 +++++------ ui/js/modal/modalTransactionFailed/index.js | 2 +- ui/js/modal/modalUpgrade/index.js | 2 +- ui/js/modal/modalWelcome/index.js | 4 ++-- ui/js/page/auth/index.js | 6 ++--- ui/js/page/backup/index.js | 2 +- ui/js/page/channel/index.js | 10 ++++---- ui/js/page/discover/index.js | 4 ++-- ui/js/page/file/index.js | 18 +++++++------- ui/js/page/fileListDownloaded/index.js | 10 ++++---- ui/js/page/fileListPublished/index.js | 8 +++---- ui/js/page/help/index.js | 6 ++--- ui/js/page/invite/index.js | 4 ++-- ui/js/page/publish/index.js | 12 +++++----- ui/js/page/report.js | 2 +- ui/js/page/rewards/index.js | 8 +++---- ui/js/page/search/index.js | 4 ++-- ui/js/page/settings/index.js | 8 +++---- ui/js/page/show/index.js | 6 ++--- ui/js/page/transactionHistory/index.js | 4 ++-- ui/js/redux/actions/app.js | 10 ++++---- ui/js/redux/actions/availability.js | 2 +- ui/js/redux/actions/content.js | 18 +++++++------- ui/js/redux/actions/cost_info.js | 8 +++---- ui/js/redux/actions/file_info.js | 10 ++++---- ui/js/redux/actions/navigation.js | 4 ++-- ui/js/redux/actions/rewards.js | 4 ++-- ui/js/redux/actions/search.js | 6 ++--- ui/js/redux/actions/settings.js | 2 +- ui/js/redux/actions/user.js | 6 ++--- ui/js/redux/actions/wallet.js | 6 ++--- ui/js/redux/selectors/claims.js | 2 +- ui/js/redux/selectors/cost_info.js | 2 +- ui/js/redux/selectors/file_info.js | 2 +- ui/js/redux/selectors/rewards.js | 2 +- ui/js/redux/selectors/search.js | 2 +- ui/js/rewards.js | 2 +- ui/js/store.js | 24 +++++++++---------- 88 files changed, 277 insertions(+), 256 deletions(-) diff --git a/ui/js/component/app/index.js b/ui/js/component/app/index.js index 06ff45f18..e178a0c75 100644 --- a/ui/js/component/app/index.js +++ b/ui/js/component/app/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { selectPageTitle } from "selectors/navigation"; -import { selectUser } from "selectors/user"; -import { doCheckUpgradeAvailable, doAlertError } from "actions/app"; -import { doRecordScroll } from "actions/navigation"; -import { doFetchRewardedContent } from "actions/content"; +import { selectPageTitle } from "redux/selectors/navigation"; +import { selectUser } from "redux/selectors/user"; +import { doCheckUpgradeAvailable, doAlertError } from "redux/actions/app"; +import { doRecordScroll } from "redux/actions/navigation"; +import { doFetchRewardedContent } from "redux/actions/content"; import App from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/cardVerify/index.js b/ui/js/component/cardVerify/index.js index 32cd22aef..53bdf05b9 100644 --- a/ui/js/component/cardVerify/index.js +++ b/ui/js/component/cardVerify/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectUserEmail } from "selectors/user"; +import { selectUserEmail } from "redux/selectors/user"; import CardVerify from "./view"; const select = state => ({ diff --git a/ui/js/component/channelTile/index.js b/ui/js/component/channelTile/index.js index 6cc68149f..4c86e8b14 100644 --- a/ui/js/component/channelTile/index.js +++ b/ui/js/component/channelTile/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { makeSelectClaimForUri } from "selectors/claims"; -import { doNavigate } from "actions/navigation"; -import { doResolveUri } from "actions/content"; -import { makeSelectTotalItemsForChannel } from "selectors/content"; -import { makeSelectIsUriResolving } from "selectors/content"; +import { makeSelectClaimForUri } from "redux/selectors/claims"; +import { doNavigate } from "redux/actions/navigation"; +import { doResolveUri } from "redux/actions/content"; +import { makeSelectTotalItemsForChannel } from "redux/selectors/content"; +import { makeSelectIsUriResolving } from "redux/selectors/content"; import ChannelTile from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/dateTime/index.js b/ui/js/component/dateTime/index.js index 81ef4b165..106de7126 100644 --- a/ui/js/component/dateTime/index.js +++ b/ui/js/component/dateTime/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { makeSelectBlockDate } from "selectors/wallet"; -import { doFetchBlock } from "actions/wallet"; +import { makeSelectBlockDate } from "redux/selectors/wallet"; +import { doFetchBlock } from "redux/actions/wallet"; import DateTime from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/fileActions/index.js b/ui/js/component/fileActions/index.js index 68597a571..53030756f 100644 --- a/ui/js/component/fileActions/index.js +++ b/ui/js/component/fileActions/index.js @@ -1,9 +1,9 @@ import React from "react"; import { connect } from "react-redux"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; -import { makeSelectCostInfoForUri } from "selectors/cost_info"; -import { doOpenModal } from "actions/app"; -import { makeSelectClaimIsMine } from "selectors/claims"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; +import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; +import { doOpenModal } from "redux/actions/app"; +import { makeSelectClaimIsMine } from "redux/selectors/claims"; import FileActions from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/fileCard/index.js b/ui/js/component/fileCard/index.js index a0de51640..49edc94d8 100644 --- a/ui/js/component/fileCard/index.js +++ b/ui/js/component/fileCard/index.js @@ -1,17 +1,17 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; -import { doResolveUri } from "actions/content"; -import { selectShowNsfw } from "selectors/settings"; +import { doNavigate } from "redux/actions/navigation"; +import { doResolveUri } from "redux/actions/content"; +import { selectShowNsfw } from "redux/selectors/settings"; import { makeSelectClaimForUri, makeSelectMetadataForUri, -} from "selectors/claims"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; +} from "redux/selectors/claims"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; import { makeSelectIsUriResolving, selectRewardContentClaimIds, -} from "selectors/content"; +} from "redux/selectors/content"; import FileCard from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/fileDetails/index.js b/ui/js/component/fileDetails/index.js index 738746d0a..fb29fe042 100644 --- a/ui/js/component/fileDetails/index.js +++ b/ui/js/component/fileDetails/index.js @@ -4,10 +4,10 @@ import { makeSelectClaimForUri, makeSelectContentTypeForUri, makeSelectMetadataForUri, -} from "selectors/claims"; +} from "redux/selectors/claims"; import FileDetails from "./view"; -import { doOpenFileInFolder } from "actions/file_info"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; +import { doOpenFileInFolder } from "redux/actions/file_info"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), diff --git a/ui/js/component/fileDownloadLink/index.js b/ui/js/component/fileDownloadLink/index.js index 2131b5f78..d7988c067 100644 --- a/ui/js/component/fileDownloadLink/index.js +++ b/ui/js/component/fileDownloadLink/index.js @@ -4,11 +4,11 @@ import { makeSelectFileInfoForUri, makeSelectDownloadingForUri, makeSelectLoadingForUri, -} from "selectors/file_info"; -import { makeSelectCostInfoForUri } from "selectors/cost_info"; -import { doFetchAvailability } from "actions/availability"; -import { doOpenFileInShell } from "actions/file_info"; -import { doPurchaseUri, doStartDownload } from "actions/content"; +} from "redux/selectors/file_info"; +import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; +import { doFetchAvailability } from "redux/actions/availability"; +import { doOpenFileInShell } from "redux/actions/file_info"; +import { doPurchaseUri, doStartDownload } from "redux/actions/content"; import FileDownloadLink from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/fileListSearch/index.js b/ui/js/component/fileListSearch/index.js index 6d70fe190..cd6e087f6 100644 --- a/ui/js/component/fileListSearch/index.js +++ b/ui/js/component/fileListSearch/index.js @@ -1,7 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doSearch } from "actions/search"; -import { selectIsSearching, makeSelectSearchUris } from "selectors/search"; +import { doSearch } from "redux/actions/search"; +import { + selectIsSearching, + makeSelectSearchUris, +} from "redux/selectors/search"; import FileListSearch from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/filePrice/index.js b/ui/js/component/filePrice/index.js index bac5cafe2..7460b0a4e 100644 --- a/ui/js/component/filePrice/index.js +++ b/ui/js/component/filePrice/index.js @@ -1,11 +1,11 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchCostInfoForUri } from "actions/cost_info"; +import { doFetchCostInfoForUri } from "redux/actions/cost_info"; import { makeSelectCostInfoForUri, makeSelectFetchingCostInfoForUri, -} from "selectors/cost_info"; -import { makeSelectClaimForUri } from "selectors/claims"; +} from "redux/selectors/cost_info"; +import { makeSelectClaimForUri } from "redux/selectors/claims"; import FilePrice from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/fileTile/index.js b/ui/js/component/fileTile/index.js index 75b6ce62b..f352b1633 100644 --- a/ui/js/component/fileTile/index.js +++ b/ui/js/component/fileTile/index.js @@ -1,17 +1,17 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; -import { doResolveUri } from "actions/content"; +import { doNavigate } from "redux/actions/navigation"; +import { doResolveUri } from "redux/actions/content"; import { makeSelectClaimForUri, makeSelectMetadataForUri, -} from "selectors/claims"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; -import { selectShowNsfw } from "selectors/settings"; +} from "redux/selectors/claims"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; +import { selectShowNsfw } from "redux/selectors/settings"; import { makeSelectIsUriResolving, selectRewardContentClaimIds, -} from "selectors/content"; +} from "redux/selectors/content"; import FileTile from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/header/index.js b/ui/js/component/header/index.js index 08d5bb9cb..e461f4efa 100644 --- a/ui/js/component/header/index.js +++ b/ui/js/component/header/index.js @@ -4,13 +4,13 @@ import { connect } from "react-redux"; import { selectIsBackDisabled, selectIsForwardDisabled, -} from "selectors/navigation"; -import { selectBalance } from "selectors/wallet"; +} from "redux/selectors/navigation"; +import { selectBalance } from "redux/selectors/wallet"; import { doNavigate, doHistoryBack, doHistoryForward, -} from "actions/navigation"; +} from "redux/actions/navigation"; import Header from "./view"; const select = state => ({ diff --git a/ui/js/component/inviteList/index.js b/ui/js/component/inviteList/index.js index 3f7361454..638ce63f5 100644 --- a/ui/js/component/inviteList/index.js +++ b/ui/js/component/inviteList/index.js @@ -3,7 +3,7 @@ import { connect } from "react-redux"; import { selectUserInvitees, selectUserInviteStatusIsPending, -} from "selectors/user"; +} from "redux/selectors/user"; import InviteList from "./view"; const select = state => ({ diff --git a/ui/js/component/inviteNew/index.js b/ui/js/component/inviteNew/index.js index b31213b3f..c2d4e66ec 100644 --- a/ui/js/component/inviteNew/index.js +++ b/ui/js/component/inviteNew/index.js @@ -5,11 +5,11 @@ import { selectUserInvitesRemaining, selectUserInviteNewIsPending, selectUserInviteNewErrorMessage, -} from "selectors/user"; +} from "redux/selectors/user"; import rewards from "rewards"; -import { makeSelectRewardAmountByType } from "selectors/rewards"; +import { makeSelectRewardAmountByType } from "redux/selectors/rewards"; -import { doUserInviteNew } from "actions/user"; +import { doUserInviteNew } from "redux/actions/user"; const select = state => { const selectReward = makeSelectRewardAmountByType(); diff --git a/ui/js/component/link/index.js b/ui/js/component/link/index.js index 37340987a..d7c8b6a18 100644 --- a/ui/js/component/link/index.js +++ b/ui/js/component/link/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; +import { doNavigate } from "redux/actions/navigation"; import Link from "./view"; const perform = dispatch => ({ diff --git a/ui/js/component/nsfwOverlay/index.js b/ui/js/component/nsfwOverlay/index.js index 8395df0ac..aa847f16f 100644 --- a/ui/js/component/nsfwOverlay/index.js +++ b/ui/js/component/nsfwOverlay/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; +import { doNavigate } from "redux/actions/navigation"; import NsfwOverlay from "./view"; const perform = dispatch => ({ diff --git a/ui/js/component/rewardLink/index.js b/ui/js/component/rewardLink/index.js index aa2034835..04eb383af 100644 --- a/ui/js/component/rewardLink/index.js +++ b/ui/js/component/rewardLink/index.js @@ -4,9 +4,12 @@ import { makeSelectClaimRewardError, makeSelectRewardByType, makeSelectIsRewardClaimPending, -} from "selectors/rewards"; -import { doNavigate } from "actions/navigation"; -import { doClaimRewardType, doClaimRewardClearError } from "actions/rewards"; +} from "redux/selectors/rewards"; +import { doNavigate } from "redux/actions/navigation"; +import { + doClaimRewardType, + doClaimRewardClearError, +} from "redux/actions/rewards"; import RewardLink from "./view"; const makeSelect = () => { diff --git a/ui/js/component/rewardListClaimed/index.js b/ui/js/component/rewardListClaimed/index.js index 095121cad..45f98bdc5 100644 --- a/ui/js/component/rewardListClaimed/index.js +++ b/ui/js/component/rewardListClaimed/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectClaimedRewards } from "selectors/rewards"; +import { selectClaimedRewards } from "redux/selectors/rewards"; import RewardListClaimed from "./view"; const select = state => ({ diff --git a/ui/js/component/rewardSummary/index.js b/ui/js/component/rewardSummary/index.js index dac44f34f..a2b64dfbb 100644 --- a/ui/js/component/rewardSummary/index.js +++ b/ui/js/component/rewardSummary/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectUnclaimedRewardValue } from "selectors/rewards"; +import { selectUnclaimedRewardValue } from "redux/selectors/rewards"; import RewardSummary from "./view"; const select = state => ({ diff --git a/ui/js/component/router/index.js b/ui/js/component/router/index.js index a5c0e9e63..ed413c66f 100644 --- a/ui/js/component/router/index.js +++ b/ui/js/component/router/index.js @@ -4,7 +4,7 @@ import Router from "./view.jsx"; import { selectCurrentPage, selectCurrentParams, -} from "selectors/navigation.js"; +} from "redux/selectors/navigation.js"; const select = state => ({ params: selectCurrentParams(state), diff --git a/ui/js/component/snackBar/index.js b/ui/js/component/snackBar/index.js index ff083c3d3..64dc70196 100644 --- a/ui/js/component/snackBar/index.js +++ b/ui/js/component/snackBar/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { doRemoveSnackBarSnack } from "actions/app"; -import { selectSnackBarSnacks } from "selectors/app"; +import { doRemoveSnackBarSnack } from "redux/actions/app"; +import { selectSnackBarSnacks } from "redux/selectors/app"; import SnackBar from "./view"; const perform = dispatch => ({ diff --git a/ui/js/component/splash/index.js b/ui/js/component/splash/index.js index 1a87f476b..82712fa15 100644 --- a/ui/js/component/splash/index.js +++ b/ui/js/component/splash/index.js @@ -1,8 +1,11 @@ import React from "react"; import { connect } from "react-redux"; -import { selectCurrentModal, selectDaemonVersionMatched } from "selectors/app"; -import { doCheckDaemonVersion } from "actions/app"; +import { + selectCurrentModal, + selectDaemonVersionMatched, +} from "redux/selectors/app"; +import { doCheckDaemonVersion } from "redux/actions/app"; import SplashScreen from "./view"; const select = state => { diff --git a/ui/js/component/subHeader/index.js b/ui/js/component/subHeader/index.js index 2806828ae..d74d46306 100644 --- a/ui/js/component/subHeader/index.js +++ b/ui/js/component/subHeader/index.js @@ -1,7 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { selectCurrentPage, selectHeaderLinks } from "selectors/navigation"; -import { doNavigate } from "actions/navigation"; +import { + selectCurrentPage, + selectHeaderLinks, +} from "redux/selectors/navigation"; +import { doNavigate } from "redux/actions/navigation"; import SubHeader from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/theme/index.js b/ui/js/component/theme/index.js index ad95b5297..c6940828f 100644 --- a/ui/js/component/theme/index.js +++ b/ui/js/component/theme/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectThemePath } from "selectors/settings.js"; +import { selectThemePath } from "redux/selectors/settings.js"; import Theme from "./view"; const select = state => ({ diff --git a/ui/js/component/transactionList/index.js b/ui/js/component/transactionList/index.js index 48ea3bc05..12d5ea42f 100644 --- a/ui/js/component/transactionList/index.js +++ b/ui/js/component/transactionList/index.js @@ -1,9 +1,9 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; -import { doOpenModal } from "actions/app"; -import { selectClaimedRewardsByTransactionId } from "selectors/rewards"; -import { selectAllMyClaimsByOutpoint } from "selectors/claims"; +import { doNavigate } from "redux/actions/navigation"; +import { doOpenModal } from "redux/actions/app"; +import { selectClaimedRewardsByTransactionId } from "redux/selectors/rewards"; +import { selectAllMyClaimsByOutpoint } from "redux/selectors/claims"; import TransactionList from "./view"; const select = state => ({ diff --git a/ui/js/component/transactionListRecent/index.js b/ui/js/component/transactionListRecent/index.js index bea2fdac1..1813cf00e 100644 --- a/ui/js/component/transactionListRecent/index.js +++ b/ui/js/component/transactionListRecent/index.js @@ -1,12 +1,12 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchTransactions } from "actions/wallet"; +import { doFetchTransactions } from "redux/actions/wallet"; import { selectBalance, selectRecentTransactions, selectHasTransactions, selectIsFetchingTransactions, -} from "selectors/wallet"; +} from "redux/selectors/wallet"; import TransactionListRecent from "./view"; diff --git a/ui/js/component/uriIndicator/index.js b/ui/js/component/uriIndicator/index.js index a57c33b15..1b3ddabec 100644 --- a/ui/js/component/uriIndicator/index.js +++ b/ui/js/component/uriIndicator/index.js @@ -1,9 +1,9 @@ import React from "react"; import lbryuri from "lbryuri"; import { connect } from "react-redux"; -import { doResolveUri } from "actions/content"; -import { makeSelectIsUriResolving } from "selectors/content"; -import { makeSelectClaimForUri } from "selectors/claims"; +import { doResolveUri } from "redux/actions/content"; +import { makeSelectIsUriResolving } from "redux/selectors/content"; +import { makeSelectClaimForUri } from "redux/selectors/claims"; import UriIndicator from "./view"; const select = (state, props) => ({ diff --git a/ui/js/component/userEmailNew/index.js b/ui/js/component/userEmailNew/index.js index 699f794ec..2efc29794 100644 --- a/ui/js/component/userEmailNew/index.js +++ b/ui/js/component/userEmailNew/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doUserEmailNew, doUserInviteNew } from "actions/user"; +import { doUserEmailNew, doUserInviteNew } from "redux/actions/user"; import { selectEmailNewIsPending, selectEmailNewErrorMessage, -} from "selectors/user"; +} from "redux/selectors/user"; import UserEmailNew from "./view"; const select = state => ({ diff --git a/ui/js/component/userEmailVerify/index.js b/ui/js/component/userEmailVerify/index.js index f2ae56c86..d267c1c89 100644 --- a/ui/js/component/userEmailVerify/index.js +++ b/ui/js/component/userEmailVerify/index.js @@ -1,11 +1,11 @@ import React from "react"; import { connect } from "react-redux"; -import { doUserEmailVerify } from "actions/user"; +import { doUserEmailVerify } from "redux/actions/user"; import { selectEmailVerifyIsPending, selectEmailToVerify, selectEmailVerifyErrorMessage, -} from "selectors/user"; +} from "redux/selectors/user"; import UserEmailVerify from "./view"; const select = state => ({ diff --git a/ui/js/component/userVerify/index.js b/ui/js/component/userVerify/index.js index b90719084..046bafdb0 100644 --- a/ui/js/component/userVerify/index.js +++ b/ui/js/component/userVerify/index.js @@ -1,13 +1,13 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; -import { doUserIdentityVerify } from "actions/user"; +import { doNavigate } from "redux/actions/navigation"; +import { doUserIdentityVerify } from "redux/actions/user"; import rewards from "rewards"; -import { makeSelectRewardByType } from "selectors/rewards"; +import { makeSelectRewardByType } from "redux/selectors/rewards"; import { selectIdentityVerifyIsPending, selectIdentityVerifyErrorMessage, -} from "selectors/user"; +} from "redux/selectors/user"; import UserVerify from "./view"; const select = (state, props) => { diff --git a/ui/js/component/video/index.js b/ui/js/component/video/index.js index 3c80869dc..a9b0ed62d 100644 --- a/ui/js/component/video/index.js +++ b/ui/js/component/video/index.js @@ -1,21 +1,21 @@ import React from "react"; import { connect } from "react-redux"; -import { doChangeVolume } from "actions/app"; -import { selectVolume } from "selectors/app"; -import { doPlayUri, doSetPlayingUri } from "actions/content"; +import { doChangeVolume } from "redux/actions/app"; +import { selectVolume } from "redux/selectors/app"; +import { doPlayUri, doSetPlayingUri } from "redux/actions/content"; import { makeSelectMetadataForUri, makeSelectContentTypeForUri, -} from "selectors/claims"; +} from "redux/selectors/claims"; import { makeSelectFileInfoForUri, makeSelectLoadingForUri, makeSelectDownloadingForUri, -} from "selectors/file_info"; -import { makeSelectCostInfoForUri } from "selectors/cost_info"; -import { selectShowNsfw } from "selectors/settings"; +} from "redux/selectors/file_info"; +import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; +import { selectShowNsfw } from "redux/selectors/settings"; import Video from "./view"; -import { selectPlayingUri } from "selectors/content"; +import { selectPlayingUri } from "redux/selectors/content"; const select = (state, props) => ({ costInfo: makeSelectCostInfoForUri(props.uri)(state), diff --git a/ui/js/component/walletAddress/index.js b/ui/js/component/walletAddress/index.js index d5a8d7696..f335249f8 100644 --- a/ui/js/component/walletAddress/index.js +++ b/ui/js/component/walletAddress/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doCheckAddressIsMine, doGetNewAddress } from "actions/wallet"; +import { doCheckAddressIsMine, doGetNewAddress } from "redux/actions/wallet"; import { selectReceiveAddress, selectGettingNewAddress, -} from "selectors/wallet"; +} from "redux/selectors/wallet"; import WalletAddress from "./view"; const select = state => ({ diff --git a/ui/js/component/walletBalance/index.js b/ui/js/component/walletBalance/index.js index 1121cc463..e67f90acc 100644 --- a/ui/js/component/walletBalance/index.js +++ b/ui/js/component/walletBalance/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectBalance } from "selectors/wallet"; +import { selectBalance } from "redux/selectors/wallet"; import WalletBalance from "./view"; const select = state => ({ diff --git a/ui/js/component/walletSend/index.js b/ui/js/component/walletSend/index.js index d396dc92c..87344fa37 100644 --- a/ui/js/component/walletSend/index.js +++ b/ui/js/component/walletSend/index.js @@ -4,12 +4,12 @@ import { doSendDraftTransaction, doSetDraftTransactionAmount, doSetDraftTransactionAddress, -} from "actions/wallet"; +} from "redux/actions/wallet"; import { selectDraftTransactionAmount, selectDraftTransactionAddress, selectDraftTransactionError, -} from "selectors/wallet"; +} from "redux/selectors/wallet"; import WalletSend from "./view"; diff --git a/ui/js/component/walletSendTip/index.js b/ui/js/component/walletSendTip/index.js index 6d3275321..109eec9c1 100644 --- a/ui/js/component/walletSendTip/index.js +++ b/ui/js/component/walletSendTip/index.js @@ -1,9 +1,9 @@ import React from "react"; import { connect } from "react-redux"; -import { doSendSupport } from "actions/wallet"; +import { doSendSupport } from "redux/actions/wallet"; import WalletSendTip from "./view"; -import { makeSelectTitleForUri } from "selectors/claims"; -import { selectIsSendingSupport } from "selectors/wallet"; +import { makeSelectTitleForUri } from "redux/selectors/claims"; +import { selectIsSendingSupport } from "redux/selectors/wallet"; const select = (state, props) => ({ isPending: selectIsSendingSupport(state), diff --git a/ui/js/component/wunderbar/index.js b/ui/js/component/wunderbar/index.js index bd327fd92..81bab941d 100644 --- a/ui/js/component/wunderbar/index.js +++ b/ui/js/component/wunderbar/index.js @@ -1,8 +1,11 @@ import React from "react"; import { connect } from "react-redux"; import lbryuri from "lbryuri.js"; -import { selectWunderBarAddress, selectWunderBarIcon } from "selectors/search"; -import { doNavigate } from "actions/navigation"; +import { + selectWunderBarAddress, + selectWunderBarIcon, +} from "redux/selectors/search"; +import { doNavigate } from "redux/actions/navigation"; import Wunderbar from "./view"; const select = state => ({ diff --git a/ui/js/main.js b/ui/js/main.js index b074f4b6d..2b55421ba 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -5,9 +5,9 @@ import SnackBar from "component/snackBar"; import { Provider } from "react-redux"; import store from "store.js"; import SplashScreen from "component/splash"; -import { doDaemonReady } from "actions/app"; -import { doNavigate } from "actions/navigation"; -import { doDownloadLanguages } from "actions/settings"; +import { doDaemonReady } from "redux/actions/app"; +import { doNavigate } from "redux/actions/navigation"; +import { doDownloadLanguages } from "redux/actions/settings"; import * as types from "constants/action_types"; const env = ENV; diff --git a/ui/js/modal/modalAffirmPurchase/index.js b/ui/js/modal/modalAffirmPurchase/index.js index d0f4affa2..d128e31b1 100644 --- a/ui/js/modal/modalAffirmPurchase/index.js +++ b/ui/js/modal/modalAffirmPurchase/index.js @@ -1,8 +1,8 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doLoadVideo, doSetPlayingUri } from "actions/content"; -import { makeSelectMetadataForUri } from "selectors/claims"; +import { doCloseModal } from "redux/actions/app"; +import { doLoadVideo, doSetPlayingUri } from "redux/actions/content"; +import { makeSelectMetadataForUri } from "redux/selectors/claims"; import ModalAffirmPurchase from "./view"; const select = (state, props) => ({ diff --git a/ui/js/modal/modalAuthFailure/index.js b/ui/js/modal/modalAuthFailure/index.js index 1a7fbfa3a..6e1aa708d 100644 --- a/ui/js/modal/modalAuthFailure/index.js +++ b/ui/js/modal/modalAuthFailure/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; +import { doCloseModal } from "redux/actions/app"; import ModalAuthFailure from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalCreditIntro/index.js b/ui/js/modal/modalCreditIntro/index.js index c793ec22a..b07a868b7 100644 --- a/ui/js/modal/modalCreditIntro/index.js +++ b/ui/js/modal/modalCreditIntro/index.js @@ -1,15 +1,15 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doAuthNavigate } from "actions/navigation"; -import { doSetClientSetting } from "actions/settings"; -import { selectUserIsRewardApproved } from "selectors/user"; -import { selectBalance } from "selectors/wallet"; +import { doCloseModal } from "redux/actions/app"; +import { doAuthNavigate } from "redux/actions/navigation"; +import { doSetClientSetting } from "redux/actions/settings"; +import { selectUserIsRewardApproved } from "redux/selectors/user"; +import { selectBalance } from "redux/selectors/wallet"; import { makeSelectHasClaimedReward, makeSelectRewardByType, selectUnclaimedRewardValue, -} from "selectors/rewards"; +} from "redux/selectors/rewards"; import * as settings from "constants/settings"; import ModalCreditIntro from "./view"; diff --git a/ui/js/modal/modalDownloading/index.js b/ui/js/modal/modalDownloading/index.js index a8a316658..56b385a2d 100644 --- a/ui/js/modal/modalDownloading/index.js +++ b/ui/js/modal/modalDownloading/index.js @@ -1,7 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doStartUpgrade, doCancelUpgrade } from "actions/app"; -import { selectDownloadProgress, selectDownloadComplete } from "selectors/app"; +import { doStartUpgrade, doCancelUpgrade } from "redux/actions/app"; +import { + selectDownloadProgress, + selectDownloadComplete, +} from "redux/selectors/app"; import ModalDownloading from "./view"; const select = state => ({ diff --git a/ui/js/modal/modalError/index.js b/ui/js/modal/modalError/index.js index b1cb30f1b..b9ce5c21e 100644 --- a/ui/js/modal/modalError/index.js +++ b/ui/js/modal/modalError/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; +import { doCloseModal } from "redux/actions/app"; import ModalError from "./view"; const perform = dispatch => ({ diff --git a/ui/js/modal/modalFileTimeout/index.js b/ui/js/modal/modalFileTimeout/index.js index 9410bcf34..a204b8149 100644 --- a/ui/js/modal/modalFileTimeout/index.js +++ b/ui/js/modal/modalFileTimeout/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { makeSelectMetadataForUri } from "selectors/claims"; +import { doCloseModal } from "redux/actions/app"; +import { makeSelectMetadataForUri } from "redux/selectors/claims"; import ModalFileTimeout from "./view"; const select = state => ({ diff --git a/ui/js/modal/modalFirstReward/index.js b/ui/js/modal/modalFirstReward/index.js index 5993a990e..6993f938c 100644 --- a/ui/js/modal/modalFirstReward/index.js +++ b/ui/js/modal/modalFirstReward/index.js @@ -1,8 +1,8 @@ import React from "react"; import rewards from "rewards"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { makeSelectRewardByType } from "selectors/rewards"; +import { doCloseModal } from "redux/actions/app"; +import { makeSelectRewardByType } from "redux/selectors/rewards"; import ModalFirstReward from "./view"; const select = (state, props) => { diff --git a/ui/js/modal/modalIncompatibleDaemon/index.js b/ui/js/modal/modalIncompatibleDaemon/index.js index 669e67316..f8e45c9d4 100644 --- a/ui/js/modal/modalIncompatibleDaemon/index.js +++ b/ui/js/modal/modalIncompatibleDaemon/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doQuit, doSkipWrongDaemonNotice } from "actions/app"; +import { doQuit, doSkipWrongDaemonNotice } from "redux/actions/app"; import ModalIncompatibleDaemon from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalInsufficientBalance/index.js b/ui/js/modal/modalInsufficientBalance/index.js index 5e94a9f9e..9ffcc3342 100644 --- a/ui/js/modal/modalInsufficientBalance/index.js +++ b/ui/js/modal/modalInsufficientBalance/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doNavigate } from "actions/navigation"; +import { doCloseModal } from "redux/actions/app"; +import { doNavigate } from "redux/actions/navigation"; import ModalInsufficientBalance from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalInsufficientCredits/index.js b/ui/js/modal/modalInsufficientCredits/index.js index c50d34d44..aea41dd13 100644 --- a/ui/js/modal/modalInsufficientCredits/index.js +++ b/ui/js/modal/modalInsufficientCredits/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doNavigate } from "actions/navigation"; +import { doCloseModal } from "redux/actions/app"; +import { doNavigate } from "redux/actions/navigation"; import ModalInsufficientCredits from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalRemoveFile/index.js b/ui/js/modal/modalRemoveFile/index.js index 39ae89ceb..e49bbc7aa 100644 --- a/ui/js/modal/modalRemoveFile/index.js +++ b/ui/js/modal/modalRemoveFile/index.js @@ -1,9 +1,12 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doDeleteFileAndGoBack } from "actions/file_info"; -import { makeSelectTitleForUri, makeSelectClaimIsMine } from "selectors/claims"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; +import { doCloseModal } from "redux/actions/app"; +import { doDeleteFileAndGoBack } from "redux/actions/file_info"; +import { + makeSelectTitleForUri, + makeSelectClaimIsMine, +} from "redux/selectors/claims"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; import ModalRemoveFile from "./view"; const select = (state, props) => ({ diff --git a/ui/js/modal/modalRevokeClaim/index.js b/ui/js/modal/modalRevokeClaim/index.js index 766095b64..1d09b4daa 100644 --- a/ui/js/modal/modalRevokeClaim/index.js +++ b/ui/js/modal/modalRevokeClaim/index.js @@ -1,8 +1,8 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doAbandonClaim } from "actions/content"; -import { selectTransactionItems } from "selectors/wallet"; +import { doCloseModal } from "redux/actions/app"; +import { doAbandonClaim } from "redux/actions/content"; +import { selectTransactionItems } from "redux/selectors/wallet"; import ModalRevokeClaim from "./view"; const select = state => ({ diff --git a/ui/js/modal/modalRewardApprovalRequired/index.js b/ui/js/modal/modalRewardApprovalRequired/index.js index 15413b6e3..d85b70a28 100644 --- a/ui/js/modal/modalRewardApprovalRequired/index.js +++ b/ui/js/modal/modalRewardApprovalRequired/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; -import { doAuthNavigate } from "actions/navigation"; +import { doCloseModal } from "redux/actions/app"; +import { doAuthNavigate } from "redux/actions/navigation"; import ModalRewardApprovalRequired from "./view"; const perform = dispatch => ({ diff --git a/ui/js/modal/modalRouter/index.js b/ui/js/modal/modalRouter/index.js index c0c637167..9b4f4d00d 100644 --- a/ui/js/modal/modalRouter/index.js +++ b/ui/js/modal/modalRouter/index.js @@ -1,13 +1,13 @@ import React from "react"; import { connect } from "react-redux"; -import { doOpenModal } from "actions/app"; +import { doOpenModal } from "redux/actions/app"; import * as settings from "constants/settings"; -import { selectCurrentModal, selectModalProps } from "selectors/app"; -import { selectCurrentPage } from "selectors/navigation"; -import { selectCostForCurrentPageUri } from "selectors/cost_info"; -import { makeSelectClientSetting } from "selectors/settings"; -import { selectUser } from "selectors/user"; -import { selectBalance } from "selectors/wallet"; +import { selectCurrentModal, selectModalProps } from "redux/selectors/app"; +import { selectCurrentPage } from "redux/selectors/navigation"; +import { selectCostForCurrentPageUri } from "redux/selectors/cost_info"; +import { makeSelectClientSetting } from "redux/selectors/settings"; +import { selectUser } from "redux/selectors/user"; +import { selectBalance } from "redux/selectors/wallet"; import ModalRouter from "./view"; const select = (state, props) => ({ diff --git a/ui/js/modal/modalTransactionFailed/index.js b/ui/js/modal/modalTransactionFailed/index.js index 4b370a7c8..5274a2467 100644 --- a/ui/js/modal/modalTransactionFailed/index.js +++ b/ui/js/modal/modalTransactionFailed/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doCloseModal } from "actions/app"; +import { doCloseModal } from "redux/actions/app"; import ModalTransactionFailed from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalUpgrade/index.js b/ui/js/modal/modalUpgrade/index.js index ae4d815c7..1ba5a5dc1 100644 --- a/ui/js/modal/modalUpgrade/index.js +++ b/ui/js/modal/modalUpgrade/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { doDownloadUpgrade, doSkipUpgrade } from "actions/app"; +import { doDownloadUpgrade, doSkipUpgrade } from "redux/actions/app"; import ModalUpgrade from "./view"; const select = state => ({}); diff --git a/ui/js/modal/modalWelcome/index.js b/ui/js/modal/modalWelcome/index.js index dd2cc0f29..e093ce883 100644 --- a/ui/js/modal/modalWelcome/index.js +++ b/ui/js/modal/modalWelcome/index.js @@ -2,8 +2,8 @@ import React from "react"; import * as settings from "constants/settings"; import * as modals from "constants/modal_types"; import { connect } from "react-redux"; -import { doCloseModal, doOpenModal } from "actions/app"; -import { doSetClientSetting } from "actions/settings"; +import { doCloseModal, doOpenModal } from "redux/actions/app"; +import { doSetClientSetting } from "redux/actions/settings"; import ModalWelcome from "./view"; const perform = dispatch => () => ({ diff --git a/ui/js/page/auth/index.js b/ui/js/page/auth/index.js index 205400088..aa8edf48d 100644 --- a/ui/js/page/auth/index.js +++ b/ui/js/page/auth/index.js @@ -1,7 +1,7 @@ import React from "react"; -import { doNavigate } from "actions/navigation"; +import { doNavigate } from "redux/actions/navigation"; import { connect } from "react-redux"; -import { selectPathAfterAuth } from "selectors/navigation"; +import { selectPathAfterAuth } from "redux/selectors/navigation"; import { selectAuthenticationIsPending, selectEmailToVerify, @@ -9,7 +9,7 @@ import { selectUser, selectUserIsPending, selectIdentityVerifyIsPending, -} from "selectors/user"; +} from "redux/selectors/user"; import AuthPage from "./view"; const select = state => ({ diff --git a/ui/js/page/backup/index.js b/ui/js/page/backup/index.js index fd83a400f..0766083c9 100644 --- a/ui/js/page/backup/index.js +++ b/ui/js/page/backup/index.js @@ -1,6 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -import { selectDaemonSettings } from "selectors/settings"; +import { selectDaemonSettings } from "redux/selectors/settings"; import BackupPage from "./view"; const select = state => ({ diff --git a/ui/js/page/channel/index.js b/ui/js/page/channel/index.js index f69d5b15e..4597fd573 100644 --- a/ui/js/page/channel/index.js +++ b/ui/js/page/channel/index.js @@ -3,18 +3,18 @@ import { connect } from "react-redux"; import { doFetchClaimsByChannel, doFetchClaimCountByChannel, -} from "actions/content"; +} from "redux/actions/content"; import { makeSelectClaimForUri, makeSelectClaimsInChannelForCurrentPage, makeSelectFetchingChannelClaims, -} from "selectors/claims"; +} from "redux/selectors/claims"; import { makeSelectCurrentParam, selectCurrentParams, -} from "selectors/navigation"; -import { doNavigate } from "actions/navigation"; -import { makeSelectTotalPagesForChannel } from "selectors/content"; +} from "redux/selectors/navigation"; +import { doNavigate } from "redux/actions/navigation"; +import { makeSelectTotalPagesForChannel } from "redux/selectors/content"; import ChannelPage from "./view"; const select = (state, props) => ({ diff --git a/ui/js/page/discover/index.js b/ui/js/page/discover/index.js index 01f9add5e..396351025 100644 --- a/ui/js/page/discover/index.js +++ b/ui/js/page/discover/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchFeaturedUris } from "actions/content"; +import { doFetchFeaturedUris } from "redux/actions/content"; import { selectFeaturedUris, selectFetchingFeaturedUris, -} from "selectors/content"; +} from "redux/selectors/content"; import DiscoverPage from "./view"; const select = state => ({ diff --git a/ui/js/page/file/index.js b/ui/js/page/file/index.js index e56391051..2e5373c25 100644 --- a/ui/js/page/file/index.js +++ b/ui/js/page/file/index.js @@ -1,19 +1,19 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate } from "actions/navigation"; -import { doFetchFileInfo } from "actions/file_info"; -import { makeSelectFileInfoForUri } from "selectors/file_info"; -import { selectRewardContentClaimIds } from "selectors/content"; -import { doFetchCostInfoForUri } from "actions/cost_info"; +import { doNavigate } from "redux/actions/navigation"; +import { doFetchFileInfo } from "redux/actions/file_info"; +import { makeSelectFileInfoForUri } from "redux/selectors/file_info"; +import { selectRewardContentClaimIds } from "redux/selectors/content"; +import { doFetchCostInfoForUri } from "redux/actions/cost_info"; import { makeSelectClaimForUri, makeSelectContentTypeForUri, makeSelectMetadataForUri, -} from "selectors/claims"; -import { makeSelectCostInfoForUri } from "selectors/cost_info"; -import { selectShowNsfw } from "selectors/settings"; +} from "redux/selectors/claims"; +import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; +import { selectShowNsfw } from "redux/selectors/settings"; import FilePage from "./view"; -import { makeSelectCurrentParam } from "selectors/navigation"; +import { makeSelectCurrentParam } from "redux/selectors/navigation"; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), diff --git a/ui/js/page/fileListDownloaded/index.js b/ui/js/page/fileListDownloaded/index.js index 2da37ca9c..ec68d1014 100644 --- a/ui/js/page/fileListDownloaded/index.js +++ b/ui/js/page/fileListDownloaded/index.js @@ -1,16 +1,16 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchFileInfosAndPublishedClaims } from "actions/file_info"; +import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info"; import { selectFileInfosDownloaded, selectIsFetchingFileListDownloadedOrPublished, -} from "selectors/file_info"; +} from "redux/selectors/file_info"; import { selectMyClaimsWithoutChannels, selectIsFetchingClaimListMine, -} from "selectors/claims"; -import { doFetchClaimListMine } from "actions/content"; -import { doNavigate } from "actions/navigation"; +} from "redux/selectors/claims"; +import { doFetchClaimListMine } from "redux/actions/content"; +import { doNavigate } from "redux/actions/navigation"; import FileListDownloaded from "./view"; const select = state => ({ diff --git a/ui/js/page/fileListPublished/index.js b/ui/js/page/fileListPublished/index.js index 5b04e101e..bf93aa71b 100644 --- a/ui/js/page/fileListPublished/index.js +++ b/ui/js/page/fileListPublished/index.js @@ -1,13 +1,13 @@ import React from "react"; import rewards from "rewards"; import { connect } from "react-redux"; -import { doFetchClaimListMine } from "actions/content"; +import { doFetchClaimListMine } from "redux/actions/content"; import { selectMyClaimsWithoutChannels, selectIsFetchingClaimListMine, -} from "selectors/claims"; -import { doClaimRewardType } from "actions/rewards"; -import { doNavigate } from "actions/navigation"; +} from "redux/selectors/claims"; +import { doClaimRewardType } from "redux/actions/rewards"; +import { doNavigate } from "redux/actions/navigation"; import FileListPublished from "./view"; const select = state => ({ diff --git a/ui/js/page/help/index.js b/ui/js/page/help/index.js index 601cdb8a7..746fd4d65 100644 --- a/ui/js/page/help/index.js +++ b/ui/js/page/help/index.js @@ -1,8 +1,8 @@ import React from "react"; -import { doAuthNavigate } from "actions/navigation"; +import { doAuthNavigate } from "redux/actions/navigation"; import { connect } from "react-redux"; -import { doFetchAccessToken } from "actions/user"; -import { selectAccessToken, selectUser } from "selectors/user"; +import { doFetchAccessToken } from "redux/actions/user"; +import { selectAccessToken, selectUser } from "redux/selectors/user"; import HelpPage from "./view"; const select = state => ({ diff --git a/ui/js/page/invite/index.js b/ui/js/page/invite/index.js index c97cd1b29..596526eee 100644 --- a/ui/js/page/invite/index.js +++ b/ui/js/page/invite/index.js @@ -1,11 +1,11 @@ import React from "react"; import { connect } from "react-redux"; import InvitePage from "./view"; -import { doFetchInviteStatus } from "actions/user"; +import { doFetchInviteStatus } from "redux/actions/user"; import { selectUserInviteStatusFailed, selectUserInviteStatusIsPending, -} from "selectors/user"; +} from "redux/selectors/user"; const select = state => ({ isFailed: selectUserInviteStatusFailed(state), diff --git a/ui/js/page/publish/index.js b/ui/js/page/publish/index.js index f0547941d..f8ec16c23 100644 --- a/ui/js/page/publish/index.js +++ b/ui/js/page/publish/index.js @@ -1,22 +1,22 @@ import React from "react"; import { connect } from "react-redux"; -import { doNavigate, doHistoryBack } from "actions/navigation"; -import { doClaimRewardType } from "actions/rewards"; +import { doNavigate, doHistoryBack } from "redux/actions/navigation"; +import { doClaimRewardType } from "redux/actions/rewards"; import { selectMyClaims, selectFetchingMyChannels, selectMyChannelClaims, selectClaimsByUri, -} from "selectors/claims"; -import { selectResolvingUris } from "selectors/content"; +} from "redux/selectors/claims"; +import { selectResolvingUris } from "redux/selectors/content"; import { doFetchClaimListMine, doFetchChannelListMine, doResolveUri, doCreateChannel, doPublish, -} from "actions/content"; -import { selectBalance } from "selectors/wallet"; +} from "redux/actions/content"; +import { selectBalance } from "redux/selectors/wallet"; import rewards from "rewards"; import PublishPage from "./view"; diff --git a/ui/js/page/report.js b/ui/js/page/report.js index c24d367d9..321cc723e 100644 --- a/ui/js/page/report.js +++ b/ui/js/page/report.js @@ -1,7 +1,7 @@ import React from "react"; import Link from "component/link"; import { FormRow } from "component/form"; -import { doShowSnackBar } from "actions/app"; +import { doShowSnackBar } from "redux/actions/app"; import lbry from "../lbry.js"; class ReportPage extends React.Component { diff --git a/ui/js/page/rewards/index.js b/ui/js/page/rewards/index.js index e9dca47f9..84262e7c2 100644 --- a/ui/js/page/rewards/index.js +++ b/ui/js/page/rewards/index.js @@ -3,10 +3,10 @@ import { connect } from "react-redux"; import { selectFetchingRewards, selectUnclaimedRewards, -} from "selectors/rewards"; -import { selectUser } from "selectors/user"; -import { doAuthNavigate, doNavigate } from "actions/navigation"; -import { doRewardList } from "actions/rewards"; +} from "redux/selectors/rewards"; +import { selectUser } from "redux/selectors/user"; +import { doAuthNavigate, doNavigate } from "redux/actions/navigation"; +import { doRewardList } from "redux/actions/rewards"; import RewardsPage from "./view"; const select = (state, props) => { diff --git a/ui/js/page/search/index.js b/ui/js/page/search/index.js index 8426f3637..b184768a9 100644 --- a/ui/js/page/search/index.js +++ b/ui/js/page/search/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; -import { selectIsSearching, selectSearchQuery } from "selectors/search"; -import { doNavigate } from "actions/navigation"; +import { selectIsSearching, selectSearchQuery } from "redux/selectors/search"; +import { doNavigate } from "redux/actions/navigation"; import SearchPage from "./view"; const select = state => ({ diff --git a/ui/js/page/settings/index.js b/ui/js/page/settings/index.js index c22cbdbe7..ad76676b4 100644 --- a/ui/js/page/settings/index.js +++ b/ui/js/page/settings/index.js @@ -1,20 +1,20 @@ import React from "react"; import { connect } from "react-redux"; import * as settings from "constants/settings"; -import { doClearCache } from "actions/app"; +import { doClearCache } from "redux/actions/app"; import { doSetDaemonSetting, doSetClientSetting, doGetThemes, doSetTheme, doChangeLanguage, -} from "actions/settings"; +} from "redux/actions/settings"; import { makeSelectClientSetting, selectDaemonSettings, selectLanguages, -} from "selectors/settings"; -import { selectCurrentLanguage } from "selectors/app"; +} from "redux/selectors/settings"; +import { selectCurrentLanguage } from "redux/selectors/app"; import SettingsPage from "./view"; const select = state => ({ diff --git a/ui/js/page/show/index.js b/ui/js/page/show/index.js index 94b380381..d8c628387 100644 --- a/ui/js/page/show/index.js +++ b/ui/js/page/show/index.js @@ -1,8 +1,8 @@ import React from "react"; import { connect } from "react-redux"; -import { doResolveUri } from "actions/content"; -import { makeSelectClaimForUri } from "selectors/claims"; -import { makeSelectIsUriResolving } from "selectors/content"; +import { doResolveUri } from "redux/actions/content"; +import { makeSelectClaimForUri } from "redux/selectors/claims"; +import { makeSelectIsUriResolving } from "redux/selectors/content"; import ShowPage from "./view"; const select = (state, props) => ({ diff --git a/ui/js/page/transactionHistory/index.js b/ui/js/page/transactionHistory/index.js index 12acf47ad..bea2b4976 100644 --- a/ui/js/page/transactionHistory/index.js +++ b/ui/js/page/transactionHistory/index.js @@ -1,10 +1,10 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchTransactions } from "actions/wallet"; +import { doFetchTransactions } from "redux/actions/wallet"; import { selectTransactionItems, selectIsFetchingTransactions, -} from "selectors/wallet"; +} from "redux/selectors/wallet"; import TransactionHistoryPage from "./view"; const select = state => ({ diff --git a/ui/js/redux/actions/app.js b/ui/js/redux/actions/app.js index 0ccc6a977..e4c60cddf 100644 --- a/ui/js/redux/actions/app.js +++ b/ui/js/redux/actions/app.js @@ -5,11 +5,11 @@ import { selectUpgradeDownloadPath, selectUpgradeDownloadItem, selectUpgradeFilename, -} from "selectors/app"; -import { doFetchDaemonSettings } from "actions/settings"; -import { doBalanceSubscribe } from "actions/wallet"; -import { doAuthenticate } from "actions/user"; -import { doFetchFileInfosAndPublishedClaims } from "actions/file_info"; +} from "redux/selectors/app"; +import { doFetchDaemonSettings } from "redux/actions/settings"; +import { doBalanceSubscribe } from "redux/actions/wallet"; +import { doAuthenticate } from "redux/actions/user"; +import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info"; import * as modals from "constants/modal_types"; const { remote, ipcRenderer, shell } = require("electron"); diff --git a/ui/js/redux/actions/availability.js b/ui/js/redux/actions/availability.js index 4cde9d2ed..5be5eb760 100644 --- a/ui/js/redux/actions/availability.js +++ b/ui/js/redux/actions/availability.js @@ -1,6 +1,6 @@ import * as types from "constants/action_types"; import lbry from "lbry"; -import { selectFetchingAvailability } from "selectors/availability"; +import { selectFetchingAvailability } from "redux/selectors/availability"; export function doFetchAvailability(uri) { return function(dispatch, getState) { diff --git a/ui/js/redux/actions/content.js b/ui/js/redux/actions/content.js index 6347536c0..886fb28d3 100644 --- a/ui/js/redux/actions/content.js +++ b/ui/js/redux/actions/content.js @@ -3,18 +3,18 @@ import * as settings from "constants/settings"; import lbry from "lbry"; import lbryio from "lbryio"; import lbryuri from "lbryuri"; -import { makeSelectClientSetting } from "selectors/settings"; -import { selectBalance, selectTransactionItems } from "selectors/wallet"; +import { makeSelectClientSetting } from "redux/selectors/settings"; +import { selectBalance, selectTransactionItems } from "redux/selectors/wallet"; import { makeSelectFileInfoForUri, selectDownloadingByOutpoint, -} from "selectors/file_info"; -import { selectResolvingUris } from "selectors/content"; -import { makeSelectCostInfoForUri } from "selectors/cost_info"; -import { doAlertError, doOpenModal } from "actions/app"; -import { doClaimEligiblePurchaseRewards } from "actions/rewards"; -import { selectBadgeNumber } from "selectors/app"; -import { selectTotalDownloadProgress } from "selectors/file_info"; +} from "redux/selectors/file_info"; +import { selectResolvingUris } from "redux/selectors/content"; +import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; +import { doAlertError, doOpenModal } from "redux/actions/app"; +import { doClaimEligiblePurchaseRewards } from "redux/actions/rewards"; +import { selectBadgeNumber } from "redux/selectors/app"; +import { selectTotalDownloadProgress } from "redux/selectors/file_info"; import setBadge from "util/setBadge"; import setProgressBar from "util/setProgressBar"; import batchActions from "util/batchActions"; diff --git a/ui/js/redux/actions/cost_info.js b/ui/js/redux/actions/cost_info.js index 001c4ae56..70a1a5a36 100644 --- a/ui/js/redux/actions/cost_info.js +++ b/ui/js/redux/actions/cost_info.js @@ -1,10 +1,10 @@ import * as types from "constants/action_types"; import lbry from "lbry"; import lbryio from "lbryio"; -import { doResolveUri } from "actions/content"; -import { selectResolvingUris } from "selectors/content"; -import { selectClaimsByUri } from "selectors/claims"; -import { selectSettingsIsGenerous } from "selectors/settings"; +import { doResolveUri } from "redux/actions/content"; +import { selectResolvingUris } from "redux/selectors/content"; +import { selectClaimsByUri } from "redux/selectors/claims"; +import { selectSettingsIsGenerous } from "redux/selectors/settings"; export function doFetchCostInfoForUri(uri) { return function(dispatch, getState) { diff --git a/ui/js/redux/actions/file_info.js b/ui/js/redux/actions/file_info.js index ef9a742d5..84062ee23 100644 --- a/ui/js/redux/actions/file_info.js +++ b/ui/js/redux/actions/file_info.js @@ -1,19 +1,19 @@ import * as types from "constants/action_types"; import lbry from "lbry"; -import { doFetchClaimListMine, doAbandonClaim } from "actions/content"; +import { doFetchClaimListMine, doAbandonClaim } from "redux/actions/content"; import { selectClaimsByUri, selectIsFetchingClaimListMine, selectMyClaimsOutpoints, -} from "selectors/claims"; +} from "redux/selectors/claims"; import { selectIsFetchingFileList, selectFileInfosByOutpoint, selectUrisLoading, selectTotalDownloadProgress, -} from "selectors/file_info"; -import { doCloseModal } from "actions/app"; -import { doNavigate, doHistoryBack } from "actions/navigation"; +} from "redux/selectors/file_info"; +import { doCloseModal } from "redux/actions/app"; +import { doNavigate, doHistoryBack } from "redux/actions/navigation"; import setProgressBar from "util/setProgressBar"; import batchActions from "util/batchActions"; diff --git a/ui/js/redux/actions/navigation.js b/ui/js/redux/actions/navigation.js index 0ab3a22eb..c236c3fcb 100644 --- a/ui/js/redux/actions/navigation.js +++ b/ui/js/redux/actions/navigation.js @@ -6,8 +6,8 @@ import { selectCurrentParams, selectHistoryStack, selectHistoryIndex, -} from "selectors/navigation"; -import { doSearch } from "actions/search"; +} from "redux/selectors/navigation"; +import { doSearch } from "redux/actions/search"; import { toQueryString } from "util/query_params"; export function doNavigate(path, params = {}, options = {}) { diff --git a/ui/js/redux/actions/rewards.js b/ui/js/redux/actions/rewards.js index 274298d48..9ebc3d715 100644 --- a/ui/js/redux/actions/rewards.js +++ b/ui/js/redux/actions/rewards.js @@ -2,8 +2,8 @@ import * as types from "constants/action_types"; import * as modals from "constants/modal_types"; import lbryio from "lbryio"; import rewards from "rewards"; -import { selectUnclaimedRewardsByType } from "selectors/rewards"; -import { selectUserIsRewardApproved } from "selectors/user"; +import { selectUnclaimedRewardsByType } from "redux/selectors/rewards"; +import { selectUserIsRewardApproved } from "redux/selectors/user"; export function doRewardList() { return function(dispatch, getState) { diff --git a/ui/js/redux/actions/search.js b/ui/js/redux/actions/search.js index 80b014b73..80c269882 100644 --- a/ui/js/redux/actions/search.js +++ b/ui/js/redux/actions/search.js @@ -1,8 +1,8 @@ import * as types from "constants/action_types"; import lbryuri from "lbryuri"; -import { doResolveUri } from "actions/content"; -import { doNavigate } from "actions/navigation"; -import { selectCurrentPage } from "selectors/navigation"; +import { doResolveUri } from "redux/actions/content"; +import { doNavigate } from "redux/actions/navigation"; +import { selectCurrentPage } from "redux/selectors/navigation"; import batchActions from "util/batchActions"; export function doSearch(rawQuery) { diff --git a/ui/js/redux/actions/settings.js b/ui/js/redux/actions/settings.js index 6a2455bf9..8d7e45a55 100644 --- a/ui/js/redux/actions/settings.js +++ b/ui/js/redux/actions/settings.js @@ -1,6 +1,6 @@ import * as types from "constants/action_types"; import * as settings from "constants/settings"; -import { doAlertError } from "actions/app"; +import { doAlertError } from "redux/actions/app"; import batchActions from "util/batchActions"; import lbry from "lbry"; diff --git a/ui/js/redux/actions/user.js b/ui/js/redux/actions/user.js index 05f361f4a..5f1acf595 100644 --- a/ui/js/redux/actions/user.js +++ b/ui/js/redux/actions/user.js @@ -1,9 +1,9 @@ import * as types from "constants/action_types"; import * as modals from "constants/modal_types"; import lbryio from "lbryio"; -import { doOpenModal, doShowSnackBar } from "actions/app"; -import { doRewardList, doClaimRewardType } from "actions/rewards"; -import { selectEmailToVerify, selectUser } from "selectors/user"; +import { doOpenModal, doShowSnackBar } from "redux/actions/app"; +import { doRewardList, doClaimRewardType } from "redux/actions/rewards"; +import { selectEmailToVerify, selectUser } from "redux/selectors/user"; import rewards from "rewards"; export function doAuthenticate() { diff --git a/ui/js/redux/actions/wallet.js b/ui/js/redux/actions/wallet.js index e7b36597a..fbd744ecb 100644 --- a/ui/js/redux/actions/wallet.js +++ b/ui/js/redux/actions/wallet.js @@ -4,9 +4,9 @@ import { selectDraftTransaction, selectDraftTransactionAmount, selectBalance, -} from "selectors/wallet"; -import { doOpenModal, doShowSnackBar } from "actions/app"; -import { doNavigate } from "actions/navigation"; +} from "redux/selectors/wallet"; +import { doOpenModal, doShowSnackBar } from "redux/actions/app"; +import { doNavigate } from "redux/actions/navigation"; import * as modals from "constants/modal_types"; export function doUpdateBalance() { diff --git a/ui/js/redux/selectors/claims.js b/ui/js/redux/selectors/claims.js index c29522dcf..fead14b85 100644 --- a/ui/js/redux/selectors/claims.js +++ b/ui/js/redux/selectors/claims.js @@ -1,5 +1,5 @@ import { createSelector } from "reselect"; -import { selectCurrentParams } from "selectors/navigation"; +import { selectCurrentParams } from "redux/selectors/navigation"; import lbryuri from "lbryuri"; import { makeSelectCurrentParam } from "./navigation"; diff --git a/ui/js/redux/selectors/cost_info.js b/ui/js/redux/selectors/cost_info.js index d7c17cefa..1bf6c1fe7 100644 --- a/ui/js/redux/selectors/cost_info.js +++ b/ui/js/redux/selectors/cost_info.js @@ -1,5 +1,5 @@ import { createSelector } from "reselect"; -import { selectCurrentParams } from "selectors/navigation"; +import { selectCurrentParams } from "redux/selectors/navigation"; export const _selectState = state => state.costInfo || {}; diff --git a/ui/js/redux/selectors/file_info.js b/ui/js/redux/selectors/file_info.js index 431454dfc..0bf76ef2f 100644 --- a/ui/js/redux/selectors/file_info.js +++ b/ui/js/redux/selectors/file_info.js @@ -5,7 +5,7 @@ import { selectIsFetchingClaimListMine, selectMyClaims, selectMyClaimsOutpoints, -} from "selectors/claims"; +} from "redux/selectors/claims"; export const _selectState = state => state.fileInfo || {}; diff --git a/ui/js/redux/selectors/rewards.js b/ui/js/redux/selectors/rewards.js index f9fbc4fe4..c481a1977 100644 --- a/ui/js/redux/selectors/rewards.js +++ b/ui/js/redux/selectors/rewards.js @@ -1,5 +1,5 @@ import { createSelector } from "reselect"; -import { selectUser } from "selectors/user"; +import { selectUser } from "redux/selectors/user"; import rewards from "rewards"; const _selectState = state => state.rewards || {}; diff --git a/ui/js/redux/selectors/search.js b/ui/js/redux/selectors/search.js index aa77d7ec3..d64289d78 100644 --- a/ui/js/redux/selectors/search.js +++ b/ui/js/redux/selectors/search.js @@ -3,7 +3,7 @@ import { selectPageTitle, selectCurrentPage, selectCurrentParams, -} from "selectors/navigation"; +} from "redux/selectors/navigation"; export const _selectState = state => state.search || {}; diff --git a/ui/js/rewards.js b/ui/js/rewards.js index 2c8eae8a2..2a30be2d3 100644 --- a/ui/js/rewards.js +++ b/ui/js/rewards.js @@ -1,6 +1,6 @@ import lbry from "lbry"; import lbryio from "lbryio"; -import { doShowSnackBar } from "actions/app"; +import { doShowSnackBar } from "redux/actions/app"; function rewardMessage(type, amount) { return { diff --git a/ui/js/store.js b/ui/js/store.js index af1e68c3a..85fea7348 100644 --- a/ui/js/store.js +++ b/ui/js/store.js @@ -1,16 +1,16 @@ import { createLogger } from "redux-logger"; -import appReducer from "reducers/app"; -import availabilityReducer from "reducers/availability"; -import claimsReducer from "reducers/claims"; -import contentReducer from "reducers/content"; -import costInfoReducer from "reducers/cost_info"; -import fileInfoReducer from "reducers/file_info"; -import navigationReducer from "reducers/navigation"; -import rewardsReducer from "reducers/rewards"; -import searchReducer from "reducers/search"; -import settingsReducer from "reducers/settings"; -import userReducer from "reducers/user"; -import walletReducer from "reducers/wallet"; +import appReducer from "redux/reducers/app"; +import availabilityReducer from "redux/reducers/availability"; +import claimsReducer from "redux/reducers/claims"; +import contentReducer from "redux/reducers/content"; +import costInfoReducer from "redux/reducers/cost_info"; +import fileInfoReducer from "redux/reducers/file_info"; +import navigationReducer from "redux/reducers/navigation"; +import rewardsReducer from "redux/reducers/rewards"; +import searchReducer from "redux/reducers/search"; +import settingsReducer from "redux/reducers/settings"; +import userReducer from "redux/reducers/user"; +import walletReducer from "redux/reducers/wallet"; import { persistStore, autoRehydrate } from "redux-persist"; import createCompressor from "redux-persist-transform-compress"; import createFilter from "redux-persist-transform-filter"; -- 2.45.2 From a131bcf1988d2383ba21c92da8c676cfc679aaa3 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 13 Nov 2017 16:04:09 -0500 Subject: [PATCH 3/4] update app import --- ui/js/redux/actions/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/redux/actions/app.js b/ui/js/redux/actions/app.js index e4c60cddf..b8b6a2241 100644 --- a/ui/js/redux/actions/app.js +++ b/ui/js/redux/actions/app.js @@ -16,7 +16,7 @@ const { remote, ipcRenderer, shell } = require("electron"); const path = require("path"); const { download } = remote.require("electron-dl"); const fs = remote.require("fs"); -const { lbrySettings: config } = require("../../../app/package.json"); +const { lbrySettings: config } = require("../../../../app/package.json"); export function doOpenModal(modal, modalProps = {}) { return { -- 2.45.2 From 6d01122967169479c225201a66f9ebe675834e90 Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Fri, 17 Nov 2017 17:35:37 -0300 Subject: [PATCH 4/4] Integrate React and Redux devtools into Electron --- app/main.js | 49 ++++++++++++++++++++++++++++++------------------- package.json | 3 ++- ui/js/store.js | 5 +++-- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/app/main.js b/app/main.js index 0774c081a..897aad228 100644 --- a/app/main.js +++ b/app/main.js @@ -1,21 +1,7 @@ -module.exports = { safeQuit } +// Module imports const {app, BrowserWindow, ipcMain, Menu, Tray, globalShortcut} = require('electron'); -const url = require('url'); -const isDebug = process.env.NODE_ENV === 'development'; -const setMenu = require('./menu/main-menu.js'); - -if (isDebug) { - try - { - require('electron-debug')({showDevTools: true}); - } - catch (err) // electron-debug is in devDependencies, but some - { - console.error(err) - } -} - const path = require('path'); +const url = require('url'); const jayson = require('jayson'); const semver = require('semver'); const https = require('https'); @@ -26,8 +12,31 @@ const kill = require('tree-kill'); const child_process = require('child_process'); const assert = require('assert'); const {version: localVersion} = require(app.getAppPath() + '/package.json'); +const setMenu = require('./menu/main-menu.js'); -const VERSION_CHECK_INTERVAL = 30 * 60 * 1000; +// Debug configs +const isDebug = process.env.NODE_ENV === 'development'; +if (isDebug) { + try + { + require('electron-debug')({showDevTools: true}); + + const { default: installExtension, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } = require('electron-devtools-installer'); + app.on('ready', () => { + [REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS].forEach(extension => { + installExtension(extension) + .then((name) => console.log(`Added Extension: ${name}`)) + .catch((err) => console.log('An error occurred: ', err)); + }); + }); + } + catch (err) // electron-debug is in devDependencies, but some + { + console.error(err) + } +} + +// Misc constants const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest'; const DAEMON_PATH = process.env.LBRY_DAEMON || path.join(__dirname, 'dist', 'lbrynet-daemon'); @@ -275,7 +284,7 @@ function handleOpenUriRequested(uri) { // Window not created yet, so store up requested URI for when it is openUri = processRequestedUri(uri); } else { - + if (win.isMinimized()) { win.restore() } else if (!win.isVisible()) { @@ -357,7 +366,7 @@ if (isSecondaryInstance) { // We're not in the original process, so quit return; } -app.on('ready', function(){ +app.on('ready', function() { launchDaemonIfNotRunning(); if (process.platform === "linux") { checkLinuxTraySupport( err => { @@ -537,3 +546,5 @@ ipcMain.on('get-auth-token', (event) => { ipcMain.on('set-auth-token', (event, token) => { keytar.setPassword("LBRY", "auth_token", token ? token.toString().trim() : null); }); + +module.exports = { safeQuit }; \ No newline at end of file diff --git a/package.json b/package.json index 052bd4b18..a6085ca0c 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,8 @@ "devtron": "^1.4.0", "electron": "^1.7.9", "electron-builder": "^11.7.0", - "electron-debug": "^1.4.0" + "electron-debug": "^1.4.0", + "electron-devtools-installer": "^2.2.1" }, "license": "MIT" } diff --git a/ui/js/store.js b/ui/js/store.js index af1e68c3a..29d580b56 100644 --- a/ui/js/store.js +++ b/ui/js/store.js @@ -80,8 +80,9 @@ if (env === "development") { } // middleware.push(createActionBuffer(REHYDRATE)); // was causing issues with authentication reducers not firing - -const createStoreWithMiddleware = redux.compose( +const composeEnhancers = + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux.compose; +const createStoreWithMiddleware = composeEnhancers( autoRehydrate(), redux.applyMiddleware(...middleware) )(redux.createStore); -- 2.45.2