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) {
shell.openExternal("https://lbry.io/faq/incompatible-protocol-version");
remote.app.quit();
};
}

View file

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

View file

@ -1,21 +1,26 @@
import React from "react";
import { Modal } from "component/modal";
import Link from "component/link";
class ModalIncompatibleDaemon extends React.PureComponent {
render() {
const { quitAndLaunchDaemonHelp } = this.props;
const { quit } = this.props;
return (
<Modal
isOpen={true}
contentLabel={__("Incompatible daemon running")}
type="alert"
confirmButtonLabel={__("Quit and Learn More")}
onConfirmed={quitAndLaunchDaemonHelp}
confirmButtonLabel={__("Quit")}
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>
);
}