diff --git a/.eslintrc.json b/.eslintrc.json index ca6035fa1..b6cda7522 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,7 +19,8 @@ "__": true, "__n": true, "app": true, - "IS_WEB": true + "IS_WEB": true, + "WEBPACK_PORT": true }, "rules": { "comma-dangle": ["error", "always-multiline"], diff --git a/flow-typed/publish.js b/flow-typed/publish.js index 27f626c6d..0d1cc0acf 100644 --- a/flow-typed/publish.js +++ b/flow-typed/publish.js @@ -4,7 +4,7 @@ declare type UpdatePublishFormData = { filePath?: string, contentIsFree?: boolean, fee?: { - amount: number, + amount: string, currency: string, }, title?: string, diff --git a/package.json b/package.json index af107dd5b..051580488 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.32.0-rc.1", + "version": "0.32.0-rc.6", "description": "A browser for the LBRY network, a digital marketplace controlled by its users.", "keywords": [ "lbry" @@ -26,7 +26,7 @@ "dev": "yarn dev:electron", "dev:electron": "cross-env NODE_ENV=development node ./src/platforms/electron/devServer.js", "dev:web": "cross-env NODE_ENV=development webpack-dev-server --open --hot --progress --config webpack.web.config.js", - "dev:internal-apis": "LBRY_API_URL='http://localhost:9090' yarn dev:electron", + "dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev:electron", "run:web": "cross-env NODE_ENV=production yarn compile:web && node ./dist/web/server.js", "pack": "electron-builder --dir", "dist": "electron-builder", @@ -117,7 +117,7 @@ "jsmediatags": "^3.8.1", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#c8126ab21792d7a85e1123a2363af285a0263654", + "lbry-redux": "lbryio/lbry-redux#02f6918238110726c0b3b4248c61a84ac0b969e3", "lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845", "lint-staged": "^7.0.2", "localforage": "^1.7.1", @@ -151,7 +151,6 @@ "react-router-dom": "^5.0.0", "react-simplemde-editor": "^4.0.0", "react-toggle": "^4.0.2", - "react-virtualized": "^9.21.0", "redux": "^3.6.0", "redux-persist": "^4.8.0", "redux-persist-transform-compress": "^4.2.0", @@ -188,7 +187,7 @@ "yarn": "^1.3" }, "lbrySettings": { - "lbrynetDaemonVersion": "0.37.0rc5", + "lbrynetDaemonVersion": "0.37.0", "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip", "lbrynetDaemonDir": "static/daemon", "lbrynetDaemonFileName": "lbrynet" diff --git a/src/platforms/electron/createWindow.js b/src/platforms/electron/createWindow.js index 79f7ed769..584e6d536 100644 --- a/src/platforms/electron/createWindow.js +++ b/src/platforms/electron/createWindow.js @@ -36,7 +36,7 @@ export default appState => { }; const lbryProto = 'lbry://'; const lbryProtoQ = 'lbry://?'; - const rendererURL = isDev ? `http://localhost:8080` : `file://${__dirname}/index.html`; + const rendererURL = isDev ? `http://localhost:${WEBPACK_PORT}` : `file://${__dirname}/index.html`; let window = new BrowserWindow(windowConfiguration); diff --git a/src/platforms/electron/devServer.js b/src/platforms/electron/devServer.js index a8c16a220..85ef85696 100644 --- a/src/platforms/electron/devServer.js +++ b/src/platforms/electron/devServer.js @@ -1,5 +1,3 @@ -const fs = require('fs'); -const path = require('path'); const chalk = require('chalk'); const webpack = require('webpack'); const merge = require('webpack-merge'); @@ -7,12 +5,9 @@ const middleware = require('webpack-dev-middleware'); const express = require('express'); const app = express(); -// TODO: Spawn separate threads so realtime status logging can be used -// without overwriting information/execptions logged by the compilers -const logRealtime = str => { - let lineCount = (str.match(/\n/) || []).length + 1; - console.log('\u001B[' + lineCount + 'F\u001B[G\u001B[2K' + str); -}; +// Primary definition for this is in webpack.web.config.js +// We can't access it here because webpack isn't running on this file +const WEBPACK_PORT = 9090; console.log( chalk.magenta(`Compiling ${chalk.underline('main')} and ${chalk.underline('render')}, this will take a while.`) @@ -46,8 +41,8 @@ app.use(require('webpack-hot-middleware')(renderCompiler)); app.use(renderInstance); app.use(express.static('dist/electron/static')); -app.listen(8080, () => { - console.log(chalk.yellow.bold('Renderer listening on port 8080 (still compiling)')); +app.listen(WEBPACK_PORT, () => { + console.log(chalk.yellow.bold(`Renderer listening on port ${WEBPACK_PORT} (still compiling)`)); }); mainInstance.waitUntilValid(() => console.log(chalk.green(`${chalk.underline('main')} compilation complete.`))); diff --git a/src/ui/component/channelThumbnail/gerbil.png b/src/ui/component/channelThumbnail/gerbil.png new file mode 100644 index 000000000..c19e658d2 Binary files /dev/null and b/src/ui/component/channelThumbnail/gerbil.png differ diff --git a/src/ui/component/channelThumbnail/view.jsx b/src/ui/component/channelThumbnail/view.jsx index 054f1021e..d52df8292 100644 --- a/src/ui/component/channelThumbnail/view.jsx +++ b/src/ui/component/channelThumbnail/view.jsx @@ -1,15 +1,30 @@ // @flow import React from 'react'; +import { parseURI } from 'lbry-redux'; +import classnames from 'classnames'; +import Gerbil from './gerbil.png'; type Props = { thumbnail: ?string, + uri: string, }; function ChannelThumbnail(props: Props) { - const { thumbnail } = props; + const { thumbnail, uri } = props; + + // Generate a random color class based on the first letter of the channel name + const { channelName } = parseURI(uri); + const initializer = channelName.charCodeAt(0) - 65; // will be between 0 and 57 + const className = `channel-thumbnail__default--${initializer % 4}`; + return ( -
- {thumbnail && } +
+ {!thumbnail && } + {thumbnail && }
); } diff --git a/src/ui/component/common/icon.jsx b/src/ui/component/common/icon.jsx index 79b2365ef..fc13a5851 100644 --- a/src/ui/component/common/icon.jsx +++ b/src/ui/component/common/icon.jsx @@ -25,7 +25,7 @@ class IconComponent extends React.PureComponent { switch (icon) { case ICONS.FEATURED: return __('Featured content. Earn rewards for watching.'); - case ICONS.LOCAL: + case ICONS.DOWNLOAD: return __('This file is downloaded.'); default: return null; diff --git a/src/ui/component/common/paginate.jsx b/src/ui/component/common/paginate.jsx index c30be815f..70c21f331 100644 --- a/src/ui/component/common/paginate.jsx +++ b/src/ui/component/common/paginate.jsx @@ -16,7 +16,7 @@ type Props = { }; function Paginate(props: Props) { - const { totalPages, loading, location, history, onPageChange } = props; + const { totalPages = 1, loading, location, history, onPageChange } = props; const { search } = location; const urlParams = new URLSearchParams(search); const currentPage = Number(urlParams.get(PAGINATE_PARAM)) || 1; diff --git a/src/ui/component/errorBoundary/view.jsx b/src/ui/component/errorBoundary/view.jsx index 39751f9e0..632f0c2d2 100644 --- a/src/ui/component/errorBoundary/view.jsx +++ b/src/ui/component/errorBoundary/view.jsx @@ -3,19 +3,25 @@ import { Lbryio } from 'lbryinc'; import * as React from 'react'; import Yrbl from 'component/yrbl'; import Button from 'component/button'; +import { withRouter } from 'react-router'; type Props = { children: React.Node, + history: { + replace: string => void, + }, }; type State = { hasError: boolean, }; -export default class ErrorBoundary extends React.Component { +class ErrorBoundary extends React.Component { constructor() { super(); this.state = { hasError: false }; + + (this: any).refresh = this.refresh.bind(this); } static getDerivedStateFromError() { @@ -35,6 +41,13 @@ export default class ErrorBoundary extends React.Component { } } + refresh() { + const { history } = this.props; + // use history.replace instead of history.push so the user can't click back to the errored page + history.replace(''); + this.setState({ hasError: false }); + } + render() { if (this.state.hasError) { return ( @@ -50,7 +63,7 @@ export default class ErrorBoundary extends React.Component { button="link" className="load-screen__button" label={__('refreshing the app')} - onClick={() => (window.location.href = '/')} + onClick={this.refresh} />{' '} {__('to fix it')}.

@@ -64,3 +77,5 @@ export default class ErrorBoundary extends React.Component { return this.props.children; } } + +export default withRouter(ErrorBoundary); diff --git a/src/ui/component/fileCard/view.jsx b/src/ui/component/fileCard/view.jsx index 351d5585e..a2d4e88d7 100644 --- a/src/ui/component/fileCard/view.jsx +++ b/src/ui/component/fileCard/view.jsx @@ -12,7 +12,6 @@ import { openCopyLinkMenu } from 'util/context-menu'; import DateTime from 'component/dateTime'; import { withRouter } from 'react-router-dom'; import { formatLbryUriForWeb } from 'util/uri'; -import get from 'lodash.get'; type Props = { uri: string, @@ -65,7 +64,6 @@ class FileCard extends React.PureComponent { const { claim, fileInfo, - metadata, rewardedContentClaimIds, obscureNsfw, claimIsMine, @@ -106,7 +104,6 @@ class FileCard extends React.PureComponent { const uri = !pending ? normalizeURI(this.props.uri) : this.props.uri; const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); - const height = claim && claim.height; const handleContextMenu = event => { event.preventDefault(); event.stopPropagation(); @@ -146,7 +143,7 @@ class FileCard extends React.PureComponent { {isRewardContent && } {isSubscribed && } {claimIsMine && } - {!claimIsMine && fileInfo && } + {!claimIsMine && fileInfo && } {isNew && {__('NEW')}}
diff --git a/src/ui/component/fileDetails/view.jsx b/src/ui/component/fileDetails/view.jsx index 2ee12f074..7645d1f9d 100644 --- a/src/ui/component/fileDetails/view.jsx +++ b/src/ui/component/fileDetails/view.jsx @@ -92,7 +92,6 @@ class FileDetails extends PureComponent { {__('Downloaded to')} {': '} )} diff --git a/src/ui/component/transactionList/view.jsx b/src/ui/component/transactionList/view.jsx index ae9d63b52..35ad1c861 100644 --- a/src/ui/component/transactionList/view.jsx +++ b/src/ui/component/transactionList/view.jsx @@ -14,6 +14,7 @@ type Props = { transactions: Array, rewards: {}, openModal: (id: string, { nout: number, txid: string }) => void, + mySupports: {}, myClaims: any, filterSetting: string, setTransactionFilter: string => void, @@ -42,10 +43,9 @@ class TransactionList extends React.PureComponent { } isRevokeable(txid: string, nout: number) { - const { myClaims } = this.props; - // a claim/support/update is revokable if it - // is in my claim list(claim_list_mine) - return myClaims.has(`${txid}:${nout}`); + const outpoint = `${txid}:${nout}`; + const { mySupports, myClaims } = this.props; + return !!mySupports[outpoint] || myClaims.has(outpoint); } revokeClaim(txid: string, nout: number) { diff --git a/src/ui/component/transactionListRecent/view.jsx b/src/ui/component/transactionListRecent/view.jsx index da6578aa2..fcd979124 100644 --- a/src/ui/component/transactionListRecent/view.jsx +++ b/src/ui/component/transactionListRecent/view.jsx @@ -39,6 +39,12 @@ class TransactionListRecent extends React.PureComponent { )} + {!fetchingTransactions && !hasTransactions && ( +
+

{__('No transactions... yet.')}

+
+ )} + {hasTransactions && (
diff --git a/src/ui/page/backup/index.js b/src/ui/component/walletBackup/index.js similarity index 69% rename from src/ui/page/backup/index.js rename to src/ui/component/walletBackup/index.js index df4f971d8..5d0057d8b 100644 --- a/src/ui/page/backup/index.js +++ b/src/ui/component/walletBackup/index.js @@ -1,9 +1,9 @@ import { connect } from 'react-redux'; import { selectDaemonSettings } from 'redux/selectors/settings'; -import BackupPage from './view'; +import WalletBackup from './view'; const select = state => ({ daemonSettings: selectDaemonSettings(state), }); -export default connect(select)(BackupPage); +export default connect(select)(WalletBackup); diff --git a/src/ui/component/walletBackup/view.jsx b/src/ui/component/walletBackup/view.jsx new file mode 100644 index 000000000..322cf0dec --- /dev/null +++ b/src/ui/component/walletBackup/view.jsx @@ -0,0 +1,66 @@ +// @flow +import * as React from 'react'; +import Button from 'component/button'; + +type Props = { + daemonSettings: { + wallet_dir: ?string, + }, +}; + +class WalletBackup extends React.PureComponent { + render() { + const { daemonSettings } = this.props; + const { wallet_dir: lbryumWalletDir } = daemonSettings; + + const noDaemonSettings = Object.keys(daemonSettings).length === 0; + + return ( +
+ {noDaemonSettings ? ( +
+

{__('Failed to load settings.')}

+
+ ) : ( + +
+

{__('Backup Your LBRY Credits')}

+ +

+ {__( + 'Your LBRY credits are controllable by you and only you, via wallet file(s) stored locally on your computer.' + )} +

+
+ +
+

+ {__( + 'Currently, there is no automatic wallet backup. If you lose access to these files, you will lose your credits permanently.' + )} +

+

+ {__( + 'However, it is fairly easy to back up manually. To backup your wallet, make a copy of the folder listed below:' + )} +

+

{lbryumWalletDir}

+

+ {__( + 'Access to these files are equivalent to having access to your credits. Keep any copies you make of your wallet in a secure place.' + )} +

+

+ For more details on backing up and best practices,{' '} +

+
+ )} +
+ ); + } +} + +export default WalletBackup; diff --git a/src/ui/component/walletSend/view.jsx b/src/ui/component/walletSend/view.jsx index e98f71eda..199b57370 100644 --- a/src/ui/component/walletSend/view.jsx +++ b/src/ui/component/walletSend/view.jsx @@ -92,12 +92,12 @@ class WalletSend extends React.PureComponent { parseFloat(values.amount) === balance } /> - {!!Object.keys(errors).length && ( + {!!Object.keys(errors).length || ( {(!!values.address && touched.address && errors.address) || (!!values.amount && touched.amount && errors.amount) || - (values.amount === balance && __('Decrease amount to account for transaction fee')) || - (values.amount > balance && __('Not enough credits'))} + (parseFloat(values.amount) === balance && __('Decrease amount to account for transaction fee')) || + (parseFloat(values.amount) > balance && __('Not enough credits'))} )}
diff --git a/src/ui/modal/modalPhoneCollection/view.jsx b/src/ui/modal/modalPhoneCollection/view.jsx index bf2db9d62..f84c96216 100644 --- a/src/ui/modal/modalPhoneCollection/view.jsx +++ b/src/ui/modal/modalPhoneCollection/view.jsx @@ -3,7 +3,7 @@ import React, { Suspense } from 'react'; import { Modal } from 'modal/modal'; import Button from 'component/button'; import UserPhoneVerify from 'component/userPhoneVerify'; -import { withRouter } from 'react-router-dom'; +import { Redirect } from 'react-router'; const LazyUserPhoneNew = React.lazy(() => import(/* webpackChunkName: "userPhoneNew" */ @@ -13,7 +13,7 @@ const LazyUserPhoneNew = React.lazy(() => type Props = { phone: ?number, user: { - phone_number: ?number, + is_identity_verified: boolean, }, closeModal: () => void, history: { push: string => void }, @@ -23,29 +23,30 @@ class ModalPhoneCollection extends React.PureComponent { getTitle() { const { user, phone } = this.props; - if (!user.phone_number && !phone) { + if (!user.is_identity_verified && !phone) { return __('Enter Your Phone Number'); } + return __('Enter The Verification Code'); } renderInner() { - const { closeModal, phone, user, history } = this.props; + const { closeModal, phone, user } = this.props; const cancelButton = {isChannel ? ( @@ -52,7 +52,6 @@ export default function SearchPage(props: Props) {
-
{__('These search results are provided by LBRY, Inc.')}
diff --git a/src/ui/redux/actions/file.js b/src/ui/redux/actions/file.js index 8fb94aa06..99b95cd7c 100644 --- a/src/ui/redux/actions/file.js +++ b/src/ui/redux/actions/file.js @@ -35,7 +35,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) { if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) { const [txid, nout] = outpoint.split(':'); - dispatch(doAbandonClaim(txid, nout)); + dispatch(doAbandonClaim(txid, Number(nout))); } dispatch({ diff --git a/src/ui/redux/actions/publish.js b/src/ui/redux/actions/publish.js index 1e21afcb9..7d3ffba27 100644 --- a/src/ui/redux/actions/publish.js +++ b/src/ui/redux/actions/publish.js @@ -43,7 +43,6 @@ export const doResetThumbnailStatus = () => (dispatch: Dispatch) => { data: { uploadThumbnailStatus: THUMBNAIL_STATUSES.READY, thumbnail: '', - nsfw: false, }, }); }) @@ -53,7 +52,6 @@ export const doResetThumbnailStatus = () => (dispatch: Dispatch) => { data: { uploadThumbnailStatus: THUMBNAIL_STATUSES.API_DOWN, thumbnail: '', - nsfw: false, }, }) ); diff --git a/src/ui/scss/component/_card.scss b/src/ui/scss/component/_card.scss index add8c9937..ab177228c 100644 --- a/src/ui/scss/component/_card.scss +++ b/src/ui/scss/component/_card.scss @@ -1,6 +1,5 @@ .card { background-color: $lbry-white; - border: 1px solid $lbry-gray-1; margin-bottom: var(--spacing-vertical-xlarge); position: relative; border-radius: var(--card-radius); @@ -8,7 +7,6 @@ html[data-mode='dark'] & { background-color: rgba($lbry-white, 0.1); - border-color: rgba($lbry-white, 0.1); box-shadow: var(--card-box-shadow) darken($lbry-gray-1, 80%); } } @@ -125,15 +123,15 @@ // Depending on screen width, the amount of items in // each row change and are auto-sized - @media (min-width: 2001px) { - grid-template-columns: repeat(auto-fill, minmax(calc(100% / 10), 1fr)); - } + // @media (min-width: 2001px) { + // grid-template-columns: repeat(auto-fill, minmax(calc(100% / 10), 1fr)); + // } - @media (min-width: 1801px) and (max-width: 2000px) { - grid-template-columns: repeat(auto-fill, minmax(calc(100% / 8), 1fr)); - } + // @media (min-width: 1801px) and (max-width: 2000px) { + // grid-template-columns: repeat(auto-fill, minmax(calc(100% / 8), 1fr)); + // } - @media (min-width: 1551px) and (max-width: 1800px) { + @media (min-width: 1551px) { grid-template-columns: repeat(auto-fill, minmax(calc(100% / 7), 1fr)); } diff --git a/src/ui/scss/component/_channel.scss b/src/ui/scss/component/_channel.scss index 3552b21c1..fcbadeaf1 100644 --- a/src/ui/scss/component/_channel.scss +++ b/src/ui/scss/component/_channel.scss @@ -1,7 +1,7 @@ $cover-z-index: 0; $metadata-z-index: 1; -.channel__cover { +.channel-cover { background-image: linear-gradient(to right, $lbry-indigo-4, $lbry-cyan-5 80%); display: flex; align-items: flex-end; @@ -9,41 +9,62 @@ $metadata-z-index: 1; color: $lbry-white; } -.channel__cover--custom { +.channel-cover__custom { z-index: $cover-z-index; align-self: flex-start; position: absolute; object-fit: cover; - filter: brightness(40%); + filter: brightness(60%); } -.channel__cover, -.channel__cover--custom { +.channel-cover, +.channel-cover__custom { height: var(--cover-photo-height); width: 100%; } -.channel__thumbnail { +.channel-thumbnail { position: absolute; + display: flex; left: var(--spacing-main-padding); height: var(--channel-thumbnail-size); width: var(--channel-thumbnail-size); - background-color: $lbry-gray-3; - background-image: linear-gradient(to right, $lbry-white, $lbry-gray-3 80%); background-size: cover; box-shadow: 0px 8px 40px -3px $lbry-black; } -.channel__thumbnail--custom { +.channel-thumbnail__custom { width: 100%; object-fit: cover; } -.channel__thumbnail, -.channel__thumbnail--custom { +.channel-thumbnail__default { + width: 80%; + height: 80%; + margin-left: auto; + margin-right: auto; + align-self: flex-end; + margin-bottom: -1px; +} + +.channel-thumbnail, +.channel-thumbnail__custom { border-radius: var(--card-radius); } +.channel-thumbnail__default--0 { + background-color: $lbry-indigo-3; +} +.channel-thumbnail__default--1 { + background-color: $lbry-orange-2; +} +.channel-thumbnail__default--2 { + background-color: $lbry-blue-3; +} +.channel-thumbnail__default--3 { + background-color: $lbry-red-1; +} + .channel__primary-info { // Ensure the profile pic/title sit ontop of the default cover background z-index: $metadata-z-index; @@ -61,11 +82,6 @@ $metadata-z-index: 1; .channel__url { font-size: 1.2rem; - user-select: all; margin-top: -0.25rem; + color: rgba($lbry-white, 0.75); } - -// .channel__description { -// font-size: 1.3rem; -// margin: var(--spacing-vertical-large) 0; -// } diff --git a/src/ui/scss/component/_item-list.scss b/src/ui/scss/component/_item-list.scss index aea7be3fb..5ed35d150 100644 --- a/src/ui/scss/component/_item-list.scss +++ b/src/ui/scss/component/_item-list.scss @@ -1,6 +1,5 @@ .item-list { background-color: $lbry-white; - margin-top: var(--spacing-vertical-large); margin-bottom: var(--spacing-vertical-large); padding: var(--spacing-vertical-large); diff --git a/src/ui/scss/component/_search.scss b/src/ui/scss/component/_search.scss index 6ef816de9..4aa9c5004 100644 --- a/src/ui/scss/component/_search.scss +++ b/src/ui/scss/component/_search.scss @@ -30,14 +30,9 @@ position: relative; } -.search__results-title { - @extend .media-group__header-title; - margin-bottom: var(--spacing-vertical-large); -} - .search__options-wrapper { font-size: 1.25em; - margin-bottom: var(--spacing-vertical-large); + margin: var(--spacing-vertical-xlarge) 0; } .search__options { diff --git a/src/ui/scss/component/_table.scss b/src/ui/scss/component/_table.scss index b85f785f2..d97492ed4 100644 --- a/src/ui/scss/component/_table.scss +++ b/src/ui/scss/component/_table.scss @@ -29,6 +29,8 @@ table, } .table--transactions { + table-layout: fixed; + td:nth-of-type(1) { // TX amounts font-size: 0.9em; @@ -36,10 +38,13 @@ table, } td:nth-of-type(3) { - max-width: 150px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + // Only add ellipsis to the links in the table + // We still want to show the entire message if a TX includes one + .button__content { + @include constrict(10rem); + vertical-align: bottom; + display: inline-block; + } } } diff --git a/src/ui/scss/init/_vars.scss b/src/ui/scss/init/_vars.scss index fe0f7e72a..ae5a3129e 100644 --- a/src/ui/scss/init/_vars.scss +++ b/src/ui/scss/init/_vars.scss @@ -77,5 +77,5 @@ $large-breakpoint: 1921px; // Image --thumbnail-preview-height: 100px; --thumbnail-preview-width: 177px; - --cover-photo-height: 250px; + --cover-photo-height: 300px; } diff --git a/static/index.dev.html b/static/index.dev.html index a4796bb47..88166d44b 100644 --- a/static/index.dev.html +++ b/static/index.dev.html @@ -7,6 +7,10 @@
- + + diff --git a/webpack.base.config.js b/webpack.base.config.js index 167716858..8d67e6c70 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -13,6 +13,12 @@ const UI_ROOT = path.resolve(__dirname, 'src/ui/'); const STATIC_ROOT = path.resolve(__dirname, 'static/'); const DIST_ROOT = path.resolve(__dirname, 'dist/'); +// There are a two other uses of this value that can't access it from webpack +// They exist in +// src/platforms/electron/devServer.js +// static/index.dev.html +const WEBPACK_PORT = 9090; + console.log(ifProduction('production', 'development')); let baseConfig = { @@ -32,6 +38,10 @@ let baseConfig = { node: { __dirname: false, }, + devServer: { + historyApiFallback: true, + port: WEBPACK_PORT, + }, module: { rules: [ { @@ -117,6 +127,7 @@ let baseConfig = { 'process.env.NODE_ENV': JSON.stringify(NODE_ENV), 'process.env.SDK_API_URL': JSON.stringify(process.env.SDK_API_URL), 'process.env.LBRY_API_URL': JSON.stringify(process.env.LBRY_API_URL), + WEBPACK_PORT, }), ], }; diff --git a/webpack.web.config.js b/webpack.web.config.js index 731c4bed8..b0e89c0a7 100644 --- a/webpack.web.config.js +++ b/webpack.web.config.js @@ -18,9 +18,6 @@ const webConfig = { path: __dirname + '/dist/web', publicPath: '/', }, - devServer: { - historyApiFallback: true, - }, module: { rules: [ { diff --git a/yarn.lock b/yarn.lock index 1c88b4d11..e5a0fd298 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2389,7 +2389,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.3, classnames@^2.2.5: +classnames@^2.2.5: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== @@ -3540,13 +3540,6 @@ dom-converter@^0.2: dependencies: utila "~0.4" -"dom-helpers@^2.4.0 || ^3.0.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" - integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== - dependencies: - "@babel/runtime" "^7.1.2" - dom-scroll-into-view@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz#e8f36732dd089b0201a88d7815dc3f88e6d66c7e" @@ -6498,9 +6491,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4: yargs "^13.2.2" zstd-codec "^0.1.1" -lbry-redux@lbryio/lbry-redux#423123f1c19e61cead67c745d0892a2e4481cb6a: +lbry-redux@lbryio/lbry-redux#02f6918238110726c0b3b4248c61a84ac0b969e3: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/423123f1c19e61cead67c745d0892a2e4481cb6a" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/02f6918238110726c0b3b4248c61a84ac0b969e3" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0" @@ -6814,7 +6807,7 @@ longest-streak@^2.0.1: resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.2.tgz#2421b6ba939a443bb9ffebf596585a50b4c38e2e" integrity sha512-TmYTeEYxiAmSVdpbnQDXGtvYOIRsCMg89CVZzwzc2o7GFL1CjoiRPjH5ec0NFAVlAx3fVof9dX/t6KKRAo2OWA== -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.0, loose-envify@^1.3.1, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -9381,18 +9374,6 @@ react-toggle@^4.0.2: dependencies: classnames "^2.2.5" -react-virtualized@^9.21.0: - version "9.21.0" - resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.21.0.tgz#8267c40ffb48db35b242a36dea85edcf280a6506" - integrity sha512-duKD2HvO33mqld4EtQKm9H9H0p+xce1c++2D5xn59Ma7P8VT7CprfAe5hwjd1OGkyhqzOZiTMlTal7LxjH5yBQ== - dependencies: - babel-runtime "^6.26.0" - classnames "^2.2.3" - dom-helpers "^2.4.0 || ^3.0.0" - loose-envify "^1.3.0" - prop-types "^15.6.0" - react-lifecycles-compat "^3.0.4" - react@^16.8.2: version "16.8.6" resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"