(quickfix) Now displays quit button in IncompatibleDaemonModal. #411

Merged
hackrush01 merged 1 commit from quickfix into master 2017-08-01 15:23:58 +02:00
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";
hackrush01 commented 2017-07-31 17:13:07 +02:00 (Migrated from github.com)
Review

Is this doSkipWrongDaemonNotice required to be here? I could not find the corresponding command in actions/app.

Is this `doSkipWrongDaemonNotice` required to be here? I could not find the corresponding command in `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>
); );
} }