From 3a0ffb312a2285016055c51bede8aeae91444c5b Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Fri, 24 Nov 2017 16:36:10 -0500 Subject: [PATCH] Revert "Update file structure to follow electron-webpack guidelines" --- .bumpversion.cfg | 4 +- .gitignore | 16 +- .tx/config | 4 +- README.md | 26 +-- {src/main => app}/main.js | 0 {src/main => app}/menu/context-menu.js | 0 {src/main => app}/menu/main-menu.js | 0 {src/main => app}/package.json | 0 {src/main => app}/yarn.lock | 0 build/build.ps1 | 16 +- build/build.sh | 24 +-- build/release.py | 2 +- package.json | 2 +- {src/renderer => ui}/.babelrc | 0 {src/renderer => ui}/.eslintrc.js | 0 {src/renderer => ui}/README.md | 0 {src/renderer => ui}/dist/favicon.ico | Bin .../renderer => ui}/dist/font/FontAwesome.otf | Bin .../dist/font/fontawesome-webfont.eot | Bin .../dist/font/fontawesome-webfont.svg | 0 .../dist/font/fontawesome-webfont.ttf | Bin .../dist/font/fontawesome-webfont.woff | Bin .../dist/font/fontawesome-webfont.woff2 | Bin .../dist/img/Free-speech-flag.svg | 0 {src/renderer => ui}/dist/img/busy.gif | Bin .../dist/img/default-thumb.svg | 0 {src/renderer => ui}/dist/img/fav/32x32.png | Bin .../dist/img/fav/android-chrome-144x144.png | Bin .../dist/img/fav/android-chrome-192x192.png | Bin .../dist/img/fav/android-chrome-36x36.png | Bin .../dist/img/fav/android-chrome-48x48.png | Bin .../dist/img/fav/android-chrome-72x72.png | Bin .../dist/img/fav/android-chrome-96x96.png | Bin .../dist/img/fav/apple-touch-icon-114x114.png | Bin .../dist/img/fav/apple-touch-icon-120x120.png | Bin .../img/fav/apple-touch-icon-120x120_1.png | Bin .../dist/img/fav/apple-touch-icon-144x144.png | Bin .../dist/img/fav/apple-touch-icon-152x152.png | Bin .../dist/img/fav/apple-touch-icon-180x180.png | Bin .../dist/img/fav/apple-touch-icon-57x57.png | Bin .../dist/img/fav/apple-touch-icon-60x60.png | Bin .../dist/img/fav/apple-touch-icon-72x72.png | Bin .../dist/img/fav/apple-touch-icon-76x76.png | Bin .../dist/img/fav/apple-touch-icon-76x76_1.png | Bin .../img/fav/apple-touch-icon-precomposed.png | Bin .../dist/img/fav/apple-touch-icon.png | Bin .../dist/img/fav/browserconfig.xml | 24 +-- .../dist/img/fav/favicon-16x16.png | Bin .../dist/img/fav/favicon-194x194.png | Bin .../dist/img/fav/favicon-32x32.png | Bin .../dist/img/fav/favicon-96x96.png | Bin .../dist/img/fav/macTemplate@2x.png | Bin .../dist/img/fav/manifest.json | 0 .../dist/img/fav/mstile-144x144.png | Bin .../dist/img/fav/mstile-150x150.png | Bin .../dist/img/fav/mstile-310x150.png | Bin .../dist/img/fav/mstile-310x310.png | Bin .../dist/img/fav/mstile-70x70.png | Bin {src/renderer => ui}/dist/img/lbry-bg.png | Bin .../dist/img/lbry-dark-1600x528.png | Bin .../dist/img/lbry-white-485x160.png | Bin .../dist/img/lbry-white-909x300.png | Bin {src/renderer => ui}/dist/img/warning.png | Bin {src/renderer => ui}/dist/index.html | 0 {src/renderer => ui}/dist/quit.html | 0 {src/renderer => ui}/dist/requirements.txt | 0 {src/renderer => ui}/dist/themes/dark.css | 0 {src/renderer => ui}/dist/themes/light.css | 0 {src/renderer => ui}/dist/upgrade.html | 0 {src/renderer => ui}/dist/warning.html | 0 {src/renderer => ui}/extractLocals.js | 2 +- {src/renderer => ui}/js/app.js | 0 .../renderer => ui}/js/component/app/index.js | 0 .../renderer => ui}/js/component/app/view.jsx | 0 .../js/component/cardMedia/index.js | 0 .../js/component/cardMedia/view.jsx | 0 .../js/component/cardVerify/index.js | 0 .../js/component/cardVerify/view.jsx | 0 .../js/component/channelTile/index.js | 0 .../js/component/channelTile/view.jsx | 15 +- {src/renderer => ui}/js/component/common.js | 31 ++-- .../js/component/dateTime/index.js | 0 .../js/component/dateTime/view.jsx | 0 .../js/component/file-selector.js | 10 +- .../js/component/fileActions/index.js | 0 .../js/component/fileActions/view.jsx | 15 +- .../js/component/fileCard/index.js | 0 .../js/component/fileCard/view.jsx | 0 .../js/component/fileDetails/index.js | 0 .../js/component/fileDetails/view.jsx | 14 +- .../js/component/fileDownloadLink/index.js | 0 .../js/component/fileDownloadLink/view.jsx | 11 +- .../js/component/fileList/index.js | 0 .../js/component/fileList/view.jsx | 2 +- .../js/component/fileListSearch/index.js | 0 .../js/component/fileListSearch/view.jsx | 18 +- .../js/component/filePrice/index.js | 0 .../js/component/filePrice/view.jsx | 0 .../js/component/fileTile/index.js | 0 .../js/component/fileTile/view.jsx | 30 ++-- {src/renderer => ui}/js/component/form.js | 59 +++---- .../js/component/formField/index.js | 0 .../js/component/formField/view.jsx | 52 +++--- .../js/component/formFieldPrice/index.js | 0 .../js/component/formFieldPrice/view.jsx | 14 +- .../js/component/header/index.js | 0 .../js/component/header/view.jsx | 0 .../js/component/icon/index.js | 0 .../js/component/icon/view.jsx | 0 .../js/component/inviteList/index.js | 0 .../js/component/inviteList/view.jsx | 50 +++--- .../js/component/inviteNew/index.js | 0 .../js/component/inviteNew/view.jsx | 4 +- .../js/component/link/index.js | 0 .../js/component/link/view.jsx | 11 +- .../js/component/linkTransaction/index.js | 0 .../js/component/linkTransaction/view.jsx | 0 .../js/component/load_screen.js | 13 +- {src/renderer => ui}/js/component/menu.js | 22 +-- .../js/component/nsfwOverlay/index.js | 0 .../js/component/nsfwOverlay/view.jsx | 1 + .../js/component/publishForm/index.js | 0 .../publishForm/internal/channelSection.jsx | 24 ++- .../js/component/publishForm/view.jsx | 0 .../js/component/rewardLink/index.js | 0 .../js/component/rewardLink/view.jsx | 26 ++- .../js/component/rewardListClaimed/index.js | 0 .../js/component/rewardListClaimed/view.jsx | 8 +- .../js/component/rewardSummary/index.js | 0 .../js/component/rewardSummary/view.jsx | 5 +- .../js/component/rewardTile/index.js | 0 .../js/component/rewardTile/view.jsx | 19 +- .../js/component/router/index.js | 0 .../js/component/router/view.jsx | 0 .../js/component/snackBar/index.js | 0 .../js/component/snackBar/view.jsx | 13 +- .../js/component/splash/index.js | 0 .../js/component/splash/view.jsx | 13 +- .../js/component/subHeader/index.js | 0 .../js/component/subHeader/view.jsx | 0 .../js/component/theme/index.js | 0 .../js/component/theme/view.jsx | 0 {src/renderer => ui}/js/component/tooltip.js | 0 .../js/component/transactionList/index.js | 0 .../internal/TransactionListItem.jsx | 62 +++---- .../js/component/transactionList/view.jsx | 24 ++- .../component/transactionListRecent/index.js | 0 .../component/transactionListRecent/view.jsx | 15 +- .../js/component/truncatedMarkdown/index.js | 0 .../js/component/truncatedMarkdown/view.jsx | 7 +- .../js/component/uriIndicator/index.js | 0 .../js/component/uriIndicator/view.jsx | 0 .../js/component/userEmailNew/index.js | 0 .../js/component/userEmailNew/view.jsx | 0 .../js/component/userEmailVerify/index.js | 0 .../js/component/userEmailVerify/view.jsx | 0 .../js/component/userVerify/index.js | 0 .../js/component/userVerify/view.jsx | 12 +- .../js/component/video/index.js | 0 .../video/internal/loading-screen.jsx | 9 +- .../component/video/internal/play-button.jsx | 7 +- .../js/component/video/internal/player.jsx | 11 +- .../js/component/video/view.jsx | 31 ++-- .../js/component/walletAddress/index.js | 0 .../js/component/walletAddress/view.jsx | 0 .../js/component/walletBalance/index.js | 0 .../js/component/walletBalance/view.jsx | 5 +- .../js/component/walletSend/index.js | 0 .../js/component/walletSend/view.jsx | 0 .../js/component/walletSendTip/index.js | 0 .../js/component/walletSendTip/view.jsx | 4 +- .../js/component/wunderbar/index.js | 0 .../js/component/wunderbar/view.jsx | 0 {src/renderer => ui}/js/config/development.js | 0 {src/renderer => ui}/js/config/production.js | 0 .../js/constants/action_types.js | 0 {src/renderer => ui}/js/constants/icons.js | 0 .../renderer => ui}/js/constants/languages.js | 0 .../js/constants/modal_types.js | 0 {src/renderer => ui}/js/constants/settings.js | 0 .../js/constants/transaction_types.js | 0 {src/renderer => ui}/js/jsonrpc.js | 0 {src/renderer => ui}/js/lbry.js | 5 +- {src/renderer => ui}/js/lbryio.js | 0 {src/renderer => ui}/js/lbryuri.js | 0 {src/renderer => ui}/js/main.js | 0 {src/renderer => ui}/js/modal/modal.js | 38 ++-- .../js/modal/modalAffirmPurchase/index.js | 0 .../js/modal/modalAffirmPurchase/view.jsx | 0 .../js/modal/modalAuthFailure/index.js | 0 .../js/modal/modalAuthFailure/view.jsx | 0 .../js/modal/modalCreditIntro/index.js | 0 .../js/modal/modalCreditIntro/view.jsx | 0 .../js/modal/modalDownloading/index.js | 0 .../js/modal/modalDownloading/view.jsx | 42 ++--- .../js/modal/modalError/index.js | 0 .../js/modal/modalError/view.jsx | 11 +- .../js/modal/modalFileTimeout/index.js | 0 .../js/modal/modalFileTimeout/view.jsx | 3 +- .../js/modal/modalFirstReward/index.js | 0 .../js/modal/modalFirstReward/view.jsx | 4 +- .../js/modal/modalIncompatibleDaemon/index.js | 0 .../js/modal/modalIncompatibleDaemon/view.jsx | 0 .../modal/modalInsufficientBalance/index.js | 0 .../modal/modalInsufficientBalance/view.jsx | 0 .../modal/modalInsufficientCredits/index.js | 0 .../modal/modalInsufficientCredits/view.jsx | 4 +- .../js/modal/modalRemoveFile/index.js | 0 .../js/modal/modalRemoveFile/view.jsx | 8 +- .../js/modal/modalRevokeClaim/index.js | 0 .../js/modal/modalRevokeClaim/view.jsx | 0 .../modalRewardApprovalRequired/index.js | 0 .../modalRewardApprovalRequired/view.jsx | 0 .../js/modal/modalRouter/index.js | 0 .../js/modal/modalRouter/view.jsx | 0 .../js/modal/modalTransactionFailed/index.js | 0 .../js/modal/modalTransactionFailed/view.jsx | 0 .../js/modal/modalUpgrade/index.js | 0 .../js/modal/modalUpgrade/view.jsx | 6 +- .../js/modal/modalWelcome/index.js | 0 .../js/modal/modalWelcome/view.jsx | 4 +- {src/renderer => ui}/js/page/auth/index.js | 0 {src/renderer => ui}/js/page/auth/view.jsx | 44 ++--- {src/renderer => ui}/js/page/backup/index.js | 0 {src/renderer => ui}/js/page/backup/view.jsx | 4 +- {src/renderer => ui}/js/page/channel/index.js | 0 {src/renderer => ui}/js/page/channel/view.jsx | 48 +++--- .../renderer => ui}/js/page/discover/index.js | 0 .../renderer => ui}/js/page/discover/view.jsx | 61 +++---- {src/renderer => ui}/js/page/file/index.js | 0 {src/renderer => ui}/js/page/file/view.jsx | 0 .../js/page/fileListDownloaded/index.js | 0 .../js/page/fileListDownloaded/view.jsx | 0 .../js/page/fileListPublished/index.js | 0 .../js/page/fileListPublished/view.jsx | 4 +- {src/renderer => ui}/js/page/help/index.js | 0 {src/renderer => ui}/js/page/help/view.jsx | 162 ++++++++---------- {src/renderer => ui}/js/page/invite/index.js | 0 {src/renderer => ui}/js/page/invite/view.jsx | 14 +- {src/renderer => ui}/js/page/publish/index.js | 0 {src/renderer => ui}/js/page/publish/view.jsx | 0 .../js/page/receiveCredits/index.js | 0 .../js/page/receiveCredits/view.jsx | 0 {src/renderer => ui}/js/page/report.js | 0 {src/renderer => ui}/js/page/rewards/index.js | 0 {src/renderer => ui}/js/page/rewards/view.jsx | 18 +- {src/renderer => ui}/js/page/search/index.js | 0 {src/renderer => ui}/js/page/search/view.jsx | 40 ++--- .../js/page/sendCredits/index.js | 0 .../js/page/sendCredits/view.jsx | 0 .../renderer => ui}/js/page/settings/index.js | 0 .../renderer => ui}/js/page/settings/view.jsx | 15 +- {src/renderer => ui}/js/page/show/index.js | 0 {src/renderer => ui}/js/page/show/view.jsx | 18 +- .../js/page/transactionHistory/index.js | 0 .../js/page/transactionHistory/view.jsx | 16 +- {src/renderer => ui}/js/page/wallet/index.js | 0 {src/renderer => ui}/js/page/wallet/view.jsx | 0 {src/renderer => ui}/js/redux/actions/app.js | 39 +++-- .../js/redux/actions/availability.js | 0 .../js/redux/actions/content.js | 0 .../js/redux/actions/cost_info.js | 0 .../js/redux/actions/file_info.js | 0 .../js/redux/actions/navigation.js | 0 .../js/redux/actions/rewards.js | 0 .../js/redux/actions/search.js | 0 .../js/redux/actions/settings.js | 0 {src/renderer => ui}/js/redux/actions/user.js | 0 .../js/redux/actions/wallet.js | 0 {src/renderer => ui}/js/redux/reducers/app.js | 0 .../js/redux/reducers/availability.js | 0 .../js/redux/reducers/claims.js | 0 .../js/redux/reducers/content.js | 0 .../js/redux/reducers/cost_info.js | 0 .../js/redux/reducers/file_info.js | 0 .../js/redux/reducers/navigation.js | 0 .../js/redux/reducers/rewards.js | 0 .../js/redux/reducers/search.js | 0 .../js/redux/reducers/settings.js | 0 .../renderer => ui}/js/redux/reducers/user.js | 0 .../js/redux/reducers/wallet.js | 0 .../renderer => ui}/js/redux/selectors/app.js | 0 .../js/redux/selectors/availability.js | 0 .../js/redux/selectors/claims.js | 0 .../js/redux/selectors/content.js | 0 .../js/redux/selectors/cost_info.js | 0 .../js/redux/selectors/file_info.js | 0 .../js/redux/selectors/navigation.js | 0 .../js/redux/selectors/rewards.js | 0 .../js/redux/selectors/search.js | 0 .../js/redux/selectors/settings.js | 0 .../js/redux/selectors/user.js | 0 .../js/redux/selectors/wallet.js | 0 {src/renderer => ui}/js/rewards.js | 0 {src/renderer => ui}/js/store.js | 0 {src/renderer => ui}/js/util/batchActions.js | 0 {src/renderer => ui}/js/util/formatCredits.js | 0 {src/renderer => ui}/js/util/query_params.js | 10 +- {src/renderer => ui}/js/util/setBadge.js | 0 .../renderer => ui}/js/util/setProgressBar.js | 0 {src/renderer => ui}/js/util/throttle.js | 0 {src/renderer => ui}/package.json | 4 +- {src/renderer => ui}/scss/_gui.scss | 0 {src/renderer => ui}/scss/_icons.scss | 0 {src/renderer => ui}/scss/_reset.scss | 0 {src/renderer => ui}/scss/_vars.scss | 0 {src/renderer => ui}/scss/all.scss | 0 .../scss/component/__divider.scss | 0 .../scss/component/_button.scss | 0 .../renderer => ui}/scss/component/_card.scss | 0 .../scss/component/_channel-indicator.scss | 0 .../scss/component/_checkbox.scss | 0 .../scss/component/_file-download.scss | 0 .../scss/component/_file-selector.scss | 0 .../scss/component/_file-tile.scss | 0 .../scss/component/_form-field.scss | 0 .../scss/component/_header.scss | 0 .../scss/component/_load-screen.scss | 0 .../scss/component/_markdown-editor.scss | 0 .../renderer => ui}/scss/component/_menu.scss | 0 .../scss/component/_modal.scss | 0 .../scss/component/_notice.scss | 0 .../scss/component/_pagination.scss | 0 .../scss/component/_radio.scss | 0 .../scss/component/_scrollbar.scss | 0 .../scss/component/_snack-bar.scss | 0 .../scss/component/_table.scss | 0 .../renderer => ui}/scss/component/_tabs.scss | 0 .../scss/component/_tooltip.scss | 0 .../scss/component/_video.scss | 0 {src/renderer => ui}/scss/mixin/link.scss | 0 {src/renderer => ui}/scss/page/_show.scss | 0 {src/renderer => ui}/watch.bat | 2 +- {src/renderer => ui}/watch.sh | 4 +- {src/renderer => ui}/webpack.common.js | 2 +- {src/renderer => ui}/webpack.dev.js | 2 +- {src/renderer => ui}/webpack.prod.js | 0 {src/renderer => ui}/yarn.lock | 0 338 files changed, 670 insertions(+), 749 deletions(-) rename {src/main => app}/main.js (100%) rename {src/main => app}/menu/context-menu.js (100%) rename {src/main => app}/menu/main-menu.js (100%) rename {src/main => app}/package.json (100%) rename {src/main => app}/yarn.lock (100%) rename {src/renderer => ui}/.babelrc (100%) rename {src/renderer => ui}/.eslintrc.js (100%) rename {src/renderer => ui}/README.md (100%) rename {src/renderer => ui}/dist/favicon.ico (100%) rename {src/renderer => ui}/dist/font/FontAwesome.otf (100%) rename {src/renderer => ui}/dist/font/fontawesome-webfont.eot (100%) rename {src/renderer => ui}/dist/font/fontawesome-webfont.svg (100%) rename {src/renderer => ui}/dist/font/fontawesome-webfont.ttf (100%) rename {src/renderer => ui}/dist/font/fontawesome-webfont.woff (100%) rename {src/renderer => ui}/dist/font/fontawesome-webfont.woff2 (100%) rename {src/renderer => ui}/dist/img/Free-speech-flag.svg (100%) rename {src/renderer => ui}/dist/img/busy.gif (100%) rename {src/renderer => ui}/dist/img/default-thumb.svg (100%) rename {src/renderer => ui}/dist/img/fav/32x32.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-144x144.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-192x192.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-36x36.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-48x48.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-72x72.png (100%) rename {src/renderer => ui}/dist/img/fav/android-chrome-96x96.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-114x114.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-120x120.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-120x120_1.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-144x144.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-152x152.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-180x180.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-57x57.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-60x60.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-72x72.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-76x76.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-76x76_1.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon-precomposed.png (100%) rename {src/renderer => ui}/dist/img/fav/apple-touch-icon.png (100%) rename {src/renderer => ui}/dist/img/fav/browserconfig.xml (96%) rename {src/renderer => ui}/dist/img/fav/favicon-16x16.png (100%) rename {src/renderer => ui}/dist/img/fav/favicon-194x194.png (100%) rename {src/renderer => ui}/dist/img/fav/favicon-32x32.png (100%) rename {src/renderer => ui}/dist/img/fav/favicon-96x96.png (100%) rename {src/renderer => ui}/dist/img/fav/macTemplate@2x.png (100%) rename {src/renderer => ui}/dist/img/fav/manifest.json (100%) rename {src/renderer => ui}/dist/img/fav/mstile-144x144.png (100%) rename {src/renderer => ui}/dist/img/fav/mstile-150x150.png (100%) rename {src/renderer => ui}/dist/img/fav/mstile-310x150.png (100%) rename {src/renderer => ui}/dist/img/fav/mstile-310x310.png (100%) rename {src/renderer => ui}/dist/img/fav/mstile-70x70.png (100%) rename {src/renderer => ui}/dist/img/lbry-bg.png (100%) rename {src/renderer => ui}/dist/img/lbry-dark-1600x528.png (100%) rename {src/renderer => ui}/dist/img/lbry-white-485x160.png (100%) rename {src/renderer => ui}/dist/img/lbry-white-909x300.png (100%) rename {src/renderer => ui}/dist/img/warning.png (100%) rename {src/renderer => ui}/dist/index.html (100%) rename {src/renderer => ui}/dist/quit.html (100%) rename {src/renderer => ui}/dist/requirements.txt (100%) rename {src/renderer => ui}/dist/themes/dark.css (100%) rename {src/renderer => ui}/dist/themes/light.css (100%) rename {src/renderer => ui}/dist/upgrade.html (100%) rename {src/renderer => ui}/dist/warning.html (100%) rename {src/renderer => ui}/extractLocals.js (96%) rename {src/renderer => ui}/js/app.js (100%) rename {src/renderer => ui}/js/component/app/index.js (100%) rename {src/renderer => ui}/js/component/app/view.jsx (100%) rename {src/renderer => ui}/js/component/cardMedia/index.js (100%) rename {src/renderer => ui}/js/component/cardMedia/view.jsx (100%) rename {src/renderer => ui}/js/component/cardVerify/index.js (100%) rename {src/renderer => ui}/js/component/cardVerify/view.jsx (100%) rename {src/renderer => ui}/js/component/channelTile/index.js (100%) rename {src/renderer => ui}/js/component/channelTile/view.jsx (85%) rename {src/renderer => ui}/js/component/common.js (89%) rename {src/renderer => ui}/js/component/dateTime/index.js (100%) rename {src/renderer => ui}/js/component/dateTime/view.jsx (100%) rename {src/renderer => ui}/js/component/file-selector.js (92%) rename {src/renderer => ui}/js/component/fileActions/index.js (100%) rename {src/renderer => ui}/js/component/fileActions/view.jsx (90%) rename {src/renderer => ui}/js/component/fileCard/index.js (100%) rename {src/renderer => ui}/js/component/fileCard/view.jsx (100%) rename {src/renderer => ui}/js/component/fileDetails/index.js (100%) rename {src/renderer => ui}/js/component/fileDetails/view.jsx (85%) rename {src/renderer => ui}/js/component/fileDownloadLink/index.js (100%) rename {src/renderer => ui}/js/component/fileDownloadLink/view.jsx (92%) rename {src/renderer => ui}/js/component/fileList/index.js (100%) rename {src/renderer => ui}/js/component/fileList/view.jsx (99%) rename {src/renderer => ui}/js/component/fileListSearch/index.js (100%) rename {src/renderer => ui}/js/component/fileListSearch/view.jsx (74%) rename {src/renderer => ui}/js/component/filePrice/index.js (100%) rename {src/renderer => ui}/js/component/filePrice/view.jsx (100%) rename {src/renderer => ui}/js/component/fileTile/index.js (100%) rename {src/renderer => ui}/js/component/fileTile/view.jsx (90%) rename {src/renderer => ui}/js/component/form.js (77%) rename {src/renderer => ui}/js/component/formField/index.js (100%) rename {src/renderer => ui}/js/component/formField/view.jsx (84%) rename {src/renderer => ui}/js/component/formFieldPrice/index.js (100%) rename {src/renderer => ui}/js/component/formFieldPrice/view.jsx (87%) rename {src/renderer => ui}/js/component/header/index.js (100%) rename {src/renderer => ui}/js/component/header/view.jsx (100%) rename {src/renderer => ui}/js/component/icon/index.js (100%) rename {src/renderer => ui}/js/component/icon/view.jsx (100%) rename {src/renderer => ui}/js/component/inviteList/index.js (100%) rename {src/renderer => ui}/js/component/inviteList/view.jsx (57%) rename {src/renderer => ui}/js/component/inviteNew/index.js (100%) rename {src/renderer => ui}/js/component/inviteNew/view.jsx (96%) rename {src/renderer => ui}/js/component/link/index.js (100%) rename {src/renderer => ui}/js/component/link/view.jsx (87%) rename {src/renderer => ui}/js/component/linkTransaction/index.js (100%) rename {src/renderer => ui}/js/component/linkTransaction/view.jsx (100%) rename {src/renderer => ui}/js/component/load_screen.js (80%) rename {src/renderer => ui}/js/component/menu.js (88%) rename {src/renderer => ui}/js/component/nsfwOverlay/index.js (100%) rename {src/renderer => ui}/js/component/nsfwOverlay/view.jsx (96%) rename {src/renderer => ui}/js/component/publishForm/index.js (100%) rename {src/renderer => ui}/js/component/publishForm/internal/channelSection.jsx (92%) rename {src/renderer => ui}/js/component/publishForm/view.jsx (100%) rename {src/renderer => ui}/js/component/rewardLink/index.js (100%) rename {src/renderer => ui}/js/component/rewardLink/view.jsx (66%) rename {src/renderer => ui}/js/component/rewardListClaimed/index.js (100%) rename {src/renderer => ui}/js/component/rewardListClaimed/view.jsx (83%) rename {src/renderer => ui}/js/component/rewardSummary/index.js (100%) rename {src/renderer => ui}/js/component/rewardSummary/view.jsx (91%) rename {src/renderer => ui}/js/component/rewardTile/index.js (100%) rename {src/renderer => ui}/js/component/rewardTile/view.jsx (66%) rename {src/renderer => ui}/js/component/router/index.js (100%) rename {src/renderer => ui}/js/component/router/view.jsx (100%) rename {src/renderer => ui}/js/component/snackBar/index.js (100%) rename {src/renderer => ui}/js/component/snackBar/view.jsx (81%) rename {src/renderer => ui}/js/component/splash/index.js (100%) rename {src/renderer => ui}/js/component/splash/view.jsx (92%) rename {src/renderer => ui}/js/component/subHeader/index.js (100%) rename {src/renderer => ui}/js/component/subHeader/view.jsx (100%) rename {src/renderer => ui}/js/component/theme/index.js (100%) rename {src/renderer => ui}/js/component/theme/view.jsx (100%) rename {src/renderer => ui}/js/component/tooltip.js (100%) rename {src/renderer => ui}/js/component/transactionList/index.js (100%) rename {src/renderer => ui}/js/component/transactionList/internal/TransactionListItem.jsx (65%) rename {src/renderer => ui}/js/component/transactionList/view.jsx (88%) rename {src/renderer => ui}/js/component/transactionListRecent/index.js (100%) rename {src/renderer => ui}/js/component/transactionListRecent/view.jsx (87%) rename {src/renderer => ui}/js/component/truncatedMarkdown/index.js (100%) rename {src/renderer => ui}/js/component/truncatedMarkdown/view.jsx (83%) rename {src/renderer => ui}/js/component/uriIndicator/index.js (100%) rename {src/renderer => ui}/js/component/uriIndicator/view.jsx (100%) rename {src/renderer => ui}/js/component/userEmailNew/index.js (100%) rename {src/renderer => ui}/js/component/userEmailNew/view.jsx (100%) rename {src/renderer => ui}/js/component/userEmailVerify/index.js (100%) rename {src/renderer => ui}/js/component/userEmailVerify/view.jsx (100%) rename {src/renderer => ui}/js/component/userVerify/index.js (100%) rename {src/renderer => ui}/js/component/userVerify/view.jsx (96%) rename {src/renderer => ui}/js/component/video/index.js (100%) rename {src/renderer => ui}/js/component/video/internal/loading-screen.jsx (56%) rename {src/renderer => ui}/js/component/video/internal/play-button.jsx (91%) rename {src/renderer => ui}/js/component/video/internal/player.jsx (96%) rename {src/renderer => ui}/js/component/video/view.jsx (84%) rename {src/renderer => ui}/js/component/walletAddress/index.js (100%) rename {src/renderer => ui}/js/component/walletAddress/view.jsx (100%) rename {src/renderer => ui}/js/component/walletBalance/index.js (100%) rename {src/renderer => ui}/js/component/walletBalance/view.jsx (87%) rename {src/renderer => ui}/js/component/walletSend/index.js (100%) rename {src/renderer => ui}/js/component/walletSend/view.jsx (100%) rename {src/renderer => ui}/js/component/walletSendTip/index.js (100%) rename {src/renderer => ui}/js/component/walletSendTip/view.jsx (95%) rename {src/renderer => ui}/js/component/wunderbar/index.js (100%) rename {src/renderer => ui}/js/component/wunderbar/view.jsx (100%) rename {src/renderer => ui}/js/config/development.js (100%) rename {src/renderer => ui}/js/config/production.js (100%) rename {src/renderer => ui}/js/constants/action_types.js (100%) rename {src/renderer => ui}/js/constants/icons.js (100%) rename {src/renderer => ui}/js/constants/languages.js (100%) rename {src/renderer => ui}/js/constants/modal_types.js (100%) rename {src/renderer => ui}/js/constants/settings.js (100%) rename {src/renderer => ui}/js/constants/transaction_types.js (100%) rename {src/renderer => ui}/js/jsonrpc.js (100%) rename {src/renderer => ui}/js/lbry.js (98%) rename {src/renderer => ui}/js/lbryio.js (100%) rename {src/renderer => ui}/js/lbryuri.js (100%) rename {src/renderer => ui}/js/main.js (100%) rename {src/renderer => ui}/js/modal/modal.js (77%) rename {src/renderer => ui}/js/modal/modalAffirmPurchase/index.js (100%) rename {src/renderer => ui}/js/modal/modalAffirmPurchase/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalAuthFailure/index.js (100%) rename {src/renderer => ui}/js/modal/modalAuthFailure/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalCreditIntro/index.js (100%) rename {src/renderer => ui}/js/modal/modalCreditIntro/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalDownloading/index.js (100%) rename {src/renderer => ui}/js/modal/modalDownloading/view.jsx (56%) rename {src/renderer => ui}/js/modal/modalError/index.js (100%) rename {src/renderer => ui}/js/modal/modalError/view.jsx (87%) rename {src/renderer => ui}/js/modal/modalFileTimeout/index.js (100%) rename {src/renderer => ui}/js/modal/modalFileTimeout/view.jsx (80%) rename {src/renderer => ui}/js/modal/modalFirstReward/index.js (100%) rename {src/renderer => ui}/js/modal/modalFirstReward/view.jsx (91%) rename {src/renderer => ui}/js/modal/modalIncompatibleDaemon/index.js (100%) rename {src/renderer => ui}/js/modal/modalIncompatibleDaemon/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalInsufficientBalance/index.js (100%) rename {src/renderer => ui}/js/modal/modalInsufficientBalance/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalInsufficientCredits/index.js (100%) rename {src/renderer => ui}/js/modal/modalInsufficientCredits/view.jsx (88%) rename {src/renderer => ui}/js/modal/modalRemoveFile/index.js (100%) rename {src/renderer => ui}/js/modal/modalRemoveFile/view.jsx (96%) rename {src/renderer => ui}/js/modal/modalRevokeClaim/index.js (100%) rename {src/renderer => ui}/js/modal/modalRevokeClaim/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalRewardApprovalRequired/index.js (100%) rename {src/renderer => ui}/js/modal/modalRewardApprovalRequired/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalRouter/index.js (100%) rename {src/renderer => ui}/js/modal/modalRouter/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalTransactionFailed/index.js (100%) rename {src/renderer => ui}/js/modal/modalTransactionFailed/view.jsx (100%) rename {src/renderer => ui}/js/modal/modalUpgrade/index.js (100%) rename {src/renderer => ui}/js/modal/modalUpgrade/view.jsx (85%) rename {src/renderer => ui}/js/modal/modalWelcome/index.js (100%) rename {src/renderer => ui}/js/modal/modalWelcome/view.jsx (92%) rename {src/renderer => ui}/js/page/auth/index.js (100%) rename {src/renderer => ui}/js/page/auth/view.jsx (72%) rename {src/renderer => ui}/js/page/backup/index.js (100%) rename {src/renderer => ui}/js/page/backup/view.jsx (95%) rename {src/renderer => ui}/js/page/channel/index.js (100%) rename {src/renderer => ui}/js/page/channel/view.jsx (65%) rename {src/renderer => ui}/js/page/discover/index.js (100%) rename {src/renderer => ui}/js/page/discover/view.jsx (83%) rename {src/renderer => ui}/js/page/file/index.js (100%) rename {src/renderer => ui}/js/page/file/view.jsx (100%) rename {src/renderer => ui}/js/page/fileListDownloaded/index.js (100%) rename {src/renderer => ui}/js/page/fileListDownloaded/view.jsx (100%) rename {src/renderer => ui}/js/page/fileListPublished/index.js (100%) rename {src/renderer => ui}/js/page/fileListPublished/view.jsx (91%) rename {src/renderer => ui}/js/page/help/index.js (100%) rename {src/renderer => ui}/js/page/help/view.jsx (54%) rename {src/renderer => ui}/js/page/invite/index.js (100%) rename {src/renderer => ui}/js/page/invite/view.jsx (78%) rename {src/renderer => ui}/js/page/publish/index.js (100%) rename {src/renderer => ui}/js/page/publish/view.jsx (100%) rename {src/renderer => ui}/js/page/receiveCredits/index.js (100%) rename {src/renderer => ui}/js/page/receiveCredits/view.jsx (100%) rename {src/renderer => ui}/js/page/report.js (100%) rename {src/renderer => ui}/js/page/rewards/index.js (100%) rename {src/renderer => ui}/js/page/rewards/view.jsx (91%) rename {src/renderer => ui}/js/page/search/index.js (100%) rename {src/renderer => ui}/js/page/search/view.jsx (52%) rename {src/renderer => ui}/js/page/sendCredits/index.js (100%) rename {src/renderer => ui}/js/page/sendCredits/view.jsx (100%) rename {src/renderer => ui}/js/page/settings/index.js (100%) rename {src/renderer => ui}/js/page/settings/view.jsx (97%) rename {src/renderer => ui}/js/page/show/index.js (100%) rename {src/renderer => ui}/js/page/show/view.jsx (79%) rename {src/renderer => ui}/js/page/transactionHistory/index.js (100%) rename {src/renderer => ui}/js/page/transactionHistory/view.jsx (72%) rename {src/renderer => ui}/js/page/wallet/index.js (100%) rename {src/renderer => ui}/js/page/wallet/view.jsx (100%) rename {src/renderer => ui}/js/redux/actions/app.js (90%) rename {src/renderer => ui}/js/redux/actions/availability.js (100%) rename {src/renderer => ui}/js/redux/actions/content.js (100%) rename {src/renderer => ui}/js/redux/actions/cost_info.js (100%) rename {src/renderer => ui}/js/redux/actions/file_info.js (100%) rename {src/renderer => ui}/js/redux/actions/navigation.js (100%) rename {src/renderer => ui}/js/redux/actions/rewards.js (100%) rename {src/renderer => ui}/js/redux/actions/search.js (100%) rename {src/renderer => ui}/js/redux/actions/settings.js (100%) rename {src/renderer => ui}/js/redux/actions/user.js (100%) rename {src/renderer => ui}/js/redux/actions/wallet.js (100%) rename {src/renderer => ui}/js/redux/reducers/app.js (100%) rename {src/renderer => ui}/js/redux/reducers/availability.js (100%) rename {src/renderer => ui}/js/redux/reducers/claims.js (100%) rename {src/renderer => ui}/js/redux/reducers/content.js (100%) rename {src/renderer => ui}/js/redux/reducers/cost_info.js (100%) rename {src/renderer => ui}/js/redux/reducers/file_info.js (100%) rename {src/renderer => ui}/js/redux/reducers/navigation.js (100%) rename {src/renderer => ui}/js/redux/reducers/rewards.js (100%) rename {src/renderer => ui}/js/redux/reducers/search.js (100%) rename {src/renderer => ui}/js/redux/reducers/settings.js (100%) rename {src/renderer => ui}/js/redux/reducers/user.js (100%) rename {src/renderer => ui}/js/redux/reducers/wallet.js (100%) rename {src/renderer => ui}/js/redux/selectors/app.js (100%) rename {src/renderer => ui}/js/redux/selectors/availability.js (100%) rename {src/renderer => ui}/js/redux/selectors/claims.js (100%) rename {src/renderer => ui}/js/redux/selectors/content.js (100%) rename {src/renderer => ui}/js/redux/selectors/cost_info.js (100%) rename {src/renderer => ui}/js/redux/selectors/file_info.js (100%) rename {src/renderer => ui}/js/redux/selectors/navigation.js (100%) rename {src/renderer => ui}/js/redux/selectors/rewards.js (100%) rename {src/renderer => ui}/js/redux/selectors/search.js (100%) rename {src/renderer => ui}/js/redux/selectors/settings.js (100%) rename {src/renderer => ui}/js/redux/selectors/user.js (100%) rename {src/renderer => ui}/js/redux/selectors/wallet.js (100%) rename {src/renderer => ui}/js/rewards.js (100%) rename {src/renderer => ui}/js/store.js (100%) rename {src/renderer => ui}/js/util/batchActions.js (100%) rename {src/renderer => ui}/js/util/formatCredits.js (100%) rename {src/renderer => ui}/js/util/query_params.js (77%) rename {src/renderer => ui}/js/util/setBadge.js (100%) rename {src/renderer => ui}/js/util/setProgressBar.js (100%) rename {src/renderer => ui}/js/util/throttle.js (100%) rename {src/renderer => ui}/package.json (97%) rename {src/renderer => ui}/scss/_gui.scss (100%) rename {src/renderer => ui}/scss/_icons.scss (100%) rename {src/renderer => ui}/scss/_reset.scss (100%) rename {src/renderer => ui}/scss/_vars.scss (100%) rename {src/renderer => ui}/scss/all.scss (100%) rename {src/renderer => ui}/scss/component/__divider.scss (100%) rename {src/renderer => ui}/scss/component/_button.scss (100%) rename {src/renderer => ui}/scss/component/_card.scss (100%) rename {src/renderer => ui}/scss/component/_channel-indicator.scss (100%) rename {src/renderer => ui}/scss/component/_checkbox.scss (100%) rename {src/renderer => ui}/scss/component/_file-download.scss (100%) rename {src/renderer => ui}/scss/component/_file-selector.scss (100%) rename {src/renderer => ui}/scss/component/_file-tile.scss (100%) rename {src/renderer => ui}/scss/component/_form-field.scss (100%) rename {src/renderer => ui}/scss/component/_header.scss (100%) rename {src/renderer => ui}/scss/component/_load-screen.scss (100%) rename {src/renderer => ui}/scss/component/_markdown-editor.scss (100%) rename {src/renderer => ui}/scss/component/_menu.scss (100%) rename {src/renderer => ui}/scss/component/_modal.scss (100%) rename {src/renderer => ui}/scss/component/_notice.scss (100%) rename {src/renderer => ui}/scss/component/_pagination.scss (100%) rename {src/renderer => ui}/scss/component/_radio.scss (100%) rename {src/renderer => ui}/scss/component/_scrollbar.scss (100%) rename {src/renderer => ui}/scss/component/_snack-bar.scss (100%) rename {src/renderer => ui}/scss/component/_table.scss (100%) rename {src/renderer => ui}/scss/component/_tabs.scss (100%) rename {src/renderer => ui}/scss/component/_tooltip.scss (100%) rename {src/renderer => ui}/scss/component/_video.scss (100%) rename {src/renderer => ui}/scss/mixin/link.scss (100%) rename {src/renderer => ui}/scss/page/_show.scss (100%) rename {src/renderer => ui}/watch.bat (88%) rename {src/renderer => ui}/watch.sh (74%) rename {src/renderer => ui}/webpack.common.js (96%) rename {src/renderer => ui}/webpack.dev.js (91%) rename {src/renderer => ui}/webpack.prod.js (100%) rename {src/renderer => ui}/yarn.lock (100%) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4085f20a3..5a3a3ab63 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -16,11 +16,11 @@ values = rc production -[bumpversion:file:src/main/package.json] +[bumpversion:file:app/package.json] search = "version": "{current_version}" replace = "version": "{new_version}" -[bumpversion:file:src/renderer/package.json] +[bumpversion:file:ui/package.json] search = "version": "{current_version}" replace = "version": "{new_version}" diff --git a/.gitignore b/.gitignore index 5ef0c8653..200baee60 100644 --- a/.gitignore +++ b/.gitignore @@ -2,16 +2,16 @@ /LBRY-darwin-x64 /dist -/src/renderer/dist/css/* -/src/renderer/dist/js/* -!/src/renderer/dist/js/mediaelement -/src/renderer/node_modules -/src/renderer/.sass-cache +/ui/dist/css/* +/ui/dist/js/* +!/ui/dist/js/mediaelement +/ui/node_modules +/ui/.sass-cache -/src/main/dist -/src/main/locales -/src/main/node_modules +/app/dist +/app/locales +/app/node_modules /build/venv /build/daemon.ver /lbry-app-venv diff --git a/.tx/config b/.tx/config index 206478926..44a0319a8 100644 --- a/.tx/config +++ b/.tx/config @@ -2,7 +2,7 @@ host = https://www.transifex.com [lbry-app.app-strings] -file_filter = src/main/dist/locales/.json -source_file = src/main/dist/locales/en.json +file_filter = app/dist/locales/.json +source_file = app/dist/locales/en.json source_lang = en type = KEYVALUEJSON \ No newline at end of file diff --git a/README.md b/README.md index ead1a4a35..27d426584 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ This will download and install the LBRY app and its dependencies, including [the ### Running -Run `./node_modules/.bin/electron src/main` +Run `./node_modules/.bin/electron app` ### Ongoing Development -1. `cd src/renderer` +1. `cd ui` 2. `./watch.sh` -This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src/renderer` folder. This allows you to make changes and see them immediately by reloading the app. +This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `ui` folder. This allows you to make changes and see them immediately by reloading the app. ### Packaging @@ -67,36 +67,36 @@ python build\set_version.py npm install -g yarn yarn install ``` -3. Change directory to `src\main` and run the following; +3. Change directory to `app` and run the following; ``` yarn install node_modules\.bin\electron-rebuild node_modules\.bin\electron-rebuild -cd ..\.. +cd .. ``` -4. Change directory to `src\renderer` and run the following: +4. Change directory to `ui` and run the following: ``` yarn install npm rebuild node-sass node node_modules\node-sass\bin\node-sass --output dist\css --sourcemap=none scss\ node_modules\.bin\webpack --config webpack.dev.config.js -xcopy /E dist ..\main\dist -cd ..\.. +xcopy /E dist ..\app\dist +cd .. ``` -4. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `src\main\dist\` +4. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `app\dist\` ### Building lbry-app 1. run `node_modules\.bin\build -p never` from the root of the project. ### Running the electron app -1. Run `node_modules\.bin\electron src\main` +1. Run `node_modules\.bin\electron app` ### Ongoing Development -1. `cd src\renderer` +1. `cd ui` 2. `watch.bat` -This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src\renderer` folder. This allows you to make changes and see them immediately by reloading the app. +This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `ui` folder. This allows you to make changes and see them immediately by reloading the app. ## Internationalization -If you want to help translating the lbry-app, you can copy the en.json file in /src/main/locales and modify the values while leaving the keys as their original English strings. An example for this would be: `"Skip": "Überspringen",` Translations should automatically show up in options. +If you want to help translating the lbry-app, you can copy the en.json file in /app/locales and modify the values while leaving the keys as their original English strings. An example for this would be: `"Skip": "Überspringen",` Translations should automatically show up in options. diff --git a/src/main/main.js b/app/main.js similarity index 100% rename from src/main/main.js rename to app/main.js diff --git a/src/main/menu/context-menu.js b/app/menu/context-menu.js similarity index 100% rename from src/main/menu/context-menu.js rename to app/menu/context-menu.js diff --git a/src/main/menu/main-menu.js b/app/menu/main-menu.js similarity index 100% rename from src/main/menu/main-menu.js rename to app/menu/main-menu.js diff --git a/src/main/package.json b/app/package.json similarity index 100% rename from src/main/package.json rename to app/package.json diff --git a/src/main/yarn.lock b/app/yarn.lock similarity index 100% rename from src/main/yarn.lock rename to app/yarn.lock diff --git a/build/build.ps1 b/build/build.ps1 index 72bc2e3c4..17e1373d5 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -9,33 +9,33 @@ yarn install # do app -cd src\main +cd app yarn install # necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) # yes, it needs to be run twice. it fails the first time, not sure why node_modules\.bin\electron-rebuild node_modules\.bin\electron-rebuild -cd ..\.. +cd .. # build ui -cd main\renderer +cd ui yarn install npm rebuild node-sass node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\ node_modules\.bin\webpack --config webpack.prod.js -Copy-Item dist ..\main\ -recurse -cd ..\.. +Copy-Item dist ..\app\ -recurse +cd .. # get daemon and cli executable -$package_settings = (Get-Content src\main\package.json -Raw | ConvertFrom-Json).lbrySettings +$package_settings = (Get-Content app\package.json -Raw | ConvertFrom-Json).lbrySettings $daemon_ver = $package_settings.lbrynetDaemonVersion $daemon_url_template = $package_settings.lbrynetDaemonUrlTemplate $daemon_url = $daemon_url_template.Replace('OSNAME', 'windows').Replace('DAEMONVER', $daemon_ver) Invoke-WebRequest -Uri $daemon_url -OutFile daemon.zip -Expand-Archive daemon.zip -DestinationPath src\main\dist\ -dir src\main\dist\ # verify that daemon binary is there +Expand-Archive daemon.zip -DestinationPath app\dist\ +dir app\dist\ # verify that daemon binary is there rm daemon.zip diff --git a/build/build.sh b/build/build.sh index 04ec944b3..2a6fa1d4e 100755 --- a/build/build.sh +++ b/build/build.sh @@ -41,8 +41,8 @@ fi [ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist" mkdir -p "$ROOT/dist" -[ -d "$ROOT/src/main/dist" ] && rm -rf "$ROOT/src/main/dist" -mkdir -p "$ROOT/src/main/dist" +[ -d "$ROOT/app/dist" ] && rm -rf "$ROOT/app/dist" +mkdir -p "$ROOT/app/dist" yarn install @@ -53,13 +53,13 @@ yarn install ############ echo -e "\033[0;32mCompiling UI\x1b[m" ( - cd "$ROOT/src/renderer" + cd "$ROOT/ui" yarn install npm rebuild node-sass node extractLocals.js node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/webpack --config webpack.prod.js - cp -r dist/* "$ROOT/src/main/dist/" + cp -r dist/* "$ROOT/app/dist/" ) @@ -73,14 +73,14 @@ if $OSX; then else OSNAME="linux" fi -DAEMON_VER=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonVersion)") -DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)") +DAEMON_VER=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonVersion)") +DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)") DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g") DAEMON_VER_PATH="$BUILD_DIR/daemon.ver" echo "$DAEMON_VER_PATH" -if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/src/main/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then +if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/app/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then curl -sL -o "$BUILD_DIR/daemon.zip" "$DAEMON_URL" - unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/src/main/dist/" + unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/app/dist/" rm "$BUILD_DIR/daemon.zip" echo "$DAEMON_VER" > "$DAEMON_VER_PATH" else @@ -95,16 +95,16 @@ fi ################### echo -e '\033[0;32mBuilding Lbry-app\x1b[m' ( - cd "$ROOT/src/main" + cd "$ROOT/app" yarn install # necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) # yes, it needs to be run twice. it fails the first time, not sure why set +e # DEBUG=electron-rebuild node_modules/.bin/electron-rebuild . - node_modules/.bin/electron-rebuild "$ROOT/src/main" + node_modules/.bin/electron-rebuild "$ROOT/app" set -e - node_modules/.bin/electron-rebuild "$ROOT/src/main" + node_modules/.bin/electron-rebuild "$ROOT/app" ) if [ "$FULL_BUILD" == "true" ]; then @@ -133,5 +133,5 @@ if [ "$FULL_BUILD" == "true" ]; then echo -e '\033[0;32mBuild and packaging complete.\x1b[m' else - echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron src/main\x1b[m to launch the app' + echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron app\x1b[m to launch the app' fi diff --git a/build/release.py b/build/release.py index 871b0ed7c..81297ebf3 100644 --- a/build/release.py +++ b/build/release.py @@ -17,7 +17,7 @@ import github import changelog ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'src', 'main', 'package.json') +APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'app', 'package.json') def main(): diff --git a/package.json b/package.json index 3c3bc5a0a..a6085ca0c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "build": { "asar": false, "directories": { - "app": "src/main" + "app": "app" }, "appId": "io.lbry.LBRY", "mac": { diff --git a/src/renderer/.babelrc b/ui/.babelrc similarity index 100% rename from src/renderer/.babelrc rename to ui/.babelrc diff --git a/src/renderer/.eslintrc.js b/ui/.eslintrc.js similarity index 100% rename from src/renderer/.eslintrc.js rename to ui/.eslintrc.js diff --git a/src/renderer/README.md b/ui/README.md similarity index 100% rename from src/renderer/README.md rename to ui/README.md diff --git a/src/renderer/dist/favicon.ico b/ui/dist/favicon.ico similarity index 100% rename from src/renderer/dist/favicon.ico rename to ui/dist/favicon.ico diff --git a/src/renderer/dist/font/FontAwesome.otf b/ui/dist/font/FontAwesome.otf similarity index 100% rename from src/renderer/dist/font/FontAwesome.otf rename to ui/dist/font/FontAwesome.otf diff --git a/src/renderer/dist/font/fontawesome-webfont.eot b/ui/dist/font/fontawesome-webfont.eot similarity index 100% rename from src/renderer/dist/font/fontawesome-webfont.eot rename to ui/dist/font/fontawesome-webfont.eot diff --git a/src/renderer/dist/font/fontawesome-webfont.svg b/ui/dist/font/fontawesome-webfont.svg similarity index 100% rename from src/renderer/dist/font/fontawesome-webfont.svg rename to ui/dist/font/fontawesome-webfont.svg diff --git a/src/renderer/dist/font/fontawesome-webfont.ttf b/ui/dist/font/fontawesome-webfont.ttf similarity index 100% rename from src/renderer/dist/font/fontawesome-webfont.ttf rename to ui/dist/font/fontawesome-webfont.ttf diff --git a/src/renderer/dist/font/fontawesome-webfont.woff b/ui/dist/font/fontawesome-webfont.woff similarity index 100% rename from src/renderer/dist/font/fontawesome-webfont.woff rename to ui/dist/font/fontawesome-webfont.woff diff --git a/src/renderer/dist/font/fontawesome-webfont.woff2 b/ui/dist/font/fontawesome-webfont.woff2 similarity index 100% rename from src/renderer/dist/font/fontawesome-webfont.woff2 rename to ui/dist/font/fontawesome-webfont.woff2 diff --git a/src/renderer/dist/img/Free-speech-flag.svg b/ui/dist/img/Free-speech-flag.svg similarity index 100% rename from src/renderer/dist/img/Free-speech-flag.svg rename to ui/dist/img/Free-speech-flag.svg diff --git a/src/renderer/dist/img/busy.gif b/ui/dist/img/busy.gif similarity index 100% rename from src/renderer/dist/img/busy.gif rename to ui/dist/img/busy.gif diff --git a/src/renderer/dist/img/default-thumb.svg b/ui/dist/img/default-thumb.svg similarity index 100% rename from src/renderer/dist/img/default-thumb.svg rename to ui/dist/img/default-thumb.svg diff --git a/src/renderer/dist/img/fav/32x32.png b/ui/dist/img/fav/32x32.png similarity index 100% rename from src/renderer/dist/img/fav/32x32.png rename to ui/dist/img/fav/32x32.png diff --git a/src/renderer/dist/img/fav/android-chrome-144x144.png b/ui/dist/img/fav/android-chrome-144x144.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-144x144.png rename to ui/dist/img/fav/android-chrome-144x144.png diff --git a/src/renderer/dist/img/fav/android-chrome-192x192.png b/ui/dist/img/fav/android-chrome-192x192.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-192x192.png rename to ui/dist/img/fav/android-chrome-192x192.png diff --git a/src/renderer/dist/img/fav/android-chrome-36x36.png b/ui/dist/img/fav/android-chrome-36x36.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-36x36.png rename to ui/dist/img/fav/android-chrome-36x36.png diff --git a/src/renderer/dist/img/fav/android-chrome-48x48.png b/ui/dist/img/fav/android-chrome-48x48.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-48x48.png rename to ui/dist/img/fav/android-chrome-48x48.png diff --git a/src/renderer/dist/img/fav/android-chrome-72x72.png b/ui/dist/img/fav/android-chrome-72x72.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-72x72.png rename to ui/dist/img/fav/android-chrome-72x72.png diff --git a/src/renderer/dist/img/fav/android-chrome-96x96.png b/ui/dist/img/fav/android-chrome-96x96.png similarity index 100% rename from src/renderer/dist/img/fav/android-chrome-96x96.png rename to ui/dist/img/fav/android-chrome-96x96.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-114x114.png b/ui/dist/img/fav/apple-touch-icon-114x114.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-114x114.png rename to ui/dist/img/fav/apple-touch-icon-114x114.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-120x120.png b/ui/dist/img/fav/apple-touch-icon-120x120.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-120x120.png rename to ui/dist/img/fav/apple-touch-icon-120x120.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-120x120_1.png b/ui/dist/img/fav/apple-touch-icon-120x120_1.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-120x120_1.png rename to ui/dist/img/fav/apple-touch-icon-120x120_1.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-144x144.png b/ui/dist/img/fav/apple-touch-icon-144x144.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-144x144.png rename to ui/dist/img/fav/apple-touch-icon-144x144.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-152x152.png b/ui/dist/img/fav/apple-touch-icon-152x152.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-152x152.png rename to ui/dist/img/fav/apple-touch-icon-152x152.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-180x180.png b/ui/dist/img/fav/apple-touch-icon-180x180.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-180x180.png rename to ui/dist/img/fav/apple-touch-icon-180x180.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-57x57.png b/ui/dist/img/fav/apple-touch-icon-57x57.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-57x57.png rename to ui/dist/img/fav/apple-touch-icon-57x57.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-60x60.png b/ui/dist/img/fav/apple-touch-icon-60x60.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-60x60.png rename to ui/dist/img/fav/apple-touch-icon-60x60.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-72x72.png b/ui/dist/img/fav/apple-touch-icon-72x72.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-72x72.png rename to ui/dist/img/fav/apple-touch-icon-72x72.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-76x76.png b/ui/dist/img/fav/apple-touch-icon-76x76.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-76x76.png rename to ui/dist/img/fav/apple-touch-icon-76x76.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-76x76_1.png b/ui/dist/img/fav/apple-touch-icon-76x76_1.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-76x76_1.png rename to ui/dist/img/fav/apple-touch-icon-76x76_1.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon-precomposed.png b/ui/dist/img/fav/apple-touch-icon-precomposed.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon-precomposed.png rename to ui/dist/img/fav/apple-touch-icon-precomposed.png diff --git a/src/renderer/dist/img/fav/apple-touch-icon.png b/ui/dist/img/fav/apple-touch-icon.png similarity index 100% rename from src/renderer/dist/img/fav/apple-touch-icon.png rename to ui/dist/img/fav/apple-touch-icon.png diff --git a/src/renderer/dist/img/fav/browserconfig.xml b/ui/dist/img/fav/browserconfig.xml similarity index 96% rename from src/renderer/dist/img/fav/browserconfig.xml rename to ui/dist/img/fav/browserconfig.xml index fe44cae80..65380f387 100644 --- a/src/renderer/dist/img/fav/browserconfig.xml +++ b/ui/dist/img/fav/browserconfig.xml @@ -1,12 +1,12 @@ - - - - - - - - - #da532c - - - + + + + + + + + + #da532c + + + diff --git a/src/renderer/dist/img/fav/favicon-16x16.png b/ui/dist/img/fav/favicon-16x16.png similarity index 100% rename from src/renderer/dist/img/fav/favicon-16x16.png rename to ui/dist/img/fav/favicon-16x16.png diff --git a/src/renderer/dist/img/fav/favicon-194x194.png b/ui/dist/img/fav/favicon-194x194.png similarity index 100% rename from src/renderer/dist/img/fav/favicon-194x194.png rename to ui/dist/img/fav/favicon-194x194.png diff --git a/src/renderer/dist/img/fav/favicon-32x32.png b/ui/dist/img/fav/favicon-32x32.png similarity index 100% rename from src/renderer/dist/img/fav/favicon-32x32.png rename to ui/dist/img/fav/favicon-32x32.png diff --git a/src/renderer/dist/img/fav/favicon-96x96.png b/ui/dist/img/fav/favicon-96x96.png similarity index 100% rename from src/renderer/dist/img/fav/favicon-96x96.png rename to ui/dist/img/fav/favicon-96x96.png diff --git a/src/renderer/dist/img/fav/macTemplate@2x.png b/ui/dist/img/fav/macTemplate@2x.png similarity index 100% rename from src/renderer/dist/img/fav/macTemplate@2x.png rename to ui/dist/img/fav/macTemplate@2x.png diff --git a/src/renderer/dist/img/fav/manifest.json b/ui/dist/img/fav/manifest.json similarity index 100% rename from src/renderer/dist/img/fav/manifest.json rename to ui/dist/img/fav/manifest.json diff --git a/src/renderer/dist/img/fav/mstile-144x144.png b/ui/dist/img/fav/mstile-144x144.png similarity index 100% rename from src/renderer/dist/img/fav/mstile-144x144.png rename to ui/dist/img/fav/mstile-144x144.png diff --git a/src/renderer/dist/img/fav/mstile-150x150.png b/ui/dist/img/fav/mstile-150x150.png similarity index 100% rename from src/renderer/dist/img/fav/mstile-150x150.png rename to ui/dist/img/fav/mstile-150x150.png diff --git a/src/renderer/dist/img/fav/mstile-310x150.png b/ui/dist/img/fav/mstile-310x150.png similarity index 100% rename from src/renderer/dist/img/fav/mstile-310x150.png rename to ui/dist/img/fav/mstile-310x150.png diff --git a/src/renderer/dist/img/fav/mstile-310x310.png b/ui/dist/img/fav/mstile-310x310.png similarity index 100% rename from src/renderer/dist/img/fav/mstile-310x310.png rename to ui/dist/img/fav/mstile-310x310.png diff --git a/src/renderer/dist/img/fav/mstile-70x70.png b/ui/dist/img/fav/mstile-70x70.png similarity index 100% rename from src/renderer/dist/img/fav/mstile-70x70.png rename to ui/dist/img/fav/mstile-70x70.png diff --git a/src/renderer/dist/img/lbry-bg.png b/ui/dist/img/lbry-bg.png similarity index 100% rename from src/renderer/dist/img/lbry-bg.png rename to ui/dist/img/lbry-bg.png diff --git a/src/renderer/dist/img/lbry-dark-1600x528.png b/ui/dist/img/lbry-dark-1600x528.png similarity index 100% rename from src/renderer/dist/img/lbry-dark-1600x528.png rename to ui/dist/img/lbry-dark-1600x528.png diff --git a/src/renderer/dist/img/lbry-white-485x160.png b/ui/dist/img/lbry-white-485x160.png similarity index 100% rename from src/renderer/dist/img/lbry-white-485x160.png rename to ui/dist/img/lbry-white-485x160.png diff --git a/src/renderer/dist/img/lbry-white-909x300.png b/ui/dist/img/lbry-white-909x300.png similarity index 100% rename from src/renderer/dist/img/lbry-white-909x300.png rename to ui/dist/img/lbry-white-909x300.png diff --git a/src/renderer/dist/img/warning.png b/ui/dist/img/warning.png similarity index 100% rename from src/renderer/dist/img/warning.png rename to ui/dist/img/warning.png diff --git a/src/renderer/dist/index.html b/ui/dist/index.html similarity index 100% rename from src/renderer/dist/index.html rename to ui/dist/index.html diff --git a/src/renderer/dist/quit.html b/ui/dist/quit.html similarity index 100% rename from src/renderer/dist/quit.html rename to ui/dist/quit.html diff --git a/src/renderer/dist/requirements.txt b/ui/dist/requirements.txt similarity index 100% rename from src/renderer/dist/requirements.txt rename to ui/dist/requirements.txt diff --git a/src/renderer/dist/themes/dark.css b/ui/dist/themes/dark.css similarity index 100% rename from src/renderer/dist/themes/dark.css rename to ui/dist/themes/dark.css diff --git a/src/renderer/dist/themes/light.css b/ui/dist/themes/light.css similarity index 100% rename from src/renderer/dist/themes/light.css rename to ui/dist/themes/light.css diff --git a/src/renderer/dist/upgrade.html b/ui/dist/upgrade.html similarity index 100% rename from src/renderer/dist/upgrade.html rename to ui/dist/upgrade.html diff --git a/src/renderer/dist/warning.html b/ui/dist/warning.html similarity index 100% rename from src/renderer/dist/warning.html rename to ui/dist/warning.html diff --git a/src/renderer/extractLocals.js b/ui/extractLocals.js similarity index 96% rename from src/renderer/extractLocals.js rename to ui/extractLocals.js index ef46d74ad..b36e3e9d4 100644 --- a/src/renderer/extractLocals.js +++ b/ui/extractLocals.js @@ -1,7 +1,7 @@ var extract = require("i18n-extract"); const fs = require("fs"); -var dir = __dirname + "/../main/dist/locales"; +var dir = __dirname + "/../app/dist/locales"; var path = dir + "/en.json"; if (!fs.existsSync(dir)) { diff --git a/src/renderer/js/app.js b/ui/js/app.js similarity index 100% rename from src/renderer/js/app.js rename to ui/js/app.js diff --git a/src/renderer/js/component/app/index.js b/ui/js/component/app/index.js similarity index 100% rename from src/renderer/js/component/app/index.js rename to ui/js/component/app/index.js diff --git a/src/renderer/js/component/app/view.jsx b/ui/js/component/app/view.jsx similarity index 100% rename from src/renderer/js/component/app/view.jsx rename to ui/js/component/app/view.jsx diff --git a/src/renderer/js/component/cardMedia/index.js b/ui/js/component/cardMedia/index.js similarity index 100% rename from src/renderer/js/component/cardMedia/index.js rename to ui/js/component/cardMedia/index.js diff --git a/src/renderer/js/component/cardMedia/view.jsx b/ui/js/component/cardMedia/view.jsx similarity index 100% rename from src/renderer/js/component/cardMedia/view.jsx rename to ui/js/component/cardMedia/view.jsx diff --git a/src/renderer/js/component/cardVerify/index.js b/ui/js/component/cardVerify/index.js similarity index 100% rename from src/renderer/js/component/cardVerify/index.js rename to ui/js/component/cardVerify/index.js diff --git a/src/renderer/js/component/cardVerify/view.jsx b/ui/js/component/cardVerify/view.jsx similarity index 100% rename from src/renderer/js/component/cardVerify/view.jsx rename to ui/js/component/cardVerify/view.jsx diff --git a/src/renderer/js/component/channelTile/index.js b/ui/js/component/channelTile/index.js similarity index 100% rename from src/renderer/js/component/channelTile/index.js rename to ui/js/component/channelTile/index.js diff --git a/src/renderer/js/component/channelTile/view.jsx b/ui/js/component/channelTile/view.jsx similarity index 85% rename from src/renderer/js/component/channelTile/view.jsx rename to ui/js/component/channelTile/view.jsx index e4a4ed8be..512389f0c 100644 --- a/src/renderer/js/component/channelTile/view.jsx +++ b/ui/js/component/channelTile/view.jsx @@ -40,19 +40,16 @@ class ChannelTile extends React.PureComponent {
- {isResolvingUri && ( - - )} - {totalItems > 0 && ( + {isResolvingUri && + } + {totalItems > 0 && This is a channel with {totalItems}{" "} {totalItems === 1 ? " item" : " items"} inside of it. - - )} + } {!isResolvingUri && - !totalItems && ( - This is an empty channel. - )} + !totalItems && + This is an empty channel.}
diff --git a/src/renderer/js/component/common.js b/ui/js/component/common.js similarity index 89% rename from src/renderer/js/component/common.js rename to ui/js/component/common.js index 010bd8f31..00f65e75d 100644 --- a/src/renderer/js/component/common.js +++ b/ui/js/component/common.js @@ -50,9 +50,7 @@ export class BusyMessage extends React.PureComponent { render() { return ( - - {this.props.message} - + {this.props.message} ); } } @@ -94,10 +92,9 @@ export class CreditAmount extends React.PureComponent { if (showFullPrice) { formattedAmount = fullPrice; } else { - formattedAmount = - amount > 0 && amount < minimumRenderableAmount - ? "<" + minimumRenderableAmount - : formatCredits(amount, precision); + formattedAmount = amount > 0 && amount < minimumRenderableAmount + ? "<" + minimumRenderableAmount + : formatCredits(amount, precision); } let amountText; @@ -122,15 +119,17 @@ export class CreditAmount extends React.PureComponent { className={`credit-amount credit-amount--${this.props.look}`} title={fullPrice} > - {amountText} - {this.props.isEstimate ? ( - - * - - ) : null} + + {amountText} + + {this.props.isEstimate + ? + * + + : null} ); } diff --git a/src/renderer/js/component/dateTime/index.js b/ui/js/component/dateTime/index.js similarity index 100% rename from src/renderer/js/component/dateTime/index.js rename to ui/js/component/dateTime/index.js diff --git a/src/renderer/js/component/dateTime/view.jsx b/ui/js/component/dateTime/view.jsx similarity index 100% rename from src/renderer/js/component/dateTime/view.jsx rename to ui/js/component/dateTime/view.jsx diff --git a/src/renderer/js/component/file-selector.js b/ui/js/component/file-selector.js similarity index 92% rename from src/renderer/js/component/file-selector.js rename to ui/js/component/file-selector.js index 2c3189c2f..391ce9acf 100644 --- a/src/renderer/js/component/file-selector.js +++ b/ui/js/component/file-selector.js @@ -26,10 +26,9 @@ class FileSelector extends React.PureComponent { handleButtonClick() { remote.dialog.showOpenDialog( { - properties: - this.props.type == "file" - ? ["openFile"] - : ["openDirectory", "createDirectory"], + properties: this.props.type == "file" + ? ["openFile"] + : ["openDirectory", "createDirectory"], }, paths => { if (!paths) { @@ -63,7 +62,8 @@ class FileSelector extends React.PureComponent { : __("Choose Directory")} - {" "} + + {" "} - {showDelete && ( + {showDelete && openModal(modals.CONFIRM_FILE_REMOVE, { uri })} - /> - )} - {!claimIsMine && ( + />} + {!claimIsMine && - )} + />} - {claimIsMine && ( + {claimIsMine && - )} + />} ); } diff --git a/src/renderer/js/component/fileCard/index.js b/ui/js/component/fileCard/index.js similarity index 100% rename from src/renderer/js/component/fileCard/index.js rename to ui/js/component/fileCard/index.js diff --git a/src/renderer/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx similarity index 100% rename from src/renderer/js/component/fileCard/view.jsx rename to ui/js/component/fileCard/view.jsx diff --git a/src/renderer/js/component/fileDetails/index.js b/ui/js/component/fileDetails/index.js similarity index 100% rename from src/renderer/js/component/fileDetails/index.js rename to ui/js/component/fileDetails/index.js diff --git a/src/renderer/js/component/fileDetails/view.jsx b/ui/js/component/fileDetails/view.jsx similarity index 85% rename from src/renderer/js/component/fileDetails/view.jsx rename to ui/js/component/fileDetails/view.jsx index 55afed97d..257d0593e 100644 --- a/src/renderer/js/component/fileDetails/view.jsx +++ b/ui/js/component/fileDetails/view.jsx @@ -49,18 +49,15 @@ class FileDetails extends React.PureComponent { - - + - - + - - + - {downloadPath && ( + {downloadPath && - - )} + }
{__("Content-Type")}{mediaType}{__("Content-Type")}{mediaType}
{__("Language")}{language}{__("Language")}{language}
{__("License")}{license}{__("License")}{license}
{__("Downloaded to")} @@ -68,8 +65,7 @@ class FileDetails extends React.PureComponent { {downloadPath}
diff --git a/src/renderer/js/component/fileDownloadLink/index.js b/ui/js/component/fileDownloadLink/index.js similarity index 100% rename from src/renderer/js/component/fileDownloadLink/index.js rename to ui/js/component/fileDownloadLink/index.js diff --git a/src/renderer/js/component/fileDownloadLink/view.jsx b/ui/js/component/fileDownloadLink/view.jsx similarity index 92% rename from src/renderer/js/component/fileDownloadLink/view.jsx rename to ui/js/component/fileDownloadLink/view.jsx index 32d0fe3c4..9980e8a07 100644 --- a/src/renderer/js/component/fileDownloadLink/view.jsx +++ b/ui/js/component/fileDownloadLink/view.jsx @@ -45,17 +45,18 @@ class FileDownloadLink extends React.PureComponent { } = this.props; if (loading || downloading) { - const progress = - fileInfo && fileInfo.written_bytes - ? fileInfo.written_bytes / fileInfo.total_bytes * 100 - : 0, + const progress = fileInfo && fileInfo.written_bytes + ? fileInfo.written_bytes / fileInfo.total_bytes * 100 + : 0, label = fileInfo ? progress.toFixed(0) + __("% complete") : __("Connecting..."), labelWithIcon = ( - {label} + + {label} + ); diff --git a/src/renderer/js/component/fileList/index.js b/ui/js/component/fileList/index.js similarity index 100% rename from src/renderer/js/component/fileList/index.js rename to ui/js/component/fileList/index.js diff --git a/src/renderer/js/component/fileList/view.jsx b/ui/js/component/fileList/view.jsx similarity index 99% rename from src/renderer/js/component/fileList/view.jsx rename to ui/js/component/fileList/view.jsx index 10dd2d2d7..9cb755ec9 100644 --- a/src/renderer/js/component/fileList/view.jsx +++ b/ui/js/component/fileList/view.jsx @@ -98,7 +98,7 @@ class FileList extends React.PureComponent {
{fetching && } - {__("Sort by")}{" "} + {__("Sort by")} {" "} diff --git a/src/renderer/js/component/fileListSearch/index.js b/ui/js/component/fileListSearch/index.js similarity index 100% rename from src/renderer/js/component/fileListSearch/index.js rename to ui/js/component/fileListSearch/index.js diff --git a/src/renderer/js/component/fileListSearch/view.jsx b/ui/js/component/fileListSearch/view.jsx similarity index 74% rename from src/renderer/js/component/fileListSearch/view.jsx rename to ui/js/component/fileListSearch/view.jsx index 00a759d5e..224c48d6a 100644 --- a/src/renderer/js/component/fileListSearch/view.jsx +++ b/ui/js/component/fileListSearch/view.jsx @@ -11,7 +11,7 @@ const SearchNoResults = props => { return (
- {(__("No one has checked anything in for %s yet."), query)}{" "} + {(__("No one has checked anything in for %s yet."), query)} {" "}
@@ -39,21 +39,19 @@ class FileListSearch extends React.PureComponent { return (
{isSearching && - !uris && ( - - )} + !uris && + } {isSearching && - uris && } + uris && + } {uris && uris.length ? uris.map( uri => - lbryuri.parse(uri).name[0] === "@" ? ( - - ) : ( - - ) + lbryuri.parse(uri).name[0] === "@" + ? + : ) : !isSearching && }
diff --git a/src/renderer/js/component/filePrice/index.js b/ui/js/component/filePrice/index.js similarity index 100% rename from src/renderer/js/component/filePrice/index.js rename to ui/js/component/filePrice/index.js diff --git a/src/renderer/js/component/filePrice/view.jsx b/ui/js/component/filePrice/view.jsx similarity index 100% rename from src/renderer/js/component/filePrice/view.jsx rename to ui/js/component/filePrice/view.jsx diff --git a/src/renderer/js/component/fileTile/index.js b/ui/js/component/fileTile/index.js similarity index 100% rename from src/renderer/js/component/fileTile/index.js rename to ui/js/component/fileTile/index.js diff --git a/src/renderer/js/component/fileTile/view.jsx b/ui/js/component/fileTile/view.jsx similarity index 90% rename from src/renderer/js/component/fileTile/view.jsx rename to ui/js/component/fileTile/view.jsx index fbf3c9110..b712ae048 100644 --- a/src/renderer/js/component/fileTile/view.jsx +++ b/ui/js/component/fileTile/view.jsx @@ -72,12 +72,12 @@ class FileTile extends React.PureComponent { const uri = lbryuri.normalize(this.props.uri); const isClaimed = !!claim; const isClaimable = lbryuri.isClaimable(uri); - const title = - isClaimed && metadata && metadata.title - ? metadata.title - : lbryuri.parse(uri).contentName; - const thumbnail = - metadata && metadata.thumbnail ? metadata.thumbnail : null; + const title = isClaimed && metadata && metadata.title + ? metadata.title + : lbryuri.parse(uri).contentName; + const thumbnail = metadata && metadata.thumbnail + ? metadata.thumbnail + : null; const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw; const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); @@ -98,10 +98,9 @@ class FileTile extends React.PureComponent { onClick = () => navigate("/publish", {}); description = ( - {__("This location is unused.")}{" "} - {isClaimable && ( - {__("Put something here!")} - )} + {__("This location is unused.")} {" "} + {isClaimable && + {__("Put something here!")}} ); } else if (showEmpty === FileTile.SHOW_EMPTY_PENDING) { @@ -124,21 +123,22 @@ class FileTile extends React.PureComponent {
- {showPrice && }{" "} - {isRewardContent && }{" "} + {showPrice && } + {" "} + {isRewardContent && } + {" "} {showLocal && fileInfo && }

{title || name}

- {description && ( + {description &&
{description} -
- )} +
} diff --git a/src/renderer/js/component/form.js b/ui/js/component/form.js similarity index 77% rename from src/renderer/js/component/form.js rename to ui/js/component/form.js index 03bf1185e..4db52e23d 100644 --- a/src/renderer/js/component/form.js +++ b/ui/js/component/form.js @@ -67,12 +67,11 @@ export class FormRow extends React.PureComponent { getStateFromProps(props) { return { isError: !!props.errorMessage, - errorMessage: - typeof props.errorMessage === "string" - ? props.errorMessage - : props.errorMessage instanceof Error - ? props.errorMessage.toString() - : "", + errorMessage: typeof props.errorMessage === "string" + ? props.errorMessage + : props.errorMessage instanceof Error + ? props.errorMessage.toString() + : "", }; } @@ -136,26 +135,24 @@ export class FormRow extends React.PureComponent {
- {this.props.label && !renderLabelInFormField ? ( -
- -
- ) : ( - "" - )} + +
+ : ""} { this._field = ref ? ref.getWrappedInstance() : null; @@ -165,16 +162,12 @@ export class FormRow extends React.PureComponent { onBlur={this.onBlur.bind(this)} {...fieldProps} /> - {!this.state.isError && this.props.helper ? ( -
{this.props.helper}
- ) : ( - "" - )} - {this.state.isError ? ( -
{this.state.errorMessage}
- ) : ( - "" - )} + {!this.state.isError && this.props.helper + ?
{this.props.helper}
+ : ""} + {this.state.isError + ?
{this.state.errorMessage}
+ : ""} ); } diff --git a/src/renderer/js/component/formField/index.js b/ui/js/component/formField/index.js similarity index 100% rename from src/renderer/js/component/formField/index.js rename to ui/js/component/formField/index.js diff --git a/src/renderer/js/component/formField/view.jsx b/ui/js/component/formField/view.jsx similarity index 84% rename from src/renderer/js/component/formField/view.jsx rename to ui/js/component/formField/view.jsx index e93559eb0..34b5d5665 100644 --- a/src/renderer/js/component/formField/view.jsx +++ b/ui/js/component/formField/view.jsx @@ -132,8 +132,9 @@ class FormField extends React.PureComponent { render() { // Pass all unhandled props to the field element const otherProps = Object.assign({}, this.props), - isError = - this.state.isError !== null ? this.state.isError : this.props.hasError, + isError = this.state.isError !== null + ? this.state.isError + : this.props.hasError, elementId = this.props.elementId ? this.props.elementId : formFieldId(), renderElementInsideLabel = this.props.label && formFieldNestedLabelTypes.includes(this.props.type); @@ -173,13 +174,11 @@ class FormField extends React.PureComponent { return (
- {this.props.prefix ? ( - {this.props.prefix} - ) : ( - "" - )} + {this.props.prefix + ? {this.props.prefix} + : ""} {element} - {renderElementInsideLabel && ( + {renderElementInsideLabel && - )} - {formFieldFileSelectorTypes.includes(this.props.type) ? ( - - ) : null} - {this.props.postfix ? ( - {this.props.postfix} - ) : ( - "" - )} - {isError && this.state.errorMessage ? ( -
{this.state.errorMessage}
- ) : ( - "" - )} + } + {formFieldFileSelectorTypes.includes(this.props.type) + ? + : null} + {this.props.postfix + ? {this.props.postfix} + : ""} + {isError && this.state.errorMessage + ?
{this.state.errorMessage}
+ : ""}
); } diff --git a/src/renderer/js/component/formFieldPrice/index.js b/ui/js/component/formFieldPrice/index.js similarity index 100% rename from src/renderer/js/component/formFieldPrice/index.js rename to ui/js/component/formFieldPrice/index.js diff --git a/src/renderer/js/component/formFieldPrice/view.jsx b/ui/js/component/formFieldPrice/view.jsx similarity index 87% rename from src/renderer/js/component/formFieldPrice/view.jsx rename to ui/js/component/formFieldPrice/view.jsx index 6d9925960..81c97c8e8 100644 --- a/src/renderer/js/component/formFieldPrice/view.jsx +++ b/ui/js/component/formFieldPrice/view.jsx @@ -5,14 +5,12 @@ class FormFieldPrice extends React.PureComponent { constructor(props) { super(props); this.state = { - amount: - props.defaultValue && props.defaultValue.amount - ? props.defaultValue.amount - : "", - currency: - props.defaultValue && props.defaultValue.currency - ? props.defaultValue.currency - : "LBC", + amount: props.defaultValue && props.defaultValue.amount + ? props.defaultValue.amount + : "", + currency: props.defaultValue && props.defaultValue.currency + ? props.defaultValue.currency + : "LBC", }; } diff --git a/src/renderer/js/component/header/index.js b/ui/js/component/header/index.js similarity index 100% rename from src/renderer/js/component/header/index.js rename to ui/js/component/header/index.js diff --git a/src/renderer/js/component/header/view.jsx b/ui/js/component/header/view.jsx similarity index 100% rename from src/renderer/js/component/header/view.jsx rename to ui/js/component/header/view.jsx diff --git a/src/renderer/js/component/icon/index.js b/ui/js/component/icon/index.js similarity index 100% rename from src/renderer/js/component/icon/index.js rename to ui/js/component/icon/index.js diff --git a/src/renderer/js/component/icon/view.jsx b/ui/js/component/icon/view.jsx similarity index 100% rename from src/renderer/js/component/icon/view.jsx rename to ui/js/component/icon/view.jsx diff --git a/src/renderer/js/component/inviteList/index.js b/ui/js/component/inviteList/index.js similarity index 100% rename from src/renderer/js/component/inviteList/index.js rename to ui/js/component/inviteList/index.js diff --git a/src/renderer/js/component/inviteList/view.jsx b/ui/js/component/inviteList/view.jsx similarity index 57% rename from src/renderer/js/component/inviteList/view.jsx rename to ui/js/component/inviteList/view.jsx index b02de3278..8e6e0c938 100644 --- a/src/renderer/js/component/inviteList/view.jsx +++ b/ui/js/component/inviteList/view.jsx @@ -17,16 +17,21 @@ class InviteList extends React.PureComponent {

{__("Invite History")}

- {invitees.length === 0 && ( - {__("You haven't invited anyone.")} - )} - {invitees.length > 0 && ( + {invitees.length === 0 && + {__("You haven't invited anyone.")} } + {invitees.length > 0 && - - - + + + @@ -35,30 +40,27 @@ class InviteList extends React.PureComponent { ); })} -
{__("Invitee Email")}{__("Invite Status")}{__("Reward")} + {__("Invitee Email")} + + {__("Invite Status")} + + {__("Reward")} +
{invitee.email} - {invitee.invite_accepted ? ( - - ) : ( - {__("unused")} - )} + {invitee.invite_accepted + ? + : {__("unused")}} - {invitee.invite_reward_claimed ? ( - - ) : invitee.invite_reward_claimable ? ( - - ) : ( - {__("unclaimable")} - )} + {invitee.invite_reward_claimed + ? + : invitee.invite_reward_claimable + ? + : + {__("unclaimable")} + }
- )} + }
diff --git a/src/renderer/js/component/inviteNew/index.js b/ui/js/component/inviteNew/index.js similarity index 100% rename from src/renderer/js/component/inviteNew/index.js rename to ui/js/component/inviteNew/index.js diff --git a/src/renderer/js/component/inviteNew/view.jsx b/ui/js/component/inviteNew/view.jsx similarity index 96% rename from src/renderer/js/component/inviteNew/view.jsx rename to ui/js/component/inviteNew/view.jsx index 7eccf1cec..af15a5fd2 100644 --- a/src/renderer/js/component/inviteNew/view.jsx +++ b/ui/js/component/inviteNew/view.jsx @@ -61,7 +61,9 @@ class InviteNew extends React.PureComponent {
-

{__("Invite a Friend")}

+

+ {__("Invite a Friend")} +

{/*
diff --git a/src/renderer/js/component/link/index.js b/ui/js/component/link/index.js similarity index 100% rename from src/renderer/js/component/link/index.js rename to ui/js/component/link/index.js diff --git a/src/renderer/js/component/link/view.jsx b/ui/js/component/link/view.jsx similarity index 87% rename from src/renderer/js/component/link/view.jsx rename to ui/js/component/link/view.jsx index 9b949bf75..98193cd40 100644 --- a/src/renderer/js/component/link/view.jsx +++ b/ui/js/component/link/view.jsx @@ -22,12 +22,11 @@ const Link = props => { (button ? " button-block button-" + button + " button-set-item" : "") + (disabled ? " disabled" : ""); - const onClick = - !props.onClick && navigate - ? () => { - doNavigate(navigate, navigateParams || {}); - } - : props.onClick; + const onClick = !props.onClick && navigate + ? () => { + doNavigate(navigate, navigateParams || {}); + } + : props.onClick; let content; if (children) { diff --git a/src/renderer/js/component/linkTransaction/index.js b/ui/js/component/linkTransaction/index.js similarity index 100% rename from src/renderer/js/component/linkTransaction/index.js rename to ui/js/component/linkTransaction/index.js diff --git a/src/renderer/js/component/linkTransaction/view.jsx b/ui/js/component/linkTransaction/view.jsx similarity index 100% rename from src/renderer/js/component/linkTransaction/view.jsx rename to ui/js/component/linkTransaction/view.jsx diff --git a/src/renderer/js/component/load_screen.js b/ui/js/component/load_screen.js similarity index 80% rename from src/renderer/js/component/load_screen.js rename to ui/js/component/load_screen.js index 8304b2a5f..4ca861fd4 100644 --- a/src/renderer/js/component/load_screen.js +++ b/ui/js/component/load_screen.js @@ -31,14 +31,11 @@ class LoadScreen extends React.PureComponent { LBRY

- {!this.props.isWarning ? ( - - ) : ( - - - {" " + this.props.message} - - )} + {!this.props.isWarning + ? + : + {" " + this.props.message} + }

- {this.state.menuOpen ? ( -
(this._menuDiv = div)} - className="menu" - onClick={event => { - this.handleMenuClick(event); - }} - > - {this.props.children} -
- ) : null} + {this.state.menuOpen + ?
(this._menuDiv = div)} + className="menu" + onClick={event => { + this.handleMenuClick(event); + }} + > + {this.props.children} +
+ : null}
); } diff --git a/src/renderer/js/component/nsfwOverlay/index.js b/ui/js/component/nsfwOverlay/index.js similarity index 100% rename from src/renderer/js/component/nsfwOverlay/index.js rename to ui/js/component/nsfwOverlay/index.js diff --git a/src/renderer/js/component/nsfwOverlay/view.jsx b/ui/js/component/nsfwOverlay/view.jsx similarity index 96% rename from src/renderer/js/component/nsfwOverlay/view.jsx rename to ui/js/component/nsfwOverlay/view.jsx index fc7fc19dd..89c3705c7 100644 --- a/src/renderer/js/component/nsfwOverlay/view.jsx +++ b/ui/js/component/nsfwOverlay/view.jsx @@ -8,6 +8,7 @@ const NsfwOverlay = props => { {__( "This content is Not Safe For Work. To view adult content, please change your" )}{" "} + {" "}{" "} props.navigateSettings()} diff --git a/src/renderer/js/component/publishForm/index.js b/ui/js/component/publishForm/index.js similarity index 100% rename from src/renderer/js/component/publishForm/index.js rename to ui/js/component/publishForm/index.js diff --git a/src/renderer/js/component/publishForm/internal/channelSection.jsx b/ui/js/component/publishForm/internal/channelSection.jsx similarity index 92% rename from src/renderer/js/component/publishForm/internal/channelSection.jsx rename to ui/js/component/publishForm/internal/channelSection.jsx index 203e90e74..d61ae3762 100644 --- a/src/renderer/js/component/publishForm/internal/channelSection.jsx +++ b/ui/js/component/publishForm/internal/channelSection.jsx @@ -100,11 +100,9 @@ class ChannelSection extends React.PureComponent { - {channels.map(({ name }) => ( - - ))} + {channels.map(({ name }) => + + )} @@ -118,18 +116,17 @@ class ChannelSection extends React.PureComponent {
{__( "This is a username or handle that your content can be found under." - )}{" "} + )} + {" "} {__("Ex. @Marvel, @TheBeatles, @BooksByJoe")}
- {fetchingChannels ? ( - - ) : ( - channelSelector - )} + {fetchingChannels + ? + : channelSelector}
- {this.state.addingChannel && ( + {this.state.addingChannel &&
-
- )} +
}
); } diff --git a/src/renderer/js/component/publishForm/view.jsx b/ui/js/component/publishForm/view.jsx similarity index 100% rename from src/renderer/js/component/publishForm/view.jsx rename to ui/js/component/publishForm/view.jsx diff --git a/src/renderer/js/component/rewardLink/index.js b/ui/js/component/rewardLink/index.js similarity index 100% rename from src/renderer/js/component/rewardLink/index.js rename to ui/js/component/rewardLink/index.js diff --git a/src/renderer/js/component/rewardLink/view.jsx b/ui/js/component/rewardLink/view.jsx similarity index 66% rename from src/renderer/js/component/rewardLink/view.jsx rename to ui/js/component/rewardLink/view.jsx index 05271feb8..9eeee17e2 100644 --- a/src/renderer/js/component/rewardLink/view.jsx +++ b/ui/js/component/rewardLink/view.jsx @@ -25,20 +25,18 @@ const RewardLink = props => { claimReward(reward); }} /> - {errorMessage ? ( - { - clearError(reward); - }} - > - {errorMessage} - - ) : ( - "" - )} + {errorMessage + ? { + clearError(reward); + }} + > + {errorMessage} + + : ""} ); }; diff --git a/src/renderer/js/component/rewardListClaimed/index.js b/ui/js/component/rewardListClaimed/index.js similarity index 100% rename from src/renderer/js/component/rewardListClaimed/index.js rename to ui/js/component/rewardListClaimed/index.js diff --git a/src/renderer/js/component/rewardListClaimed/view.jsx b/ui/js/component/rewardListClaimed/view.jsx similarity index 83% rename from src/renderer/js/component/rewardListClaimed/view.jsx rename to ui/js/component/rewardListClaimed/view.jsx index ea1d7a208..f568348cd 100644 --- a/src/renderer/js/component/rewardListClaimed/view.jsx +++ b/ui/js/component/rewardListClaimed/view.jsx @@ -10,9 +10,7 @@ const RewardListClaimed = props => { return (
-
-

Claimed Rewards

-
+

Claimed Rewards

@@ -29,9 +27,7 @@ const RewardListClaimed = props => { - + diff --git a/src/renderer/js/component/rewardSummary/index.js b/ui/js/component/rewardSummary/index.js similarity index 100% rename from src/renderer/js/component/rewardSummary/index.js rename to ui/js/component/rewardSummary/index.js diff --git a/src/renderer/js/component/rewardSummary/view.jsx b/ui/js/component/rewardSummary/view.jsx similarity index 91% rename from src/renderer/js/component/rewardSummary/view.jsx rename to ui/js/component/rewardSummary/view.jsx index 3c97c50bb..d5f452477 100644 --- a/src/renderer/js/component/rewardSummary/view.jsx +++ b/ui/js/component/rewardSummary/view.jsx @@ -11,13 +11,12 @@ const RewardSummary = props => {

{__("Rewards")}

- {unclaimedRewardAmount > 0 && ( + {unclaimedRewardAmount > 0 &&

You have{" "} in unclaimed rewards. -

- )} +

}
diff --git a/src/renderer/js/component/rewardTile/index.js b/ui/js/component/rewardTile/index.js similarity index 100% rename from src/renderer/js/component/rewardTile/index.js rename to ui/js/component/rewardTile/index.js diff --git a/src/renderer/js/component/rewardTile/view.jsx b/ui/js/component/rewardTile/view.jsx similarity index 66% rename from src/renderer/js/component/rewardTile/view.jsx rename to ui/js/component/rewardTile/view.jsx index bc6af7313..df543561b 100644 --- a/src/renderer/js/component/rewardTile/view.jsx +++ b/ui/js/component/rewardTile/view.jsx @@ -18,17 +18,16 @@ const RewardTile = props => {
{reward.reward_description}
- {reward.reward_type == rewards.TYPE_REFERRAL && ( - - )} + {reward.reward_type == rewards.TYPE_REFERRAL && + } {reward.reward_type !== rewards.TYPE_REFERRAL && - (claimed ? ( - - {__("Reward claimed.")} - - ) : ( - - ))} + (claimed + ? {__("Reward claimed.")} + : )}
diff --git a/src/renderer/js/component/router/index.js b/ui/js/component/router/index.js similarity index 100% rename from src/renderer/js/component/router/index.js rename to ui/js/component/router/index.js diff --git a/src/renderer/js/component/router/view.jsx b/ui/js/component/router/view.jsx similarity index 100% rename from src/renderer/js/component/router/view.jsx rename to ui/js/component/router/view.jsx diff --git a/src/renderer/js/component/snackBar/index.js b/ui/js/component/snackBar/index.js similarity index 100% rename from src/renderer/js/component/snackBar/index.js rename to ui/js/component/snackBar/index.js diff --git a/src/renderer/js/component/snackBar/view.jsx b/ui/js/component/snackBar/view.jsx similarity index 81% rename from src/renderer/js/component/snackBar/view.jsx rename to ui/js/component/snackBar/view.jsx index a04aa3145..f2ee2c49d 100644 --- a/src/renderer/js/component/snackBar/view.jsx +++ b/ui/js/component/snackBar/view.jsx @@ -31,13 +31,12 @@ class SnackBar extends React.PureComponent {
{message} {linkText && - linkTarget && ( - - )} + linkTarget && + }
); } diff --git a/src/renderer/js/component/splash/index.js b/ui/js/component/splash/index.js similarity index 100% rename from src/renderer/js/component/splash/index.js rename to ui/js/component/splash/index.js diff --git a/src/renderer/js/component/splash/view.jsx b/ui/js/component/splash/view.jsx similarity index 92% rename from src/renderer/js/component/splash/view.jsx rename to ui/js/component/splash/view.jsx index 6d4ed62a4..d785911f5 100644 --- a/src/renderer/js/component/splash/view.jsx +++ b/ui/js/component/splash/view.jsx @@ -57,10 +57,9 @@ export class SplashScreen extends React.PureComponent { status.blockchain_status && status.blockchain_status.blocks_behind > 0 ) { - const format = - status.blockchain_status.blocks_behind == 1 - ? "%s block behind" - : "%s blocks behind"; + const format = status.blockchain_status.blocks_behind == 1 + ? "%s block behind" + : "%s blocks behind"; this.setState({ message: __("Blockchain Sync"), details: __(format, status.blockchain_status.blocks_behind), @@ -111,10 +110,12 @@ export class SplashScreen extends React.PureComponent { daemon doesn't let you quit during startup, so the "Quit" buttons in the modals won't work. */} {modal == "incompatibleDaemon" && - this.state.isRunning && } + this.state.isRunning && + } {modal == modals.UPGRADE && this.state.isRunning && } {modal == modals.DOWNLOADING && - this.state.isRunning && } + this.state.isRunning && + } ); } diff --git a/src/renderer/js/component/subHeader/index.js b/ui/js/component/subHeader/index.js similarity index 100% rename from src/renderer/js/component/subHeader/index.js rename to ui/js/component/subHeader/index.js diff --git a/src/renderer/js/component/subHeader/view.jsx b/ui/js/component/subHeader/view.jsx similarity index 100% rename from src/renderer/js/component/subHeader/view.jsx rename to ui/js/component/subHeader/view.jsx diff --git a/src/renderer/js/component/theme/index.js b/ui/js/component/theme/index.js similarity index 100% rename from src/renderer/js/component/theme/index.js rename to ui/js/component/theme/index.js diff --git a/src/renderer/js/component/theme/view.jsx b/ui/js/component/theme/view.jsx similarity index 100% rename from src/renderer/js/component/theme/view.jsx rename to ui/js/component/theme/view.jsx diff --git a/src/renderer/js/component/tooltip.js b/ui/js/component/tooltip.js similarity index 100% rename from src/renderer/js/component/tooltip.js rename to ui/js/component/tooltip.js diff --git a/src/renderer/js/component/transactionList/index.js b/ui/js/component/transactionList/index.js similarity index 100% rename from src/renderer/js/component/transactionList/index.js rename to ui/js/component/transactionList/index.js diff --git a/src/renderer/js/component/transactionList/internal/TransactionListItem.jsx b/ui/js/component/transactionList/internal/TransactionListItem.jsx similarity index 65% rename from src/renderer/js/component/transactionList/internal/TransactionListItem.jsx rename to ui/js/component/transactionList/internal/TransactionListItem.jsx index 847e3759c..35cd33247 100644 --- a/src/renderer/js/component/transactionList/internal/TransactionListItem.jsx +++ b/ui/js/component/transactionList/internal/TransactionListItem.jsx @@ -59,20 +59,20 @@ class TransactionListItem extends React.PureComponent { return (
{reward.reward_title} {reward.reward_amount} - - {reward.created_at.replace("Z", " ").replace("T", " ")}
- {date ? ( -
- -
- + {date + ?
+ +
+ +
-
- ) : ( - {__("Pending")} - )} + : + {__("Pending")} + }

- {fee != 0 && ( - - )} + {fee != 0 && + }
- {this.capitalize(type)} {isRevokeable && this.getLink(type)} + {this.capitalize(type)}{" "} + {isRevokeable && this.getLink(type)} + - {reward && ( + {reward && {__("Reward: %s", reward.reward_title)} - - )} + } {name && - claimId && ( - - {name} - - )} + claimId && + + {name} + } diff --git a/src/renderer/js/component/transactionList/view.jsx b/ui/js/component/transactionList/view.jsx similarity index 88% rename from src/renderer/js/component/transactionList/view.jsx rename to ui/js/component/transactionList/view.jsx index dca14dd93..f736320bf 100644 --- a/src/renderer/js/component/transactionList/view.jsx +++ b/ui/js/component/transactionList/view.jsx @@ -45,9 +45,9 @@ class TransactionList extends React.PureComponent { return (
- {(transactionList.length || this.state.filter) && ( + {(transactionList.length || this.state.filter) && - {__("Filter")}{" "} + {__("Filter")} {" "} {__("Tips")} - {" "} + + {" "} - - )} - {!transactionList.length && ( + } + {!transactionList.length &&
{emptyMessage || __("No transactions to list.")} -
- )} - {Boolean(transactionList.length) && ( +
} + {Boolean(transactionList.length) && @@ -84,7 +83,7 @@ class TransactionList extends React.PureComponent { - {transactionList.map(t => ( + {transactionList.map(t => - ))} + )} -
- )} +
}
); } diff --git a/src/renderer/js/component/transactionListRecent/index.js b/ui/js/component/transactionListRecent/index.js similarity index 100% rename from src/renderer/js/component/transactionListRecent/index.js rename to ui/js/component/transactionListRecent/index.js diff --git a/src/renderer/js/component/transactionListRecent/view.jsx b/ui/js/component/transactionListRecent/view.jsx similarity index 87% rename from src/renderer/js/component/transactionListRecent/view.jsx rename to ui/js/component/transactionListRecent/view.jsx index 7c5b00c4b..45d3700bb 100644 --- a/src/renderer/js/component/transactionListRecent/view.jsx +++ b/ui/js/component/transactionListRecent/view.jsx @@ -18,17 +18,15 @@ class TransactionListRecent extends React.PureComponent {

{__("Recent Transactions")}

- {fetchingTransactions && ( - - )} - {!fetchingTransactions && ( + {fetchingTransactions && + } + {!fetchingTransactions && - )} + />}
- {hasTransactions && ( + {hasTransactions &&
-
- )} + }
); } diff --git a/src/renderer/js/component/truncatedMarkdown/index.js b/ui/js/component/truncatedMarkdown/index.js similarity index 100% rename from src/renderer/js/component/truncatedMarkdown/index.js rename to ui/js/component/truncatedMarkdown/index.js diff --git a/src/renderer/js/component/truncatedMarkdown/view.jsx b/ui/js/component/truncatedMarkdown/view.jsx similarity index 83% rename from src/renderer/js/component/truncatedMarkdown/view.jsx rename to ui/js/component/truncatedMarkdown/view.jsx index 9146855f1..59e42d6af 100644 --- a/src/renderer/js/component/truncatedMarkdown/view.jsx +++ b/ui/js/component/truncatedMarkdown/view.jsx @@ -22,10 +22,9 @@ class TruncatedMarkdown extends React.PureComponent { } render() { - let content = - this.props.children && typeof this.props.children === "string" - ? this.transformMarkdown(this.props.children) - : this.props.children; + let content = this.props.children && typeof this.props.children === "string" + ? this.transformMarkdown(this.props.children) + : this.props.children; return (
- {errorMessage && ( -

{errorMessage}

- )} + {errorMessage && +

{errorMessage}

}
This will not automatically refresh after approval. Once you have - synced your account, just navigate away or click{" "} - . + synced your account, just navigate away or click + {" "} .
@@ -129,11 +129,13 @@ class UserVerify extends React.PureComponent {
{__("Or, Skip It Entirely")}
+

{__( "You can continue without this step, but you will not be eligible to earn rewards." )}

+
( +const LoadingScreen = ({ status, spinner = true }) =>
{spinner &&
} -
{status}
+
+ {status} +
-
-); +
; export default LoadingScreen; diff --git a/src/renderer/js/component/video/internal/play-button.jsx b/ui/js/component/video/internal/play-button.jsx similarity index 91% rename from src/renderer/js/component/video/internal/play-button.jsx rename to ui/js/component/video/internal/play-button.jsx index ca49cb331..73905f298 100644 --- a/src/renderer/js/component/video/internal/play-button.jsx +++ b/ui/js/component/video/internal/play-button.jsx @@ -37,10 +37,9 @@ class VideoPlayButton extends React.PureComponent { */ const disabled = isLoading || fileInfo === undefined; - const icon = - ["audio", "video"].indexOf(mediaType) !== -1 - ? "icon-play" - : "icon-folder-o"; + const icon = ["audio", "video"].indexOf(mediaType) !== -1 + ? "icon-play" + : "icon-folder-o"; return ( {["audio", "application"].indexOf(mediaType) !== -1 && (!this.playableType() || hasMetadata) && - !unplayable && } + !unplayable && + } {this.playableType() && !hasMetadata && - !unplayable && } - {unplayable && ( - - )} + !unplayable && + } + {unplayable && + }
); diff --git a/src/renderer/js/component/video/view.jsx b/ui/js/component/video/view.jsx similarity index 84% rename from src/renderer/js/component/video/view.jsx rename to ui/js/component/video/view.jsx index c42994a17..f65a63204 100644 --- a/src/renderer/js/component/video/view.jsx +++ b/ui/js/component/video/view.jsx @@ -98,28 +98,25 @@ class Video extends React.PureComponent { onMouseLeave={this.handleMouseOut.bind(this)} > {isPlaying && - (!isReadyToPlay ? ( - - ) : ( - - ))} - {!isPlaying && ( + (!isReadyToPlay + ? + : )} + {!isPlaying &&
-
- )} +
} {this.state.showNsfwHelp && } ); diff --git a/src/renderer/js/component/walletAddress/index.js b/ui/js/component/walletAddress/index.js similarity index 100% rename from src/renderer/js/component/walletAddress/index.js rename to ui/js/component/walletAddress/index.js diff --git a/src/renderer/js/component/walletAddress/view.jsx b/ui/js/component/walletAddress/view.jsx similarity index 100% rename from src/renderer/js/component/walletAddress/view.jsx rename to ui/js/component/walletAddress/view.jsx diff --git a/src/renderer/js/component/walletBalance/index.js b/ui/js/component/walletBalance/index.js similarity index 100% rename from src/renderer/js/component/walletBalance/index.js rename to ui/js/component/walletBalance/index.js diff --git a/src/renderer/js/component/walletBalance/view.jsx b/ui/js/component/walletBalance/view.jsx similarity index 87% rename from src/renderer/js/component/walletBalance/view.jsx rename to ui/js/component/walletBalance/view.jsx index 72ab590f5..90d666895 100644 --- a/src/renderer/js/component/walletBalance/view.jsx +++ b/ui/js/component/walletBalance/view.jsx @@ -18,9 +18,8 @@ const WalletBalance = props => {

{__("Balance")}

- {(balance || balance === 0) && ( - - )} + {(balance || balance === 0) && + }
-

- {__("Support")} -

+

{__("Support")}

-
{this.props.children}
- {this.props.type == "custom" ? null : ( // custom modals define their own buttons -
- - {this.props.type == "confirm" ? ( +
+ {this.props.children} +
+ {this.props.type == "custom" // custom modals define their own buttons + ? null + :
- ) : null} -
- )} + {this.props.type == "confirm" + ? + : null} +
} ); } diff --git a/src/renderer/js/modal/modalAffirmPurchase/index.js b/ui/js/modal/modalAffirmPurchase/index.js similarity index 100% rename from src/renderer/js/modal/modalAffirmPurchase/index.js rename to ui/js/modal/modalAffirmPurchase/index.js diff --git a/src/renderer/js/modal/modalAffirmPurchase/view.jsx b/ui/js/modal/modalAffirmPurchase/view.jsx similarity index 100% rename from src/renderer/js/modal/modalAffirmPurchase/view.jsx rename to ui/js/modal/modalAffirmPurchase/view.jsx diff --git a/src/renderer/js/modal/modalAuthFailure/index.js b/ui/js/modal/modalAuthFailure/index.js similarity index 100% rename from src/renderer/js/modal/modalAuthFailure/index.js rename to ui/js/modal/modalAuthFailure/index.js diff --git a/src/renderer/js/modal/modalAuthFailure/view.jsx b/ui/js/modal/modalAuthFailure/view.jsx similarity index 100% rename from src/renderer/js/modal/modalAuthFailure/view.jsx rename to ui/js/modal/modalAuthFailure/view.jsx diff --git a/src/renderer/js/modal/modalCreditIntro/index.js b/ui/js/modal/modalCreditIntro/index.js similarity index 100% rename from src/renderer/js/modal/modalCreditIntro/index.js rename to ui/js/modal/modalCreditIntro/index.js diff --git a/src/renderer/js/modal/modalCreditIntro/view.jsx b/ui/js/modal/modalCreditIntro/view.jsx similarity index 100% rename from src/renderer/js/modal/modalCreditIntro/view.jsx rename to ui/js/modal/modalCreditIntro/view.jsx diff --git a/src/renderer/js/modal/modalDownloading/index.js b/ui/js/modal/modalDownloading/index.js similarity index 100% rename from src/renderer/js/modal/modalDownloading/index.js rename to ui/js/modal/modalDownloading/index.js diff --git a/src/renderer/js/modal/modalDownloading/view.jsx b/ui/js/modal/modalDownloading/view.jsx similarity index 56% rename from src/renderer/js/modal/modalDownloading/view.jsx rename to ui/js/modal/modalDownloading/view.jsx index d52176b8e..373f83ae1 100644 --- a/src/renderer/js/modal/modalDownloading/view.jsx +++ b/ui/js/modal/modalDownloading/view.jsx @@ -24,27 +24,29 @@ class ModalDownloading extends React.PureComponent { percent={downloadProgress ? downloadProgress : 0} strokeWidth="4" /> - {downloadComplete ? ( -
-
-

{__('Click "Begin Upgrade" to start the upgrade process.')}

-

- {__( - "The app will close, and you will be prompted to install the latest version of LBRY." - )} -

-

{__("After the install is complete, please reopen the app.")}

-
- ) : null} + {downloadComplete + ?
+
+

{__('Click "Begin Upgrade" to start the upgrade process.')}

+

+ {__( + "The app will close, and you will be prompted to install the latest version of LBRY." + )} +

+

+ {__("After the install is complete, please reopen the app.")} +

+
+ : null}
- {downloadComplete ? ( - - ) : null} + {downloadComplete + ? + : null} - {label}: {val} - +
  • {label}: {val}
  • ); } const errorInfo = ( diff --git a/src/renderer/js/modal/modalFileTimeout/index.js b/ui/js/modal/modalFileTimeout/index.js similarity index 100% rename from src/renderer/js/modal/modalFileTimeout/index.js rename to ui/js/modal/modalFileTimeout/index.js diff --git a/src/renderer/js/modal/modalFileTimeout/view.jsx b/ui/js/modal/modalFileTimeout/view.jsx similarity index 80% rename from src/renderer/js/modal/modalFileTimeout/view.jsx rename to ui/js/modal/modalFileTimeout/view.jsx index da9be3f17..9a0916c66 100644 --- a/src/renderer/js/modal/modalFileTimeout/view.jsx +++ b/ui/js/modal/modalFileTimeout/view.jsx @@ -11,7 +11,8 @@ class ModalFileTimeout extends React.PureComponent { contentLabel={__("Download failed")} onConfirmed={closeModal} > - {__("LBRY was unable to download the stream")} {title}. + {__("LBRY was unable to download the stream")}{" "} + {title}. ); } diff --git a/src/renderer/js/modal/modalFirstReward/index.js b/ui/js/modal/modalFirstReward/index.js similarity index 100% rename from src/renderer/js/modal/modalFirstReward/index.js rename to ui/js/modal/modalFirstReward/index.js diff --git a/src/renderer/js/modal/modalFirstReward/view.jsx b/ui/js/modal/modalFirstReward/view.jsx similarity index 91% rename from src/renderer/js/modal/modalFirstReward/view.jsx rename to ui/js/modal/modalFirstReward/view.jsx index 05fb0c0e0..5317bd9d9 100644 --- a/src/renderer/js/modal/modalFirstReward/view.jsx +++ b/ui/js/modal/modalFirstReward/view.jsx @@ -17,8 +17,8 @@ class ModalFirstReward extends React.PureComponent {

    {__("Your First Reward")}

    - {__("You just earned your first reward of")}{" "} - . + {__("You just earned your first reward of")} + {" "}.

    {__( diff --git a/src/renderer/js/modal/modalIncompatibleDaemon/index.js b/ui/js/modal/modalIncompatibleDaemon/index.js similarity index 100% rename from src/renderer/js/modal/modalIncompatibleDaemon/index.js rename to ui/js/modal/modalIncompatibleDaemon/index.js diff --git a/src/renderer/js/modal/modalIncompatibleDaemon/view.jsx b/ui/js/modal/modalIncompatibleDaemon/view.jsx similarity index 100% rename from src/renderer/js/modal/modalIncompatibleDaemon/view.jsx rename to ui/js/modal/modalIncompatibleDaemon/view.jsx diff --git a/src/renderer/js/modal/modalInsufficientBalance/index.js b/ui/js/modal/modalInsufficientBalance/index.js similarity index 100% rename from src/renderer/js/modal/modalInsufficientBalance/index.js rename to ui/js/modal/modalInsufficientBalance/index.js diff --git a/src/renderer/js/modal/modalInsufficientBalance/view.jsx b/ui/js/modal/modalInsufficientBalance/view.jsx similarity index 100% rename from src/renderer/js/modal/modalInsufficientBalance/view.jsx rename to ui/js/modal/modalInsufficientBalance/view.jsx diff --git a/src/renderer/js/modal/modalInsufficientCredits/index.js b/ui/js/modal/modalInsufficientCredits/index.js similarity index 100% rename from src/renderer/js/modal/modalInsufficientCredits/index.js rename to ui/js/modal/modalInsufficientCredits/index.js diff --git a/src/renderer/js/modal/modalInsufficientCredits/view.jsx b/ui/js/modal/modalInsufficientCredits/view.jsx similarity index 88% rename from src/renderer/js/modal/modalInsufficientCredits/view.jsx rename to ui/js/modal/modalInsufficientCredits/view.jsx index 7da75a7dd..397fc0301 100644 --- a/src/renderer/js/modal/modalInsufficientCredits/view.jsx +++ b/ui/js/modal/modalInsufficientCredits/view.jsx @@ -17,9 +17,7 @@ class ModalInsufficientCredits extends React.PureComponent { onConfirmed={addFunds} >

    {__("More Credits Required")}

    -

    - You'll need more to do this. -

    +

    You'll need more to do this.

    ); } diff --git a/src/renderer/js/modal/modalRemoveFile/index.js b/ui/js/modal/modalRemoveFile/index.js similarity index 100% rename from src/renderer/js/modal/modalRemoveFile/index.js rename to ui/js/modal/modalRemoveFile/index.js diff --git a/src/renderer/js/modal/modalRemoveFile/view.jsx b/ui/js/modal/modalRemoveFile/view.jsx similarity index 96% rename from src/renderer/js/modal/modalRemoveFile/view.jsx rename to ui/js/modal/modalRemoveFile/view.jsx index 7106a5e4c..5b0c36f86 100644 --- a/src/renderer/js/modal/modalRemoveFile/view.jsx +++ b/ui/js/modal/modalRemoveFile/view.jsx @@ -41,8 +41,7 @@ class ModalRemoveFile extends React.PureComponent { type="confirm" confirmButtonLabel={__("Remove")} onConfirmed={() => - deleteFile(outpoint, deleteChecked, abandonClaimChecked) - } + deleteFile(outpoint, deleteChecked, abandonClaimChecked)} onAborted={closeModal} >

    @@ -58,7 +57,7 @@ class ModalRemoveFile extends React.PureComponent { label={__("Delete this file from my computer")} />

    - {claimIsMine && ( + {claimIsMine &&
    -
    - )} + } ); } diff --git a/src/renderer/js/modal/modalRevokeClaim/index.js b/ui/js/modal/modalRevokeClaim/index.js similarity index 100% rename from src/renderer/js/modal/modalRevokeClaim/index.js rename to ui/js/modal/modalRevokeClaim/index.js diff --git a/src/renderer/js/modal/modalRevokeClaim/view.jsx b/ui/js/modal/modalRevokeClaim/view.jsx similarity index 100% rename from src/renderer/js/modal/modalRevokeClaim/view.jsx rename to ui/js/modal/modalRevokeClaim/view.jsx diff --git a/src/renderer/js/modal/modalRewardApprovalRequired/index.js b/ui/js/modal/modalRewardApprovalRequired/index.js similarity index 100% rename from src/renderer/js/modal/modalRewardApprovalRequired/index.js rename to ui/js/modal/modalRewardApprovalRequired/index.js diff --git a/src/renderer/js/modal/modalRewardApprovalRequired/view.jsx b/ui/js/modal/modalRewardApprovalRequired/view.jsx similarity index 100% rename from src/renderer/js/modal/modalRewardApprovalRequired/view.jsx rename to ui/js/modal/modalRewardApprovalRequired/view.jsx diff --git a/src/renderer/js/modal/modalRouter/index.js b/ui/js/modal/modalRouter/index.js similarity index 100% rename from src/renderer/js/modal/modalRouter/index.js rename to ui/js/modal/modalRouter/index.js diff --git a/src/renderer/js/modal/modalRouter/view.jsx b/ui/js/modal/modalRouter/view.jsx similarity index 100% rename from src/renderer/js/modal/modalRouter/view.jsx rename to ui/js/modal/modalRouter/view.jsx diff --git a/src/renderer/js/modal/modalTransactionFailed/index.js b/ui/js/modal/modalTransactionFailed/index.js similarity index 100% rename from src/renderer/js/modal/modalTransactionFailed/index.js rename to ui/js/modal/modalTransactionFailed/index.js diff --git a/src/renderer/js/modal/modalTransactionFailed/view.jsx b/ui/js/modal/modalTransactionFailed/view.jsx similarity index 100% rename from src/renderer/js/modal/modalTransactionFailed/view.jsx rename to ui/js/modal/modalTransactionFailed/view.jsx diff --git a/src/renderer/js/modal/modalUpgrade/index.js b/ui/js/modal/modalUpgrade/index.js similarity index 100% rename from src/renderer/js/modal/modalUpgrade/index.js rename to ui/js/modal/modalUpgrade/index.js diff --git a/src/renderer/js/modal/modalUpgrade/view.jsx b/ui/js/modal/modalUpgrade/view.jsx similarity index 85% rename from src/renderer/js/modal/modalUpgrade/view.jsx rename to ui/js/modal/modalUpgrade/view.jsx index e80f4c07c..7d10d9a0f 100644 --- a/src/renderer/js/modal/modalUpgrade/view.jsx +++ b/ui/js/modal/modalUpgrade/view.jsx @@ -19,11 +19,13 @@ class ModalUpgrade extends React.PureComponent {

    {__("LBRY Leveled Up")}


    - {__("An updated version of LBRY is now available.")}{" "} + {__("An updated version of LBRY is now available.")} + {" "} {__("Your version is out of date and may be unreliable or insecure.")}

    - {__("Want to know what has changed?")} See the{" "} + {__("Want to know what has changed?")} + {" "} See the{" "} {

    {__( "Using LBRY is like dating a centaur. Totally normal up top, and" - )}{" "} - {__("way different")} {__("underneath.")} + )} + {" "}{__("way different")} {__("underneath.")}

    {__("Up top, LBRY is similar to popular media sites.")}

    diff --git a/src/renderer/js/page/auth/index.js b/ui/js/page/auth/index.js similarity index 100% rename from src/renderer/js/page/auth/index.js rename to ui/js/page/auth/index.js diff --git a/src/renderer/js/page/auth/view.jsx b/ui/js/page/auth/view.jsx similarity index 72% rename from src/renderer/js/page/auth/view.jsx rename to ui/js/page/auth/view.jsx index 49ea877b2..b9ac51bbd 100644 --- a/src/renderer/js/page/auth/view.jsx +++ b/ui/js/page/auth/view.jsx @@ -60,29 +60,29 @@ export class AuthPage extends React.PureComponent { const { email, user, isPending, navigate } = this.props; const [innerContent, useTemplate] = this.renderMain(); - return useTemplate ? ( -

    -
    -
    -

    {this.getTitle()}

    -
    -
    {innerContent}
    -
    -
    - {__( - "This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards." - ) + " "} - navigate("/discover")} - label={__("Return home")} - />. + return useTemplate + ?
    +
    +
    +

    {this.getTitle()}

    -
    -
    -
    - ) : ( - innerContent - ); +
    + {innerContent} +
    +
    +
    + {__( + "This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards." + ) + " "} + navigate("/discover")} + label={__("Return home")} + />. +
    +
    + + + : innerContent; } } diff --git a/src/renderer/js/page/backup/index.js b/ui/js/page/backup/index.js similarity index 100% rename from src/renderer/js/page/backup/index.js rename to ui/js/page/backup/index.js diff --git a/src/renderer/js/page/backup/view.jsx b/ui/js/page/backup/view.jsx similarity index 95% rename from src/renderer/js/page/backup/view.jsx rename to ui/js/page/backup/view.jsx index 09c0b54da..6ce9de6b6 100644 --- a/src/renderer/js/page/backup/view.jsx +++ b/ui/js/page/backup/view.jsx @@ -39,7 +39,9 @@ class BackupPage extends React.PureComponent { )}

    - {__(`${daemonSettings.lbryum_wallet_dir}`)} + + {__(`${daemonSettings.lbryum_wallet_dir}`)} +

    diff --git a/src/renderer/js/page/channel/index.js b/ui/js/page/channel/index.js similarity index 100% rename from src/renderer/js/page/channel/index.js rename to ui/js/page/channel/index.js diff --git a/src/renderer/js/page/channel/view.jsx b/ui/js/page/channel/view.jsx similarity index 65% rename from src/renderer/js/page/channel/view.jsx rename to ui/js/page/channel/view.jsx index 805ebc2d4..bb8f5d20b 100644 --- a/src/renderer/js/page/channel/view.jsx +++ b/ui/js/page/channel/view.jsx @@ -44,9 +44,8 @@ class ChannelPage extends React.PureComponent { if (fetching) { contentList = ; } else { - contentList = - claimsInChannel && claimsInChannel.length ? ( - claimsInChannel.map(claim => ( + contentList = claimsInChannel && claimsInChannel.length + ? claimsInChannel.map(claim => - )) - ) : ( - {__("No content found.")} - ); + ) + : {__("No content found.")}; } return (

    -
    -

    {uri}

    -
    +

    {uri}

    @@ -81,23 +76,22 @@ class ChannelPage extends React.PureComponent { {contentList}

    {(!fetching || (claimsInChannel && claimsInChannel.length)) && - totalPages > 1 && ( - this.changePage(e.selected + 1)} - initialPage={parseInt(page - 1)} - containerClassName="pagination" - /> - )} + totalPages > 1 && + this.changePage(e.selected + 1)} + initialPage={parseInt(page - 1)} + containerClassName="pagination" + />}
    ); } diff --git a/src/renderer/js/page/discover/index.js b/ui/js/page/discover/index.js similarity index 100% rename from src/renderer/js/page/discover/index.js rename to ui/js/page/discover/index.js diff --git a/src/renderer/js/page/discover/view.jsx b/ui/js/page/discover/view.jsx similarity index 83% rename from src/renderer/js/page/discover/view.jsx rename to ui/js/page/discover/view.jsx index f8ea424ab..19e00980d 100644 --- a/src/renderer/js/page/discover/view.jsx +++ b/ui/js/page/discover/view.jsx @@ -155,18 +155,17 @@ class FeaturedCategory extends React.PureComponent {

    {category} {category && - category.match(/^community/i) && ( - - )} + category.match(/^community/i) && + }

    - {this.state.canScrollPrevious && ( + {this.state.canScrollPrevious &&
    -
    - )} - {this.state.canScrollNext && ( +
    } + {this.state.canScrollNext &&
    -
    - )} +
    }
    {names && - names.map(name => ( + names.map(name => - ))} + )}
    @@ -210,31 +207,29 @@ class DiscoverPage extends React.PureComponent { render() { const { featuredUris, fetchingFeaturedUris } = this.props; const hasContent = - typeof featuredUris === "object" && Object.keys(featuredUris).length, + typeof featuredUris === "object" && Object.keys(featuredUris).length, failedToLoad = !fetchingFeaturedUris && !hasContent; return (
    {!hasContent && - fetchingFeaturedUris && ( - - )} + fetchingFeaturedUris && + } {hasContent && Object.keys(featuredUris).map( category => - featuredUris[category].length ? ( - - ) : ( - "" - ) + featuredUris[category].length + ? + : "" )} - {failedToLoad && ( -
    {__("Failed to load landing content.")}
    - )} + {failedToLoad && +
    + {__("Failed to load landing content.")} +
    }
    ); } diff --git a/src/renderer/js/page/file/index.js b/ui/js/page/file/index.js similarity index 100% rename from src/renderer/js/page/file/index.js rename to ui/js/page/file/index.js diff --git a/src/renderer/js/page/file/view.jsx b/ui/js/page/file/view.jsx similarity index 100% rename from src/renderer/js/page/file/view.jsx rename to ui/js/page/file/view.jsx diff --git a/src/renderer/js/page/fileListDownloaded/index.js b/ui/js/page/fileListDownloaded/index.js similarity index 100% rename from src/renderer/js/page/fileListDownloaded/index.js rename to ui/js/page/fileListDownloaded/index.js diff --git a/src/renderer/js/page/fileListDownloaded/view.jsx b/ui/js/page/fileListDownloaded/view.jsx similarity index 100% rename from src/renderer/js/page/fileListDownloaded/view.jsx rename to ui/js/page/fileListDownloaded/view.jsx diff --git a/src/renderer/js/page/fileListPublished/index.js b/ui/js/page/fileListPublished/index.js similarity index 100% rename from src/renderer/js/page/fileListPublished/index.js rename to ui/js/page/fileListPublished/index.js diff --git a/src/renderer/js/page/fileListPublished/view.jsx b/ui/js/page/fileListPublished/view.jsx similarity index 91% rename from src/renderer/js/page/fileListPublished/view.jsx rename to ui/js/page/fileListPublished/view.jsx index 2444bca12..0d9e093c8 100644 --- a/src/renderer/js/page/fileListPublished/view.jsx +++ b/ui/js/page/fileListPublished/view.jsx @@ -33,7 +33,9 @@ class FileListPublished extends React.PureComponent { } else { content = ( - {__("It looks like you haven't published anything to LBRY yet. Go")}{" "} + {__( + "It looks like you haven't published anything to LBRY yet. Go" + )}{" "} navigate("/publish")} label={__("share your beautiful cats with the world")} diff --git a/src/renderer/js/page/help/index.js b/ui/js/page/help/index.js similarity index 100% rename from src/renderer/js/page/help/index.js rename to ui/js/page/help/index.js diff --git a/src/renderer/js/page/help/view.jsx b/ui/js/page/help/view.jsx similarity index 54% rename from src/renderer/js/page/help/view.jsx rename to ui/js/page/help/view.jsx index 2aca230c6..b7a0db697 100644 --- a/src/renderer/js/page/help/view.jsx +++ b/ui/js/page/help/view.jsx @@ -55,8 +55,9 @@ class HelpPage extends React.PureComponent { if (this.state.versionInfo) { ver = this.state.versionInfo; if (ver.os_system == "Darwin") { - osName = - parseInt(ver.os_release.match(/^\d+/)) < 16 ? "Mac OS X" : "Mac OS"; + osName = parseInt(ver.os_release.match(/^\d+/)) < 16 + ? "Mac OS X" + : "Mac OS"; platform = `${osName} ${ver.os_release}`; newVerLink = "https://lbry.io/get/lbry.dmg"; @@ -96,8 +97,9 @@ class HelpPage extends React.PureComponent {

    - {__("Live help is available most hours in the")}{" "} - #help {__("channel of our Discord chat room.")} + {__("Live help is available most hours in the")} + {" "}#help + {" "}{__("channel of our Discord chat room.")}

    -
    -

    {__("About")}

    -
    +

    {__("About")}

    - {this.state.upgradeAvailable === null ? ( - "" - ) : this.state.upgradeAvailable ? ( -

    - {__("A newer version of LBRY is available.")}{" "} - -

    - ) : ( -

    {__("Your copy of LBRY is up to date.")}

    - )} - {this.state.uiVersion && ver ? ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
    {__("App")}{this.state.uiVersion}
    {__("Daemon (lbrynet)")}{ver.lbrynet_version}
    {__("Wallet (lbryum)")}{ver.lbryum_version}
    {__("Connected Email")} - {user && user.primary_email ? ( - user.primary_email - ) : ( - - {__("none")} - ( doAuth()} - label={__("set email")} - />) - - )} -
    {__("Reward Eligible")} - {user && user.is_reward_approved ? ( - - ) : ( - - )} -
    {__("Platform")}{platform}
    {__("Installation ID")}{this.state.lbryId}
    {__("Access Token")} - {this.state.accessTokenHidden && ( - - )} - {!this.state.accessTokenHidden && - accessToken && ( + {this.state.upgradeAvailable === null + ? "" + : this.state.upgradeAvailable + ?

    + {__("A newer version of LBRY is available.")} + {" "} +

    + :

    {__("Your copy of LBRY is up to date.")}

    } + {this.state.uiVersion && ver + ? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
    {__("App")}{this.state.uiVersion}
    {__("Daemon (lbrynet)")}{ver.lbrynet_version}
    {__("Wallet (lbryum)")}{ver.lbryum_version}
    {__("Connected Email")} + {user && user.primary_email + ? user.primary_email + : + {__("none")} + ( doAuth()} + label={__("set email")} + />) + } +
    {__("Reward Eligible")} + {user && user.is_reward_approved + ? + : } +
    {__("Platform")}{platform}
    {__("Installation ID")}{this.state.lbryId}
    {__("Access Token")} + {this.state.accessTokenHidden && + } + {!this.state.accessTokenHidden && + accessToken &&

    {accessToken}

    @@ -211,15 +204,12 @@ class HelpPage extends React.PureComponent { "This is equivalent to a password. Do not post or share this." )}
    -
    - )} -
    - ) : ( - - )} + } +
    + : }
    diff --git a/src/renderer/js/page/invite/index.js b/ui/js/page/invite/index.js similarity index 100% rename from src/renderer/js/page/invite/index.js rename to ui/js/page/invite/index.js diff --git a/src/renderer/js/page/invite/view.jsx b/ui/js/page/invite/view.jsx similarity index 78% rename from src/renderer/js/page/invite/view.jsx rename to ui/js/page/invite/view.jsx index c4dd7ae31..0488ca1f3 100644 --- a/src/renderer/js/page/invite/view.jsx +++ b/ui/js/page/invite/view.jsx @@ -15,15 +15,13 @@ class InvitePage extends React.PureComponent { return (
    - {isPending && ( - - )} + {isPending && + } {!isPending && - isFailed && ( - - {__("Failed to retrieve invite status.")} - - )} + isFailed && + + {__("Failed to retrieve invite status.")} + } {!isPending && !isFailed && } {!isPending && !isFailed && }
    diff --git a/src/renderer/js/page/publish/index.js b/ui/js/page/publish/index.js similarity index 100% rename from src/renderer/js/page/publish/index.js rename to ui/js/page/publish/index.js diff --git a/src/renderer/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx similarity index 100% rename from src/renderer/js/page/publish/view.jsx rename to ui/js/page/publish/view.jsx diff --git a/src/renderer/js/page/receiveCredits/index.js b/ui/js/page/receiveCredits/index.js similarity index 100% rename from src/renderer/js/page/receiveCredits/index.js rename to ui/js/page/receiveCredits/index.js diff --git a/src/renderer/js/page/receiveCredits/view.jsx b/ui/js/page/receiveCredits/view.jsx similarity index 100% rename from src/renderer/js/page/receiveCredits/view.jsx rename to ui/js/page/receiveCredits/view.jsx diff --git a/src/renderer/js/page/report.js b/ui/js/page/report.js similarity index 100% rename from src/renderer/js/page/report.js rename to ui/js/page/report.js diff --git a/src/renderer/js/page/rewards/index.js b/ui/js/page/rewards/index.js similarity index 100% rename from src/renderer/js/page/rewards/index.js rename to ui/js/page/rewards/index.js diff --git a/src/renderer/js/page/rewards/view.jsx b/ui/js/page/rewards/view.jsx similarity index 91% rename from src/renderer/js/page/rewards/view.jsx rename to ui/js/page/rewards/view.jsx index b2132df83..97344d152 100644 --- a/src/renderer/js/page/rewards/view.jsx +++ b/ui/js/page/rewards/view.jsx @@ -44,7 +44,8 @@ class RewardsPage extends React.PureComponent {

    - {__("Rewards are for human beings only.")}{" "} + {__("Rewards are for human beings only.")} + {" "} {__( "You'll have to prove you're one of us before you can claim any rewards." )} @@ -61,7 +62,8 @@ class RewardsPage extends React.PureComponent {

    {__( "This account must undergo review before you can participate in the rewards program." - )}{" "} + )} + {" "} {__( "This can take anywhere from several minutes to several days." )} @@ -73,9 +75,7 @@ class RewardsPage extends React.PureComponent { )}

    - {__( - "If you continue to see this message, send us an email to help@lbry.io." - ) + + {__("If you continue to see this message, send us an email to help@lbry.io.") + " " + __("Please enjoy free content in the meantime!")}

    @@ -114,17 +114,15 @@ class RewardsPage extends React.PureComponent { } else if (!rewards || rewards.length <= 0) { return (
    - {__( - "There are no rewards available at this time, please check back later." - )} + {__("There are no rewards available at this time, please check back later.")}
    ); } else { return (
    - {rewards.map(reward => ( + {rewards.map(reward => - ))} + )}
    ); } diff --git a/src/renderer/js/page/search/index.js b/ui/js/page/search/index.js similarity index 100% rename from src/renderer/js/page/search/index.js rename to ui/js/page/search/index.js diff --git a/src/renderer/js/page/search/view.jsx b/ui/js/page/search/view.jsx similarity index 52% rename from src/renderer/js/page/search/view.jsx rename to ui/js/page/search/view.jsx index d6a69bf9c..e2ca65da2 100644 --- a/src/renderer/js/page/search/view.jsx +++ b/ui/js/page/search/view.jsx @@ -10,29 +10,29 @@ class SearchPage extends React.PureComponent { return (
    - {lbryuri.isValid(query) ? ( -
    -

    - {__("Exact URL")}{" "} - +

    + {__("Exact URL")} + {" "} + +

    + -

    - -
    - ) : ( - "" - )} + + : ""}

    - {__("Search Results for")} {query}{" "} + {__("Search Results for")} {query} + {" "} - {!daemonSettings.disable_max_key_fee && ( + {!daemonSettings.disable_max_key_fee && - )} + />}

    {__( @@ -257,13 +256,12 @@ class SettingsPage extends React.PureComponent { this.onInstantPurchaseEnabledChange(true); }} /> - {instantPurchaseEnabled && ( + {instantPurchaseEnabled && this.onInstantPurchaseMaxChange(val)} defaultValue={instantPurchaseMax} - /> - )} + />}
    When this option is chosen, LBRY won't ask you to confirm @@ -322,12 +320,13 @@ class SettingsPage extends React.PureComponent { defaultValue={theme} className="form-field__input--inline" > - {themes.map((theme, index) => ( + {themes.map((theme, index) => - ))} + )} +
    diff --git a/src/renderer/js/page/show/index.js b/ui/js/page/show/index.js similarity index 100% rename from src/renderer/js/page/show/index.js rename to ui/js/page/show/index.js diff --git a/src/renderer/js/page/show/view.jsx b/ui/js/page/show/view.jsx similarity index 79% rename from src/renderer/js/page/show/view.jsx rename to ui/js/page/show/view.jsx index d0584847f..8b1e05789 100644 --- a/src/renderer/js/page/show/view.jsx +++ b/ui/js/page/show/view.jsx @@ -28,22 +28,18 @@ class ShowPage extends React.PureComponent { innerContent = (
    -
    -

    {uri}

    -
    +

    {uri}

    - {isResolvingUri && ( + {isResolvingUri && - )} + />} {claim === null && - !isResolvingUri && ( - - {__("There's nothing at this location.")} - - )} + !isResolvingUri && + + {__("There's nothing at this location.")} + }
    ); diff --git a/src/renderer/js/page/transactionHistory/index.js b/ui/js/page/transactionHistory/index.js similarity index 100% rename from src/renderer/js/page/transactionHistory/index.js rename to ui/js/page/transactionHistory/index.js diff --git a/src/renderer/js/page/transactionHistory/view.jsx b/ui/js/page/transactionHistory/view.jsx similarity index 72% rename from src/renderer/js/page/transactionHistory/view.jsx rename to ui/js/page/transactionHistory/view.jsx index ec4db0ed9..2f3a75715 100644 --- a/src/renderer/js/page/transactionHistory/view.jsx +++ b/ui/js/page/transactionHistory/view.jsx @@ -24,16 +24,12 @@ class TransactionHistoryPage extends React.PureComponent {

    {__("Transaction History")}

    - {fetchingTransactions && !transactions.length ? ( - - ) : ( - "" - )} - {transactions && transactions.length ? ( - - ) : ( - "" - )} + {fetchingTransactions && !transactions.length + ? + : ""} + {transactions && transactions.length + ? + : ""}
    diff --git a/src/renderer/js/page/wallet/index.js b/ui/js/page/wallet/index.js similarity index 100% rename from src/renderer/js/page/wallet/index.js rename to ui/js/page/wallet/index.js diff --git a/src/renderer/js/page/wallet/view.jsx b/ui/js/page/wallet/view.jsx similarity index 100% rename from src/renderer/js/page/wallet/view.jsx rename to ui/js/page/wallet/view.jsx diff --git a/src/renderer/js/redux/actions/app.js b/ui/js/redux/actions/app.js similarity index 90% rename from src/renderer/js/redux/actions/app.js rename to ui/js/redux/actions/app.js index 485108245..91f5f795e 100644 --- a/src/renderer/js/redux/actions/app.js +++ b/ui/js/redux/actions/app.js @@ -20,7 +20,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("../../../../main/package.json"); +const { lbrySettings: config } = require("../../../../app/package.json"); const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000; export function doOpenModal(modal, modalProps = {}) { @@ -68,31 +68,33 @@ export function doDownloadUpgrade() { const state = getState(); // Make a new directory within temp directory so the filename is guaranteed to be available const dir = fs.mkdtempSync( - remote.app.getPath("temp") + require("path").sep - ), + remote.app.getPath("temp") + require("path").sep + ), upgradeFilename = selectUpgradeFilename(state); let options = { onProgress: p => dispatch(doUpdateDownloadProgress(Math.round(p * 100))), directory: dir, }; - download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then( - downloadItem => { - /** + download( + remote.getCurrentWindow(), + selectUpdateUrl(state), + options + ).then(downloadItem => { + /** * TODO: get the download path directly from the download object. It should just be * downloadItem.getSavePath(), but the copy on the main process is being garbage collected * too soon. */ - dispatch({ - type: types.UPGRADE_DOWNLOAD_COMPLETED, - data: { - downloadItem, - path: path.join(dir, upgradeFilename), - }, - }); - } - ); + dispatch({ + type: types.UPGRADE_DOWNLOAD_COMPLETED, + data: { + downloadItem, + path: path.join(dir, upgradeFilename), + }, + }); + }); dispatch({ type: types.UPGRADE_DOWNLOAD_STARTED, @@ -190,10 +192,9 @@ export function doCheckDaemonVersion() { return function(dispatch, getState) { lbry.version().then(({ lbrynet_version }) => { dispatch({ - type: - config.lbrynetDaemonVersion == lbrynet_version - ? types.DAEMON_VERSION_MATCH - : types.DAEMON_VERSION_MISMATCH, + type: config.lbrynetDaemonVersion == lbrynet_version + ? types.DAEMON_VERSION_MATCH + : types.DAEMON_VERSION_MISMATCH, }); }); }; diff --git a/src/renderer/js/redux/actions/availability.js b/ui/js/redux/actions/availability.js similarity index 100% rename from src/renderer/js/redux/actions/availability.js rename to ui/js/redux/actions/availability.js diff --git a/src/renderer/js/redux/actions/content.js b/ui/js/redux/actions/content.js similarity index 100% rename from src/renderer/js/redux/actions/content.js rename to ui/js/redux/actions/content.js diff --git a/src/renderer/js/redux/actions/cost_info.js b/ui/js/redux/actions/cost_info.js similarity index 100% rename from src/renderer/js/redux/actions/cost_info.js rename to ui/js/redux/actions/cost_info.js diff --git a/src/renderer/js/redux/actions/file_info.js b/ui/js/redux/actions/file_info.js similarity index 100% rename from src/renderer/js/redux/actions/file_info.js rename to ui/js/redux/actions/file_info.js diff --git a/src/renderer/js/redux/actions/navigation.js b/ui/js/redux/actions/navigation.js similarity index 100% rename from src/renderer/js/redux/actions/navigation.js rename to ui/js/redux/actions/navigation.js diff --git a/src/renderer/js/redux/actions/rewards.js b/ui/js/redux/actions/rewards.js similarity index 100% rename from src/renderer/js/redux/actions/rewards.js rename to ui/js/redux/actions/rewards.js diff --git a/src/renderer/js/redux/actions/search.js b/ui/js/redux/actions/search.js similarity index 100% rename from src/renderer/js/redux/actions/search.js rename to ui/js/redux/actions/search.js diff --git a/src/renderer/js/redux/actions/settings.js b/ui/js/redux/actions/settings.js similarity index 100% rename from src/renderer/js/redux/actions/settings.js rename to ui/js/redux/actions/settings.js diff --git a/src/renderer/js/redux/actions/user.js b/ui/js/redux/actions/user.js similarity index 100% rename from src/renderer/js/redux/actions/user.js rename to ui/js/redux/actions/user.js diff --git a/src/renderer/js/redux/actions/wallet.js b/ui/js/redux/actions/wallet.js similarity index 100% rename from src/renderer/js/redux/actions/wallet.js rename to ui/js/redux/actions/wallet.js diff --git a/src/renderer/js/redux/reducers/app.js b/ui/js/redux/reducers/app.js similarity index 100% rename from src/renderer/js/redux/reducers/app.js rename to ui/js/redux/reducers/app.js diff --git a/src/renderer/js/redux/reducers/availability.js b/ui/js/redux/reducers/availability.js similarity index 100% rename from src/renderer/js/redux/reducers/availability.js rename to ui/js/redux/reducers/availability.js diff --git a/src/renderer/js/redux/reducers/claims.js b/ui/js/redux/reducers/claims.js similarity index 100% rename from src/renderer/js/redux/reducers/claims.js rename to ui/js/redux/reducers/claims.js diff --git a/src/renderer/js/redux/reducers/content.js b/ui/js/redux/reducers/content.js similarity index 100% rename from src/renderer/js/redux/reducers/content.js rename to ui/js/redux/reducers/content.js diff --git a/src/renderer/js/redux/reducers/cost_info.js b/ui/js/redux/reducers/cost_info.js similarity index 100% rename from src/renderer/js/redux/reducers/cost_info.js rename to ui/js/redux/reducers/cost_info.js diff --git a/src/renderer/js/redux/reducers/file_info.js b/ui/js/redux/reducers/file_info.js similarity index 100% rename from src/renderer/js/redux/reducers/file_info.js rename to ui/js/redux/reducers/file_info.js diff --git a/src/renderer/js/redux/reducers/navigation.js b/ui/js/redux/reducers/navigation.js similarity index 100% rename from src/renderer/js/redux/reducers/navigation.js rename to ui/js/redux/reducers/navigation.js diff --git a/src/renderer/js/redux/reducers/rewards.js b/ui/js/redux/reducers/rewards.js similarity index 100% rename from src/renderer/js/redux/reducers/rewards.js rename to ui/js/redux/reducers/rewards.js diff --git a/src/renderer/js/redux/reducers/search.js b/ui/js/redux/reducers/search.js similarity index 100% rename from src/renderer/js/redux/reducers/search.js rename to ui/js/redux/reducers/search.js diff --git a/src/renderer/js/redux/reducers/settings.js b/ui/js/redux/reducers/settings.js similarity index 100% rename from src/renderer/js/redux/reducers/settings.js rename to ui/js/redux/reducers/settings.js diff --git a/src/renderer/js/redux/reducers/user.js b/ui/js/redux/reducers/user.js similarity index 100% rename from src/renderer/js/redux/reducers/user.js rename to ui/js/redux/reducers/user.js diff --git a/src/renderer/js/redux/reducers/wallet.js b/ui/js/redux/reducers/wallet.js similarity index 100% rename from src/renderer/js/redux/reducers/wallet.js rename to ui/js/redux/reducers/wallet.js diff --git a/src/renderer/js/redux/selectors/app.js b/ui/js/redux/selectors/app.js similarity index 100% rename from src/renderer/js/redux/selectors/app.js rename to ui/js/redux/selectors/app.js diff --git a/src/renderer/js/redux/selectors/availability.js b/ui/js/redux/selectors/availability.js similarity index 100% rename from src/renderer/js/redux/selectors/availability.js rename to ui/js/redux/selectors/availability.js diff --git a/src/renderer/js/redux/selectors/claims.js b/ui/js/redux/selectors/claims.js similarity index 100% rename from src/renderer/js/redux/selectors/claims.js rename to ui/js/redux/selectors/claims.js diff --git a/src/renderer/js/redux/selectors/content.js b/ui/js/redux/selectors/content.js similarity index 100% rename from src/renderer/js/redux/selectors/content.js rename to ui/js/redux/selectors/content.js diff --git a/src/renderer/js/redux/selectors/cost_info.js b/ui/js/redux/selectors/cost_info.js similarity index 100% rename from src/renderer/js/redux/selectors/cost_info.js rename to ui/js/redux/selectors/cost_info.js diff --git a/src/renderer/js/redux/selectors/file_info.js b/ui/js/redux/selectors/file_info.js similarity index 100% rename from src/renderer/js/redux/selectors/file_info.js rename to ui/js/redux/selectors/file_info.js diff --git a/src/renderer/js/redux/selectors/navigation.js b/ui/js/redux/selectors/navigation.js similarity index 100% rename from src/renderer/js/redux/selectors/navigation.js rename to ui/js/redux/selectors/navigation.js diff --git a/src/renderer/js/redux/selectors/rewards.js b/ui/js/redux/selectors/rewards.js similarity index 100% rename from src/renderer/js/redux/selectors/rewards.js rename to ui/js/redux/selectors/rewards.js diff --git a/src/renderer/js/redux/selectors/search.js b/ui/js/redux/selectors/search.js similarity index 100% rename from src/renderer/js/redux/selectors/search.js rename to ui/js/redux/selectors/search.js diff --git a/src/renderer/js/redux/selectors/settings.js b/ui/js/redux/selectors/settings.js similarity index 100% rename from src/renderer/js/redux/selectors/settings.js rename to ui/js/redux/selectors/settings.js diff --git a/src/renderer/js/redux/selectors/user.js b/ui/js/redux/selectors/user.js similarity index 100% rename from src/renderer/js/redux/selectors/user.js rename to ui/js/redux/selectors/user.js diff --git a/src/renderer/js/redux/selectors/wallet.js b/ui/js/redux/selectors/wallet.js similarity index 100% rename from src/renderer/js/redux/selectors/wallet.js rename to ui/js/redux/selectors/wallet.js diff --git a/src/renderer/js/rewards.js b/ui/js/rewards.js similarity index 100% rename from src/renderer/js/rewards.js rename to ui/js/rewards.js diff --git a/src/renderer/js/store.js b/ui/js/store.js similarity index 100% rename from src/renderer/js/store.js rename to ui/js/store.js diff --git a/src/renderer/js/util/batchActions.js b/ui/js/util/batchActions.js similarity index 100% rename from src/renderer/js/util/batchActions.js rename to ui/js/util/batchActions.js diff --git a/src/renderer/js/util/formatCredits.js b/ui/js/util/formatCredits.js similarity index 100% rename from src/renderer/js/util/formatCredits.js rename to ui/js/util/formatCredits.js diff --git a/src/renderer/js/util/query_params.js b/ui/js/util/query_params.js similarity index 77% rename from src/renderer/js/util/query_params.js rename to ui/js/util/query_params.js index 51987755b..55b9616da 100644 --- a/src/renderer/js/util/query_params.js +++ b/ui/js/util/query_params.js @@ -1,12 +1,8 @@ export function parseQueryParams(queryString) { if (queryString === "") return {}; - const parts = queryString - .split("?") - .pop() - .split("&") - .map(function(p) { - return p.split("="); - }); + const parts = queryString.split("?").pop().split("&").map(function(p) { + return p.split("="); + }); const params = {}; parts.forEach(function(arr) { diff --git a/src/renderer/js/util/setBadge.js b/ui/js/util/setBadge.js similarity index 100% rename from src/renderer/js/util/setBadge.js rename to ui/js/util/setBadge.js diff --git a/src/renderer/js/util/setProgressBar.js b/ui/js/util/setProgressBar.js similarity index 100% rename from src/renderer/js/util/setProgressBar.js rename to ui/js/util/setProgressBar.js diff --git a/src/renderer/js/util/throttle.js b/ui/js/util/throttle.js similarity index 100% rename from src/renderer/js/util/throttle.js rename to ui/js/util/throttle.js diff --git a/src/renderer/package.json b/ui/package.json similarity index 97% rename from src/renderer/package.json rename to ui/package.json index d581cf972..bd0fbdbf4 100644 --- a/src/renderer/package.json +++ b/ui/package.json @@ -77,8 +77,8 @@ "webpack-target-electron-renderer": "^0.4.0" }, "lint-staged": { - "gitDir": "../..", - "src/renderer/js/**/*.{jsx,js}": [ + "gitDir": "../", + "ui/js/**/*.{jsx,js}": [ "prettier --trailing-comma es5 --write", "git add" ] diff --git a/src/renderer/scss/_gui.scss b/ui/scss/_gui.scss similarity index 100% rename from src/renderer/scss/_gui.scss rename to ui/scss/_gui.scss diff --git a/src/renderer/scss/_icons.scss b/ui/scss/_icons.scss similarity index 100% rename from src/renderer/scss/_icons.scss rename to ui/scss/_icons.scss diff --git a/src/renderer/scss/_reset.scss b/ui/scss/_reset.scss similarity index 100% rename from src/renderer/scss/_reset.scss rename to ui/scss/_reset.scss diff --git a/src/renderer/scss/_vars.scss b/ui/scss/_vars.scss similarity index 100% rename from src/renderer/scss/_vars.scss rename to ui/scss/_vars.scss diff --git a/src/renderer/scss/all.scss b/ui/scss/all.scss similarity index 100% rename from src/renderer/scss/all.scss rename to ui/scss/all.scss diff --git a/src/renderer/scss/component/__divider.scss b/ui/scss/component/__divider.scss similarity index 100% rename from src/renderer/scss/component/__divider.scss rename to ui/scss/component/__divider.scss diff --git a/src/renderer/scss/component/_button.scss b/ui/scss/component/_button.scss similarity index 100% rename from src/renderer/scss/component/_button.scss rename to ui/scss/component/_button.scss diff --git a/src/renderer/scss/component/_card.scss b/ui/scss/component/_card.scss similarity index 100% rename from src/renderer/scss/component/_card.scss rename to ui/scss/component/_card.scss diff --git a/src/renderer/scss/component/_channel-indicator.scss b/ui/scss/component/_channel-indicator.scss similarity index 100% rename from src/renderer/scss/component/_channel-indicator.scss rename to ui/scss/component/_channel-indicator.scss diff --git a/src/renderer/scss/component/_checkbox.scss b/ui/scss/component/_checkbox.scss similarity index 100% rename from src/renderer/scss/component/_checkbox.scss rename to ui/scss/component/_checkbox.scss diff --git a/src/renderer/scss/component/_file-download.scss b/ui/scss/component/_file-download.scss similarity index 100% rename from src/renderer/scss/component/_file-download.scss rename to ui/scss/component/_file-download.scss diff --git a/src/renderer/scss/component/_file-selector.scss b/ui/scss/component/_file-selector.scss similarity index 100% rename from src/renderer/scss/component/_file-selector.scss rename to ui/scss/component/_file-selector.scss diff --git a/src/renderer/scss/component/_file-tile.scss b/ui/scss/component/_file-tile.scss similarity index 100% rename from src/renderer/scss/component/_file-tile.scss rename to ui/scss/component/_file-tile.scss diff --git a/src/renderer/scss/component/_form-field.scss b/ui/scss/component/_form-field.scss similarity index 100% rename from src/renderer/scss/component/_form-field.scss rename to ui/scss/component/_form-field.scss diff --git a/src/renderer/scss/component/_header.scss b/ui/scss/component/_header.scss similarity index 100% rename from src/renderer/scss/component/_header.scss rename to ui/scss/component/_header.scss diff --git a/src/renderer/scss/component/_load-screen.scss b/ui/scss/component/_load-screen.scss similarity index 100% rename from src/renderer/scss/component/_load-screen.scss rename to ui/scss/component/_load-screen.scss diff --git a/src/renderer/scss/component/_markdown-editor.scss b/ui/scss/component/_markdown-editor.scss similarity index 100% rename from src/renderer/scss/component/_markdown-editor.scss rename to ui/scss/component/_markdown-editor.scss diff --git a/src/renderer/scss/component/_menu.scss b/ui/scss/component/_menu.scss similarity index 100% rename from src/renderer/scss/component/_menu.scss rename to ui/scss/component/_menu.scss diff --git a/src/renderer/scss/component/_modal.scss b/ui/scss/component/_modal.scss similarity index 100% rename from src/renderer/scss/component/_modal.scss rename to ui/scss/component/_modal.scss diff --git a/src/renderer/scss/component/_notice.scss b/ui/scss/component/_notice.scss similarity index 100% rename from src/renderer/scss/component/_notice.scss rename to ui/scss/component/_notice.scss diff --git a/src/renderer/scss/component/_pagination.scss b/ui/scss/component/_pagination.scss similarity index 100% rename from src/renderer/scss/component/_pagination.scss rename to ui/scss/component/_pagination.scss diff --git a/src/renderer/scss/component/_radio.scss b/ui/scss/component/_radio.scss similarity index 100% rename from src/renderer/scss/component/_radio.scss rename to ui/scss/component/_radio.scss diff --git a/src/renderer/scss/component/_scrollbar.scss b/ui/scss/component/_scrollbar.scss similarity index 100% rename from src/renderer/scss/component/_scrollbar.scss rename to ui/scss/component/_scrollbar.scss diff --git a/src/renderer/scss/component/_snack-bar.scss b/ui/scss/component/_snack-bar.scss similarity index 100% rename from src/renderer/scss/component/_snack-bar.scss rename to ui/scss/component/_snack-bar.scss diff --git a/src/renderer/scss/component/_table.scss b/ui/scss/component/_table.scss similarity index 100% rename from src/renderer/scss/component/_table.scss rename to ui/scss/component/_table.scss diff --git a/src/renderer/scss/component/_tabs.scss b/ui/scss/component/_tabs.scss similarity index 100% rename from src/renderer/scss/component/_tabs.scss rename to ui/scss/component/_tabs.scss diff --git a/src/renderer/scss/component/_tooltip.scss b/ui/scss/component/_tooltip.scss similarity index 100% rename from src/renderer/scss/component/_tooltip.scss rename to ui/scss/component/_tooltip.scss diff --git a/src/renderer/scss/component/_video.scss b/ui/scss/component/_video.scss similarity index 100% rename from src/renderer/scss/component/_video.scss rename to ui/scss/component/_video.scss diff --git a/src/renderer/scss/mixin/link.scss b/ui/scss/mixin/link.scss similarity index 100% rename from src/renderer/scss/mixin/link.scss rename to ui/scss/mixin/link.scss diff --git a/src/renderer/scss/page/_show.scss b/ui/scss/page/_show.scss similarity index 100% rename from src/renderer/scss/page/_show.scss rename to ui/scss/page/_show.scss diff --git a/src/renderer/watch.bat b/ui/watch.bat similarity index 88% rename from src/renderer/watch.bat rename to ui/watch.bat index af8c2c2ed..000bbc6df 100644 --- a/src/renderer/watch.bat +++ b/ui/watch.bat @@ -7,5 +7,5 @@ for %%F in ( ) do if exist %%F (set found=1) if not defined found EXIT -node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\..\main\dist\css --sourcemap=none %~dp0\scss +node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\..\app\dist\css --sourcemap=none %~dp0\scss %~dp0\node_modules\.bin\webpack --config %~dp0\webpack.dev.js --progress --colors --watch \ No newline at end of file diff --git a/src/renderer/watch.sh b/ui/watch.sh similarity index 74% rename from src/renderer/watch.sh rename to ui/watch.sh index e54efaff4..e7092699d 100755 --- a/src/renderer/watch.sh +++ b/ui/watch.sh @@ -18,8 +18,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" fi # run sass once without --watch to force update. then run with --watch to keep watching - node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none $DIR/scss/ - node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none --watch $DIR/scss/ & + node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none $DIR/scss/ + node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none --watch $DIR/scss/ & node_modules/.bin/webpack --config webpack.dev.js --progress --colors --watch ) \ No newline at end of file diff --git a/src/renderer/webpack.common.js b/ui/webpack.common.js similarity index 96% rename from src/renderer/webpack.common.js rename to ui/webpack.common.js index 3e843a89e..d2d7e0719 100644 --- a/src/renderer/webpack.common.js +++ b/ui/webpack.common.js @@ -5,7 +5,7 @@ const appPath = path.resolve(__dirname, "js"); process.traceDeprecation = true; const PATHS = { - app: path.join(__dirname, "src/main"), + app: path.join(__dirname, "app"), dist: path.join(__dirname, "dist") }; diff --git a/src/renderer/webpack.dev.js b/ui/webpack.dev.js similarity index 91% rename from src/renderer/webpack.dev.js rename to ui/webpack.dev.js index 877b10d51..e5d72b83b 100644 --- a/src/renderer/webpack.dev.js +++ b/ui/webpack.dev.js @@ -6,7 +6,7 @@ const common = require('./webpack.common.js'); const PATHS = { - dist: path.join(__dirname, "..", "main", "dist") + dist: path.join(__dirname, "..", "app", "dist") }; module.exports = merge(common, { diff --git a/src/renderer/webpack.prod.js b/ui/webpack.prod.js similarity index 100% rename from src/renderer/webpack.prod.js rename to ui/webpack.prod.js diff --git a/src/renderer/yarn.lock b/ui/yarn.lock similarity index 100% rename from src/renderer/yarn.lock rename to ui/yarn.lock