Check if daemon version is greater than or equal to recommended, and modal edit. #378

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

View file

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

View file

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

View file

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