Merge pull request #411 from hackrush01/quickfix
(quickfix) Now displays quit button in IncompatibleDaemonModal.
This commit is contained in:
commit
c2c910ba9f
3 changed files with 11 additions and 8 deletions
|
@ -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();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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);
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue