diff --git a/package.json b/package.json index 0787f6304..e708bd722 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "yarn": "^1.3" }, "lbrySettings": { - "lbrynetDaemonVersion": "0.30.0", + "lbrynetDaemonVersion": "0.30.1rc1", "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip", "lbrynetDaemonDir": "static/daemon", "lbrynetDaemonFileName": "lbrynet" diff --git a/src/renderer/component/address/index.js b/src/renderer/component/address/index.js index e38b68ada..3d24bd7e7 100644 --- a/src/renderer/component/address/index.js +++ b/src/renderer/component/address/index.js @@ -1,12 +1,12 @@ // @flow import { connect } from 'react-redux'; -import { doNotify } from 'lbry-redux'; +import { doToast } from 'lbry-redux'; import Address from './view'; export default connect( null, { - doNotify, + doToast, } )(Address); diff --git a/src/renderer/component/address/view.jsx b/src/renderer/component/address/view.jsx index aa252f920..81c6ba0ad 100644 --- a/src/renderer/component/address/view.jsx +++ b/src/renderer/component/address/view.jsx @@ -11,8 +11,7 @@ https://github.com/lbryio/lbry-desktop/issues/1945 */ type Props = { address: string, - noSnackbar: boolean, - doNotify: ({ message: string, displayType: Array }) => void, + doToast: ({ message: string }) => void, }; export default class Address extends React.PureComponent { @@ -25,7 +24,7 @@ export default class Address extends React.PureComponent { input: ?HTMLInputElement; render() { - const { address, doNotify, noSnackbar } = this.props; + const { address, doToast } = this.props; return ( @@ -48,12 +47,9 @@ export default class Address extends React.PureComponent { icon={icons.CLIPBOARD} onClick={() => { clipboard.writeText(address); - if (!noSnackbar) { - doNotify({ - message: __('Address copied'), - displayType: ['snackbar'], - }); - } + doToast({ + message: __('Address copied'), + }); }} /> diff --git a/src/renderer/component/app/index.js b/src/renderer/component/app/index.js index b5c8a2218..b188a0c5e 100644 --- a/src/renderer/component/app/index.js +++ b/src/renderer/component/app/index.js @@ -1,8 +1,7 @@ import { connect } from 'react-redux'; -import { selectPageTitle, selectHistoryIndex, selectActiveHistoryEntry } from 'lbry-redux'; +import { selectPageTitle, selectHistoryIndex, selectActiveHistoryEntry, doError } from 'lbry-redux'; import { doRecordScroll } from 'redux/actions/navigation'; import { selectUser } from 'lbryinc'; -import { doAlertError } from 'redux/actions/app'; import { selectThemePath } from 'redux/selectors/settings'; import App from './view'; @@ -15,7 +14,7 @@ const select = state => ({ }); const perform = dispatch => ({ - alertError: errorList => dispatch(doAlertError(errorList)), + alertError: errorList => dispatch(doError(errorList)), recordScroll: scrollPosition => dispatch(doRecordScroll(scrollPosition)), }); diff --git a/src/renderer/component/copyableText/index.js b/src/renderer/component/copyableText/index.js index f759811aa..070ea0e99 100644 --- a/src/renderer/component/copyableText/index.js +++ b/src/renderer/component/copyableText/index.js @@ -1,10 +1,10 @@ import { connect } from 'react-redux'; -import { doNotify } from 'lbry-redux'; +import { doToast } from 'lbry-redux'; import CopyableText from './view'; export default connect( null, { - doNotify, + doToast, } )(CopyableText); diff --git a/src/renderer/component/copyableText/view.jsx b/src/renderer/component/copyableText/view.jsx index e47a37506..b09f28913 100644 --- a/src/renderer/component/copyableText/view.jsx +++ b/src/renderer/component/copyableText/view.jsx @@ -4,15 +4,10 @@ import { clipboard } from 'electron'; import { FormRow } from 'component/common/form'; import Button from 'component/button'; import * as icons from 'constants/icons'; -/* -noSnackbar added due to issue 1945 -https://github.com/lbryio/lbry-desktop/issues/1945 -"Snackbars and modals can't be displayed at the same time" -*/ + type Props = { copyable: string, - noSnackbar: boolean, - doNotify: ({ message: string, displayType: Array }) => void, + doToast: ({ message: string }) => void, }; export default class CopyableText extends React.PureComponent { @@ -25,7 +20,7 @@ export default class CopyableText extends React.PureComponent { input: ?HTMLInputElement; render() { - const { copyable, doNotify, noSnackbar } = this.props; + const { copyable, doToast, noSnackbar } = this.props; return ( @@ -49,12 +44,9 @@ export default class CopyableText extends React.PureComponent { icon={icons.CLIPBOARD} onClick={() => { clipboard.writeText(copyable); - if (!noSnackbar) { - doNotify({ - message: __('Text copied'), - displayType: ['snackbar'], - }); - } + doToast({ + message: __('Text copied'), + }); }} /> diff --git a/src/renderer/component/externalLink/index.js b/src/renderer/component/externalLink/index.js index 2855016f2..c0cfb79ce 100644 --- a/src/renderer/component/externalLink/index.js +++ b/src/renderer/component/externalLink/index.js @@ -1,12 +1,12 @@ import { connect } from 'react-redux'; -import { doNotify } from 'lbry-redux'; +import { doOpenModal } from 'redux/actions/app'; import { doNavigate } from 'redux/actions/navigation'; import ExternalLink from './view'; const select = () => ({}); const perform = dispatch => ({ navigate: (path, params) => dispatch(doNavigate(path, params)), - openModal: (modal, props) => dispatch(doNotify(modal, props)), + openModal: (modal, props) => dispatch(doOpenModal(modal, props)), }); export default connect(select, perform)(ExternalLink); diff --git a/src/renderer/component/externalLink/view.jsx b/src/renderer/component/externalLink/view.jsx index e42197432..11a8bee65 100644 --- a/src/renderer/component/externalLink/view.jsx +++ b/src/renderer/component/externalLink/view.jsx @@ -1,7 +1,8 @@ // @flow +import * as MODALS from 'constants/modal_types'; +import * as ICONS from 'constants/icons'; import * as React from 'react'; -import { MODALS, isURIValid } from 'lbry-redux'; -import * as icons from 'constants/icons'; +import { isURIValid } from 'lbry-redux'; import Button from 'component/button'; type Props = { @@ -9,7 +10,7 @@ type Props = { title?: string, children: React.Node, navigate: (string, ?{}) => void, - openModal: ({ id: string }, { uri: string }) => void, + openModal: (id: string, { uri: string }) => void, }; class ExternalLink extends React.PureComponent { @@ -33,11 +34,11 @@ class ExternalLink extends React.PureComponent { element = (