(quickfix) Now displays two buttons in IncompatibleDaemonModal. #405

Closed
hackrush01 wants to merge 1 commit from quickfix into master
3 changed files with 16 additions and 7 deletions
Showing only changes of commit 2085540899 - Show all commits

View file

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

View file

@ -1,13 +1,14 @@
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 { doLaunchDaemonHelp } 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()),
launchDaemonHelp: () => dispatch(doLaunchDaemonHelp()),
}); });
export default connect(select, perform)(ModalIncompatibleDaemon); export default connect(select, perform)(ModalIncompatibleDaemon);

View file

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