Merge pull request #411 from hackrush01/quickfix

(quickfix) Now displays quit button in IncompatibleDaemonModal.
This commit is contained in:
Jeremy Kauffman 2017-08-01 09:23:57 -04:00 committed by GitHub
commit c2c910ba9f
3 changed files with 11 additions and 8 deletions

View file

@ -297,9 +297,8 @@ export function doClearCache() {
}; };
} }
export function doQuitAndLaunchDaemonHelp() { export function doQuit() {
return function(dispatch, getState) { return function(dispatch, getState) {
shell.openExternal("https://lbry.io/faq/incompatible-protocol-version");
remote.app.quit(); remote.app.quit();
}; };
} }

View file

@ -1,13 +1,12 @@
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { doQuit, doSkipWrongDaemonNotice } from "actions/app"; import { doQuit, doSkipWrongDaemonNotice } from "actions/app";
import { doQuitAndLaunchDaemonHelp } from "actions/app";
import ModalIncompatibleDaemon from "./view"; import ModalIncompatibleDaemon from "./view";
const select = state => ({}); const select = state => ({});
const perform = dispatch => ({ const perform = dispatch => ({
quitAndLaunchDaemonHelp: () => dispatch(doQuitAndLaunchDaemonHelp()), quit: () => dispatch(doQuit()),
}); });
export default connect(select, perform)(ModalIncompatibleDaemon); export default connect(select, perform)(ModalIncompatibleDaemon);

View file

@ -1,21 +1,26 @@
import React from "react"; import React from "react";
import { Modal } from "component/modal"; import { Modal } from "component/modal";
import Link from "component/link";
class ModalIncompatibleDaemon extends React.PureComponent { class ModalIncompatibleDaemon extends React.PureComponent {
render() { render() {
const { quitAndLaunchDaemonHelp } = this.props; const { quit } = this.props;
return ( return (
<Modal <Modal
isOpen={true} isOpen={true}
contentLabel={__("Incompatible daemon running")} contentLabel={__("Incompatible daemon running")}
type="alert" type="alert"
confirmButtonLabel={__("Quit and Learn More")} confirmButtonLabel={__("Quit")}
onConfirmed={quitAndLaunchDaemonHelp} onConfirmed={quit}
> >
{__( {__(
"This browser is running with an incompatible version of the LBRY protocol and your install must be repaired. " "This browser is running with an incompatible version of the LBRY protocol and your install must be repaired. "
)} )}
<Link
label={__("Learn more")}
href="https://lbry.io/faq/incompatible-protocol-version"
/>
</Modal> </Modal>
); );
} }